On Sat, Nov 30, 2019 at 05:50:55PM +0100, Fredrik Noring wrote: > Fix commit 7b81cb6bddd2 ("usb: add a HCD_DMA flag instead of > guestimating DMA capabilities") where local memory USB drivers > erroneously allocate DMA memory instead of pool memory, causing > > OHCI Unrecoverable Error, disabled > HC died; cleaning up > > The order between hcd_uses_dma() and hcd->localmem_pool is now > arranged as in hcd_buffer_alloc() and hcd_buffer_free(), with the > test for hcd->localmem_pool placed first. > > As an alternative, one might consider adjusting hcd_uses_dma() with > > static inline bool hcd_uses_dma(struct usb_hcd *hcd) > { > - return IS_ENABLED(CONFIG_HAS_DMA) && (hcd->driver->flags & HCD_DMA); > + return IS_ENABLED(CONFIG_HAS_DMA) && > + (hcd->driver->flags & HCD_DMA) && > + (hcd->localmem_pool == NULL); > } > > One can also consider unsetting HCD_DMA for local memory pool drivers. > > Fixes: 7b81cb6bddd2 ("usb: add a HCD_DMA flag instead of guestimating DMA capabilities") > Cc: stable <stable@xxxxxxxxxxxxxxx> > Signed-off-by: Fredrik Noring <noring@xxxxxxxxxx> > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > --- > drivers/usb/core/hcd.c | 42 +++++++++++++++++----------------- > drivers/usb/storage/scsiglue.c | 3 ++- > 2 files changed, 23 insertions(+), 22 deletions(-) This patch doesn't apply against 5.5-rc1, can you refresh it and resend? thanks, greg k-h