diff options
Diffstat (limited to 'drivers/usb/wusbcore')
-rw-r--r-- | drivers/usb/wusbcore/Makefile | 19 | ||||
-rw-r--r-- | drivers/usb/wusbcore/crypto.c | 4 | ||||
-rw-r--r-- | drivers/usb/wusbcore/reservation.c | 2 | ||||
-rw-r--r-- | drivers/usb/wusbcore/rh.c | 8 | ||||
-rw-r--r-- | drivers/usb/wusbcore/wa-rpipe.c | 4 | ||||
-rw-r--r-- | drivers/usb/wusbcore/wa-xfer.c | 8 | ||||
-rw-r--r-- | drivers/usb/wusbcore/wusbhc.c | 2 | ||||
-rw-r--r-- | drivers/usb/wusbcore/wusbhc.h | 4 |
8 files changed, 25 insertions, 26 deletions
diff --git a/drivers/usb/wusbcore/Makefile b/drivers/usb/wusbcore/Makefile index 75f1ade66258..b3bd313032b1 100644 --- a/drivers/usb/wusbcore/Makefile +++ b/drivers/usb/wusbcore/Makefile | |||
@@ -1,9 +1,11 @@ | |||
1 | ccflags-$(CONFIG_USB_WUSB_CBAF_DEBUG) := -DDEBUG | ||
2 | |||
1 | obj-$(CONFIG_USB_WUSB) += wusbcore.o | 3 | obj-$(CONFIG_USB_WUSB) += wusbcore.o |
2 | obj-$(CONFIG_USB_HWA_HCD) += wusb-wa.o | 4 | obj-$(CONFIG_USB_HWA_HCD) += wusb-wa.o |
3 | obj-$(CONFIG_USB_WUSB_CBAF) += wusb-cbaf.o | 5 | obj-$(CONFIG_USB_WUSB_CBAF) += wusb-cbaf.o |
4 | 6 | ||
5 | 7 | ||
6 | wusbcore-objs := \ | 8 | wusbcore-y := \ |
7 | crypto.o \ | 9 | crypto.o \ |
8 | devconnect.o \ | 10 | devconnect.o \ |
9 | dev-sysfs.o \ | 11 | dev-sysfs.o \ |
@@ -14,13 +16,10 @@ wusbcore-objs := \ | |||
14 | security.o \ | 16 | security.o \ |
15 | wusbhc.o | 17 | wusbhc.o |
16 | 18 | ||
17 | wusb-cbaf-objs := cbaf.o | 19 | wusb-cbaf-y := cbaf.o |
18 | |||
19 | wusb-wa-objs := wa-hc.o \ | ||
20 | wa-nep.o \ | ||
21 | wa-rpipe.o \ | ||
22 | wa-xfer.o | ||
23 | 20 | ||
24 | ifeq ($(CONFIG_USB_WUSB_CBAF_DEBUG),y) | 21 | wusb-wa-y := \ |
25 | EXTRA_CFLAGS += -DDEBUG | 22 | wa-hc.o \ |
26 | endif | 23 | wa-nep.o \ |
24 | wa-rpipe.o \ | ||
25 | wa-xfer.o | ||
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c index 827c87f10cc5..7e4bf95f8f7b 100644 --- a/drivers/usb/wusbcore/crypto.c +++ b/drivers/usb/wusbcore/crypto.c | |||
@@ -180,7 +180,7 @@ static void bytewise_xor(void *_bo, const void *_bi1, const void *_bi2, | |||
180 | * using the 14 bytes of @a to fill up | 180 | * using the 14 bytes of @a to fill up |
181 | * b1.{mac_header,e0,security_reserved,padding}. | 181 | * b1.{mac_header,e0,security_reserved,padding}. |
182 | * | 182 | * |
183 | * NOTE: The definiton of l(a) in WUSB1.0[6.5] vs the definition of | 183 | * NOTE: The definition of l(a) in WUSB1.0[6.5] vs the definition of |
184 | * l(m) is orthogonal, they bear no relationship, so it is not | 184 | * l(m) is orthogonal, they bear no relationship, so it is not |
185 | * in conflict with the parameter's relation that | 185 | * in conflict with the parameter's relation that |
186 | * WUSB1.0[6.4.2]) defines. | 186 | * WUSB1.0[6.4.2]) defines. |
@@ -272,7 +272,7 @@ static int wusb_ccm_mac(struct crypto_blkcipher *tfm_cbc, | |||
272 | 272 | ||
273 | /* Now we crypt the MIC Tag (*iv) with Ax -- values per WUSB1.0[6.5] | 273 | /* Now we crypt the MIC Tag (*iv) with Ax -- values per WUSB1.0[6.5] |
274 | * The procedure is to AES crypt the A0 block and XOR the MIC | 274 | * The procedure is to AES crypt the A0 block and XOR the MIC |
275 | * Tag agains it; we only do the first 8 bytes and place it | 275 | * Tag against it; we only do the first 8 bytes and place it |
276 | * directly in the destination buffer. | 276 | * directly in the destination buffer. |
277 | * | 277 | * |
278 | * POS Crypto API: size is assumed to be AES's block size. | 278 | * POS Crypto API: size is assumed to be AES's block size. |
diff --git a/drivers/usb/wusbcore/reservation.c b/drivers/usb/wusbcore/reservation.c index 4ed97360c046..6f4fafdc2401 100644 --- a/drivers/usb/wusbcore/reservation.c +++ b/drivers/usb/wusbcore/reservation.c | |||
@@ -71,7 +71,7 @@ static void wusbhc_rsv_complete_cb(struct uwb_rsv *rsv) | |||
71 | 71 | ||
72 | /** | 72 | /** |
73 | * wusbhc_rsv_establish - establish a reservation for the cluster | 73 | * wusbhc_rsv_establish - establish a reservation for the cluster |
74 | * @wusbhc: the WUSB HC requesting a bandwith reservation | 74 | * @wusbhc: the WUSB HC requesting a bandwidth reservation |
75 | */ | 75 | */ |
76 | int wusbhc_rsv_establish(struct wusbhc *wusbhc) | 76 | int wusbhc_rsv_establish(struct wusbhc *wusbhc) |
77 | { | 77 | { |
diff --git a/drivers/usb/wusbcore/rh.c b/drivers/usb/wusbcore/rh.c index a68ad7aa0b59..39de3900ad20 100644 --- a/drivers/usb/wusbcore/rh.c +++ b/drivers/usb/wusbcore/rh.c | |||
@@ -133,7 +133,7 @@ static int wusbhc_rh_port_reset(struct wusbhc *wusbhc, u8 port_idx) | |||
133 | * big of a problem [and we can't make it an spinlock | 133 | * big of a problem [and we can't make it an spinlock |
134 | * because other parts need to take it and sleep] . | 134 | * because other parts need to take it and sleep] . |
135 | * | 135 | * |
136 | * @usb_hcd is refcounted, so it won't dissapear under us | 136 | * @usb_hcd is refcounted, so it won't disappear under us |
137 | * and before killing a host, the polling of the root hub | 137 | * and before killing a host, the polling of the root hub |
138 | * would be stopped anyway. | 138 | * would be stopped anyway. |
139 | */ | 139 | */ |
@@ -156,7 +156,7 @@ int wusbhc_rh_status_data(struct usb_hcd *usb_hcd, char *_buf) | |||
156 | EXPORT_SYMBOL_GPL(wusbhc_rh_status_data); | 156 | EXPORT_SYMBOL_GPL(wusbhc_rh_status_data); |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * Return the hub's desciptor | 159 | * Return the hub's descriptor |
160 | * | 160 | * |
161 | * NOTE: almost cut and paste from ehci-hub.c | 161 | * NOTE: almost cut and paste from ehci-hub.c |
162 | * | 162 | * |
@@ -184,8 +184,8 @@ static int wusbhc_rh_get_hub_descr(struct wusbhc *wusbhc, u16 wValue, | |||
184 | descr->bPwrOn2PwrGood = 0; | 184 | descr->bPwrOn2PwrGood = 0; |
185 | descr->bHubContrCurrent = 0; | 185 | descr->bHubContrCurrent = 0; |
186 | /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */ | 186 | /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */ |
187 | memset(&descr->bitmap[0], 0, temp); | 187 | memset(&descr->u.hs.DeviceRemovable[0], 0, temp); |
188 | memset(&descr->bitmap[temp], 0xff, temp); | 188 | memset(&descr->u.hs.DeviceRemovable[temp], 0xff, temp); |
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpipe.c index c7b1d8108de9..ca80171f42c6 100644 --- a/drivers/usb/wusbcore/wa-rpipe.c +++ b/drivers/usb/wusbcore/wa-rpipe.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * | 24 | * |
25 | * RPIPE | 25 | * RPIPE |
26 | * | 26 | * |
27 | * Targetted at different downstream endpoints | 27 | * Targeted at different downstream endpoints |
28 | * | 28 | * |
29 | * Descriptor: use to config the remote pipe. | 29 | * Descriptor: use to config the remote pipe. |
30 | * | 30 | * |
@@ -49,7 +49,7 @@ | |||
49 | * | 49 | * |
50 | * USB Stack port number 4 (1 based) | 50 | * USB Stack port number 4 (1 based) |
51 | * WUSB code port index 3 (0 based) | 51 | * WUSB code port index 3 (0 based) |
52 | * USB Addresss 5 (2 based -- 0 is for default, 1 for root hub) | 52 | * USB Address 5 (2 based -- 0 is for default, 1 for root hub) |
53 | * | 53 | * |
54 | * Now, because we don't use the concept as default address exactly | 54 | * Now, because we don't use the concept as default address exactly |
55 | * like the (wired) USB code does, we need to kind of skip it. So we | 55 | * like the (wired) USB code does, we need to kind of skip it. So we |
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c index 84b744c428a4..6ccd93a9b909 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c | |||
@@ -61,7 +61,7 @@ | |||
61 | * | 61 | * |
62 | * Two methods it could be done: | 62 | * Two methods it could be done: |
63 | * | 63 | * |
64 | * (a) set up a timer everytime an rpipe's use count drops to 1 | 64 | * (a) set up a timer every time an rpipe's use count drops to 1 |
65 | * (which means unused) or when a transfer ends. Reset the | 65 | * (which means unused) or when a transfer ends. Reset the |
66 | * timer when a xfer is queued. If the timer expires, release | 66 | * timer when a xfer is queued. If the timer expires, release |
67 | * the rpipe [see rpipe_ep_disable()]. | 67 | * the rpipe [see rpipe_ep_disable()]. |
@@ -140,7 +140,7 @@ struct wa_xfer { | |||
140 | 140 | ||
141 | struct wahc *wa; /* Wire adapter we are plugged to */ | 141 | struct wahc *wa; /* Wire adapter we are plugged to */ |
142 | struct usb_host_endpoint *ep; | 142 | struct usb_host_endpoint *ep; |
143 | struct urb *urb; /* URB we are transfering for */ | 143 | struct urb *urb; /* URB we are transferring for */ |
144 | struct wa_seg **seg; /* transfer segments */ | 144 | struct wa_seg **seg; /* transfer segments */ |
145 | u8 segs, segs_submitted, segs_done; | 145 | u8 segs, segs_submitted, segs_done; |
146 | unsigned is_inbound:1; | 146 | unsigned is_inbound:1; |
@@ -161,7 +161,7 @@ static inline void wa_xfer_init(struct wa_xfer *xfer) | |||
161 | } | 161 | } |
162 | 162 | ||
163 | /* | 163 | /* |
164 | * Destory a transfer structure | 164 | * Destroy a transfer structure |
165 | * | 165 | * |
166 | * Note that the xfer->seg[index] thingies follow the URB life cycle, | 166 | * Note that the xfer->seg[index] thingies follow the URB life cycle, |
167 | * so we need to put them, not free them. | 167 | * so we need to put them, not free them. |
@@ -494,7 +494,7 @@ static void __wa_xfer_setup_hdr0(struct wa_xfer *xfer, | |||
494 | * function does almost the same thing and they work closely | 494 | * function does almost the same thing and they work closely |
495 | * together. | 495 | * together. |
496 | * | 496 | * |
497 | * If the seg request has failed but this DTO phase has suceeded, | 497 | * If the seg request has failed but this DTO phase has succeeded, |
498 | * wa_seg_cb() has already failed the segment and moved the | 498 | * wa_seg_cb() has already failed the segment and moved the |
499 | * status to WA_SEG_ERROR, so this will go through 'case 0' and | 499 | * status to WA_SEG_ERROR, so this will go through 'case 0' and |
500 | * effectively do nothing. | 500 | * effectively do nothing. |
diff --git a/drivers/usb/wusbcore/wusbhc.c b/drivers/usb/wusbcore/wusbhc.c index 2054d4ee9774..0faca16df765 100644 --- a/drivers/usb/wusbcore/wusbhc.c +++ b/drivers/usb/wusbcore/wusbhc.c | |||
@@ -320,7 +320,7 @@ u8 wusb_cluster_id_get(void) | |||
320 | u8 id; | 320 | u8 id; |
321 | spin_lock(&wusb_cluster_ids_lock); | 321 | spin_lock(&wusb_cluster_ids_lock); |
322 | id = find_first_zero_bit(wusb_cluster_id_table, CLUSTER_IDS); | 322 | id = find_first_zero_bit(wusb_cluster_id_table, CLUSTER_IDS); |
323 | if (id > CLUSTER_IDS) { | 323 | if (id >= CLUSTER_IDS) { |
324 | id = 0; | 324 | id = 0; |
325 | goto out; | 325 | goto out; |
326 | } | 326 | } |
diff --git a/drivers/usb/wusbcore/wusbhc.h b/drivers/usb/wusbcore/wusbhc.h index 3d94c4247f46..3a2d09162e70 100644 --- a/drivers/usb/wusbcore/wusbhc.h +++ b/drivers/usb/wusbcore/wusbhc.h | |||
@@ -132,7 +132,7 @@ static inline void wusb_dev_put(struct wusb_dev *wusb_dev) | |||
132 | } | 132 | } |
133 | 133 | ||
134 | /** | 134 | /** |
135 | * Wireless USB Host Controlller root hub "fake" ports | 135 | * Wireless USB Host Controller root hub "fake" ports |
136 | * (state and device information) | 136 | * (state and device information) |
137 | * | 137 | * |
138 | * Wireless USB is wireless, so there are no ports; but we | 138 | * Wireless USB is wireless, so there are no ports; but we |
@@ -231,7 +231,7 @@ struct wusb_port { | |||
231 | * | 231 | * |
232 | * Most of the times when you need to use it, it will be non-NULL, | 232 | * Most of the times when you need to use it, it will be non-NULL, |
233 | * so there is no real need to check for it (wusb_dev will | 233 | * so there is no real need to check for it (wusb_dev will |
234 | * dissapear before usb_dev). | 234 | * disappear before usb_dev). |
235 | * | 235 | * |
236 | * - The following fields need to be filled out before calling | 236 | * - The following fields need to be filled out before calling |
237 | * wusbhc_create(): ports_max, mmcies_max, mmcie_{add,rm}. | 237 | * wusbhc_create(): ports_max, mmcies_max, mmcie_{add,rm}. |