aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-07-28 10:41:30 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-28 10:41:30 -0700
commit078ab6446f8a0b8391aca88fa85f087f47de2183 (patch)
tree250162e882b62b0e55e8f6e9bebacc83490f2b81
parent3b615c5608e249ca355898353a0d7b06236827b3 (diff)
downloadpatches-078ab6446f8a0b8391aca88fa85f087f47de2183.tar.gz
more patches
-rw-r--r--pending/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch60
-rw-r--r--series9
-rw-r--r--staging/staging-dst-correct-error-handling-code.patch48
-rw-r--r--staging/staging-hv-transform-pdevice_object-and-device_object-typedefs-into-their-corresponding-structs.patch1298
-rw-r--r--usb.current/usb-musb-fix-configdata-register-read-issue.patch2
-rw-r--r--usb.current/usb-usbtest-no-need-for-usb_devicefs.patch30
-rw-r--r--usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch282
-rw-r--r--usb/usb-at91-add-usb-gadget-driver-selection-for-at91sam9g45-series.patch43
-rw-r--r--usb/usb-at91-modify-ohci-driver-to-allow-shared-interrupts.patch37
-rw-r--r--usb/usb-uhci-rm-repeatedly-evaluation-for-urbp-qh.patch26
10 files changed, 1832 insertions, 3 deletions
diff --git a/pending/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch b/pending/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch
new file mode 100644
index 00000000000000..71bff70ea2a4af
--- /dev/null
+++ b/pending/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch
@@ -0,0 +1,60 @@
+From oliver@neukum.org Sat Jul 18 15:45:44 2009
+From: Oliver Neukum <oliver@neukum.org>
+Date: Sat, 18 Jul 2009 15:47:17 +0200
+Subject: USB: fix usage count in usb serial generic open regarding autoresume
+To: Matthew Garrett <mjg59@srcf.ucam.org>, Greg KH <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>, linux-usb@vger.kernel.org
+Message-ID: <200907181547.17813.oliver@neukum.org>
+Content-Disposition: inline
+
+
+The resume handler has to resubmit the reading URBs if the device is
+resumed while opened. But the open() method bumps the counter before
+it resumes a device. The fix is to increment the counter only after
+the resumption or if no resumption is attempted.
+
+Signed-off-by: Oliver Neukum <oliver@neukum.org>
+Tested-by: Matthew Garrett <mjg@redhat.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/serial/usb-serial.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/serial/usb-serial.c
++++ b/drivers/usb/serial/usb-serial.c
+@@ -214,15 +214,13 @@ static int serial_open (struct tty_struc
+ goto bailout_port_put;
+ }
+
+- ++port->port.count;
+-
+ /* set up our port structure making the tty driver
+ * remember our port object, and us it */
+ tty->driver_data = port;
+ tty_port_tty_set(&port->port, tty);
+
+ /* If the console is attached, the device is already open */
+- if (port->port.count == 1 && !port->console) {
++ if (!port->port.count && !port->console) {
+
+ /* lock this module before we call it
+ * this may fail, which means we must bail out,
+@@ -240,12 +238,16 @@ static int serial_open (struct tty_struc
+ if (retval)
+ goto bailout_module_put;
+
++ ++port->port.count;
++
+ /* only call the device specific open if this
+ * is the first time the port is opened */
+ retval = serial->type->open(tty, port, filp);
+ if (retval)
+ goto bailout_interface_put;
+ mutex_unlock(&serial->disc_mutex);
++ } else {
++ ++port->port.count;
+ }
+ mutex_unlock(&port->mutex);
+ /* Now do the correct tty layer semantics */
diff --git a/series b/series
index fa47742afc27a6..c9f43b1ea92e01 100644
--- a/series
+++ b/series
@@ -34,6 +34,7 @@ usb.current/usb-option.c-to-support-alcatel-x060s-x200-broadband-modems.patch
usb.current/usb-musb_gadget_ep0-fix-typo-in-service_zero_data_request.patch
usb.current/usb-musb-refer-to-musb_otg_timer_func-under-correct-ifdef.patch
usb.current/usb-musb-fix-configdata-register-read-issue.patch
+usb.current/usb-usbtest-no-need-for-usb_devicefs.patch
usb.current/usb-xhci-fix-less-and-greater-than-confusion.patch
usb.current/usb-xhci-set-td-size-in-transfer-trb.patch
usb.current/usb-xhci-deal-with-stalled-endpoints.patch
@@ -127,6 +128,10 @@ usb/usb-r8a66597-hcd-platform-data-on_chip-support.patch
usb/usb-move-r8a66597-register-defines.patch
usb/usb-m66592-udc-platform-data-on_chip-support.patch
usb/usb-usbtmc-sanity-checks-for-dev_dep_msg_in-urbs.patch
+usb/usb-uhci-rm-repeatedly-evaluation-for-urbp-qh.patch
+usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch
+usb/usb-at91-add-usb-gadget-driver-selection-for-at91sam9g45-series.patch
+usb/usb-at91-modify-ohci-driver-to-allow-shared-interrupts.patch
# stuff I want in my tree, but not to go into -next
@@ -374,6 +379,7 @@ staging/staging-hv-remove-vmbus_connection-typedef.patch
staging/staging-hv-remove-vmbus_msginfo-typedef.patch
staging/staging-hv-remove-netvsc_device-typedef.patch
staging/staging-hv-remove-workqueue-typedef.patch
+staging/staging-hv-transform-pdevice_object-and-device_object-typedefs-into-their-corresponding-structs.patch
staging/staging-htc-dream-limit-kconfig-for-only-msm-platforms.patch
staging/staging-htc-dream-touchscreen-driver-for-staging.patch
@@ -394,8 +400,7 @@ staging/staging-usb-ip-vhci_hdc-fix-the-returned-error-value.patch
staging/staging-fix-typos-mang-ment-management.patch
staging/staging-correct-use-of-and.patch
staging/staging-array_size-changes.patch
+staging/staging-dst-correct-error-handling-code.patch
led_classdev.sysfs-name.patch
-
-
diff --git a/staging/staging-dst-correct-error-handling-code.patch b/staging/staging-dst-correct-error-handling-code.patch
new file mode 100644
index 00000000000000..fe3bbf4b857a4b
--- /dev/null
+++ b/staging/staging-dst-correct-error-handling-code.patch
@@ -0,0 +1,48 @@
+From julia@diku.dk Tue Jul 28 10:06:49 2009
+From: Julia Lawall <julia@diku.dk>
+Date: Tue, 28 Jul 2009 17:52:56 +0200 (CEST)
+Subject: Staging: dst: correct error-handling code
+To: gregkh@suse.de, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
+Message-ID: <Pine.LNX.4.64.0907281752370.28189@ask.diku.dk>
+
+
+From: Julia Lawall <julia@diku.dk>
+
+dst_state_alloc returns an ERR_PTR value in an error case instead of NULL.
+
+A simplified version of the semantic match that finds this problem is as
+follows: (http://coccinelle.lip6.fr/)
+
+// <smpl>
+@match exists@
+expression x, E;
+statement S1, S2;
+@@
+
+x = dst_state_alloc(...)
+... when != x = E
+(
+* if (x == NULL || ...) S1 else S2
+|
+* if (x == NULL && ...) S1 else S2
+)
+// </smpl>
+
+Signed-off-by: Julia Lawall <julia@diku.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/dst/export.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/dst/export.c
++++ b/drivers/staging/dst/export.c
+@@ -159,7 +159,7 @@ static struct dst_state *dst_accept_clie
+ goto err_out_exit;
+
+ new = dst_state_alloc(st->node);
+- if (!new) {
++ if (IS_ERR(new)) {
+ err = -ENOMEM;
+ goto err_out_release;
+ }
diff --git a/staging/staging-hv-transform-pdevice_object-and-device_object-typedefs-into-their-corresponding-structs.patch b/staging/staging-hv-transform-pdevice_object-and-device_object-typedefs-into-their-corresponding-structs.patch
new file mode 100644
index 00000000000000..3195be30e77c73
--- /dev/null
+++ b/staging/staging-hv-transform-pdevice_object-and-device_object-typedefs-into-their-corresponding-structs.patch
@@ -0,0 +1,1298 @@
+From npalix@diku.dk Tue Jul 28 10:07:22 2009
+From: Nicolas Palix <npalix@diku.dk>
+Date: Tue, 28 Jul 2009 17:32:53 +0200
+Subject: Staging: hv: Transform PDEVICE_OBJECT and DEVICE_OBJECT typedefs into their corresponding structs
+To: Greg KH <gregkh@suse.de>
+Cc: hjanssen@microsoft.com
+Message-ID: <200907281732.53376.npalix@diku.dk>
+
+
+
+Remove typedef DEVICE_OBJECT and use a struct named hv_device instead.
+Remove typedef PDEVICE_OBJECT which aliases a pointer and use
+struct hv_device * instead.
+
+Here is the semantic patch to perform this transformation:
+(http://coccinelle.lip6.fr/)
+
+//<smpl>
+@rm_PDEVICE_OBJECT@
+@@
+-typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
+
+@rm_DEVICE_OBJECT@
+@@
+-typedef struct _DEVICE_OBJECT
++struct hv_device
+{...}
+-DEVICE_OBJECT
+;
+
+@fixtypedef_PDEVICE_OBJECT@
+typedef PDEVICE_OBJECT;
+@@
+-PDEVICE_OBJECT
++struct hv_device*
+
+@fixtypedef_DEVICE_OBJECT@
+typedef DEVICE_OBJECT;
+@@
+-DEVICE_OBJECT
++struct hv_device
+
+@fixstruct__DEVICE_OBJECT@
+@@
+struct
+-_DEVICE_OBJECT
++hv_device
+//</smpl>
+
+Signed-off-by: Nicolas Palix <npalix@diku.dk>
+Cc: Hank Janssen <hjanssen@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/hv/BlkVsc.c | 4 +-
+ drivers/staging/hv/ChannelInterface.c | 20 ++++++------
+ drivers/staging/hv/ChannelInterface.h | 2 -
+ drivers/staging/hv/ChannelMgmt.h | 2 -
+ drivers/staging/hv/NetVsc.c | 52 ++++++++++++++++----------------
+ drivers/staging/hv/NetVsc.h | 2 -
+ drivers/staging/hv/RndisFilter.c | 24 +++++++-------
+ drivers/staging/hv/StorVsc.c | 50 +++++++++++++++---------------
+ drivers/staging/hv/Vmbus.c | 22 ++++++-------
+ drivers/staging/hv/VmbusPrivate.h | 8 ++--
+ drivers/staging/hv/blkvsc_drv.c | 4 +-
+ drivers/staging/hv/include/NetVscApi.h | 14 ++++----
+ drivers/staging/hv/include/StorVscApi.h | 6 +--
+ drivers/staging/hv/include/VmbusApi.h | 41 ++++++++++++-------------
+ drivers/staging/hv/include/vmbus.h | 4 +-
+ drivers/staging/hv/netvsc_drv.c | 16 ++++-----
+ drivers/staging/hv/storvsc_drv.c | 10 +++---
+ drivers/staging/hv/vmbus_drv.c | 22 ++++++-------
+ 18 files changed, 151 insertions(+), 152 deletions(-)
+
+--- a/drivers/staging/hv/BlkVsc.c
++++ b/drivers/staging/hv/BlkVsc.c
+@@ -34,7 +34,7 @@ static const GUID gBlkVscDeviceType={
+ /* Static routines */
+ static int
+ BlkVscOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ );
+
+@@ -77,7 +77,7 @@ BlkVscInitialize(
+
+ int
+ BlkVscOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ )
+ {
+--- a/drivers/staging/hv/blkvsc_drv.c
++++ b/drivers/staging/hv/blkvsc_drv.c
+@@ -263,7 +263,7 @@ static int blkvsc_probe(struct device *d
+ STORVSC_DRIVER_OBJECT* storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
+
+ struct device_context *device_ctx = device_to_device_context(device);
+- DEVICE_OBJECT* device_obj = &device_ctx->device_obj;
++ struct hv_device *device_obj = &device_ctx->device_obj;
+
+ struct block_device_context *blkdev=NULL;
+ STORVSC_DEVICE_INFO device_info;
+@@ -772,7 +772,7 @@ static int blkvsc_remove(struct device *
+ STORVSC_DRIVER_OBJECT* storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
+
+ struct device_context *device_ctx = device_to_device_context(device);
+- DEVICE_OBJECT* device_obj = &device_ctx->device_obj;
++ struct hv_device *device_obj = &device_ctx->device_obj;
+ struct block_device_context *blkdev = dev_get_drvdata(device);
+ unsigned long flags;
+
+--- a/drivers/staging/hv/ChannelInterface.c
++++ b/drivers/staging/hv/ChannelInterface.c
+@@ -25,7 +25,7 @@
+
+ static int
+ IVmbusChannelOpen(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ u32 SendBufferSize,
+ u32 RecvRingBufferSize,
+ void * UserData,
+@@ -46,7 +46,7 @@ IVmbusChannelOpen(
+
+ static void
+ IVmbusChannelClose(
+- PDEVICE_OBJECT Device
++ struct hv_device *Device
+ )
+ {
+ VmbusChannelClose((VMBUS_CHANNEL*)Device->context);
+@@ -55,7 +55,7 @@ IVmbusChannelClose(
+
+ static int
+ IVmbusChannelSendPacket(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ const void * Buffer,
+ u32 BufferLen,
+ u64 RequestId,
+@@ -73,7 +73,7 @@ IVmbusChannelSendPacket(
+
+ static int
+ IVmbusChannelSendPacketPageBuffer(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ PAGE_BUFFER PageBuffers[],
+ u32 PageCount,
+ void * Buffer,
+@@ -91,7 +91,7 @@ IVmbusChannelSendPacketPageBuffer(
+
+ static int
+ IVmbusChannelSendPacketMultiPageBuffer(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ MULTIPAGE_BUFFER *MultiPageBuffer,
+ void * Buffer,
+ u32 BufferLen,
+@@ -107,7 +107,7 @@ IVmbusChannelSendPacketMultiPageBuffer(
+
+ static int
+ IVmbusChannelRecvPacket (
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ void * Buffer,
+ u32 BufferLen,
+ u32* BufferActualLen,
+@@ -123,7 +123,7 @@ IVmbusChannelRecvPacket (
+
+ static int
+ IVmbusChannelRecvPacketRaw(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ void * Buffer,
+ u32 BufferLen,
+ u32* BufferActualLen,
+@@ -139,7 +139,7 @@ IVmbusChannelRecvPacketRaw(
+
+ static int
+ IVmbusChannelEstablishGpadl(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ void * Buffer,
+ u32 BufferLen,
+ u32* GpadlHandle
+@@ -153,7 +153,7 @@ IVmbusChannelEstablishGpadl(
+
+ static int
+ IVmbusChannelTeardownGpadl(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ u32 GpadlHandle
+ )
+ {
+@@ -182,7 +182,7 @@ GetChannelInterface(
+
+ static void
+ GetChannelInfo(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ DEVICE_INFO *DeviceInfo
+ )
+ {
+--- a/drivers/staging/hv/ChannelInterface.h
++++ b/drivers/staging/hv/ChannelInterface.h
+@@ -34,7 +34,7 @@ GetChannelInterface(
+
+ static void
+ GetChannelInfo(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ DEVICE_INFO *DeviceInfo
+ );
+
+--- a/drivers/staging/hv/ChannelMgmt.h
++++ b/drivers/staging/hv/ChannelMgmt.h
+@@ -45,7 +45,7 @@ typedef enum {
+ typedef struct _VMBUS_CHANNEL {
+ LIST_ENTRY ListEntry;
+
+- DEVICE_OBJECT* DeviceObject;
++ struct hv_device *DeviceObject;
+
+ HANDLE PollTimer; /* SA-111 workaround */
+
+--- a/drivers/staging/hv/include/NetVscApi.h
++++ b/drivers/staging/hv/include/NetVscApi.h
+@@ -44,15 +44,15 @@ typedef struct _NETVSC_PACKET *PNETVSC_P
+ /* Data types */
+
+
+-typedef int (*PFN_ON_OPEN)(DEVICE_OBJECT *Device);
+-typedef int (*PFN_ON_CLOSE)(DEVICE_OBJECT *Device);
++typedef int (*PFN_ON_OPEN)(struct hv_device *Device);
++typedef int (*PFN_ON_CLOSE)(struct hv_device *Device);
+
+-typedef void (*PFN_QUERY_LINKSTATUS)(DEVICE_OBJECT *Device);
+-typedef int (*PFN_ON_SEND)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
++typedef void (*PFN_QUERY_LINKSTATUS)(struct hv_device *Device);
++typedef int (*PFN_ON_SEND)(struct hv_device *dev, PNETVSC_PACKET packet);
+ typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context);
+
+-typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet);
+-typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, u32 Status);
++typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev, PNETVSC_PACKET packet);
++typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status);
+
+ /* Represent the xfer page packet which contains 1 or more netvsc packet */
+ typedef struct _XFERPAGE_PACKET {
+@@ -74,7 +74,7 @@ typedef struct _NETVSC_PACKET {
+ /* Bookkeeping stuff */
+ DLIST_ENTRY ListEntry;
+
+- DEVICE_OBJECT *Device;
++ struct hv_device *Device;
+ bool IsDataPacket;
+
+ /*
+--- a/drivers/staging/hv/include/StorVscApi.h
++++ b/drivers/staging/hv/include/StorVscApi.h
+@@ -56,11 +56,11 @@ typedef struct _STORVSC_REQUEST* PSTORVS
+
+ /* Data types */
+
+-typedef int (*PFN_ON_IO_REQUEST)(PDEVICE_OBJECT Device, PSTORVSC_REQUEST Request);
++typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device, PSTORVSC_REQUEST Request);
+ typedef void (*PFN_ON_IO_REQUEST_COMPLTN)(PSTORVSC_REQUEST Request);
+
+-typedef int (*PFN_ON_HOST_RESET)(PDEVICE_OBJECT Device);
+-typedef void (*PFN_ON_HOST_RESCAN)(PDEVICE_OBJECT Device);
++typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device);
++typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device);
+
+
+ /* Matches Windows-end */
+--- a/drivers/staging/hv/include/VmbusApi.h
++++ b/drivers/staging/hv/include/VmbusApi.h
+@@ -39,7 +39,6 @@
+ /* Fwd declarations */
+
+ typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
+-typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
+
+
+ /* Data types */
+@@ -70,28 +69,28 @@ typedef struct _MULTIPAGE_BUFFER {
+ #pragma pack(pop)
+
+ /* All drivers */
+-typedef int (*PFN_ON_DEVICEADD)(PDEVICE_OBJECT Device, void* AdditionalInfo);
+-typedef int (*PFN_ON_DEVICEREMOVE)(PDEVICE_OBJECT Device);
++typedef int (*PFN_ON_DEVICEADD)(struct hv_device *Device, void* AdditionalInfo);
++typedef int (*PFN_ON_DEVICEREMOVE)(struct hv_device *Device);
+ typedef char** (*PFN_ON_GETDEVICEIDS)(void);
+ typedef void (*PFN_ON_CLEANUP)(PDRIVER_OBJECT Driver);
+
+ /* Vmbus extensions */
+-/* typedef int (*PFN_ON_MATCH)(PDEVICE_OBJECT dev, PDRIVER_OBJECT drv); */
+-/* typedef int (*PFN_ON_PROBE)(PDEVICE_OBJECT dev); */
++/* typedef int (*PFN_ON_MATCH)(struct hv_device *dev, PDRIVER_OBJECT drv); */
++/* typedef int (*PFN_ON_PROBE)(struct hv_device *dev); */
+ typedef int (*PFN_ON_ISR)(PDRIVER_OBJECT drv);
+ typedef void (*PFN_ON_DPC)(PDRIVER_OBJECT drv);
+ typedef void (*PFN_GET_CHANNEL_OFFERS)(void);
+
+-typedef PDEVICE_OBJECT (*PFN_ON_CHILDDEVICE_CREATE)(GUID DeviceType, GUID DeviceInstance, void *Context);
+-typedef void (*PFN_ON_CHILDDEVICE_DESTROY)(PDEVICE_OBJECT Device);
+-typedef int (*PFN_ON_CHILDDEVICE_ADD)(PDEVICE_OBJECT RootDevice, PDEVICE_OBJECT ChildDevice);
+-typedef void (*PFN_ON_CHILDDEVICE_REMOVE)(PDEVICE_OBJECT Device);
++typedef struct hv_device *(*PFN_ON_CHILDDEVICE_CREATE)(GUID DeviceType, GUID DeviceInstance, void *Context);
++typedef void (*PFN_ON_CHILDDEVICE_DESTROY)(struct hv_device *Device);
++typedef int (*PFN_ON_CHILDDEVICE_ADD)(struct hv_device *RootDevice, struct hv_device *ChildDevice);
++typedef void (*PFN_ON_CHILDDEVICE_REMOVE)(struct hv_device *Device);
+
+ /* Vmbus channel interface */
+ typedef void (*VMBUS_CHANNEL_CALLBACK)(void * context);
+
+ typedef int (*VMBUS_CHANNEL_OPEN)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ u32 SendBufferSize,
+ u32 RecvRingBufferSize,
+ void * UserData,
+@@ -101,11 +100,11 @@ typedef int (*VMBUS_CHANNEL_OPEN)(
+ );
+
+ typedef void (*VMBUS_CHANNEL_CLOSE)(
+- PDEVICE_OBJECT Device
++ struct hv_device *Device
+ );
+
+ typedef int (*VMBUS_CHANNEL_SEND_PACKET)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ const void * Buffer,
+ u32 BufferLen,
+ u64 RequestId,
+@@ -114,7 +113,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET)
+ );
+
+ typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ PAGE_BUFFER PageBuffers[],
+ u32 PageCount,
+ void * Buffer,
+@@ -123,7 +122,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_
+ );
+
+ typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ MULTIPAGE_BUFFER *MultiPageBuffer,
+ void * Buffer,
+ u32 BufferLen,
+@@ -131,7 +130,7 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_
+ );
+
+ typedef int (*VMBUS_CHANNEL_RECV_PACKET)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ void * Buffer,
+ u32 BufferLen,
+ u32* BufferActualLen,
+@@ -139,7 +138,7 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET)
+ );
+
+ typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ void * Buffer,
+ u32 BufferLen,
+ u32* BufferActualLen,
+@@ -147,14 +146,14 @@ typedef int (*VMBUS_CHANNEL_RECV_PACKET_
+ );
+
+ typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ void * Buffer, /* from kmalloc() */
+ u32 BufferLen, /* page-size multiple */
+ u32* GpadlHandle
+ );
+
+ typedef int (*VMBUS_CHANNEL_TEARDOWN_GPADL)(
+- PDEVICE_OBJECT Device,
++ struct hv_device *Device,
+ u32 GpadlHandle
+ );
+
+@@ -186,7 +185,7 @@ typedef struct _DEVICE_INFO {
+ PORT_INFO Outbound;
+ } DEVICE_INFO;
+
+-typedef void (*VMBUS_GET_CHANNEL_INFO)(PDEVICE_OBJECT Device, DEVICE_INFO* DeviceInfo);
++typedef void (*VMBUS_GET_CHANNEL_INFO)(struct hv_device *Device, DEVICE_INFO* DeviceInfo);
+
+ typedef struct _VMBUS_CHANNEL_INTERFACE {
+ VMBUS_CHANNEL_OPEN Open;
+@@ -218,14 +217,14 @@ typedef struct _DRIVER_OBJECT {
+
+
+ /* Base device object */
+-typedef struct _DEVICE_OBJECT {
++struct hv_device {
+ DRIVER_OBJECT* Driver; /* the driver for this device */
+ char name[64];
+ GUID deviceType; /* the device type id of this device */
+ GUID deviceInstance; /* the device instance id of this device */
+ void* context;
+ void* Extension; /* Device extension; */
+-} DEVICE_OBJECT;
++};
+
+
+ /* Vmbus driver object */
+--- a/drivers/staging/hv/include/vmbus.h
++++ b/drivers/staging/hv/include/vmbus.h
+@@ -53,7 +53,7 @@ struct device_context {
+ GUID device_id;
+ int probe_error;
+ struct device device;
+- DEVICE_OBJECT device_obj;
++ struct hv_device device_obj;
+ };
+
+
+@@ -64,7 +64,7 @@ struct device_context {
+
+ /* Inlines */
+
+-static inline struct device_context *to_device_context(DEVICE_OBJECT *device_obj)
++static inline struct device_context *to_device_context(struct hv_device *device_obj)
+ {
+ return container_of(device_obj, struct device_context, device_obj);
+ }
+--- a/drivers/staging/hv/NetVsc.c
++++ b/drivers/staging/hv/NetVsc.c
+@@ -40,13 +40,13 @@ static const GUID gNetVscDeviceType={
+ /* Internal routines */
+ static int
+ NetVscOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ );
+
+ static int
+ NetVscOnDeviceRemove(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static void
+@@ -61,12 +61,12 @@ NetVscOnChannelCallback(
+
+ static int
+ NetVscInitializeSendBufferWithNetVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static int
+ NetVscInitializeReceiveBufferWithNetVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static int
+@@ -81,24 +81,24 @@ NetVscDestroyReceiveBuffer(
+
+ static int
+ NetVscConnectToVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static void
+ NetVscOnSendCompletion(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VMPACKET_DESCRIPTOR *Packet
+ );
+
+ static int
+ NetVscOnSend(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ NETVSC_PACKET *Packet
+ );
+
+ static void
+ NetVscOnReceive(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VMPACKET_DESCRIPTOR *Packet
+ );
+
+@@ -109,11 +109,11 @@ NetVscOnReceiveCompletion(
+
+ static void
+ NetVscSendReceiveCompletion(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ u64 TransactionId
+ );
+
+-static inline struct NETVSC_DEVICE *AllocNetDevice(DEVICE_OBJECT *Device)
++static inline struct NETVSC_DEVICE *AllocNetDevice(struct hv_device *Device)
+ {
+ struct NETVSC_DEVICE *netDevice;
+
+@@ -139,7 +139,7 @@ static inline void FreeNetDevice(struct
+
+
+ /* Get the net device object iff exists and its refcount > 1 */
+-static inline struct NETVSC_DEVICE *GetOutboundNetDevice(DEVICE_OBJECT *Device)
++static inline struct NETVSC_DEVICE *GetOutboundNetDevice(struct hv_device *Device)
+ {
+ struct NETVSC_DEVICE *netDevice;
+
+@@ -157,7 +157,7 @@ static inline struct NETVSC_DEVICE *GetO
+ }
+
+ /* Get the net device object iff exists and its refcount > 0 */
+-static inline struct NETVSC_DEVICE *GetInboundNetDevice(DEVICE_OBJECT *Device)
++static inline struct NETVSC_DEVICE *GetInboundNetDevice(struct hv_device *Device)
+ {
+ struct NETVSC_DEVICE *netDevice;
+
+@@ -174,7 +174,7 @@ static inline struct NETVSC_DEVICE *GetI
+ return netDevice;
+ }
+
+-static inline void PutNetDevice(DEVICE_OBJECT *Device)
++static inline void PutNetDevice(struct hv_device *Device)
+ {
+ struct NETVSC_DEVICE *netDevice;
+
+@@ -184,7 +184,7 @@ static inline void PutNetDevice(DEVICE_O
+ InterlockedDecrement(&netDevice->RefCount);
+ }
+
+-static inline struct NETVSC_DEVICE *ReleaseOutboundNetDevice(DEVICE_OBJECT *Device)
++static inline struct NETVSC_DEVICE *ReleaseOutboundNetDevice(struct hv_device *Device)
+ {
+ struct NETVSC_DEVICE *netDevice;
+
+@@ -201,7 +201,7 @@ static inline struct NETVSC_DEVICE *Rele
+ return netDevice;
+ }
+
+-static inline struct NETVSC_DEVICE *ReleaseInboundNetDevice(DEVICE_OBJECT *Device)
++static inline struct NETVSC_DEVICE *ReleaseInboundNetDevice(struct hv_device *Device)
+ {
+ struct NETVSC_DEVICE *netDevice;
+
+@@ -268,7 +268,7 @@ NetVscInitialize(
+
+ static int
+ NetVscInitializeReceiveBufferWithNetVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ int ret=0;
+@@ -397,7 +397,7 @@ Exit:
+
+ static int
+ NetVscInitializeSendBufferWithNetVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ int ret=0;
+@@ -661,7 +661,7 @@ NetVscDestroySendBuffer(
+
+ static int
+ NetVscConnectToVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ int ret=0;
+@@ -794,7 +794,7 @@ Description:
+ --*/
+ int
+ NetVscOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ )
+ {
+@@ -911,7 +911,7 @@ Description:
+ --*/
+ int
+ NetVscOnDeviceRemove(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ struct NETVSC_DEVICE *netDevice;
+@@ -993,7 +993,7 @@ NetVscOnCleanup(
+
+ static void
+ NetVscOnSendCompletion(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VMPACKET_DESCRIPTOR *Packet
+ )
+ {
+@@ -1047,7 +1047,7 @@ NetVscOnSendCompletion(
+
+ static int
+ NetVscOnSend(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ NETVSC_PACKET *Packet
+ )
+ {
+@@ -1111,7 +1111,7 @@ NetVscOnSend(
+
+ static void
+ NetVscOnReceive(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VMPACKET_DESCRIPTOR *Packet
+ )
+ {
+@@ -1304,7 +1304,7 @@ NetVscOnReceive(
+
+ static void
+ NetVscSendReceiveCompletion(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ u64 TransactionId
+ )
+ {
+@@ -1358,7 +1358,7 @@ NetVscOnReceiveCompletion(
+ void * Context)
+ {
+ NETVSC_PACKET *packet = (NETVSC_PACKET*)Context;
+- DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device;
++ struct hv_device *device = (struct hv_device*)packet->Device;
+ struct NETVSC_DEVICE *netDevice;
+ u64 transactionId=0;
+ bool fSendReceiveComp = false;
+@@ -1417,7 +1417,7 @@ NetVscOnChannelCallback(
+ {
+ const int netPacketSize=2048;
+ int ret=0;
+- DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context;
++ struct hv_device *device=(struct hv_device*)Context;
+ struct NETVSC_DEVICE *netDevice;
+
+ u32 bytesRecvd;
+--- a/drivers/staging/hv/netvsc_drv.c
++++ b/drivers/staging/hv/netvsc_drv.c
+@@ -51,10 +51,10 @@ static int netvsc_remove(struct device *
+ static int netvsc_open(struct net_device *net);
+ static void netvsc_xmit_completion(void *context);
+ static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net);
+-static int netvsc_recv_callback(DEVICE_OBJECT *device_obj, NETVSC_PACKET* Packet);
++static int netvsc_recv_callback(struct hv_device *device_obj, NETVSC_PACKET* Packet);
+ static int netvsc_close(struct net_device *net);
+ static struct net_device_stats *netvsc_get_stats(struct net_device *net);
+-static void netvsc_linkstatus_callback(DEVICE_OBJECT *device_obj, unsigned int status);
++static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status);
+
+
+ /* Data types */
+@@ -172,7 +172,7 @@ static int netvsc_probe(struct device *d
+ NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
+
+ struct device_context *device_ctx = device_to_device_context(device);
+- DEVICE_OBJECT *device_obj = &device_ctx->device_obj;
++ struct hv_device *device_obj = &device_ctx->device_obj;
+
+ struct net_device *net = NULL;
+ struct net_device_context *net_device_ctx;
+@@ -249,7 +249,7 @@ static int netvsc_remove(struct device *
+
+ struct device_context *device_ctx = device_to_device_context(device);
+ struct net_device *net = dev_get_drvdata(&device_ctx->device);
+- DEVICE_OBJECT *device_obj = &device_ctx->device_obj;
++ struct hv_device *device_obj = &device_ctx->device_obj;
+
+ DPRINT_ENTER(NETVSC_DRV);
+
+@@ -302,7 +302,7 @@ static int netvsc_open(struct net_device
+ struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context*)driver_ctx;
+ NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
+
+- DEVICE_OBJECT *device_obj = &net_device_ctx->device_ctx->device_obj;
++ struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj;
+
+ DPRINT_ENTER(NETVSC_DRV);
+
+@@ -344,7 +344,7 @@ static int netvsc_close(struct net_devic
+ struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context*)driver_ctx;
+ NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
+
+- DEVICE_OBJECT *device_obj = &net_device_ctx->device_ctx->device_obj;
++ struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj;
+
+ DPRINT_ENTER(NETVSC_DRV);
+
+@@ -515,7 +515,7 @@ Name: netvsc_linkstatus_callback()
+ Desc: Link up/down notification
+
+ --*/
+-static void netvsc_linkstatus_callback(DEVICE_OBJECT *device_obj, unsigned int status)
++static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status)
+ {
+ struct device_context* device_ctx = to_device_context(device_obj);
+ struct net_device* net = dev_get_drvdata(&device_ctx->device);
+@@ -549,7 +549,7 @@ Name: netvsc_recv_callback()
+ Desc: Callback when we receive a packet from the "wire" on the specify device
+
+ --*/
+-static int netvsc_recv_callback(DEVICE_OBJECT *device_obj, NETVSC_PACKET* packet)
++static int netvsc_recv_callback(struct hv_device *device_obj, NETVSC_PACKET* packet)
+ {
+ int ret=0;
+ struct device_context *device_ctx = to_device_context(device_obj);
+--- a/drivers/staging/hv/NetVsc.h
++++ b/drivers/staging/hv/NetVsc.h
+@@ -55,7 +55,7 @@
+
+ /* Per netvsc channel-specific */
+ struct NETVSC_DEVICE {
+- DEVICE_OBJECT *Device;
++ struct hv_device *Device;
+
+ int RefCount;
+
+--- a/drivers/staging/hv/RndisFilter.c
++++ b/drivers/staging/hv/RndisFilter.c
+@@ -112,7 +112,7 @@ RndisFilterReceiveData(
+
+ static int
+ RndisFilterOnReceive(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ NETVSC_PACKET *Packet
+ );
+
+@@ -157,13 +157,13 @@ RndisFilterCloseDevice(
+
+ static int
+ RndisFilterOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ );
+
+ static int
+ RndisFilterOnDeviceRemove(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static void
+@@ -173,17 +173,17 @@ RndisFilterOnCleanup(
+
+ static int
+ RndisFilterOnOpen(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static int
+ RndisFilterOnClose(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static int
+ RndisFilterOnSend(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ NETVSC_PACKET *Packet
+ );
+
+@@ -490,7 +490,7 @@ RndisFilterReceiveData(
+
+ static int
+ RndisFilterOnReceive(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ NETVSC_PACKET *Packet
+ )
+ {
+@@ -928,7 +928,7 @@ RndisFilterCloseDevice(
+
+ int
+ RndisFilterOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ )
+ {
+@@ -1007,7 +1007,7 @@ RndisFilterOnDeviceAdd(
+
+ static int
+ RndisFilterOnDeviceRemove(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ struct NETVSC_DEVICE *netDevice = (struct NETVSC_DEVICE*)Device->Extension;
+@@ -1042,7 +1042,7 @@ RndisFilterOnCleanup(
+
+ static int
+ RndisFilterOnOpen(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ int ret;
+@@ -1060,7 +1060,7 @@ RndisFilterOnOpen(
+
+ static int
+ RndisFilterOnClose(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ int ret;
+@@ -1079,7 +1079,7 @@ RndisFilterOnClose(
+
+ static int
+ RndisFilterOnSend(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ NETVSC_PACKET *Packet
+ )
+ {
+--- a/drivers/staging/hv/StorVsc.c
++++ b/drivers/staging/hv/StorVsc.c
+@@ -44,7 +44,7 @@ typedef struct _STORVSC_REQUEST_EXTENSIO
+ /* LIST_ENTRY ListEntry; */
+
+ STORVSC_REQUEST *Request;
+- DEVICE_OBJECT *Device;
++ struct hv_device *Device;
+
+ /* Synchronize the request/response if needed */
+ HANDLE WaitEvent;
+@@ -55,7 +55,7 @@ typedef struct _STORVSC_REQUEST_EXTENSIO
+
+ /* A storvsc device is a device object that contains a vmbus channel */
+ typedef struct _STORVSC_DEVICE{
+- DEVICE_OBJECT *Device;
++ struct hv_device *Device;
+
+ int RefCount; /* 0 indicates the device is being destroyed */
+
+@@ -96,24 +96,24 @@ static const GUID gStorVscDeviceType={
+
+ static int
+ StorVscOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ );
+
+ static int
+ StorVscOnDeviceRemove(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static int
+ StorVscOnIORequest(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ STORVSC_REQUEST *Request
+ );
+
+ static int
+ StorVscOnHostReset(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+ static void
+@@ -128,24 +128,24 @@ StorVscOnChannelCallback(
+
+ static void
+ StorVscOnIOCompletion(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VSTOR_PACKET *VStorPacket,
+ STORVSC_REQUEST_EXTENSION *RequestExt
+ );
+
+ static void
+ StorVscOnReceive(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VSTOR_PACKET *VStorPacket,
+ STORVSC_REQUEST_EXTENSION *RequestExt
+ );
+
+ static int
+ StorVscConnectToVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ );
+
+-static inline STORVSC_DEVICE* AllocStorDevice(DEVICE_OBJECT *Device)
++static inline STORVSC_DEVICE* AllocStorDevice(struct hv_device *Device)
+ {
+ STORVSC_DEVICE *storDevice;
+
+@@ -170,7 +170,7 @@ static inline void FreeStorDevice(STORVS
+ }
+
+ /* Get the stordevice object iff exists and its refcount > 1 */
+-static inline STORVSC_DEVICE* GetStorDevice(DEVICE_OBJECT *Device)
++static inline STORVSC_DEVICE* GetStorDevice(struct hv_device *Device)
+ {
+ STORVSC_DEVICE *storDevice;
+
+@@ -188,7 +188,7 @@ static inline STORVSC_DEVICE* GetStorDev
+ }
+
+ /* Get the stordevice object iff exists and its refcount > 0 */
+-static inline STORVSC_DEVICE* MustGetStorDevice(DEVICE_OBJECT *Device)
++static inline STORVSC_DEVICE* MustGetStorDevice(struct hv_device *Device)
+ {
+ STORVSC_DEVICE *storDevice;
+
+@@ -205,7 +205,7 @@ static inline STORVSC_DEVICE* MustGetSto
+ return storDevice;
+ }
+
+-static inline void PutStorDevice(DEVICE_OBJECT *Device)
++static inline void PutStorDevice(struct hv_device *Device)
+ {
+ STORVSC_DEVICE *storDevice;
+
+@@ -217,7 +217,7 @@ static inline void PutStorDevice(DEVICE_
+ }
+
+ /* Drop ref count to 1 to effectively disable GetStorDevice() */
+-static inline STORVSC_DEVICE* ReleaseStorDevice(DEVICE_OBJECT *Device)
++static inline STORVSC_DEVICE* ReleaseStorDevice(struct hv_device *Device)
+ {
+ STORVSC_DEVICE *storDevice;
+
+@@ -234,7 +234,7 @@ static inline STORVSC_DEVICE* ReleaseSto
+ }
+
+ /* Drop ref count to 0. No one can use StorDevice object. */
+-static inline STORVSC_DEVICE* FinalReleaseStorDevice(DEVICE_OBJECT *Device)
++static inline STORVSC_DEVICE* FinalReleaseStorDevice(struct hv_device *Device)
+ {
+ STORVSC_DEVICE *storDevice;
+
+@@ -317,7 +317,7 @@ Description:
+ --*/
+ int
+ StorVscOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ )
+ {
+@@ -365,7 +365,7 @@ Cleanup:
+ return ret;
+ }
+
+-static int StorVscChannelInit(DEVICE_OBJECT *Device)
++static int StorVscChannelInit(struct hv_device *Device)
+ {
+ int ret=0;
+ STORVSC_DEVICE *storDevice;
+@@ -529,7 +529,7 @@ Cleanup:
+
+ int
+ StorVscConnectToVsp(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ int ret=0;
+@@ -574,7 +574,7 @@ Description:
+ --*/
+ int
+ StorVscOnDeviceRemove(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ STORVSC_DEVICE *storDevice;
+@@ -619,7 +619,7 @@ StorVscOnTargetRescan(
+ void *Context
+ )
+ {
+-DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context;
++struct hv_device *device=(struct hv_device *)Context;
+ STORVSC_DRIVER_OBJECT *storDriver;
+
+ DPRINT_ENTER(STORVSC);
+@@ -633,7 +633,7 @@ DPRINT_EXIT(STORVSC);
+
+ int
+ StorVscOnHostReset(
+- DEVICE_OBJECT *Device
++ struct hv_device *Device
+ )
+ {
+ int ret=0;
+@@ -703,7 +703,7 @@ Description:
+ --*/
+ int
+ StorVscOnIORequest(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ STORVSC_REQUEST *Request
+ )
+ {
+@@ -817,7 +817,7 @@ StorVscOnCleanup(
+
+ static void
+ StorVscOnIOCompletion(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VSTOR_PACKET *VStorPacket,
+ STORVSC_REQUEST_EXTENSION *RequestExt
+ )
+@@ -887,7 +887,7 @@ StorVscOnIOCompletion(
+
+ static void
+ StorVscOnReceive(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ VSTOR_PACKET *VStorPacket,
+ STORVSC_REQUEST_EXTENSION *RequestExt
+ )
+@@ -925,7 +925,7 @@ StorVscOnChannelCallback(
+ )
+ {
+ int ret=0;
+- DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context;
++ struct hv_device *device = (struct hv_device*)Context;
+ STORVSC_DEVICE *storDevice;
+ u32 bytesRecvd;
+ u64 requestId;
+--- a/drivers/staging/hv/storvsc_drv.c
++++ b/drivers/staging/hv/storvsc_drv.c
+@@ -82,7 +82,7 @@ static int storvsc_device_alloc(struct s
+ static int storvsc_device_configure(struct scsi_device *);
+ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd);
+ static void storvsc_host_rescan_callback(struct work_struct *work);
+-static void storvsc_host_rescan(DEVICE_OBJECT* device_obj);
++static void storvsc_host_rescan(struct hv_device* device_obj);
+ static int storvsc_remove(struct device *dev);
+
+ static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl, unsigned int sg_count, unsigned int len);
+@@ -233,7 +233,7 @@ static int storvsc_probe(struct device *
+ STORVSC_DRIVER_OBJECT* storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
+
+ struct device_context *device_ctx = device_to_device_context(device);
+- DEVICE_OBJECT* device_obj = &device_ctx->device_obj;
++ struct hv_device *device_obj = &device_ctx->device_obj;
+
+ struct Scsi_Host *host;
+ struct host_device_context *host_device_ctx;
+@@ -336,7 +336,7 @@ static int storvsc_remove(struct device
+ STORVSC_DRIVER_OBJECT* storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
+
+ struct device_context *device_ctx = device_to_device_context(device);
+- DEVICE_OBJECT* device_obj = &device_ctx->device_obj;
++ struct hv_device *device_obj = &device_ctx->device_obj;
+
+ struct Scsi_Host *host = dev_get_drvdata(device);
+ struct host_device_context *host_device_ctx=(struct host_device_context*)host->hostdata;
+@@ -912,7 +912,7 @@ Desc: Rescan the scsi HBA
+ --*/
+ static void storvsc_host_rescan_callback(struct work_struct *work)
+ {
+- DEVICE_OBJECT* device_obj =
++ struct hv_device *device_obj =
+ &((struct host_device_context*)work)->device_ctx->device_obj;
+ struct device_context* device_ctx = to_device_context(device_obj);
+ struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device);
+@@ -1076,7 +1076,7 @@ static int storvsc_report_luns(struct sc
+ return 0;
+ }
+
+-static void storvsc_host_rescan(DEVICE_OBJECT* device_obj)
++static void storvsc_host_rescan(struct hv_device *device_obj)
+ {
+ struct device_context* device_ctx = to_device_context(device_obj);
+ struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device);
+--- a/drivers/staging/hv/Vmbus.c
++++ b/drivers/staging/hv/Vmbus.c
+@@ -46,7 +46,7 @@ static const GUID gVmbusDeviceId={
+ };
+
+ static DRIVER_OBJECT* gDriver; /* vmbus driver object */
+-static DEVICE_OBJECT* gDevice; /* vmbus root device */
++static struct hv_device* gDevice; /* vmbus root device */
+
+
+
+@@ -60,7 +60,7 @@ VmbusGetChannelInterface(
+
+ static void
+ VmbusGetChannelInfo(
+- DEVICE_OBJECT *DeviceObject,
++ struct hv_device *DeviceObject,
+ DEVICE_INFO *DeviceInfo
+ );
+
+@@ -71,13 +71,13 @@ VmbusGetChannelOffers(
+
+ static int
+ VmbusOnDeviceAdd(
+- DEVICE_OBJECT *Device,
++ struct hv_device *Device,
+ void *AdditionalInfo
+ );
+
+ static int
+ VmbusOnDeviceRemove(
+- DEVICE_OBJECT* dev
++ struct hv_device *dev
+ );
+
+ static void
+@@ -205,7 +205,7 @@ Description:
+ --*/
+ static void
+ VmbusGetChannelInfo(
+- DEVICE_OBJECT *DeviceObject,
++ struct hv_device *DeviceObject,
+ DEVICE_INFO *DeviceInfo
+ )
+ {
+@@ -224,7 +224,7 @@ Description:
+
+ --*/
+
+-DEVICE_OBJECT*
++struct hv_device*
+ VmbusChildDeviceCreate(
+ GUID DeviceType,
+ GUID DeviceInstance,
+@@ -250,7 +250,7 @@ Description:
+ --*/
+ int
+ VmbusChildDeviceAdd(
+- DEVICE_OBJECT* ChildDevice)
++ struct hv_device *ChildDevice)
+ {
+ VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
+
+@@ -269,7 +269,7 @@ Description:
+ --*/
+ void
+ VmbusChildDeviceRemove(
+- DEVICE_OBJECT* ChildDevice)
++ struct hv_device *ChildDevice)
+ {
+ VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
+
+@@ -289,7 +289,7 @@ Description:
+ /* **************
+ void
+ VmbusChildDeviceDestroy(
+-DEVICE_OBJECT* ChildDevice
++struct hv_device *ChildDevice
+ )
+ {
+ VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
+@@ -309,7 +309,7 @@ Description:
+ --*/
+ static int
+ VmbusOnDeviceAdd(
+- DEVICE_OBJECT *dev,
++ struct hv_device *dev,
+ void *AdditionalInfo
+ )
+ {
+@@ -347,7 +347,7 @@ Description:
+
+ --*/
+ int VmbusOnDeviceRemove(
+- DEVICE_OBJECT* dev
++ struct hv_device *dev
+ )
+ {
+ int ret=0;
+--- a/drivers/staging/hv/vmbus_drv.c
++++ b/drivers/staging/hv/vmbus_drv.c
+@@ -75,11 +75,11 @@ static irqreturn_t vmbus_isr(int irq, vo
+ static void vmbus_device_release(struct device *device);
+ static void vmbus_bus_release(struct device *device);
+
+-static DEVICE_OBJECT* vmbus_child_device_create(GUID type, GUID instance, void* context);
+-static void vmbus_child_device_destroy(DEVICE_OBJECT* device_obj);
+-static int vmbus_child_device_register(DEVICE_OBJECT* root_device_obj, DEVICE_OBJECT* child_device_obj);
+-static void vmbus_child_device_unregister(DEVICE_OBJECT* child_device_obj);
+-static void vmbus_child_device_get_info(DEVICE_OBJECT *device_obj, DEVICE_INFO *device_info);
++static struct hv_device *vmbus_child_device_create(GUID type, GUID instance, void* context);
++static void vmbus_child_device_destroy(struct hv_device *device_obj);
++static int vmbus_child_device_register(struct hv_device *root_device_obj, struct hv_device *child_device_obj);
++static void vmbus_child_device_unregister(struct hv_device *child_device_obj);
++static void vmbus_child_device_get_info(struct hv_device *device_obj, DEVICE_INFO *device_info);
+
+ /* static ssize_t vmbus_show_class_id(struct device *dev, struct device_attribute *attr, char *buf); */
+ /* static ssize_t vmbus_show_device_id(struct device *dev, struct device_attribute *attr, char *buf); */
+@@ -542,7 +542,7 @@ Name: vmbus_child_device_get_info()
+
+ Desc: Get the vmbus child device info. This is invoked to display various device attributes in sysfs.
+ --*/
+-static void vmbus_child_device_get_info(DEVICE_OBJECT *device_obj, DEVICE_INFO *device_info)
++static void vmbus_child_device_get_info(struct hv_device *device_obj, DEVICE_INFO *device_info)
+ {
+ VMBUS_DRIVER_OBJECT *vmbus_drv_obj=&g_vmbus_drv.drv_obj;
+
+@@ -557,10 +557,10 @@ Name: vmbus_child_device_create()
+ Desc: Creates and registers a new child device on the vmbus.
+
+ --*/
+-static DEVICE_OBJECT* vmbus_child_device_create(GUID type, GUID instance, void* context)
++static struct hv_device *vmbus_child_device_create(GUID type, GUID instance, void* context)
+ {
+ struct device_context *child_device_ctx;
+- DEVICE_OBJECT* child_device_obj;
++ struct hv_device *child_device_obj;
+
+ DPRINT_ENTER(VMBUS_DRV);
+
+@@ -601,7 +601,7 @@ Name: vmbus_child_device_register()
+ Desc: Register the child device on the specified bus
+
+ --*/
+-static int vmbus_child_device_register(DEVICE_OBJECT* root_device_obj, DEVICE_OBJECT* child_device_obj)
++static int vmbus_child_device_register(struct hv_device *root_device_obj, struct hv_device *child_device_obj)
+ {
+ int ret=0;
+ struct device_context *root_device_ctx = to_device_context(root_device_obj);
+@@ -655,7 +655,7 @@ Name: vmbus_child_device_unregister()
+ Desc: Remove the specified child device from the vmbus.
+
+ --*/
+-static void vmbus_child_device_unregister(DEVICE_OBJECT* device_obj)
++static void vmbus_child_device_unregister(struct hv_device *device_obj)
+ {
+ struct device_context *device_ctx = to_device_context(device_obj);
+
+@@ -680,7 +680,7 @@ Name: vmbus_child_device_destroy()
+ Desc: Destroy the specified child device on the vmbus.
+
+ --*/
+-static void vmbus_child_device_destroy(DEVICE_OBJECT* device_obj)
++static void vmbus_child_device_destroy(struct hv_device *device_obj)
+ {
+ DPRINT_ENTER(VMBUS_DRV);
+
+--- a/drivers/staging/hv/VmbusPrivate.h
++++ b/drivers/staging/hv/VmbusPrivate.h
+@@ -117,7 +117,7 @@ extern struct VMBUS_CONNECTION gVmbusCon
+
+ /* General vmbus interface */
+
+-static DEVICE_OBJECT*
++static struct hv_device*
+ VmbusChildDeviceCreate(
+ GUID deviceType,
+ GUID deviceInstance,
+@@ -125,15 +125,15 @@ VmbusChildDeviceCreate(
+
+ static int
+ VmbusChildDeviceAdd(
+- DEVICE_OBJECT* Device);
++ struct hv_device *Device);
+
+ static void
+ VmbusChildDeviceRemove(
+- DEVICE_OBJECT* Device);
++ struct hv_device *Device);
+
+ /* static void */
+ /* VmbusChildDeviceDestroy( */
+-/* DEVICE_OBJECT*); */
++/* struct hv_device *); */
+
+ static VMBUS_CHANNEL*
+ GetChannelFromRelId(
diff --git a/usb.current/usb-musb-fix-configdata-register-read-issue.patch b/usb.current/usb-musb-fix-configdata-register-read-issue.patch
index f09a632e916fa7..f84c8229c67897 100644
--- a/usb.current/usb-musb-fix-configdata-register-read-issue.patch
+++ b/usb.current/usb-musb-fix-configdata-register-read-issue.patch
@@ -20,7 +20,7 @@ causing module reinset failure.
Fixing the issue by moving INDEX register write part to
musb_read_configdata() function itself.
-Signed-off-by: Vikram Pandita <vikram.pandita at ti.com>
+Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
diff --git a/usb.current/usb-usbtest-no-need-for-usb_devicefs.patch b/usb.current/usb-usbtest-no-need-for-usb_devicefs.patch
new file mode 100644
index 00000000000000..18c2e89532b5b5
--- /dev/null
+++ b/usb.current/usb-usbtest-no-need-for-usb_devicefs.patch
@@ -0,0 +1,30 @@
+From stern@rowland.harvard.edu Tue Jul 28 10:06:26 2009
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Tue, 28 Jul 2009 11:56:17 -0400 (EDT)
+Subject: USB: usbtest: no need for USB_DEVICEFS
+To: Greg KH <greg@kroah.com>
+Message-ID: <Pine.LNX.4.44L0.0907281155190.2653-100000@iolanthe.rowland.org>
+
+
+THis patch (as1270) allows the usbtest module to be built even when
+USB_DEVICEFS isn't configured. Tests can be performed without
+USB_DEVICEFS, using the /dev/bus/usb/*/* device files.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/misc/Kconfig
++++ b/drivers/usb/misc/Kconfig
+@@ -220,7 +220,7 @@ config USB_IOWARRIOR
+
+ config USB_TEST
+ tristate "USB testing driver"
+- depends on USB && USB_DEVICEFS
++ depends on USB
+ help
+ This driver is for testing host controller software. It is used
+ with specialized device firmware for regression and stress testing,
diff --git a/usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch b/usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch
new file mode 100644
index 00000000000000..f1dc844f75124e
--- /dev/null
+++ b/usb/usb-at91-add-usb-ehci-driver-for-at91sam9g45-series.patch
@@ -0,0 +1,282 @@
+From david-b@pacbell.net Tue Jul 28 10:33:04 2009
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+Date: Mon, 27 Jul 2009 14:47:40 -0700
+Subject: USB: at91: Add USB EHCI driver for at91sam9g45 series
+To: Greg KH <greg@kroah.com>
+Cc: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>, patrice.vilchez@atmel.com, Haavard Skinnemoen <hskinnemoen@atmel.com>
+Message-ID: <200907271447.40995.david-b@pacbell.net>
+
+
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+
+Add host USB High speed driver for at91sam9g45 series.
+The host driver is an EHCI with its companion OHCI. EHCI is
+handled by the new ehci-atmel.c whereas the OHCI is always
+handled by ohci-at91.c.
+
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+
+---
+ drivers/usb/Kconfig | 1
+ drivers/usb/host/ehci-atmel.c | 230 ++++++++++++++++++++++++++++++++++++++++++
+ drivers/usb/host/ehci-hcd.c | 5
+ 3 files changed, 236 insertions(+)
+
+--- /dev/null
++++ b/drivers/usb/host/ehci-atmel.c
+@@ -0,0 +1,230 @@
++/*
++ * Driver for EHCI UHP on Atmel chips
++ *
++ * Copyright (C) 2009 Atmel Corporation,
++ * Nicolas Ferre <nicolas.ferre@atmel.com>
++ *
++ * Based on various ehci-*.c drivers
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ */
++
++#include <linux/clk.h>
++#include <linux/platform_device.h>
++
++/* interface and function clocks */
++static struct clk *iclk, *fclk;
++static int clocked;
++
++/*-------------------------------------------------------------------------*/
++
++static void atmel_start_clock(void)
++{
++ clk_enable(iclk);
++ clk_enable(fclk);
++ clocked = 1;
++}
++
++static void atmel_stop_clock(void)
++{
++ clk_disable(fclk);
++ clk_disable(iclk);
++ clocked = 0;
++}
++
++static void atmel_start_ehci(struct platform_device *pdev)
++{
++ dev_dbg(&pdev->dev, "start\n");
++ atmel_start_clock();
++}
++
++static void atmel_stop_ehci(struct platform_device *pdev)
++{
++ dev_dbg(&pdev->dev, "stop\n");
++ atmel_stop_clock();
++}
++
++/*-------------------------------------------------------------------------*/
++
++static int ehci_atmel_setup(struct usb_hcd *hcd)
++{
++ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
++ int retval = 0;
++
++ /* registers start at offset 0x0 */
++ ehci->caps = hcd->regs;
++ ehci->regs = hcd->regs +
++ HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
++ dbg_hcs_params(ehci, "reset");
++ dbg_hcc_params(ehci, "reset");
++
++ /* cache this readonly data; minimize chip reads */
++ ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
++
++ retval = ehci_halt(ehci);
++ if (retval)
++ return retval;
++
++ /* data structure init */
++ retval = ehci_init(hcd);
++ if (retval)
++ return retval;
++
++ ehci->sbrn = 0x20;
++
++ ehci_reset(ehci);
++ ehci_port_power(ehci, 0);
++
++ return retval;
++}
++
++static const struct hc_driver ehci_atmel_hc_driver = {
++ .description = hcd_name,
++ .product_desc = "Atmel EHCI UHP HS",
++ .hcd_priv_size = sizeof(struct ehci_hcd),
++
++ /* generic hardware linkage */
++ .irq = ehci_irq,
++ .flags = HCD_MEMORY | HCD_USB2,
++
++ /* basic lifecycle operations */
++ .reset = ehci_atmel_setup,
++ .start = ehci_run,
++ .stop = ehci_stop,
++ .shutdown = ehci_shutdown,
++
++ /* managing i/o requests and associated device resources */
++ .urb_enqueue = ehci_urb_enqueue,
++ .urb_dequeue = ehci_urb_dequeue,
++ .endpoint_disable = ehci_endpoint_disable,
++
++ /* scheduling support */
++ .get_frame_number = ehci_get_frame,
++
++ /* root hub support */
++ .hub_status_data = ehci_hub_status_data,
++ .hub_control = ehci_hub_control,
++ .bus_suspend = ehci_bus_suspend,
++ .bus_resume = ehci_bus_resume,
++ .relinquish_port = ehci_relinquish_port,
++ .port_handed_over = ehci_port_handed_over,
++};
++
++static int __init ehci_atmel_drv_probe(struct platform_device *pdev)
++{
++ struct usb_hcd *hcd;
++ const struct hc_driver *driver = &ehci_atmel_hc_driver;
++ struct resource *res;
++ int irq;
++ int retval;
++
++ if (usb_disabled())
++ return -ENODEV;
++
++ pr_debug("Initializing Atmel-SoC USB Host Controller\n");
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq <= 0) {
++ dev_err(&pdev->dev,
++ "Found HC with no IRQ. Check %s setup!\n",
++ dev_name(&pdev->dev));
++ retval = -ENODEV;
++ goto fail_create_hcd;
++ }
++
++ hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
++ if (!hcd) {
++ retval = -ENOMEM;
++ goto fail_create_hcd;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res) {
++ dev_err(&pdev->dev,
++ "Found HC with no register addr. Check %s setup!\n",
++ dev_name(&pdev->dev));
++ retval = -ENODEV;
++ goto fail_request_resource;
++ }
++ hcd->rsrc_start = res->start;
++ hcd->rsrc_len = res->end - res->start + 1;
++
++ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
++ driver->description)) {
++ dev_dbg(&pdev->dev, "controller already in use\n");
++ retval = -EBUSY;
++ goto fail_request_resource;
++ }
++
++ hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
++ if (hcd->regs == NULL) {
++ dev_dbg(&pdev->dev, "error mapping memory\n");
++ retval = -EFAULT;
++ goto fail_ioremap;
++ }
++
++ iclk = clk_get(&pdev->dev, "ehci_clk");
++ if (IS_ERR(iclk)) {
++ dev_err(&pdev->dev, "Error getting interface clock\n");
++ retval = -ENOENT;
++ goto fail_get_iclk;
++ }
++ fclk = clk_get(&pdev->dev, "uhpck");
++ if (IS_ERR(fclk)) {
++ dev_err(&pdev->dev, "Error getting function clock\n");
++ retval = -ENOENT;
++ goto fail_get_fclk;
++ }
++
++ atmel_start_ehci(pdev);
++
++ retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
++ if (retval)
++ goto fail_add_hcd;
++
++ return retval;
++
++fail_add_hcd:
++ atmel_stop_ehci(pdev);
++ clk_put(fclk);
++fail_get_fclk:
++ clk_put(iclk);
++fail_get_iclk:
++ iounmap(hcd->regs);
++fail_ioremap:
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++fail_request_resource:
++ usb_put_hcd(hcd);
++fail_create_hcd:
++ dev_err(&pdev->dev, "init %s fail, %d\n",
++ dev_name(&pdev->dev), retval);
++
++ return retval;
++}
++
++static int __exit ehci_atmel_drv_remove(struct platform_device *pdev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(pdev);
++
++ ehci_shutdown(hcd);
++ usb_remove_hcd(hcd);
++ iounmap(hcd->regs);
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++ usb_put_hcd(hcd);
++
++ atmel_stop_ehci(pdev);
++ clk_put(fclk);
++ clk_put(iclk);
++ fclk = iclk = NULL;
++
++ return 0;
++}
++
++static struct platform_driver ehci_atmel_driver = {
++ .probe = ehci_atmel_drv_probe,
++ .remove = __exit_p(ehci_atmel_drv_remove),
++ .shutdown = usb_hcd_platform_shutdown,
++ .driver.name = "atmel-ehci",
++};
+--- a/drivers/usb/host/ehci-hcd.c
++++ b/drivers/usb/host/ehci-hcd.c
+@@ -1135,6 +1135,11 @@ MODULE_LICENSE ("GPL");
+ #define PLATFORM_DRIVER ehci_hcd_w90x900_driver
+ #endif
+
++#ifdef CONFIG_ARCH_AT91
++#include "ehci-atmel.c"
++#define PLATFORM_DRIVER ehci_atmel_driver
++#endif
++
+ #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
+ !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER)
+ #error "missing bus glue for ehci-hcd"
+--- a/drivers/usb/Kconfig
++++ b/drivers/usb/Kconfig
+@@ -60,6 +60,7 @@ config USB_ARCH_HAS_EHCI
+ default y if SOC_AU1200
+ default y if ARCH_IXP4XX
+ default y if ARCH_W90X900
++ default y if ARCH_AT91SAM9G45
+ default PCI
+
+ # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
diff --git a/usb/usb-at91-add-usb-gadget-driver-selection-for-at91sam9g45-series.patch b/usb/usb-at91-add-usb-gadget-driver-selection-for-at91sam9g45-series.patch
new file mode 100644
index 00000000000000..cc58655d67ba60
--- /dev/null
+++ b/usb/usb-at91-add-usb-gadget-driver-selection-for-at91sam9g45-series.patch
@@ -0,0 +1,43 @@
+From david-b@pacbell.net Tue Jul 28 10:34:24 2009
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+Date: Mon, 27 Jul 2009 15:00:35 -0700
+Subject: USB: at91: Add USB gadget driver selection for at91sam9g45 series
+To: Greg KH <greg@kroah.com>
+Cc: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
+Message-ID: <200907271500.35221.david-b@pacbell.net>
+
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+
+Add gadget USB drivers for at91sam9g45 series. Those SOC include
+high speed USB interfaces.
+The gadget driver is the already available atmel_usba_udc.
+
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/gadget/Kconfig | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/Kconfig
++++ b/drivers/usb/gadget/Kconfig
+@@ -124,7 +124,7 @@ choice
+
+ config USB_GADGET_AT91
+ boolean "Atmel AT91 USB Device Port"
+- depends on ARCH_AT91 && !ARCH_AT91SAM9RL && !ARCH_AT91CAP9
++ depends on ARCH_AT91 && !ARCH_AT91SAM9RL && !ARCH_AT91CAP9 && !ARCH_AT91SAM9G45
+ select USB_GADGET_SELECTED
+ help
+ Many Atmel AT91 processors (such as the AT91RM2000) have a
+@@ -143,7 +143,7 @@ config USB_AT91
+ config USB_GADGET_ATMEL_USBA
+ boolean "Atmel USBA"
+ select USB_GADGET_DUALSPEED
+- depends on AVR32 || ARCH_AT91CAP9 || ARCH_AT91SAM9RL
++ depends on AVR32 || ARCH_AT91CAP9 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+ help
+ USBA is the integrated high-speed USB Device controller on
+ the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
diff --git a/usb/usb-at91-modify-ohci-driver-to-allow-shared-interrupts.patch b/usb/usb-at91-modify-ohci-driver-to-allow-shared-interrupts.patch
new file mode 100644
index 00000000000000..73de36b8db1e0a
--- /dev/null
+++ b/usb/usb-at91-modify-ohci-driver-to-allow-shared-interrupts.patch
@@ -0,0 +1,37 @@
+From david-b@pacbell.net Tue Jul 28 10:34:49 2009
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+Date: Mon, 27 Jul 2009 14:59:24 -0700
+Subject: USB: at91: modify OHCI driver to allow shared interrupts
+To: Greg KH <greg@kroah.com>
+Cc: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
+Message-ID: <200907271459.24520.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+
+At91sam9g45 series has a set of high speed USB interfaces.
+The host driver is an EHCI with its companion OHCI. OHCI is
+always handled by ohci-at91.c.
+This wrapper is just modified to allow IRQ sharing
+between two controllers.
+
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-at91.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-at91.c
++++ b/drivers/usb/host/ohci-at91.c
+@@ -148,7 +148,7 @@ static int usb_hcd_at91_probe(const stru
+ at91_start_hc(pdev);
+ ohci_hcd_init(hcd_to_ohci(hcd));
+
+- retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED);
++ retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED);
+ if (retval == 0)
+ return retval;
+
diff --git a/usb/usb-uhci-rm-repeatedly-evaluation-for-urbp-qh.patch b/usb/usb-uhci-rm-repeatedly-evaluation-for-urbp-qh.patch
new file mode 100644
index 00000000000000..bb5b3316b91623
--- /dev/null
+++ b/usb/usb-uhci-rm-repeatedly-evaluation-for-urbp-qh.patch
@@ -0,0 +1,26 @@
+From yjfpb04@gmail.com Tue Jul 28 10:08:23 2009
+From: Bob Liu <yjfpb04@gmail.com>
+Date: Tue, 28 Jul 2009 22:31:06 +0800
+Subject: USB: uhci: rm repeatedly evaluation for urbp->qh
+To: linux-usb@vger.kernel.org
+Cc: Bob Liu <bo-liu@hotmail.com>
+Message-ID: <1248791466-16279-1-git-send-email-bo-liu@hotmail.com>
+
+Signed-off-by: Bob Liu <yjfpb04@gmail.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/uhci-q.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/usb/host/uhci-q.c
++++ b/drivers/usb/host/uhci-q.c
+@@ -1422,7 +1422,6 @@ static int uhci_urb_enqueue(struct usb_h
+ goto err_submit_failed;
+
+ /* Add this URB to the QH */
+- urbp->qh = qh;
+ list_add_tail(&urbp->node, &qh->queue);
+
+ /* If the new URB is the first and only one on this QH then either