diff options
| -rw-r--r-- | drivers/usb/core/hcd.h | 90 | ||||
| -rw-r--r-- | drivers/usb/core/hub.h | 18 | ||||
| -rw-r--r-- | drivers/usb/core/otg_whitelist.h | 6 | ||||
| -rw-r--r-- | drivers/usb/core/usb.h | 21 |
4 files changed, 68 insertions, 67 deletions
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h index 0095641c51fa..2d1c3d5e47b8 100644 --- a/drivers/usb/core/hcd.h +++ b/drivers/usb/core/hcd.h | |||
| @@ -125,7 +125,7 @@ struct usb_hcd { | |||
| 125 | 125 | ||
| 126 | /* more shared queuing code would be good; it should support | 126 | /* more shared queuing code would be good; it should support |
| 127 | * smarter scheduling, handle transaction translators, etc; | 127 | * smarter scheduling, handle transaction translators, etc; |
| 128 | * input size of periodic table to an interrupt scheduler. | 128 | * input size of periodic table to an interrupt scheduler. |
| 129 | * (ohci 32, uhci 1024, ehci 256/512/1024). | 129 | * (ohci 32, uhci 1024, ehci 256/512/1024). |
| 130 | */ | 130 | */ |
| 131 | 131 | ||
| @@ -133,16 +133,16 @@ struct usb_hcd { | |||
| 133 | * this structure. | 133 | * this structure. |
| 134 | */ | 134 | */ |
| 135 | unsigned long hcd_priv[0] | 135 | unsigned long hcd_priv[0] |
| 136 | __attribute__ ((aligned (sizeof(unsigned long)))); | 136 | __attribute__ ((aligned(sizeof(unsigned long)))); |
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | /* 2.4 does this a bit differently ... */ | 139 | /* 2.4 does this a bit differently ... */ |
| 140 | static inline struct usb_bus *hcd_to_bus (struct usb_hcd *hcd) | 140 | static inline struct usb_bus *hcd_to_bus(struct usb_hcd *hcd) |
| 141 | { | 141 | { |
| 142 | return &hcd->self; | 142 | return &hcd->self; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | static inline struct usb_hcd *bus_to_hcd (struct usb_bus *bus) | 145 | static inline struct usb_hcd *bus_to_hcd(struct usb_bus *bus) |
| 146 | { | 146 | { |
| 147 | return container_of(bus, struct usb_hcd, self); | 147 | return container_of(bus, struct usb_hcd, self); |
| 148 | } | 148 | } |
| @@ -202,18 +202,18 @@ struct hc_driver { | |||
| 202 | struct usb_host_endpoint *ep); | 202 | struct usb_host_endpoint *ep); |
| 203 | 203 | ||
| 204 | /* root hub support */ | 204 | /* root hub support */ |
| 205 | int (*hub_status_data) (struct usb_hcd *hcd, char *buf); | 205 | int (*hub_status_data) (struct usb_hcd *hcd, char *buf); |
| 206 | int (*hub_control) (struct usb_hcd *hcd, | 206 | int (*hub_control) (struct usb_hcd *hcd, |
| 207 | u16 typeReq, u16 wValue, u16 wIndex, | 207 | u16 typeReq, u16 wValue, u16 wIndex, |
| 208 | char *buf, u16 wLength); | 208 | char *buf, u16 wLength); |
| 209 | int (*bus_suspend)(struct usb_hcd *); | 209 | int (*bus_suspend)(struct usb_hcd *); |
| 210 | int (*bus_resume)(struct usb_hcd *); | 210 | int (*bus_resume)(struct usb_hcd *); |
| 211 | int (*start_port_reset)(struct usb_hcd *, unsigned port_num); | 211 | int (*start_port_reset)(struct usb_hcd *, unsigned port_num); |
| 212 | void (*hub_irq_enable)(struct usb_hcd *); | 212 | void (*hub_irq_enable)(struct usb_hcd *); |
| 213 | /* Needed only if port-change IRQs are level-triggered */ | 213 | /* Needed only if port-change IRQs are level-triggered */ |
| 214 | 214 | ||
| 215 | /* force handover of high-speed port to full-speed companion */ | 215 | /* force handover of high-speed port to full-speed companion */ |
| 216 | void (*relinquish_port)(struct usb_hcd *, int); | 216 | void (*relinquish_port)(struct usb_hcd *, int); |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 219 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
| @@ -221,56 +221,56 @@ extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, | |||
| 221 | int status); | 221 | int status); |
| 222 | extern void usb_hcd_unlink_urb_from_ep(struct usb_hcd *hcd, struct urb *urb); | 222 | extern void usb_hcd_unlink_urb_from_ep(struct usb_hcd *hcd, struct urb *urb); |
| 223 | 223 | ||
| 224 | extern int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags); | 224 | extern int usb_hcd_submit_urb(struct urb *urb, gfp_t mem_flags); |
| 225 | extern int usb_hcd_unlink_urb (struct urb *urb, int status); | 225 | extern int usb_hcd_unlink_urb(struct urb *urb, int status); |
| 226 | extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, | 226 | extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, |
| 227 | int status); | 227 | int status); |
| 228 | extern void usb_hcd_flush_endpoint(struct usb_device *udev, | 228 | extern void usb_hcd_flush_endpoint(struct usb_device *udev, |
| 229 | struct usb_host_endpoint *ep); | 229 | struct usb_host_endpoint *ep); |
| 230 | extern void usb_hcd_disable_endpoint(struct usb_device *udev, | 230 | extern void usb_hcd_disable_endpoint(struct usb_device *udev, |
| 231 | struct usb_host_endpoint *ep); | 231 | struct usb_host_endpoint *ep); |
| 232 | extern int usb_hcd_get_frame_number (struct usb_device *udev); | 232 | extern int usb_hcd_get_frame_number(struct usb_device *udev); |
| 233 | 233 | ||
| 234 | extern struct usb_hcd *usb_create_hcd (const struct hc_driver *driver, | 234 | extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, |
| 235 | struct device *dev, char *bus_name); | 235 | struct device *dev, char *bus_name); |
| 236 | extern struct usb_hcd *usb_get_hcd (struct usb_hcd *hcd); | 236 | extern struct usb_hcd *usb_get_hcd(struct usb_hcd *hcd); |
| 237 | extern void usb_put_hcd (struct usb_hcd *hcd); | 237 | extern void usb_put_hcd(struct usb_hcd *hcd); |
| 238 | extern int usb_add_hcd(struct usb_hcd *hcd, | 238 | extern int usb_add_hcd(struct usb_hcd *hcd, |
| 239 | unsigned int irqnum, unsigned long irqflags); | 239 | unsigned int irqnum, unsigned long irqflags); |
| 240 | extern void usb_remove_hcd(struct usb_hcd *hcd); | 240 | extern void usb_remove_hcd(struct usb_hcd *hcd); |
| 241 | 241 | ||
| 242 | struct platform_device; | 242 | struct platform_device; |
| 243 | extern void usb_hcd_platform_shutdown(struct platform_device* dev); | 243 | extern void usb_hcd_platform_shutdown(struct platform_device *dev); |
| 244 | 244 | ||
| 245 | #ifdef CONFIG_PCI | 245 | #ifdef CONFIG_PCI |
| 246 | struct pci_dev; | 246 | struct pci_dev; |
| 247 | struct pci_device_id; | 247 | struct pci_device_id; |
| 248 | extern int usb_hcd_pci_probe (struct pci_dev *dev, | 248 | extern int usb_hcd_pci_probe(struct pci_dev *dev, |
| 249 | const struct pci_device_id *id); | 249 | const struct pci_device_id *id); |
| 250 | extern void usb_hcd_pci_remove (struct pci_dev *dev); | 250 | extern void usb_hcd_pci_remove(struct pci_dev *dev); |
| 251 | 251 | ||
| 252 | #ifdef CONFIG_PM | 252 | #ifdef CONFIG_PM |
| 253 | extern int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t state); | 253 | extern int usb_hcd_pci_suspend(struct pci_dev *dev, pm_message_t state); |
| 254 | extern int usb_hcd_pci_resume (struct pci_dev *dev); | 254 | extern int usb_hcd_pci_resume(struct pci_dev *dev); |
| 255 | #endif /* CONFIG_PM */ | 255 | #endif /* CONFIG_PM */ |
| 256 | 256 | ||
| 257 | extern void usb_hcd_pci_shutdown (struct pci_dev *dev); | 257 | extern void usb_hcd_pci_shutdown(struct pci_dev *dev); |
| 258 | 258 | ||
| 259 | #endif /* CONFIG_PCI */ | 259 | #endif /* CONFIG_PCI */ |
| 260 | 260 | ||
| 261 | /* pci-ish (pdev null is ok) buffer alloc/mapping support */ | 261 | /* pci-ish (pdev null is ok) buffer alloc/mapping support */ |
| 262 | int hcd_buffer_create (struct usb_hcd *hcd); | 262 | int hcd_buffer_create(struct usb_hcd *hcd); |
| 263 | void hcd_buffer_destroy (struct usb_hcd *hcd); | 263 | void hcd_buffer_destroy(struct usb_hcd *hcd); |
| 264 | 264 | ||
| 265 | void *hcd_buffer_alloc (struct usb_bus *bus, size_t size, | 265 | void *hcd_buffer_alloc(struct usb_bus *bus, size_t size, |
| 266 | gfp_t mem_flags, dma_addr_t *dma); | 266 | gfp_t mem_flags, dma_addr_t *dma); |
| 267 | void hcd_buffer_free (struct usb_bus *bus, size_t size, | 267 | void hcd_buffer_free(struct usb_bus *bus, size_t size, |
| 268 | void *addr, dma_addr_t dma); | 268 | void *addr, dma_addr_t dma); |
| 269 | 269 | ||
| 270 | /* generic bus glue, needed for host controllers that don't use PCI */ | 270 | /* generic bus glue, needed for host controllers that don't use PCI */ |
| 271 | extern irqreturn_t usb_hcd_irq (int irq, void *__hcd); | 271 | extern irqreturn_t usb_hcd_irq(int irq, void *__hcd); |
| 272 | 272 | ||
| 273 | extern void usb_hc_died (struct usb_hcd *hcd); | 273 | extern void usb_hc_died(struct usb_hcd *hcd); |
| 274 | extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd); | 274 | extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd); |
| 275 | 275 | ||
| 276 | /* -------------------------------------------------------------------------- */ | 276 | /* -------------------------------------------------------------------------- */ |
| @@ -323,9 +323,9 @@ extern void usb_destroy_configuration(struct usb_device *dev); | |||
| 323 | * Generic bandwidth allocation constants/support | 323 | * Generic bandwidth allocation constants/support |
| 324 | */ | 324 | */ |
| 325 | #define FRAME_TIME_USECS 1000L | 325 | #define FRAME_TIME_USECS 1000L |
| 326 | #define BitTime(bytecount) (7 * 8 * bytecount / 6) /* with integer truncation */ | 326 | #define BitTime(bytecount) (7 * 8 * bytecount / 6) /* with integer truncation */ |
| 327 | /* Trying not to use worst-case bit-stuffing | 327 | /* Trying not to use worst-case bit-stuffing |
| 328 | of (7/6 * 8 * bytecount) = 9.33 * bytecount */ | 328 | * of (7/6 * 8 * bytecount) = 9.33 * bytecount */ |
| 329 | /* bytecount = data payload byte count */ | 329 | /* bytecount = data payload byte count */ |
| 330 | 330 | ||
| 331 | #define NS_TO_US(ns) ((ns + 500L) / 1000L) | 331 | #define NS_TO_US(ns) ((ns + 500L) / 1000L) |
| @@ -337,9 +337,9 @@ extern void usb_destroy_configuration(struct usb_device *dev); | |||
| 337 | */ | 337 | */ |
| 338 | #define BW_HOST_DELAY 1000L /* nanoseconds */ | 338 | #define BW_HOST_DELAY 1000L /* nanoseconds */ |
| 339 | #define BW_HUB_LS_SETUP 333L /* nanoseconds */ | 339 | #define BW_HUB_LS_SETUP 333L /* nanoseconds */ |
| 340 | /* 4 full-speed bit times (est.) */ | 340 | /* 4 full-speed bit times (est.) */ |
| 341 | 341 | ||
| 342 | #define FRAME_TIME_BITS 12000L /* frame = 1 millisecond */ | 342 | #define FRAME_TIME_BITS 12000L /* frame = 1 millisecond */ |
| 343 | #define FRAME_TIME_MAX_BITS_ALLOC (90L * FRAME_TIME_BITS / 100L) | 343 | #define FRAME_TIME_MAX_BITS_ALLOC (90L * FRAME_TIME_BITS / 100L) |
| 344 | #define FRAME_TIME_MAX_USECS_ALLOC (90L * FRAME_TIME_USECS / 100L) | 344 | #define FRAME_TIME_MAX_USECS_ALLOC (90L * FRAME_TIME_USECS / 100L) |
| 345 | 345 | ||
| @@ -349,16 +349,16 @@ extern void usb_destroy_configuration(struct usb_device *dev); | |||
| 349 | * to preallocate bandwidth) | 349 | * to preallocate bandwidth) |
| 350 | */ | 350 | */ |
| 351 | #define USB2_HOST_DELAY 5 /* nsec, guess */ | 351 | #define USB2_HOST_DELAY 5 /* nsec, guess */ |
| 352 | #define HS_NSECS(bytes) ( ((55 * 8 * 2083) \ | 352 | #define HS_NSECS(bytes) (((55 * 8 * 2083) \ |
| 353 | + (2083UL * (3 + BitTime(bytes))))/1000 \ | 353 | + (2083UL * (3 + BitTime(bytes))))/1000 \ |
| 354 | + USB2_HOST_DELAY) | 354 | + USB2_HOST_DELAY) |
| 355 | #define HS_NSECS_ISO(bytes) ( ((38 * 8 * 2083) \ | 355 | #define HS_NSECS_ISO(bytes) (((38 * 8 * 2083) \ |
| 356 | + (2083UL * (3 + BitTime(bytes))))/1000 \ | 356 | + (2083UL * (3 + BitTime(bytes))))/1000 \ |
| 357 | + USB2_HOST_DELAY) | 357 | + USB2_HOST_DELAY) |
| 358 | #define HS_USECS(bytes) NS_TO_US (HS_NSECS(bytes)) | 358 | #define HS_USECS(bytes) NS_TO_US (HS_NSECS(bytes)) |
| 359 | #define HS_USECS_ISO(bytes) NS_TO_US (HS_NSECS_ISO(bytes)) | 359 | #define HS_USECS_ISO(bytes) NS_TO_US (HS_NSECS_ISO(bytes)) |
| 360 | 360 | ||
| 361 | extern long usb_calc_bus_time (int speed, int is_input, | 361 | extern long usb_calc_bus_time(int speed, int is_input, |
| 362 | int isoc, int bytecount); | 362 | int isoc, int bytecount); |
| 363 | 363 | ||
| 364 | /*-------------------------------------------------------------------------*/ | 364 | /*-------------------------------------------------------------------------*/ |
| @@ -374,16 +374,16 @@ extern struct list_head usb_bus_list; | |||
| 374 | extern struct mutex usb_bus_list_lock; | 374 | extern struct mutex usb_bus_list_lock; |
| 375 | extern wait_queue_head_t usb_kill_urb_queue; | 375 | extern wait_queue_head_t usb_kill_urb_queue; |
| 376 | 376 | ||
| 377 | extern void usb_enable_root_hub_irq (struct usb_bus *bus); | 377 | extern void usb_enable_root_hub_irq(struct usb_bus *bus); |
| 378 | 378 | ||
| 379 | extern int usb_find_interface_driver (struct usb_device *dev, | 379 | extern int usb_find_interface_driver(struct usb_device *dev, |
| 380 | struct usb_interface *interface); | 380 | struct usb_interface *interface); |
| 381 | 381 | ||
| 382 | #define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN)) | 382 | #define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN)) |
| 383 | 383 | ||
| 384 | #ifdef CONFIG_PM | 384 | #ifdef CONFIG_PM |
| 385 | extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd); | 385 | extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd); |
| 386 | extern void usb_root_hub_lost_power (struct usb_device *rhdev); | 386 | extern void usb_root_hub_lost_power(struct usb_device *rhdev); |
| 387 | extern int hcd_bus_suspend(struct usb_device *rhdev); | 387 | extern int hcd_bus_suspend(struct usb_device *rhdev); |
| 388 | extern int hcd_bus_resume(struct usb_device *rhdev); | 388 | extern int hcd_bus_resume(struct usb_device *rhdev); |
| 389 | #else | 389 | #else |
| @@ -403,13 +403,13 @@ static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) | |||
| 403 | * these are expected to be called from the USB core/hub thread | 403 | * these are expected to be called from the USB core/hub thread |
| 404 | * with the kernel lock held | 404 | * with the kernel lock held |
| 405 | */ | 405 | */ |
| 406 | extern void usbfs_update_special (void); | 406 | extern void usbfs_update_special(void); |
| 407 | extern int usbfs_init(void); | 407 | extern int usbfs_init(void); |
| 408 | extern void usbfs_cleanup(void); | 408 | extern void usbfs_cleanup(void); |
| 409 | 409 | ||
| 410 | #else /* CONFIG_USB_DEVICEFS */ | 410 | #else /* CONFIG_USB_DEVICEFS */ |
| 411 | 411 | ||
| 412 | static inline void usbfs_update_special (void) {} | 412 | static inline void usbfs_update_special(void) {} |
| 413 | static inline int usbfs_init(void) { return 0; } | 413 | static inline int usbfs_init(void) { return 0; } |
| 414 | static inline void usbfs_cleanup(void) { } | 414 | static inline void usbfs_cleanup(void) { } |
| 415 | 415 | ||
| @@ -464,7 +464,7 @@ static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb, | |||
| 464 | /*-------------------------------------------------------------------------*/ | 464 | /*-------------------------------------------------------------------------*/ |
| 465 | 465 | ||
| 466 | /* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */ | 466 | /* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */ |
| 467 | // bleech -- resurfaced in 2.4.11 or 2.4.12 | 467 | /* bleech -- resurfaced in 2.4.11 or 2.4.12 */ |
| 468 | #define bitmap DeviceRemovable | 468 | #define bitmap DeviceRemovable |
| 469 | 469 | ||
| 470 | 470 | ||
| @@ -472,8 +472,8 @@ static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb, | |||
| 472 | 472 | ||
| 473 | /* random stuff */ | 473 | /* random stuff */ |
| 474 | 474 | ||
| 475 | #define RUN_CONTEXT (in_irq () ? "in_irq" \ | 475 | #define RUN_CONTEXT (in_irq() ? "in_irq" \ |
| 476 | : (in_interrupt () ? "in_interrupt" : "can sleep")) | 476 | : (in_interrupt() ? "in_interrupt" : "can sleep")) |
| 477 | 477 | ||
| 478 | 478 | ||
| 479 | /* This rwsem is for use only by the hub driver and ehci-hcd. | 479 | /* This rwsem is for use only by the hub driver and ehci-hcd. |
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index cf9559c6c9b6..1551aed65e05 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h | |||
| @@ -55,16 +55,16 @@ | |||
| 55 | #define USB_PORT_FEAT_TEST 21 | 55 | #define USB_PORT_FEAT_TEST 21 |
| 56 | #define USB_PORT_FEAT_INDICATOR 22 | 56 | #define USB_PORT_FEAT_INDICATOR 22 |
| 57 | 57 | ||
| 58 | /* | 58 | /* |
| 59 | * Hub Status and Hub Change results | 59 | * Hub Status and Hub Change results |
| 60 | * See USB 2.0 spec Table 11-19 and Table 11-20 | 60 | * See USB 2.0 spec Table 11-19 and Table 11-20 |
| 61 | */ | 61 | */ |
| 62 | struct usb_port_status { | 62 | struct usb_port_status { |
| 63 | __le16 wPortStatus; | 63 | __le16 wPortStatus; |
| 64 | __le16 wPortChange; | 64 | __le16 wPortChange; |
| 65 | } __attribute__ ((packed)); | 65 | } __attribute__ ((packed)); |
| 66 | 66 | ||
| 67 | /* | 67 | /* |
| 68 | * wPortStatus bit field | 68 | * wPortStatus bit field |
| 69 | * See USB 2.0 spec Table 11-21 | 69 | * See USB 2.0 spec Table 11-21 |
| 70 | */ | 70 | */ |
| @@ -81,7 +81,7 @@ struct usb_port_status { | |||
| 81 | #define USB_PORT_STAT_INDICATOR 0x1000 | 81 | #define USB_PORT_STAT_INDICATOR 0x1000 |
| 82 | /* bits 13 to 15 are reserved */ | 82 | /* bits 13 to 15 are reserved */ |
| 83 | 83 | ||
| 84 | /* | 84 | /* |
| 85 | * wPortChange bit field | 85 | * wPortChange bit field |
| 86 | * See USB 2.0 spec Table 11-22 | 86 | * See USB 2.0 spec Table 11-22 |
| 87 | * Bits 0 to 4 shown, bits 5 to 15 are reserved | 87 | * Bits 0 to 4 shown, bits 5 to 15 are reserved |
| @@ -93,7 +93,7 @@ struct usb_port_status { | |||
| 93 | #define USB_PORT_STAT_C_RESET 0x0010 | 93 | #define USB_PORT_STAT_C_RESET 0x0010 |
| 94 | 94 | ||
| 95 | /* | 95 | /* |
| 96 | * wHubCharacteristics (masks) | 96 | * wHubCharacteristics (masks) |
| 97 | * See USB 2.0 spec Table 11-13, offset 3 | 97 | * See USB 2.0 spec Table 11-13, offset 3 |
| 98 | */ | 98 | */ |
| 99 | #define HUB_CHAR_LPSM 0x0003 /* D1 .. D0 */ | 99 | #define HUB_CHAR_LPSM 0x0003 /* D1 .. D0 */ |
| @@ -119,8 +119,8 @@ struct usb_hub_status { | |||
| 119 | #define HUB_CHANGE_OVERCURRENT 0x0002 | 119 | #define HUB_CHANGE_OVERCURRENT 0x0002 |
| 120 | 120 | ||
| 121 | 121 | ||
| 122 | /* | 122 | /* |
| 123 | * Hub descriptor | 123 | * Hub descriptor |
| 124 | * See USB 2.0 spec Table 11-13 | 124 | * See USB 2.0 spec Table 11-13 |
| 125 | */ | 125 | */ |
| 126 | 126 | ||
| @@ -134,7 +134,7 @@ struct usb_hub_descriptor { | |||
| 134 | __le16 wHubCharacteristics; | 134 | __le16 wHubCharacteristics; |
| 135 | __u8 bPwrOn2PwrGood; | 135 | __u8 bPwrOn2PwrGood; |
| 136 | __u8 bHubContrCurrent; | 136 | __u8 bHubContrCurrent; |
| 137 | /* add 1 bit for hub status change; round to bytes */ | 137 | /* add 1 bit for hub status change; round to bytes */ |
| 138 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; | 138 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; |
| 139 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; | 139 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; |
| 140 | } __attribute__ ((packed)); | 140 | } __attribute__ ((packed)); |
| @@ -190,6 +190,6 @@ struct usb_tt_clear { | |||
| 190 | u16 devinfo; | 190 | u16 devinfo; |
| 191 | }; | 191 | }; |
| 192 | 192 | ||
| 193 | extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe); | 193 | extern void usb_hub_tt_clear_buffer(struct usb_device *dev, int pipe); |
| 194 | 194 | ||
| 195 | #endif /* __LINUX_HUB_H */ | 195 | #endif /* __LINUX_HUB_H */ |
diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h index 7f31a495a25d..e8cdce571bb1 100644 --- a/drivers/usb/core/otg_whitelist.h +++ b/drivers/usb/core/otg_whitelist.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * mostly use of USB_DEVICE() or USB_DEVICE_VER() entries.. | 14 | * mostly use of USB_DEVICE() or USB_DEVICE_VER() entries.. |
| 15 | * | 15 | * |
| 16 | * YOU _SHOULD_ CHANGE THIS LIST TO MATCH YOUR PRODUCT AND ITS TESTING! | 16 | * YOU _SHOULD_ CHANGE THIS LIST TO MATCH YOUR PRODUCT AND ITS TESTING! |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | static struct usb_device_id whitelist_table [] = { | 19 | static struct usb_device_id whitelist_table [] = { |
| 20 | 20 | ||
| @@ -55,7 +55,7 @@ static int is_targeted(struct usb_device *dev) | |||
| 55 | return 1; | 55 | return 1; |
| 56 | 56 | ||
| 57 | /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */ | 57 | /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */ |
| 58 | if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && | 58 | if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && |
| 59 | le16_to_cpu(dev->descriptor.idProduct) == 0xbadd)) | 59 | le16_to_cpu(dev->descriptor.idProduct) == 0xbadd)) |
| 60 | return 0; | 60 | return 0; |
| 61 | 61 | ||
| @@ -86,7 +86,7 @@ static int is_targeted(struct usb_device *dev) | |||
| 86 | continue; | 86 | continue; |
| 87 | 87 | ||
| 88 | if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && | 88 | if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && |
| 89 | (id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass)) | 89 | (id->bDeviceSubClass != dev->descriptor.bDeviceSubClass)) |
| 90 | continue; | 90 | continue; |
| 91 | 91 | ||
| 92 | if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && | 92 | if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && |
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index c52626c51f70..2375194a9d43 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
| @@ -1,22 +1,23 @@ | |||
| 1 | /* Functions local to drivers/usb/core/ */ | 1 | /* Functions local to drivers/usb/core/ */ |
| 2 | 2 | ||
| 3 | extern int usb_create_sysfs_dev_files (struct usb_device *dev); | 3 | extern int usb_create_sysfs_dev_files(struct usb_device *dev); |
| 4 | extern void usb_remove_sysfs_dev_files (struct usb_device *dev); | 4 | extern void usb_remove_sysfs_dev_files(struct usb_device *dev); |
| 5 | extern int usb_create_sysfs_intf_files (struct usb_interface *intf); | 5 | extern int usb_create_sysfs_intf_files(struct usb_interface *intf); |
| 6 | extern void usb_remove_sysfs_intf_files (struct usb_interface *intf); | 6 | extern void usb_remove_sysfs_intf_files(struct usb_interface *intf); |
| 7 | extern int usb_create_ep_files(struct device *parent, struct usb_host_endpoint *endpoint, | 7 | extern int usb_create_ep_files(struct device *parent, |
| 8 | struct usb_host_endpoint *endpoint, | ||
| 8 | struct usb_device *udev); | 9 | struct usb_device *udev); |
| 9 | extern void usb_remove_ep_files(struct usb_host_endpoint *endpoint); | 10 | extern void usb_remove_ep_files(struct usb_host_endpoint *endpoint); |
| 10 | 11 | ||
| 11 | extern void usb_enable_endpoint(struct usb_device *dev, | 12 | extern void usb_enable_endpoint(struct usb_device *dev, |
| 12 | struct usb_host_endpoint *ep); | 13 | struct usb_host_endpoint *ep); |
| 13 | extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr); | 14 | extern void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr); |
| 14 | extern void usb_disable_interface (struct usb_device *dev, | 15 | extern void usb_disable_interface(struct usb_device *dev, |
| 15 | struct usb_interface *intf); | 16 | struct usb_interface *intf); |
| 16 | extern void usb_release_interface_cache(struct kref *ref); | 17 | extern void usb_release_interface_cache(struct kref *ref); |
| 17 | extern void usb_disable_device (struct usb_device *dev, int skip_ep0); | 18 | extern void usb_disable_device(struct usb_device *dev, int skip_ep0); |
| 18 | extern int usb_deauthorize_device (struct usb_device *); | 19 | extern int usb_deauthorize_device(struct usb_device *); |
| 19 | extern int usb_authorize_device (struct usb_device *); | 20 | extern int usb_authorize_device(struct usb_device *); |
| 20 | extern void usb_detect_quirks(struct usb_device *udev); | 21 | extern void usb_detect_quirks(struct usb_device *udev); |
| 21 | 22 | ||
| 22 | extern int usb_get_device_descriptor(struct usb_device *dev, | 23 | extern int usb_get_device_descriptor(struct usb_device *dev, |
