~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#define HIF_MBOX2_BLOCK_SIZE               HIF_MBOX_BLOCK_SIZE
48
48
#define HIF_MBOX3_BLOCK_SIZE               HIF_MBOX_BLOCK_SIZE
49
49
 
50
 
struct _HIF_SCATTER_REQ_PRIV;
51
 
 
52
50
typedef struct bus_request {
53
51
    struct bus_request *next;       /* link list of available requests */
54
52
    struct bus_request *inusenext;  /* link list of in use requests */
55
53
    struct semaphore sem_req;
56
 
    A_UINT32 address;               /* request data */
57
 
    A_UCHAR *buffer;
58
 
    A_UINT32 length;
59
 
    A_UINT32 request;
 
54
    u32 address;               /* request data */
 
55
    u8 *buffer;
 
56
    u32 length;
 
57
    u32 request;
60
58
    void *context;
61
 
    A_STATUS status;
62
 
    struct _HIF_SCATTER_REQ_PRIV *pScatterReq;      /* this request is a scatter request */
 
59
    int status;
 
60
    struct hif_scatter_req_priv *pScatterReq;      /* this request is a scatter request */
63
61
} BUS_REQUEST;
64
62
 
65
63
struct hif_device {
76
74
    BUS_REQUEST busRequest[BUS_REQUEST_MAX_NUM]; /* available bus requests */
77
75
    void     *claimedContext;
78
76
    HTC_CALLBACKS htcCallbacks;
79
 
    A_UINT8     *dma_buffer;
80
 
    DL_LIST      ScatterReqHead;                /* scatter request list head */
81
 
    A_BOOL       scatter_enabled;               /* scatter enabled flag */
82
 
    A_BOOL   is_suspend;
83
 
    A_BOOL   is_disabled;
 
77
    u8 *dma_buffer;
 
78
    struct dl_list      ScatterReqHead;                /* scatter request list head */
 
79
    bool       scatter_enabled;               /* scatter enabled flag */
 
80
    bool   is_suspend;
 
81
    bool   is_disabled;
84
82
    atomic_t   irqHandling;
85
83
    HIF_DEVICE_POWER_CHANGE_TYPE powerConfig;
86
84
    const struct sdio_device_id *id;
90
88
#define CMD53_FIXED_ADDRESS 1
91
89
#define CMD53_INCR_ADDRESS  2
92
90
 
93
 
BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device);
94
 
void hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest);
95
 
void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);
 
91
BUS_REQUEST *hifAllocateBusRequest(struct hif_device *device);
 
92
void hifFreeBusRequest(struct hif_device *device, BUS_REQUEST *busrequest);
 
93
void AddToAsyncList(struct hif_device *device, BUS_REQUEST *busrequest);
96
94
 
97
95
#ifdef HIF_LINUX_MMC_SCATTER_SUPPORT
98
96
 
100
98
#define MAX_SCATTER_ENTRIES_PER_REQ      16
101
99
#define MAX_SCATTER_REQ_TRANSFER_SIZE    32*1024
102
100
 
103
 
typedef struct _HIF_SCATTER_REQ_PRIV {
104
 
    HIF_SCATTER_REQ     *pHifScatterReq;  /* HIF scatter request with allocated entries */   
105
 
    HIF_DEVICE          *device;          /* this device */
 
101
struct hif_scatter_req_priv {
 
102
    struct hif_scatter_req     *pHifScatterReq;  /* HIF scatter request with allocated entries */   
 
103
    struct hif_device          *device;          /* this device */
106
104
    BUS_REQUEST         *busrequest;      /* request associated with request */
107
105
        /* scatter list for linux */    
108
106
    struct scatterlist  sgentries[MAX_SCATTER_ENTRIES_PER_REQ];   
109
 
} HIF_SCATTER_REQ_PRIV;
 
107
};
110
108
 
111
109
#define ATH_DEBUG_SCATTER  ATH_DEBUG_MAKE_MODULE_MASK(0)
112
110
 
113
 
A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo);
114
 
void CleanupHIFScatterResources(HIF_DEVICE *device);
115
 
A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest);
 
111
int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo);
 
112
void CleanupHIFScatterResources(struct hif_device *device);
 
113
int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest);
116
114
 
117
115
#else  // HIF_LINUX_MMC_SCATTER_SUPPORT
118
116
 
119
 
static inline A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo) 
 
117
static inline int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo)
120
118
{
121
119
    return A_ENOTSUP;
122
120
}
123
121
 
124
 
static inline A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) 
 
122
static inline int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest)
125
123
{
126
124
    return A_ENOTSUP;
127
125
}