]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/core/hcd.h
[PATCH] USB: usb_bulk_message() handles interrupts endpoints
[linux-2.6-omap-h63xx.git] / drivers / usb / core / hcd.h
index ac451fa7e4d273787e814c08f5092c6fc1feab37..74757fc1a99f92648465f61400b6e9efde86681b 100644 (file)
@@ -142,12 +142,12 @@ struct hcd_timeout {      /* timeouts we allocate */
 
 struct usb_operations {
        int (*get_frame_number) (struct usb_device *usb_dev);
-       int (*submit_urb) (struct urb *urb, unsigned mem_flags);
+       int (*submit_urb) (struct urb *urb, gfp_t mem_flags);
        int (*unlink_urb) (struct urb *urb, int status);
 
        /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */
        void *(*buffer_alloc)(struct usb_bus *bus, size_t size,
-                       unsigned mem_flags,
+                       gfp_t mem_flags,
                        dma_addr_t *dma);
        void (*buffer_free)(struct usb_bus *bus, size_t size,
                        void *addr, dma_addr_t dma);
@@ -182,12 +182,12 @@ struct hc_driver {
        int     (*start) (struct usb_hcd *hcd);
 
        /* NOTE:  these suspend/resume calls relate to the HC as
-        * a whole, not just the root hub; they're for bus glue.
+        * a whole, not just the root hub; they're for PCI bus glue.
         */
-       /* called after all devices were suspended */
+       /* called after suspending the hub, before entering D3 etc */
        int     (*suspend) (struct usb_hcd *hcd, pm_message_t message);
 
-       /* called before any devices get resumed */
+       /* called after entering D0 (etc), before resuming the hub */
        int     (*resume) (struct usb_hcd *hcd);
 
        /* cleanly make HCD stop writing memory and doing I/O */
@@ -200,7 +200,7 @@ struct hc_driver {
        int     (*urb_enqueue) (struct usb_hcd *hcd,
                                        struct usb_host_endpoint *ep,
                                        struct urb *urb,
-                                       unsigned mem_flags);
+                                       gfp_t mem_flags);
        int     (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb);
 
        /* hw synch, freeing endpoint resources that urb_dequeue can't */
@@ -247,7 +247,7 @@ int hcd_buffer_create (struct usb_hcd *hcd);
 void hcd_buffer_destroy (struct usb_hcd *hcd);
 
 void *hcd_buffer_alloc (struct usb_bus *bus, size_t size,
-       unsigned mem_flags, dma_addr_t *dma);
+       gfp_t mem_flags, dma_addr_t *dma);
 void hcd_buffer_free (struct usb_bus *bus, size_t size,
        void *addr, dma_addr_t dma);
 
@@ -355,6 +355,7 @@ extern long usb_calc_bus_time (int speed, int is_input,
 
 extern struct usb_bus *usb_alloc_bus (struct usb_operations *);
 
+extern void usb_hcd_suspend_root_hub (struct usb_hcd *hcd);
 extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd);
 
 extern void usb_set_device_state(struct usb_device *udev,