cns3xxx: add linux 3.8 support and use it by default
[openwrt/svn-archive/archive.git] / target / linux / cns3xxx / patches-3.8 / 200-dwc_otg_support.patch
1 --- a/drivers/Makefile
2 +++ b/drivers/Makefile
3 @@ -81,6 +81,7 @@ obj-$(CONFIG_PARIDE) += block/paride/
4 obj-$(CONFIG_TC) += tc/
5 obj-$(CONFIG_UWB) += uwb/
6 obj-$(CONFIG_USB_OTG_UTILS) += usb/
7 +obj-$(CONFIG_USB_DWC_OTG) += usb/dwc/
8 obj-$(CONFIG_USB) += usb/
9 obj-$(CONFIG_PCI) += usb/
10 obj-$(CONFIG_USB_GADGET) += usb/
11 --- a/drivers/usb/Kconfig
12 +++ b/drivers/usb/Kconfig
13 @@ -138,6 +138,8 @@ source "drivers/usb/chipidea/Kconfig"
14
15 source "drivers/usb/renesas_usbhs/Kconfig"
16
17 +source "drivers/usb/dwc/Kconfig"
18 +
19 source "drivers/usb/class/Kconfig"
20
21 source "drivers/usb/storage/Kconfig"
22 --- a/drivers/usb/core/urb.c
23 +++ b/drivers/usb/core/urb.c
24 @@ -17,7 +17,11 @@ static void urb_destroy(struct kref *kre
25
26 if (urb->transfer_flags & URB_FREE_BUFFER)
27 kfree(urb->transfer_buffer);
28 -
29 + if (urb->aligned_transfer_buffer) {
30 + kfree(urb->aligned_transfer_buffer);
31 + urb->aligned_transfer_buffer = 0;
32 + urb->aligned_transfer_dma = 0;
33 + }
34 kfree(urb);
35 }
36
37 --- a/include/linux/usb.h
38 +++ b/include/linux/usb.h
39 @@ -1401,6 +1401,9 @@ struct urb {
40 unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/
41 void *transfer_buffer; /* (in) associated data buffer */
42 dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */
43 + void *aligned_transfer_buffer; /* (in) associeated data buffer */
44 + dma_addr_t aligned_transfer_dma;/* (in) dma addr for transfer_buffer */
45 + u32 aligned_transfer_buffer_length; /* (in) data buffer length */
46 struct scatterlist *sg; /* (in) scatter gather buffer list */
47 int num_mapped_sgs; /* (internal) mapped sg entries */
48 int num_sgs; /* (in) number of entries in the sg list */