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 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.
Please not I have not received any confirm that this series fixes the reported issue
yet :)

> 
> Also I'm not sure for what this new module parameter is needed ?
>  

This is used to disable sg on usb3.0 since it is enabled by default

> > @Rosen: could you please try this series enabling IOMMU?
> > 
> > > 
> > > If things need to be fixed in mt76 I whould check if page mappings for
> > > sg are correct. Or remove sg usage from mt76_usb completly, mt76 MMIO
> > > version do not use sg for framgments, so most likely USB don't need it
> > > as well.
> > 
> > usb scatter-gather is used to properly support non-linear skbs (A-MSDU,
> > with usb3.0) since the hw (unlike pci counterpart) does not support it,
> > so we need it.
> 
> Ok, having separe URB for each fragment make no sense since we have
> embedded sg structure in URB.

In this case each fragment will be mapped independently I guess

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