Search Linux Wireless

Re: [RFC 0/4] do not use sg if not properly supported by usb controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

Why not standard? Most of net usb drivers do not use sg :)

> 
> 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.

I agree with you that this is not strictly a fix for IOMMU issue but I think
we could avoid using sg when we are working just with linear skbs.
But first I guess we need some feedbacks from users

Regards,
Lorenzo

> 
> Regards
> Stanislaw 



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux