On Tue, Feb 12, 2019 at 03:25:30PM +0100, Lorenzo Bianconi wrote:
> > On Tue, Feb 12, 2019 at 03:09:53PM +0100, Lorenzo Bianconi wrote:
> > > >
> > > > (repost with corrected Lorenzo email)
> > > >
> > > > On Tue, Feb 12, 2019 at 02:45:50PM +0100, Stanislaw Gruszka wrote:
> > > > > On Tue, Feb 12, 2019 at 02:24:47PM +0100, 
> > > > > [email protected] wrote:
> > > > > > From: Lorenzo Bianconi <[email protected]>
> > > > > >
> > > > > > Use linear fragment and not a single usb scatter-gather buffer in 
> > > > > > mt76u
> > > > > > {tx,rx} datapath if the usb controller has sg data length 
> > > > > > constraints.
> > > > > > Moreover add disable_usb_sg module parameter in order to explicitly
> > > > > > disable scatter-gather. SG I/O is not supported by all host drivers 
> > > > > > and
> > > > > > some users have reported sg issues on AMD IOMMU.
> > > > >
> > > > > Again. This is not right approach. SG issues should be fixed
> > > > > not workarounded.
> > > 
> > > Hi Stanislaw,
> > > 
> > > here we do not use SG, so num_sg is 0 and we use transfer_buffer. I do
> > > not see how I am working around the issue.
> > 
> > By avoiding SG buffer allocation and configuration which most likely
> > need to be fixed.
> 
> In my series I:
> 1- set num_sg to 0
> 2- use transfer_buffer
>
> please correct me if I am wrong but in your solution you did the same since 
> AFAIK
> PageHighMem is always 0 so you end up setting num_sg to 0 and using
> transfer_buffer as well. Is my understanding correct?

Yes. But it still using all existing SG allocation and setup code and
buffer is tracked in urb->sg[0].

> > > Moreover with this approach we avoid some unnecessary operation in the 
> > > hotpath
> > 
> > What unnecessary operation ?
> 
> the ones in mt76u_fill_bulk_urb()

Your patches also add extra operations on hotpath due to urb->num_sgs and
dev->usb.sg_en checks.

Stanislaw

Reply via email to