/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool
365 by Suren A. Chilingaryan
Restructure driver headers
1
#ifndef _PCIDRIVER_UMEM_H
2
#define _PCIDRIVER_UMEM_H
3
4
#include <linux/sysfs.h>
5
6
#include "ioctl.h"
7
8
/* Define an entry in the umem list (this list is per device) */
9
/* This list keeps references to the SG lists for each mapped userspace region */
10
typedef struct {
11
    int id;
12
    struct list_head list;
13
    unsigned int nr_pages;		/* number of pages for this user memeory area */
14
    struct page **pages;		/* list of pointers to the pages */
15
    unsigned int nents;			/* actual entries in the scatter/gatter list (NOT nents for the map function, but the result) */
16
    struct scatterlist *sg;		/* list of sg entries */
17
    struct device_attribute sysfs_attr;	/* initialized when adding the entry */
18
} pcidriver_umem_entry_t;
19
1 by Suren A. Chilingaryan
Initial import
20
int pcidriver_umem_sgmap( pcidriver_privdata_t *privdata, umem_handle_t *umem_handle );
21
int pcidriver_umem_sgunmap( pcidriver_privdata_t *privdata, pcidriver_umem_entry_t *umem_entry );
22
int pcidriver_umem_sgget( pcidriver_privdata_t *privdata, umem_sglist_t *umem_sglist );
23
int pcidriver_umem_sync( pcidriver_privdata_t *privdata, umem_handle_t *umem_handle );
24
pcidriver_umem_entry_t *pcidriver_umem_find_entry_id( pcidriver_privdata_t *privdata, int id );
365 by Suren A. Chilingaryan
Restructure driver headers
25
26
#endif /* _PCIDRIVER_UMEM_H */