Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478338
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev |
| Date | 2016-09-07 16:40 +0200 |
| Message-ID | <seMb8-WB-13@gated-at.bofh.it> (permalink) |
| References | <scXDH-B6-9@gated-at.bofh.it> <seGp3-5Kk-9@gated-at.bofh.it> <seKM2-9T-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wednesday, September 7, 2016 4:04:52 PM CEST Roger Quadros wrote: > > The main use for it is to let you specify a MAC address for on-board > > ethernet devices that lack an EPROM, but any other information can be > > added that way too. > > > >> There is a bug in the USB core because of which the ISB device and interfaces > >> do not inherit dma_pfn_offset correctly for which I've sent a patch > >> https://lkml.org/lkml/2016/8/17/275 > > > > I'm a bit skeptical about this. Clearly if we set the dma_mask, we should > > also set the dma_pfn_offset, but what exactly is this used for in USB > > devices? > > Consider the mass storage device case. > USB storage driver creates a scsi host for the mass storage interface in > drivers/usb/storage/usb.c > The scsi host parent device is nothing but the the USB interface device. > > Now, __scsi_init_queue() calls scsi_calculate_bounce_limit() to find out > and set the block layer bounce limit. > > scsi_calculate_bounce_limit() uses dma_max_pfn(host_dev) to get the bounce_limit. > > host_dev is nothing but the device representing the mass storage interface. > > If that device doesn't have the right dma_pfn_offset, then dma_max_pfn() > is messed up and the bounce buffer limit is wrong. I see. The same thing probably happens in the network and mmc subsystems, which have similar code. This shows the inconsistencies we have in the handling for bounce buffers in the kernel, which are sometimes handled by subsystems but sometimes rely on swiotlb instead. I don't have any better idea than your patch here, but maybe we should add a comment explaining that next to the code. Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Leo Li <pku.leo@gmail.com> - 2016-09-02 00:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-02 12:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-09-02 13:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-02 13:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-02 16:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Alan Stern <stern@rowland.harvard.edu> - 2016-09-02 16:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-02 18:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Roger Quadros <rogerq@ti.com> - 2016-09-07 09:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-07 10:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Roger Quadros <rogerq@ti.com> - 2016-09-07 15:10 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-07 16:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Grygorii Strashko <grygorii.strashko@ti.com> - 2016-09-02 18:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-02 13:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Robin Murphy <robin.murphy@arm.com> - 2016-09-02 14:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-02 15:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-02 15:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Leo Li <pku.leo@gmail.com> - 2016-09-03 00:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-05 17:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-06 08:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-06 08:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-06 12:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-06 13:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-06 15:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-07 09:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-07 09:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-07 11:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-07 11:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-09-07 11:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-07 12:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-06 12:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-07 08:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-07 10:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-07 12:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Robin Murphy <robin.murphy@arm.com> - 2016-09-07 12:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-07 12:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-07 12:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-07 17:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Alan Stern <stern@rowland.harvard.edu> - 2016-09-07 18:10 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-07 21:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-08 03:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 10:10 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-08 10:10 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 10:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-08 10:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 10:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-08 11:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 12:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-08 13:10 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 13:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-08 13:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 13:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Felipe Balbi <balbi@kernel.org> - 2016-09-08 14:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 14:50 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Grygorii Strashko <grygorii.strashko@ti.com> - 2016-09-08 14:10 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 14:20 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-08 14:30 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Arnd Bergmann <arnd@arndb.de> - 2016-09-08 15:00 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-09 03:40 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Grygorii Strashko <grygorii.strashko@ti.com> - 2016-09-08 15:10 +0200
Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev Peter Chen <hzpeterchen@gmail.com> - 2016-09-09 04:00 +0200
csiph-web