You can subscribe to this list here.
1999 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2000 |
Jan
(19) |
Feb
(11) |
Mar
(56) |
Apr
(31) |
May
(37) |
Jun
(21) |
Jul
(30) |
Aug
(31) |
Sep
(25) |
Oct
(60) |
Nov
(28) |
Dec
(57) |
2001 |
Jan
(47) |
Feb
(119) |
Mar
(279) |
Apr
(198) |
May
(336) |
Jun
(201) |
Jul
(136) |
Aug
(123) |
Sep
(123) |
Oct
(185) |
Nov
(66) |
Dec
(97) |
2002 |
Jan
(318) |
Feb
(101) |
Mar
(167) |
Apr
(233) |
May
(249) |
Jun
(134) |
Jul
(195) |
Aug
(99) |
Sep
(278) |
Oct
(435) |
Nov
(326) |
Dec
(325) |
2003 |
Jan
(214) |
Feb
(309) |
Mar
(142) |
Apr
(141) |
May
(210) |
Jun
(86) |
Jul
(133) |
Aug
(218) |
Sep
(315) |
Oct
(152) |
Nov
(162) |
Dec
(288) |
2004 |
Jan
(277) |
Feb
(267) |
Mar
(182) |
Apr
(168) |
May
(254) |
Jun
(131) |
Jul
(168) |
Aug
(177) |
Sep
(262) |
Oct
(309) |
Nov
(262) |
Dec
(255) |
2005 |
Jan
(258) |
Feb
(169) |
Mar
(282) |
Apr
(208) |
May
(262) |
Jun
(187) |
Jul
(207) |
Aug
(171) |
Sep
(283) |
Oct
(216) |
Nov
(307) |
Dec
(107) |
2006 |
Jan
(207) |
Feb
(82) |
Mar
(192) |
Apr
(165) |
May
(121) |
Jun
(108) |
Jul
(120) |
Aug
(126) |
Sep
(101) |
Oct
(216) |
Nov
(95) |
Dec
(125) |
2007 |
Jan
(176) |
Feb
(117) |
Mar
(240) |
Apr
(120) |
May
(81) |
Jun
(82) |
Jul
(62) |
Aug
(120) |
Sep
(103) |
Oct
(109) |
Nov
(181) |
Dec
(87) |
2008 |
Jan
(145) |
Feb
(69) |
Mar
(31) |
Apr
(98) |
May
(91) |
Jun
(43) |
Jul
(68) |
Aug
(135) |
Sep
(48) |
Oct
(18) |
Nov
(29) |
Dec
(16) |
2009 |
Jan
(26) |
Feb
(15) |
Mar
(83) |
Apr
(39) |
May
(23) |
Jun
(35) |
Jul
(11) |
Aug
(3) |
Sep
(11) |
Oct
(2) |
Nov
(28) |
Dec
(8) |
2010 |
Jan
(4) |
Feb
(40) |
Mar
(4) |
Apr
(46) |
May
(35) |
Jun
(46) |
Jul
(10) |
Aug
(4) |
Sep
(50) |
Oct
(70) |
Nov
(31) |
Dec
(24) |
2011 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(50) |
May
(75) |
Jun
(55) |
Jul
(72) |
Aug
(272) |
Sep
(10) |
Oct
(9) |
Nov
(11) |
Dec
(15) |
2012 |
Jan
(36) |
Feb
(49) |
Mar
(54) |
Apr
(47) |
May
(8) |
Jun
(82) |
Jul
(20) |
Aug
(50) |
Sep
(51) |
Oct
(20) |
Nov
(10) |
Dec
(25) |
2013 |
Jan
(34) |
Feb
(4) |
Mar
(24) |
Apr
(40) |
May
(101) |
Jun
(30) |
Jul
(55) |
Aug
(84) |
Sep
(53) |
Oct
(49) |
Nov
(61) |
Dec
(36) |
2014 |
Jan
(26) |
Feb
(22) |
Mar
(30) |
Apr
(4) |
May
(43) |
Jun
(33) |
Jul
(44) |
Aug
(61) |
Sep
(46) |
Oct
(154) |
Nov
(16) |
Dec
(12) |
2015 |
Jan
(18) |
Feb
(2) |
Mar
(122) |
Apr
(23) |
May
(56) |
Jun
(29) |
Jul
(35) |
Aug
(15) |
Sep
|
Oct
(45) |
Nov
(94) |
Dec
(38) |
2016 |
Jan
(50) |
Feb
(39) |
Mar
(39) |
Apr
(1) |
May
(14) |
Jun
(12) |
Jul
(19) |
Aug
(12) |
Sep
(9) |
Oct
(1) |
Nov
(13) |
Dec
(7) |
2017 |
Jan
(6) |
Feb
(1) |
Mar
(16) |
Apr
(5) |
May
(61) |
Jun
(18) |
Jul
(43) |
Aug
(1) |
Sep
(8) |
Oct
(25) |
Nov
(30) |
Dec
(6) |
2018 |
Jan
(5) |
Feb
(2) |
Mar
(25) |
Apr
(15) |
May
(2) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Richard W. <ri...@no...> - 2016-03-05 21:32:51
|
Linus, The following changes since commit fc77dbd34c5c99bce46d40a2491937c3bcbd10af: Linux 4.5-rc6 (2016-02-28 08:41:20 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git for-linus-4.5-rc7 for you to fetch changes up to ad32a1f3c36b046b2e7b0361b88c18e3af61419e: um: use %lx format specifiers for unsigned longs (2016-03-05 22:21:28 +0100) ---------------------------------------------------------------- This pull request contains three bug/build fixes. ---------------------------------------------------------------- Colin Ian King (1): um: use %lx format specifiers for unsigned longs Richard Weinberger (2): Revert "um: Fix get_signal() usage" um: Export pm_power_off arch/um/kernel/reboot.c | 1 + arch/um/kernel/signal.c | 2 +- arch/x86/um/os-Linux/task_size.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) |
From: Greg Kroah-H. <gr...@li...> - 2016-02-22 03:09:41
|
On Sun, Feb 21, 2016 at 10:46:59PM +0100, Geert Uytterhoeven wrote: > Hi Greg, > > On Sun, Feb 21, 2016 at 5:23 AM, Greg Kroah-Hartman > <gr...@li...> wrote: > > On Tue, Feb 16, 2016 at 04:10:57PM +0100, Geert Uytterhoeven wrote: > >> Some platforms don't have DMA, but we should still be able to build USB > >> drivers for these platforms. They could still be used through vhci_hcd, > >> usbip_host, or maybe something like USB passthrough in UML from a > >> capable host. > >> > >> If NO_DMA=y: > >> > >> ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined! > >> ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined! > >> ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined! > >> ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined! > >> ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined! > >> > >> Add a few checks for CONFIG_HAS_DMA to fix this. > >> > >> Signed-off-by: Geert Uytterhoeven <ge...@li...> > >> Acked-by: Vegard Nossum <veg...@or...> > >> --- > >> v2: > >> - Replace remaining #ifdefs by IS_ENABLED() checks, > >> - Add to patch description that this actually allows using USB on UML, > >> - Add Acked-by. > > > > This patch didn't apply to my tree, can you rebase it against usb-next > > of usb.git and resend? > > Are you sure it's this one that didn't apply? It's already in usb-testing? > > "[2/3] usb: host: Host drivers relying on DMA should depend on HAS_DMA" > doesn't apply, as your tree gained some HAS_IOMEM dependencies, so I'll > resend. Thanks, I think you were right. greg k-h |
From: Geert U. <ge...@li...> - 2016-02-21 21:47:07
|
Hi Greg, On Sun, Feb 21, 2016 at 5:23 AM, Greg Kroah-Hartman <gr...@li...> wrote: > On Tue, Feb 16, 2016 at 04:10:57PM +0100, Geert Uytterhoeven wrote: >> Some platforms don't have DMA, but we should still be able to build USB >> drivers for these platforms. They could still be used through vhci_hcd, >> usbip_host, or maybe something like USB passthrough in UML from a >> capable host. >> >> If NO_DMA=y: >> >> ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined! >> >> Add a few checks for CONFIG_HAS_DMA to fix this. >> >> Signed-off-by: Geert Uytterhoeven <ge...@li...> >> Acked-by: Vegard Nossum <veg...@or...> >> --- >> v2: >> - Replace remaining #ifdefs by IS_ENABLED() checks, >> - Add to patch description that this actually allows using USB on UML, >> - Add Acked-by. > > This patch didn't apply to my tree, can you rebase it against usb-next > of usb.git and resend? Are you sure it's this one that didn't apply? It's already in usb-testing? "[2/3] usb: host: Host drivers relying on DMA should depend on HAS_DMA" doesn't apply, as your tree gained some HAS_IOMEM dependencies, so I'll resend. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |
From: Greg Kroah-H. <gr...@li...> - 2016-02-21 04:28:28
|
On Tue, Feb 16, 2016 at 04:10:57PM +0100, Geert Uytterhoeven wrote: > Some platforms don't have DMA, but we should still be able to build USB > drivers for these platforms. They could still be used through vhci_hcd, > usbip_host, or maybe something like USB passthrough in UML from a > capable host. > > If NO_DMA=y: > > ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined! > > Add a few checks for CONFIG_HAS_DMA to fix this. > > Signed-off-by: Geert Uytterhoeven <ge...@li...> > Acked-by: Vegard Nossum <veg...@or...> > --- > v2: > - Replace remaining #ifdefs by IS_ENABLED() checks, > - Add to patch description that this actually allows using USB on UML, > - Add Acked-by. This patch didn't apply to my tree, can you rebase it against usb-next of usb.git and resend? thanks, greg k-h |
From: Vegard N. <veg...@or...> - 2016-02-16 12:35:43
|
On 02/15/2016 09:38 PM, Vegard Nossum wrote: > On 02/15/2016 01:28 PM, Geert Uytterhoeven wrote: >> On Mon, Feb 15, 2016 at 12:49 PM, Vegard Nossum >> <veg...@or...> wrote: >>> On 02/15/2016 12:21 PM, Geert Uytterhoeven wrote: [...] >>> Assuming this still lets the platform actually run USB drivers (which it >>> looks like it does -- I still have to test it), then I'm all for it. You >> >> Please give it a try and let me know, as I'm not in a position to >> test-run >> this on Sun-3. > > Hrm, I can't quite get usb-over-ip working, I get this in the UML guest > when trying to attach the host device: [...] > That said, I haven't tried if it works with my patches either, so it > might be something else. Ok, so I managed to get UML to read a USB flash drive plugged into the host machine using USB-over-IP: mconsole (version 2) initialized on /home/vegard/.uml/eaqEV4/mconsole Checking host MADV_REMOVE support...OK UML Audio Relay (host dsp = /dev/sound/dsp, host mixer = /dev/sound/mixer) [...] vhci_hcd vhci_hcd: rhport(0) sockfd(3) devid(65538) speed(3) speed_str(high-speed) usb 2-1: new high-speed USB device number 2 using vhci_hcd usb 2-1: new high-speed USB device number 3 using vhci_hcd usb 2-1: new high-speed USB device number 4 using vhci_hcd usb 2-1: SetAddress Request (4) to port 0 usb 2-1: New USB device found, idVendor=0000, idProduct=0000 usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-1: Product: USB usb 2-1: Manufacturer: SMI Corporation usb 2-1: SerialNumber: AA627084901000000298 usb-storage 2-1:1.0: USB Mass Storage device detected scsi host0: usb-storage 2-1:1.0 scsi 0:0:0:0: Direct-Access ST 2GB 0000 PQ: 0 ANSI: 0 CCS sd 0:0:0:0: Attached scsi generic sg0 type 0 sd 0:0:0:0: [sda] 3915776 512-byte logical blocks: (2.00 GB/1.87 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 0:0:0:0: [sda] Attached SCSI removable disk This is using your patches (on top of the ones Greg already took), so feel free to add Acked-by: Vegard Nossum <veg...@or...> If you post the new version of your patch I can test that too :-) Thanks, Vegard |
From: Vegard N. <veg...@or...> - 2016-02-15 20:38:41
|
On 02/15/2016 01:28 PM, Geert Uytterhoeven wrote: > On Mon, Feb 15, 2016 at 12:49 PM, Vegard Nossum > <veg...@or...> wrote: >> On 02/15/2016 12:21 PM, Geert Uytterhoeven wrote: >>> If NO_DMA=y: >>> >>> ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined! >>> ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined! >>> ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined! >>> ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined! >>> ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined! >>> >>> Add a few checks for CONFIG_HAS_DMA to fix this. >>> >>> Signed-off-by: Geert Uytterhoeven <ge...@li...> >>> --- >>> drivers/usb/core/buffer.c | 18 ++++++++++++------ >>> drivers/usb/core/hcd.c | 14 ++++++++++---- >>> 2 files changed, 22 insertions(+), 10 deletions(-) >>> [...] >> Assuming this still lets the platform actually run USB drivers (which it >> looks like it does -- I still have to test it), then I'm all for it. You > > Please give it a try and let me know, as I'm not in a position to test-run > this on Sun-3. Hrm, I can't quite get usb-over-ip working, I get this in the UML guest when trying to attach the host device: # usbip -d attach -r 192.168.0.20 -b 2-1 usbip: debug: usbip.c:141:[run_command] running command: `attach' libusbip: debug: vhci_driver.c:242:[usbip_vhci_driver_open] available ports: 7 libusbip: debug: vhci_driver.c:71:[parse_status] port 0 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:71:[parse_status] port 1 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:71:[parse_status] port 2 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:71:[parse_status] port 3 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:71:[parse_status] port 4 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:71:[parse_status] port 5 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:71:[parse_status] port 6 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:71:[parse_status] port 7 status 4 speed 0 devid 0 libusbip: debug: vhci_driver.c:72:[parse_status] socket 0 lbusid 0000000000000000 libusbip: debug: vhci_driver.c:105:[parse_status] exit libusbip: debug: vhci_driver.c:311:[usbip_vhci_attach_device2] writing: 0 3 131074 5 libusbip: debug: vhci_driver.c:316:[usbip_vhci_attach_device2] attach attribute path: /sys/devices/platform/vhci_hcd/attach vhci_hcd: Failed attach request for unsupported USB speed: super-speed usbip: debug: sysfs_utils.c:23:[write_sysfs_attribute] error writing to attribute /sys/devices/platform/vhci_hcd/attach libusbip: debug: vhci_driver.c:320:[usbip_vhci_attach_device2] write_sysfs_attribute failed usbip: error: import device usbip: error: query That said, I haven't tried if it works with my patches either, so it might be something else. I'll dive into it tomorrow. Vegard |
From: Geert U. <ge...@li...> - 2016-02-15 12:28:45
|
Hi Vegard, On Mon, Feb 15, 2016 at 12:49 PM, Vegard Nossum <veg...@or...> wrote: > On 02/15/2016 12:21 PM, Geert Uytterhoeven wrote: >> If NO_DMA=y: >> >> ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined! >> ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined! >> >> Add a few checks for CONFIG_HAS_DMA to fix this. >> >> Signed-off-by: Geert Uytterhoeven <ge...@li...> >> --- >> drivers/usb/core/buffer.c | 18 ++++++++++++------ >> drivers/usb/core/hcd.c | 14 ++++++++++---- >> 2 files changed, 22 insertions(+), 10 deletions(-) >> > > This does look nicer than my patch. I'm happy you like it ;-) >> --- a/drivers/usb/core/hcd.c >> +++ b/drivers/usb/core/hcd.c >> @@ -1408,12 +1408,15 @@ static void hcd_free_coherent(struct usb_bus *bus, >> dma_addr_t *dma_handle, >> >> void usb_hcd_unmap_urb_setup_for_dma(struct usb_hcd *hcd, struct urb >> *urb) >> { >> +#ifdef CONFIG_HAS_DMA >> if (urb->transfer_flags & URB_SETUP_MAP_SINGLE) >> dma_unmap_single(hcd->self.controller, >> urb->setup_dma, >> sizeof(struct usb_ctrlrequest), >> DMA_TO_DEVICE); >> - else if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) >> + else >> +#endif /* CONFIG_HAS_DMA */ >> + if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) > > > Why not use IS_ENABLED() here as well instead of the ifdef? This used to be needed, else the calls to e.g. dma_unmap_single() would still cause link errors. This no longer seems to be the case (I told you this was a patch set I started a while ago ;-), probably due to the recent dma_map_ops conversion. Will update. > Assuming this still lets the platform actually run USB drivers (which it > looks like it does -- I still have to test it), then I'm all for it. You Please give it a try and let me know, as I'm not in a position to test-run this on Sun-3. > may want to steal parts of the commit description for my last patch to > include that this actually allows using USB on UML and the references to > the discussion. Thanks, will do! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |
From: Vegard N. <veg...@or...> - 2016-02-15 11:50:14
|
On 02/15/2016 12:21 PM, Geert Uytterhoeven wrote: > If NO_DMA=y: > > ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined! > ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined! > > Add a few checks for CONFIG_HAS_DMA to fix this. > > Signed-off-by: Geert Uytterhoeven <ge...@li...> > --- > drivers/usb/core/buffer.c | 18 ++++++++++++------ > drivers/usb/core/hcd.c | 14 ++++++++++---- > 2 files changed, 22 insertions(+), 10 deletions(-) > This does look nicer than my patch. > diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c > index 89f2e7765093955b..2741566ee4f25849 100644 > --- a/drivers/usb/core/buffer.c > +++ b/drivers/usb/core/buffer.c > @@ -62,8 +62,9 @@ int hcd_buffer_create(struct usb_hcd *hcd) > char name[16]; > int i, size; > > - if (!hcd->self.controller->dma_mask && > - !(hcd->driver->flags & HCD_LOCAL_MEM)) > + if (!IS_ENABLED(CONFIG_HAS_DMA) || > + (!hcd->self.controller->dma_mask && > + !(hcd->driver->flags & HCD_LOCAL_MEM))) > return 0; > > for (i = 0; i < HCD_BUFFER_POOLS; i++) { > @@ -93,6 +94,9 @@ void hcd_buffer_destroy(struct usb_hcd *hcd) > { > int i; > > + if (!IS_ENABLED(CONFIG_HAS_DMA)) > + return; > + > for (i = 0; i < HCD_BUFFER_POOLS; i++) { > struct dma_pool *pool = hcd->pool[i]; > > @@ -119,8 +123,9 @@ void *hcd_buffer_alloc( > int i; > > /* some USB hosts just use PIO */ > - if (!bus->controller->dma_mask && > - !(hcd->driver->flags & HCD_LOCAL_MEM)) { > + if (!IS_ENABLED(CONFIG_HAS_DMA) || > + (!bus->controller->dma_mask && > + !(hcd->driver->flags & HCD_LOCAL_MEM))) { > *dma = ~(dma_addr_t) 0; > return kmalloc(size, mem_flags); > } > @@ -145,8 +150,9 @@ void hcd_buffer_free( > if (!addr) > return; > > - if (!bus->controller->dma_mask && > - !(hcd->driver->flags & HCD_LOCAL_MEM)) { > + if (!IS_ENABLED(CONFIG_HAS_DMA) || > + (!bus->controller->dma_mask && > + !(hcd->driver->flags & HCD_LOCAL_MEM))) { > kfree(addr); > return; > } > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > index df0e3b92533a745f..f6caa7ba6f05655b 100644 > --- a/drivers/usb/core/hcd.c > +++ b/drivers/usb/core/hcd.c > @@ -1408,12 +1408,15 @@ static void hcd_free_coherent(struct usb_bus *bus, dma_addr_t *dma_handle, > > void usb_hcd_unmap_urb_setup_for_dma(struct usb_hcd *hcd, struct urb *urb) > { > +#ifdef CONFIG_HAS_DMA > if (urb->transfer_flags & URB_SETUP_MAP_SINGLE) > dma_unmap_single(hcd->self.controller, > urb->setup_dma, > sizeof(struct usb_ctrlrequest), > DMA_TO_DEVICE); > - else if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) > + else > +#endif /* CONFIG_HAS_DMA */ > + if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) Why not use IS_ENABLED() here as well instead of the ifdef? > hcd_free_coherent(urb->dev->bus, > &urb->setup_dma, > (void **) &urb->setup_packet, > @@ -1440,6 +1443,7 @@ void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) > usb_hcd_unmap_urb_setup_for_dma(hcd, urb); > > dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; > +#ifdef CONFIG_HAS_DMA > if (urb->transfer_flags & URB_DMA_MAP_SG) > dma_unmap_sg(hcd->self.controller, > urb->sg, > @@ -1455,7 +1459,9 @@ void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) > urb->transfer_dma, > urb->transfer_buffer_length, > dir); > - else if (urb->transfer_flags & URB_MAP_LOCAL) > + else > +#endif /* CONFIG_HAS_DMA */ > + if (urb->transfer_flags & URB_MAP_LOCAL) and here. > hcd_free_coherent(urb->dev->bus, > &urb->transfer_dma, > &urb->transfer_buffer, > @@ -1492,7 +1498,7 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, > if (usb_endpoint_xfer_control(&urb->ep->desc)) { > if (hcd->self.uses_pio_for_control) > return ret; > - if (hcd->self.uses_dma) { > + if (IS_ENABLED(CONFIG_HAS_DMA) && hcd->self.uses_dma) { > urb->setup_dma = dma_map_single( > hcd->self.controller, > urb->setup_packet, > @@ -1518,7 +1524,7 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, > dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; > if (urb->transfer_buffer_length != 0 > && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) { > - if (hcd->self.uses_dma) { > + if (IS_ENABLED(CONFIG_HAS_DMA) && hcd->self.uses_dma) { > if (urb->num_sgs) { > int n; > > Assuming this still lets the platform actually run USB drivers (which it looks like it does -- I still have to test it), then I'm all for it. You may want to steal parts of the commit description for my last patch to include that this actually allows using USB on UML and the references to the discussion. Thanks! Vegard |
From: Geert U. <ge...@li...> - 2016-02-15 11:17:10
|
Hi Vegard, On Mon, Feb 15, 2016 at 11:41 AM, Vegard Nossum <veg...@or...> wrote: > Some platforms don't have DMA, but we should still be able to build > USB drivers for these platforms. They could still be used through > vhci_hcd, usbip_host, or maybe something like USB passthrough in UML > from a capable host. > > This is admittedly ugly with the #ifdefs, but those are necessary to > get around linker errors like these: > > drivers/built-in.o: In function `dma_unmap_sg_attrs': > include/linux/dma-mapping.h:183: undefined reference to `bad_dma_ops' > drivers/built-in.o: In function `dma_unmap_single_attrs': > include/linux/dma-mapping.h:148: undefined reference to `bad_dma_ops' > drivers/built-in.o: In function `dma_map_sg_attrs': > include/linux/dma-mapping.h:168: undefined reference to `bad_dma_ops' > drivers/built-in.o: In function `dma_map_page': > include/linux/dma-mapping.h:196: undefined reference to `bad_dma_ops' > drivers/built-in.o: In function `dma_mapping_error': > include/linux/dma-mapping.h:430: undefined reference to `bad_dma_ops' > drivers/built-in.o:include/linux/dma-mapping.h:131: more undefined references to `bad_dma_ops' follow > > Greg KG suggested just defining these for UML [1] but according to > Richard Weinberger this has come up before and it was decided not to > do that just for the sake of making drivers build [2]. > > [1]: http://www.spinics.net/lists/linux-usb/msg136306.html > [2]: http://www.spinics.net/lists/linux-usb/msg136308.html > > If any of the new warnings trigger, the correct solution is almost > certainly to add a CONFIG_HAS_DMA dependency in the Kconfig menu for > the responsible driver -- that driver's functions will hopefully > appear somewhere in the stack trace. > > v2: Reduce the number of #ifdefs by moving code out into helpers. > > Signed-off-by: Vegard Nossum <veg...@or...> I have an even smaller patch that I've been updating over the years to compile allmodconfig/allyesconfig kernels for m68k/Sun-3. I'll clean it up and send it... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |
From: Vegard N. <veg...@or...> - 2016-02-15 10:42:06
|
Some platforms don't have DMA, but we should still be able to build USB drivers for these platforms. They could still be used through vhci_hcd, usbip_host, or maybe something like USB passthrough in UML from a capable host. This is admittedly ugly with the #ifdefs, but those are necessary to get around linker errors like these: drivers/built-in.o: In function `dma_unmap_sg_attrs': include/linux/dma-mapping.h:183: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_unmap_single_attrs': include/linux/dma-mapping.h:148: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_map_sg_attrs': include/linux/dma-mapping.h:168: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_map_page': include/linux/dma-mapping.h:196: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_mapping_error': include/linux/dma-mapping.h:430: undefined reference to `bad_dma_ops' drivers/built-in.o:include/linux/dma-mapping.h:131: more undefined references to `bad_dma_ops' follow Greg KG suggested just defining these for UML [1] but according to Richard Weinberger this has come up before and it was decided not to do that just for the sake of making drivers build [2]. [1]: http://www.spinics.net/lists/linux-usb/msg136306.html [2]: http://www.spinics.net/lists/linux-usb/msg136308.html If any of the new warnings trigger, the correct solution is almost certainly to add a CONFIG_HAS_DMA dependency in the Kconfig menu for the responsible driver -- that driver's functions will hopefully appear somewhere in the stack trace. v2: Reduce the number of #ifdefs by moving code out into helpers. Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/core/buffer.c | 94 ++++++++++++----- drivers/usb/core/hcd.c | 257 ++++++++++++++++++++++++++++++++++------------ include/linux/usb/hcd.h | 6 ++ 3 files changed, 266 insertions(+), 91 deletions(-) diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 89f2e77..17f416d 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -44,6 +44,28 @@ void __init usb_init_pool_max(void) /* SETUP primitives */ +static int _hcd_buffer_create(struct usb_hcd *hcd) +{ +#ifdef CONFIG_HAS_DMA + char name[16]; + int i, size; + + for (i = 0; i < HCD_BUFFER_POOLS; i++) { + size = pool_max[i]; + if (!size) + continue; + snprintf(name, sizeof(name), "buffer-%d", size); + hcd->pool[i] = dma_pool_create(name, hcd->self.controller, + size, size, 0); + if (!hcd->pool[i]) { + hcd_buffer_destroy(hcd); + return -ENOMEM; + } + } +#endif + return 0; +} + /** * hcd_buffer_create - initialize buffer pools * @hcd: the bus whose buffer pools are to be initialized @@ -59,26 +81,11 @@ void __init usb_init_pool_max(void) */ int hcd_buffer_create(struct usb_hcd *hcd) { - char name[16]; - int i, size; - if (!hcd->self.controller->dma_mask && !(hcd->driver->flags & HCD_LOCAL_MEM)) return 0; - for (i = 0; i < HCD_BUFFER_POOLS; i++) { - size = pool_max[i]; - if (!size) - continue; - snprintf(name, sizeof(name), "buffer-%d", size); - hcd->pool[i] = dma_pool_create(name, hcd->self.controller, - size, size, 0); - if (!hcd->pool[i]) { - hcd_buffer_destroy(hcd); - return -ENOMEM; - } - } - return 0; + return _hcd_buffer_create(hcd); } @@ -91,6 +98,7 @@ int hcd_buffer_create(struct usb_hcd *hcd) */ void hcd_buffer_destroy(struct usb_hcd *hcd) { +#ifdef CONFIG_HAS_DMA int i; for (i = 0; i < HCD_BUFFER_POOLS; i++) { @@ -101,6 +109,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd) hcd->pool[i] = NULL; } } +#endif } @@ -108,6 +117,27 @@ void hcd_buffer_destroy(struct usb_hcd *hcd) * better sharing and to leverage mm/slab.c intelligence. */ +static void *_hcd_buffer_alloc( + struct usb_hcd *hcd, + size_t size, + gfp_t mem_flags, + dma_addr_t *dma +) +{ +#ifdef CONFIG_HAS_DMA + int i; + + for (i = 0; i < HCD_BUFFER_POOLS; i++) { + if (size <= pool_max[i]) + return dma_pool_alloc(hcd->pool[i], mem_flags, dma); + } + return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); +#else + WARN_ON_NO_DMA(); + return NULL; +#endif +} + void *hcd_buffer_alloc( struct usb_bus *bus, size_t size, @@ -116,7 +146,6 @@ void *hcd_buffer_alloc( ) { struct usb_hcd *hcd = bus_to_hcd(bus); - int i; /* some USB hosts just use PIO */ if (!bus->controller->dma_mask && @@ -125,11 +154,27 @@ void *hcd_buffer_alloc( return kmalloc(size, mem_flags); } + return _hcd_buffer_alloc(hcd, size, mem_flags, dma); +} + +static void _hcd_buffer_free( + struct usb_hcd *hcd, + size_t size, + void *addr, + dma_addr_t dma +) +{ +#ifdef CONFIG_HAS_DMA + int i; + for (i = 0; i < HCD_BUFFER_POOLS; i++) { - if (size <= pool_max[i]) - return dma_pool_alloc(hcd->pool[i], mem_flags, dma); + if (size <= pool_max[i]) { + dma_pool_free(hcd->pool[i], addr, dma); + return; + } } - return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); + dma_free_coherent(hcd->self.controller, size, addr, dma); +#endif } void hcd_buffer_free( @@ -140,7 +185,6 @@ void hcd_buffer_free( ) { struct usb_hcd *hcd = bus_to_hcd(bus); - int i; if (!addr) return; @@ -151,11 +195,5 @@ void hcd_buffer_free( return; } - for (i = 0; i < HCD_BUFFER_POOLS; i++) { - if (size <= pool_max[i]) { - dma_pool_free(hcd->pool[i], addr, dma); - return; - } - } - dma_free_coherent(hcd->self.controller, size, addr, dma); + _hcd_buffer_free(hcd, size, addr, dma); } diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index df0e3b9..157592c 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1406,13 +1406,76 @@ static void hcd_free_coherent(struct usb_bus *bus, dma_addr_t *dma_handle, *dma_handle = 0; } +#ifdef CONFIG_HAS_DMA +static void _usb_hcd_unmap_urb_setup_for_dma_single(struct usb_hcd *hcd, + struct urb *urb) +{ + dma_unmap_single(hcd->self.controller, + urb->setup_dma, + sizeof(struct usb_ctrlrequest), + DMA_TO_DEVICE); +} + +static void _usb_hcd_unmap_urb_for_dma_sg(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ + dma_unmap_sg(hcd->self.controller, + urb->sg, + urb->num_sgs, + dir); +} + +static void _usb_hcd_unmap_urb_for_dma_page(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ + dma_unmap_page(hcd->self.controller, + urb->transfer_dma, + urb->transfer_buffer_length, + dir); +} + +static void _usb_hcd_unmap_urb_for_dma_single(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ + dma_unmap_single(hcd->self.controller, + urb->transfer_dma, + urb->transfer_buffer_length, + dir); +} + +#else /* !CONFIG_HAS_DMA */ + +static void _usb_hcd_unmap_urb_setup_for_dma_single(struct usb_hcd *hcd, + struct urb *urb) +{ +} + +static void _usb_hcd_unmap_urb_for_dma_sg(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ +} + +static void _usb_hcd_unmap_urb_for_dma_page(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ +} + +static void _usb_hcd_unmap_urb_for_dma_single(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ +} +#endif + void usb_hcd_unmap_urb_setup_for_dma(struct usb_hcd *hcd, struct urb *urb) { if (urb->transfer_flags & URB_SETUP_MAP_SINGLE) - dma_unmap_single(hcd->self.controller, - urb->setup_dma, - sizeof(struct usb_ctrlrequest), - DMA_TO_DEVICE); + _usb_hcd_unmap_urb_setup_for_dma_single(hcd, urb); else if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) hcd_free_coherent(urb->dev->bus, &urb->setup_dma, @@ -1441,20 +1504,11 @@ void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; if (urb->transfer_flags & URB_DMA_MAP_SG) - dma_unmap_sg(hcd->self.controller, - urb->sg, - urb->num_sgs, - dir); + _usb_hcd_unmap_urb_for_dma_sg(hcd, urb, dir); else if (urb->transfer_flags & URB_DMA_MAP_PAGE) - dma_unmap_page(hcd->self.controller, - urb->transfer_dma, - urb->transfer_buffer_length, - dir); + _usb_hcd_unmap_urb_for_dma_page(hcd, urb, dir); else if (urb->transfer_flags & URB_DMA_MAP_SINGLE) - dma_unmap_single(hcd->self.controller, - urb->transfer_dma, - urb->transfer_buffer_length, - dir); + _usb_hcd_unmap_urb_for_dma_single(hcd, urb, dir); else if (urb->transfer_flags & URB_MAP_LOCAL) hcd_free_coherent(urb->dev->bus, &urb->transfer_dma, @@ -1477,6 +1531,124 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); } +#ifdef CONFIG_HAS_DMA +static int _usb_hcd_map_urb_setup_for_dma_single(struct usb_hcd *hcd, + struct urb *urb) +{ + int ret = 0; + + urb->setup_dma = dma_map_single( + hcd->self.controller, + urb->setup_packet, + sizeof(struct usb_ctrlrequest), + DMA_TO_DEVICE); + if (dma_mapping_error(hcd->self.controller, + urb->setup_dma)) + ret = -EAGAIN; + else + urb->transfer_flags |= URB_SETUP_MAP_SINGLE; + + return ret; +} + +static int _usb_hcd_map_urb_for_dma_sg(struct usb_hcd *hcd, struct urb *urb, + enum dma_data_direction dir) +{ + int ret = 0; + int n; + + n = dma_map_sg( + hcd->self.controller, + urb->sg, + urb->num_sgs, + dir); + if (n <= 0) + ret = -EAGAIN; + else + urb->transfer_flags |= URB_DMA_MAP_SG; + + urb->num_mapped_sgs = n; + if (n != urb->num_sgs) + urb->transfer_flags |= + URB_DMA_SG_COMBINED; + + return ret; +} + +static int _usb_hcd_map_urb_for_dma_page(struct usb_hcd *hcd, struct urb *urb, + enum dma_data_direction dir) +{ + int ret = 0; + struct scatterlist *sg = urb->sg; + + urb->transfer_dma = dma_map_page( + hcd->self.controller, + sg_page(sg), + sg->offset, + urb->transfer_buffer_length, + dir); + if (dma_mapping_error(hcd->self.controller, + urb->transfer_dma)) + ret = -EAGAIN; + else + urb->transfer_flags |= URB_DMA_MAP_PAGE; + + return ret; +} + +static int _usb_hcd_map_urb_for_dma_single(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ + int ret = 0; + + urb->transfer_dma = dma_map_single( + hcd->self.controller, + urb->transfer_buffer, + urb->transfer_buffer_length, + dir); + if (dma_mapping_error(hcd->self.controller, + urb->transfer_dma)) + ret = -EAGAIN; + else + urb->transfer_flags |= URB_DMA_MAP_SINGLE; + + return ret; +} + + +#else /* !CONFIG_HAS_DMA */ + +static int _usb_hcd_map_urb_setup_for_dma_single(struct usb_hcd *hcd, + struct urb *urb) +{ + WARN_ON_NO_DMA(); + return -EINVAL; +} + +static int _usb_hcd_map_urb_for_dma_sg(struct usb_hcd *hcd, struct urb *urb, + enum dma_data_direction dir) +{ + WARN_ON_NO_DMA(); + return -EINVAL; +} + +static int _usb_hcd_map_urb_for_dma_page(struct usb_hcd *hcd, struct urb *urb, + enum dma_data_direction dir) +{ + WARN_ON_NO_DMA(); + return -EINVAL; +} + +static int _usb_hcd_map_urb_for_dma_single(struct usb_hcd *hcd, + struct urb *urb, + enum dma_data_direction dir) +{ + WARN_ON_NO_DMA(); + return -EINVAL; +} +#endif + int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) { @@ -1493,15 +1665,9 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, if (hcd->self.uses_pio_for_control) return ret; if (hcd->self.uses_dma) { - urb->setup_dma = dma_map_single( - hcd->self.controller, - urb->setup_packet, - sizeof(struct usb_ctrlrequest), - DMA_TO_DEVICE); - if (dma_mapping_error(hcd->self.controller, - urb->setup_dma)) - return -EAGAIN; - urb->transfer_flags |= URB_SETUP_MAP_SINGLE; + ret = _usb_hcd_map_urb_setup_for_dma_single(hcd, urb); + if (ret) + return ret; } else if (hcd->driver->flags & HCD_LOCAL_MEM) { ret = hcd_alloc_coherent( urb->dev->bus, mem_flags, @@ -1520,54 +1686,19 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) { if (hcd->self.uses_dma) { if (urb->num_sgs) { - int n; - /* We don't support sg for isoc transfers ! */ if (usb_endpoint_xfer_isoc(&urb->ep->desc)) { WARN_ON(1); return -EINVAL; } - - n = dma_map_sg( - hcd->self.controller, - urb->sg, - urb->num_sgs, - dir); - if (n <= 0) - ret = -EAGAIN; - else - urb->transfer_flags |= URB_DMA_MAP_SG; - urb->num_mapped_sgs = n; - if (n != urb->num_sgs) - urb->transfer_flags |= - URB_DMA_SG_COMBINED; + ret = _usb_hcd_map_urb_for_dma_sg(hcd, urb, dir); } else if (urb->sg) { - struct scatterlist *sg = urb->sg; - urb->transfer_dma = dma_map_page( - hcd->self.controller, - sg_page(sg), - sg->offset, - urb->transfer_buffer_length, - dir); - if (dma_mapping_error(hcd->self.controller, - urb->transfer_dma)) - ret = -EAGAIN; - else - urb->transfer_flags |= URB_DMA_MAP_PAGE; + ret = _usb_hcd_map_urb_for_dma_page(hcd, urb, dir); } else if (is_vmalloc_addr(urb->transfer_buffer)) { WARN_ONCE(1, "transfer buffer not dma capable\n"); ret = -EAGAIN; } else { - urb->transfer_dma = dma_map_single( - hcd->self.controller, - urb->transfer_buffer, - urb->transfer_buffer_length, - dir); - if (dma_mapping_error(hcd->self.controller, - urb->transfer_dma)) - ret = -EAGAIN; - else - urb->transfer_flags |= URB_DMA_MAP_SINGLE; + ret = _usb_hcd_map_urb_for_dma_single(hcd, urb, dir); } } else if (hcd->driver->flags & HCD_LOCAL_MEM) { ret = hcd_alloc_coherent( diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 4dcf844..1e90e59 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -409,6 +409,12 @@ static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd, return hcd->high_prio_bh.completing_ep == ep; } +#ifndef CONFIG_HAS_DMA +/* If this ever triggers, the correct fix is almost certainly + * to add a CONFIG_HAS_DMA dependency in the Kconfig for that driver. */ +#define WARN_ON_NO_DMA() WARN_ONCE(1, "HCD driver tried to use DMA memory") +#endif + extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, int status); -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-15 10:42:00
|
USB has not been usable on UML since this commit: commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 Author: Martin Schwidefsky <sch...@de...> Date: Thu May 10 15:45:57 2007 +0200 [S390] Kconfig: menus with depends on HAS_IOMEM. Add "depends on HAS_IOMEM" to a number of menus to make them disappear for s390 which does not have I/O memory. Signed-off-by: Martin Schwidefsky <sch...@de...> With hopefully all USB Host Controller Drivers that need it now depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT itself. This makes it possible to include USB support in UML builds again. Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 8ed451d..93ba109 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -21,7 +21,6 @@ config USB_EHCI_BIG_ENDIAN_DESC menuconfig USB_SUPPORT bool "USB support" - depends on HAS_IOMEM default y ---help--- This option adds core support for Universal Serial Bus (USB). -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-15 04:48:59
|
On 02/15/2016 02:09 AM, Greg Kroah-Hartman wrote: > On Wed, Feb 10, 2016 at 03:29:55PM +0100, Vegard Nossum wrote: >> Some platforms don't have DMA, but we should still be able to build >> USB drivers for these platforms. They could still be used through >> vhci_hcd, usbip_host, or maybe something like USB passthrough in UML >> from a capable host. >> >> This is admittedly ugly with all the #ifdefs, but it is necessary to >> get around linker errors like these: > > Sorry, you are going to have to do something else here, I can't accept > this patch, it's just too ugly to read :( > Ok, I'll work on an alternative. Thanks for the feedback ;-) Vegard |
From: Greg Kroah-H. <gr...@li...> - 2016-02-15 01:09:45
|
On Wed, Feb 10, 2016 at 03:29:55PM +0100, Vegard Nossum wrote: > Some platforms don't have DMA, but we should still be able to build > USB drivers for these platforms. They could still be used through > vhci_hcd, usbip_host, or maybe something like USB passthrough in UML > from a capable host. > > This is admittedly ugly with all the #ifdefs, but it is necessary to > get around linker errors like these: Sorry, you are going to have to do something else here, I can't accept this patch, it's just too ugly to read :( |
From: Richard W. <ri...@no...> - 2016-02-10 16:32:41
|
Am 10.02.2016 um 17:28 schrieb Vegard Nossum: > I don't think there is a "correct function" for when HAS_IOMEM is not > enabled. There is no IO address space on UML, so it doesn't make sense > to compile these drivers in the first place. > > Or do you mean to use the dummy implementation from asm-generic/io.h? (I > have to admit I don't know how that would work.) We already had an discussion of having an ioremap() like this for UML and S390: static inline void __iomem *ioremap(phys_addr_t offset, size_t size) { BUG(); return NULL; } But IMHO we should just fix the driver dependencies instead of providing dummy interfaces just for the sake of making things somehow build... Thanks, //richard |
From: Vegard N. <veg...@or...> - 2016-02-10 16:28:27
|
On 02/10/2016 05:15 PM, Greg Kroah-Hartman wrote: > On Wed, Feb 10, 2016 at 03:29:37PM +0100, Vegard Nossum wrote: >> drivers/usb/gadget/udc/net2272.c: In function ‘net2272_remove’: >> drivers/usb/gadget/udc/net2272.c:2232:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] >> iounmap(dev->base_addr); >> ^ >> drivers/usb/gadget/udc/net2272.c: In function ‘net2272_plat_probe’: >> drivers/usb/gadget/udc/net2272.c:2650:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration] >> dev->base_addr = ioremap_nocache(base, len); >> ^ >> drivers/usb/gadget/udc/net2272.c:2650:17: warning: assignment makes pointer from integer without a cast [enabled by default] >> dev->base_addr = ioremap_nocache(base, len); >> ^ >> >> Signed-off-by: Vegard Nossum <veg...@or...> >> --- >> drivers/usb/gadget/udc/Kconfig | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig >> index 753c29b..ca19f6f 100644 >> --- a/drivers/usb/gadget/udc/Kconfig >> +++ b/drivers/usb/gadget/udc/Kconfig >> @@ -287,6 +287,7 @@ config USB_FSL_QE >> dynamically linked module called "fsl_qe_udc". >> >> config USB_NET2272 >> + depends on HAS_IOMEM > > Why not fix the root of the problem and provide the correct functions > for this when HAS_IOMEM is not enabled? I don't think there is a "correct function" for when HAS_IOMEM is not enabled. There is no IO address space on UML, so it doesn't make sense to compile these drivers in the first place. Or do you mean to use the dummy implementation from asm-generic/io.h? (I have to admit I don't know how that would work.) Vegard |
From: Greg Kroah-H. <gr...@li...> - 2016-02-10 16:15:46
|
On Wed, Feb 10, 2016 at 03:29:37PM +0100, Vegard Nossum wrote: > drivers/usb/gadget/udc/net2272.c: In function ‘net2272_remove’: > drivers/usb/gadget/udc/net2272.c:2232:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] > iounmap(dev->base_addr); > ^ > drivers/usb/gadget/udc/net2272.c: In function ‘net2272_plat_probe’: > drivers/usb/gadget/udc/net2272.c:2650:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration] > dev->base_addr = ioremap_nocache(base, len); > ^ > drivers/usb/gadget/udc/net2272.c:2650:17: warning: assignment makes pointer from integer without a cast [enabled by default] > dev->base_addr = ioremap_nocache(base, len); > ^ > > Signed-off-by: Vegard Nossum <veg...@or...> > --- > drivers/usb/gadget/udc/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig > index 753c29b..ca19f6f 100644 > --- a/drivers/usb/gadget/udc/Kconfig > +++ b/drivers/usb/gadget/udc/Kconfig > @@ -287,6 +287,7 @@ config USB_FSL_QE > dynamically linked module called "fsl_qe_udc". > > config USB_NET2272 > + depends on HAS_IOMEM Why not fix the root of the problem and provide the correct functions for this when HAS_IOMEM is not enabled? thanks, greg k-h |
From: Vegard N. <veg...@or...> - 2016-02-10 14:45:22
|
On 02/10/2016 03:35 PM, Richard Weinberger wrote: > Am 10.02.2016 um 15:29 schrieb Vegard Nossum: >> USB has not been usable on UML since this commit: >> >> commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 >> Author: Martin Schwidefsky <sch...@de...> >> Date: Thu May 10 15:45:57 2007 +0200 >> >> [S390] Kconfig: menus with depends on HAS_IOMEM. >> >> Add "depends on HAS_IOMEM" to a number of menus to make them >> disappear for s390 which does not have I/O memory. >> >> Signed-off-by: Martin Schwidefsky <sch...@de...> >> >> With hopefully all USB Host Controller Drivers that need it now >> depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT >> itself. This makes it possible to include USB support in UML builds >> again. > > How do you use USB on uml? > Or is it just for build coverage? You can use usbip_host (USB over ip) to connect with real devices or gadgetfs (e.g. dummy_hcd) to emulate a device in the UML userspace which connects to the USB driver in the UML kernel. James McMechan at one time had some patches for passing through USB devices on the host to the UML kernel but I don't think it was ever merged. Anyway, that might be desirable to bring back at some point in the future. My specific use case is using gadgetfs inside UML for USB device driver fuzzing. Vegard |
From: Anton I. <ant...@ko...> - 2016-02-10 14:39:46
|
On 10/02/16 14:35, Richard Weinberger wrote: > Am 10.02.2016 um 15:29 schrieb Vegard Nossum: >> USB has not been usable on UML since this commit: >> >> commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 >> Author: Martin Schwidefsky <sch...@de...> >> Date: Thu May 10 15:45:57 2007 +0200 >> >> [S390] Kconfig: menus with depends on HAS_IOMEM. >> >> Add "depends on HAS_IOMEM" to a number of menus to make them >> disappear for s390 which does not have I/O memory. >> >> Signed-off-by: Martin Schwidefsky <sch...@de...> >> >> With hopefully all USB Host Controller Drivers that need it now >> depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT >> itself. This makes it possible to include USB support in UML builds >> again. > How do you use USB on uml? > Or is it just for build coverage? USB over Net should work. if that is working in the first place. A. > > Thanks, > //richard > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > User-mode-linux-devel mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel > |
From: Richard W. <ri...@no...> - 2016-02-10 14:35:41
|
Am 10.02.2016 um 15:29 schrieb Vegard Nossum: > USB has not been usable on UML since this commit: > > commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 > Author: Martin Schwidefsky <sch...@de...> > Date: Thu May 10 15:45:57 2007 +0200 > > [S390] Kconfig: menus with depends on HAS_IOMEM. > > Add "depends on HAS_IOMEM" to a number of menus to make them > disappear for s390 which does not have I/O memory. > > Signed-off-by: Martin Schwidefsky <sch...@de...> > > With hopefully all USB Host Controller Drivers that need it now > depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT > itself. This makes it possible to include USB support in UML builds > again. How do you use USB on uml? Or is it just for build coverage? Thanks, //richard |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:41
|
drivers/built-in.o: In function `isp1362_probe': /home/vegard/linux/drivers/usb/host/isp1362-hcd.c:2668: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 85230d6..438dcf6 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -357,6 +357,7 @@ config USB_ISP116X_HCD config USB_ISP1362_HCD tristate "ISP1362 HCD support" + depends on HAS_IOMEM ---help--- Supports the Philips ISP1362 chip as a host controller -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:39
|
USB has not been usable on UML since this commit: commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 Author: Martin Schwidefsky <sch...@de...> Date: Thu May 10 15:45:57 2007 +0200 [S390] Kconfig: menus with depends on HAS_IOMEM. Add "depends on HAS_IOMEM" to a number of menus to make them disappear for s390 which does not have I/O memory. Signed-off-by: Martin Schwidefsky <sch...@de...> With hopefully all USB Host Controller Drivers that need it now depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT itself. This makes it possible to include USB support in UML builds again. Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 8ed451d..93ba109 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -21,7 +21,6 @@ config USB_EHCI_BIG_ENDIAN_DESC menuconfig USB_SUPPORT bool "USB support" - depends on HAS_IOMEM default y ---help--- This option adds core support for Universal Serial Bus (USB). -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:38
|
Some platforms don't have DMA, but we should still be able to build USB drivers for these platforms. They could still be used through vhci_hcd, usbip_host, or maybe something like USB passthrough in UML from a capable host. This is admittedly ugly with all the #ifdefs, but it is necessary to get around linker errors like these: drivers/built-in.o: In function `dma_unmap_sg_attrs': include/linux/dma-mapping.h:183: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_unmap_single_attrs': include/linux/dma-mapping.h:148: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_map_sg_attrs': include/linux/dma-mapping.h:168: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_map_page': include/linux/dma-mapping.h:196: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_mapping_error': include/linux/dma-mapping.h:430: undefined reference to `bad_dma_ops' drivers/built-in.o:include/linux/dma-mapping.h:131: more undefined references to `bad_dma_ops' follow If any of the new warnings trigger, the correct solution is almost certainly to add a CONFIG_HAS_DMA dependency in the Kconfig menu for the responsible driver. Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/core/buffer.c | 17 +++++++++++++++++ drivers/usb/core/hcd.c | 45 +++++++++++++++++++++++++++++++++++++++------ include/linux/usb/hcd.h | 8 ++++++++ 3 files changed, 64 insertions(+), 6 deletions(-) diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 89f2e77..427b131 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -59,13 +59,16 @@ void __init usb_init_pool_max(void) */ int hcd_buffer_create(struct usb_hcd *hcd) { +#ifdef CONFIG_HAS_DMA char name[16]; int i, size; +#endif if (!hcd->self.controller->dma_mask && !(hcd->driver->flags & HCD_LOCAL_MEM)) return 0; +#ifdef CONFIG_HAS_DMA for (i = 0; i < HCD_BUFFER_POOLS; i++) { size = pool_max[i]; if (!size) @@ -78,6 +81,7 @@ int hcd_buffer_create(struct usb_hcd *hcd) return -ENOMEM; } } +#endif return 0; } @@ -91,6 +95,7 @@ int hcd_buffer_create(struct usb_hcd *hcd) */ void hcd_buffer_destroy(struct usb_hcd *hcd) { +#ifdef CONFIG_HAS_DMA int i; for (i = 0; i < HCD_BUFFER_POOLS; i++) { @@ -101,6 +106,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd) hcd->pool[i] = NULL; } } +#endif } @@ -116,7 +122,9 @@ void *hcd_buffer_alloc( ) { struct usb_hcd *hcd = bus_to_hcd(bus); +#ifdef CONFIG_HAS_DMA int i; +#endif /* some USB hosts just use PIO */ if (!bus->controller->dma_mask && @@ -125,11 +133,16 @@ void *hcd_buffer_alloc( return kmalloc(size, mem_flags); } +#ifdef CONFIG_HAS_DMA for (i = 0; i < HCD_BUFFER_POOLS; i++) { if (size <= pool_max[i]) return dma_pool_alloc(hcd->pool[i], mem_flags, dma); } return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); +#else + WARN_ON_NO_DMA(); + return NULL; +#endif } void hcd_buffer_free( @@ -140,7 +153,9 @@ void hcd_buffer_free( ) { struct usb_hcd *hcd = bus_to_hcd(bus); +#ifdef CONFIG_HAS_DMA int i; +#endif if (!addr) return; @@ -151,6 +166,7 @@ void hcd_buffer_free( return; } +#ifdef CONFIG_HAS_DMA for (i = 0; i < HCD_BUFFER_POOLS; i++) { if (size <= pool_max[i]) { dma_pool_free(hcd->pool[i], addr, dma); @@ -158,4 +174,5 @@ void hcd_buffer_free( } } dma_free_coherent(hcd->self.controller, size, addr, dma); +#endif } diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index df0e3b9..1eb214d 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1408,12 +1408,15 @@ static void hcd_free_coherent(struct usb_bus *bus, dma_addr_t *dma_handle, void usb_hcd_unmap_urb_setup_for_dma(struct usb_hcd *hcd, struct urb *urb) { - if (urb->transfer_flags & URB_SETUP_MAP_SINGLE) + if (urb->transfer_flags & URB_SETUP_MAP_SINGLE) { +#ifdef CONFIG_HAS_DMA dma_unmap_single(hcd->self.controller, urb->setup_dma, sizeof(struct usb_ctrlrequest), DMA_TO_DEVICE); - else if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) hcd_free_coherent(urb->dev->bus, &urb->setup_dma, (void **) &urb->setup_packet, @@ -1440,27 +1443,37 @@ void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) usb_hcd_unmap_urb_setup_for_dma(hcd, urb); dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; - if (urb->transfer_flags & URB_DMA_MAP_SG) + if (urb->transfer_flags & URB_DMA_MAP_SG) { +#ifdef CONFIG_HAS_DMA dma_unmap_sg(hcd->self.controller, urb->sg, urb->num_sgs, dir); - else if (urb->transfer_flags & URB_DMA_MAP_PAGE) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_DMA_MAP_PAGE) { +#ifdef CONFIG_HAS_DMA dma_unmap_page(hcd->self.controller, urb->transfer_dma, urb->transfer_buffer_length, dir); - else if (urb->transfer_flags & URB_DMA_MAP_SINGLE) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_DMA_MAP_SINGLE) { +#ifdef CONFIG_HAS_DMA dma_unmap_single(hcd->self.controller, urb->transfer_dma, urb->transfer_buffer_length, dir); - else if (urb->transfer_flags & URB_MAP_LOCAL) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_MAP_LOCAL) { hcd_free_coherent(urb->dev->bus, &urb->transfer_dma, &urb->transfer_buffer, urb->transfer_buffer_length, dir); + } /* Make it safe to call this routine more than once */ urb->transfer_flags &= ~(URB_DMA_MAP_SG | URB_DMA_MAP_PAGE | @@ -1493,6 +1506,7 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, if (hcd->self.uses_pio_for_control) return ret; if (hcd->self.uses_dma) { +#ifdef CONFIG_HAS_DMA urb->setup_dma = dma_map_single( hcd->self.controller, urb->setup_packet, @@ -1502,6 +1516,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, urb->setup_dma)) return -EAGAIN; urb->transfer_flags |= URB_SETUP_MAP_SINGLE; +#else + WARN_ON_NO_DMA(); + return -EINVAL; +#endif } else if (hcd->driver->flags & HCD_LOCAL_MEM) { ret = hcd_alloc_coherent( urb->dev->bus, mem_flags, @@ -1520,6 +1538,7 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) { if (hcd->self.uses_dma) { if (urb->num_sgs) { +#ifdef CONFIG_HAS_DMA int n; /* We don't support sg for isoc transfers ! */ @@ -1541,7 +1560,12 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, if (n != urb->num_sgs) urb->transfer_flags |= URB_DMA_SG_COMBINED; +#else + WARN_ON_NO_DMA(); + ret = -EINVAL; +#endif } else if (urb->sg) { +#ifdef CONFIG_HAS_DMA struct scatterlist *sg = urb->sg; urb->transfer_dma = dma_map_page( hcd->self.controller, @@ -1554,10 +1578,15 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, ret = -EAGAIN; else urb->transfer_flags |= URB_DMA_MAP_PAGE; +#else + WARN_ON_NO_DMA(); + ret = -EINVAL; +#endif } else if (is_vmalloc_addr(urb->transfer_buffer)) { WARN_ONCE(1, "transfer buffer not dma capable\n"); ret = -EAGAIN; } else { +#ifdef CONFIG_HAS_DMA urb->transfer_dma = dma_map_single( hcd->self.controller, urb->transfer_buffer, @@ -1568,6 +1597,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, ret = -EAGAIN; else urb->transfer_flags |= URB_DMA_MAP_SINGLE; +#else + WARN_ON_NO_DMA(); + ret = -EINVAL; +#endif } } else if (hcd->driver->flags & HCD_LOCAL_MEM) { ret = hcd_alloc_coherent( diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 4dcf844..51b816a 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -409,6 +409,14 @@ static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd, return hcd->high_prio_bh.completing_ep == ep; } +#ifdef CONFIG_HAS_DMA +#define WARN_ON_NO_DMA() do { } while (0) +#else +/* If this ever triggers, the correct fix is almost certainly + * to add a CONFIG_HAS_DMA dependency in the Kconfig for that driver. */ +#define WARN_ON_NO_DMA() WARN_ONCE(1, "HCD driver tried to use DMA memory") +#endif + extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, int status); -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:34
|
drivers/built-in.o: In function `pxa_udc_probe': /home/vegard/linux/drivers/usb/gadget/udc/pxa27x_udc.c:2430: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/gadget/udc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index 70feaf2..d6ad7e6 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@ -188,6 +188,7 @@ config USB_RENESAS_USB3 config USB_PXA27X tristate "PXA 27x" + depends on HAS_IOMEM help Intel's PXA 27x series XScale ARM v5TE processors include an integrated full speed USB 1.1 device controller. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:33
|
warning: (USB_APPLEDISPLAY) selects BACKLIGHT_LCD_SUPPORT which has unmet direct dependencies (HAS_IOMEM) Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/misc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index f7a7fc2..ea10059 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -150,6 +150,7 @@ config USB_FTDI_ELAN config USB_APPLEDISPLAY tristate "Apple Cinema Display support" + depends on HAS_IOMEM select BACKLIGHT_LCD_SUPPORT select BACKLIGHT_CLASS_DEVICE help -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:33
|
drivers/built-in.o: In function `oxu_drv_probe': /home/vegard/linux/drivers/usb/host/oxu210hp-hcd.c:3821: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index af62016..85230d6 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -332,6 +332,7 @@ endif # USB_EHCI_HCD config USB_OXU210HP_HCD tristate "OXU210HP HCD support" + depends on HAS_IOMEM ---help--- The OXU210HP is an USB host/OTG/device controller. Enable this option if your board has this chip. If unsure, say N. -- 1.9.1 |