On Wed, Jan 16, 2019 at 02:40:46PM +0100, Lorenzo Bianconi wrote: > On Jan 16, Stanislaw Gruszka wrote: > > On Wed, Jan 16, 2019 at 12:44:33PM +0100, Lorenzo Bianconi wrote: > > > > On Tue, Jan 15, 2019 at 04:47:47PM +0100, Lorenzo Bianconi wrote: > > > > > Hi Stanislaw, > > > > > > > > Hi :-) > > > > > > > > > > Not sure what is the problem , but this patch set look like a workaround > > > > > > not fix. If this an issue with IOMMU and sg, seems there is something wrong > > > > > > in sg page mappings eigher on mt76 dirver or IOMMU driver. > > > > > > > > > > The main point here I guess is we do not need sg if fragment number is one (e.g > > > > > usb2.0). Moreover this can fix IOMMU reported issues. > > > > > > > > So there if diffrence for USB host driver when we have one usb->sg > > > > sengment and if we just pass the buffer via urb->transfer_buf . I think > > > > most USB host drivers behave the same in such cases. For what USB > > > > hardware/driver this is needed ? Perhaps simpler fix could be done > > > > in USB host driver? > > > > > > According to https://github.com/torvalds/linux/blob/master/drivers/usb/core/hcd.c#L1557 > > > single sg urb and urb with a configured transfer_buf are managed in a different way. > > > > But this should not make any difference for underlying low level USB > > host driver, since we map 1 buffer of the same size, just by using > > different routines for that. > > probably amd iommu has some constraints on sg buffer layout respect to intel > one, not sure > > > > > > Please not I have not received any confirm that this series fixes the reported issue > > > yet :) > > > > What is reported issue ? > > https://marc.info/?l=linux-wireless&m=154716096506037&w=2 So, this if for AMD IOMMU issue as I thought initally. For the moment I thought you are trying to fix some diffrent problem with some non-standart usb host controler. I still think not using sg is just workaround for the problem not worth to do, since we have already workaround in form of disabling IOMMU. Right fix will be fixing AMD IOMMU driver or fix sg usage in mt76-usb if it does something wrong. Regards Stanislaw