Patrick Scharrenberg
2007-Mar-25 14:29 UTC
[Xen-devel] out of dma-memory when using usblp-module in driverdomain
Hi! I tried attaching an usb-printer to an usb-port of a driver-domain. On loading the module usblp I get the following error: /usr/src/xen/xen-unstable.hg/linux-2.6.18-xen/drivers/usb/class/usblp.c: out of memory for write buf usblp: probe of 2-1:1.0 failed with error -5 I figured out, that reducing USBLP_BUF_SIZE (usb/class/usblp.c) form 8192 to some smaller value, e.g. 4096 it works fine, but that''s just a workaround. USBLP_BUF_SIZE is used to "usb_buffer_alloc" (usb/core/usb.c) dma memory:>From usb.c:usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP but here I''m out.. cheers ~patrick _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2007-Mar-26 07:23 UTC
Re: [Xen-devel] out of dma-memory when using usblp-module in driverdomain
>>> Patrick Scharrenberg <pittipatti@web.de> 25.03.07 16:29 >>> >I tried attaching an usb-printer to an usb-port of a driver-domain. >On loading the module usblp I get the following error: > > /usr/src/xen/xen-unstable.hg/linux-2.6.18-xen/drivers/usb/class/usblp.c: > out of memory for write buf > usblp: probe of 2-1:1.0 failed with error -5 > >I figured out, that reducing USBLP_BUF_SIZE (usb/class/usblp.c) form >8192 to some smaller value, e.g. 4096 it works fine, but that''s just a >workaround. > >USBLP_BUF_SIZE is used to "usb_buffer_alloc" (usb/core/usb.c) dma memory: > >>From usb.c: > usb_buffer_alloc - allocate dma-consistent buffer for >URB_NO_xxx_DMA_MAP > >but here I''m out..Probably you''re just suffering from domains without any I/O memory ranges assigned not being permitted to have multi-page contiguous memory ranges assigned? If not, do you force swiotlb on in the domain? And what resources does the USB HC require? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Patrick Scharrenberg
2007-Apr-10 15:01 UTC
Re: [Xen-devel] out of dma-memory when using usblp-module in driverdomain
Hi Jan! I''m sorry for not replying for such a long time after asking questions. :-)>> I figured out, that reducing USBLP_BUF_SIZE (usb/class/usblp.c) form >> 8192 to some smaller value, e.g. 4096 it works fine, but that''s just a >> workaround. >> >> USBLP_BUF_SIZE is used to "usb_buffer_alloc" (usb/core/usb.c) dma memory: >> >> >From usb.c: >> usb_buffer_alloc - allocate dma-consistent buffer for >> URB_NO_xxx_DMA_MAP >> >> but here I''m out.. >> > > Probably you''re just suffering from domains without any I/O memory ranges > assigned not being permitted to have multi-page contiguous memory ranges > assigned?I added the usb-controllers as quirky devices, like xen told me to do: (usb (pci_ids (''1106:3038'') ) (pci_config_space_fields (''000000c0:2:00000000'' ''000000f0:2:00000000'' ''000000f8:2:00000000'' ''00000084:2:00000000'') ) )> If not, do you force swiotlb on in the domain? And what resources > does the USB HC require? >Honestly I have no clue if I''m forcing it! In the kernel-config I have "CONFIG_SWIOTLB=y" Please see attaches "lspci" for resource-view (or is there a better way, to see more information?) I''m just using usb-controllers 0., 0.1 and 0.3 because 0.2 shares its irq with another device and is not working in domU. I hope we can isolate the problem a bit more now. Please contact me for more information. (I''m now online again and can answer much faster! :-) ) Thanks Patrick _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel