Re: [v4] usb: UHCI: fix pkt size in TD for a sg element

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

 



On Mon, Jun 24, 2013 at 10:56:30PM +0800, Ming Lei wrote:
> On Mon, Jun 24, 2013 at 10:33 PM, Denis V. Lunev <den@xxxxxxxxxx> wrote:
> > From: Konstantin Filatov <kfilatov@xxxxxxxxxxxxx>
> >
> > This patch shortens TD's packet not only for the last TD in sg list,
> > but also for the last TD in sg element.
> >
> > Signed-off-by: Konstantin Filatov <kfilatov@xxxxxxxxxxxxx>
> > Signed-off-by: Denis V. Lunev <den@xxxxxxxxxx>
> 
> Considered that:
> 
> - the change violates USB spec(1.1/2.0/3.0)

I can't see how this would violate USB spec. USB specifications have no
knowledge of scatter-gather.

It really doesn't matter how the data gets into the HW's FIFO, as long
as it *does* get there. IOW an SG table like below:

sg[0].length = 512
sg[1].length = 512
sg[2].length = 20

is no different than:

sg[0].length = 502
sg[1].length = 512
sg[2].length = 30

from the USB perspective, all is sees is 1044 bytes being shifted
through the data lines.

> - the problem should be avoided in usbcore since it isn't a uhci
> specific problem

to this I agree.

> - this patch only hides problem, doesn't help to fix real problem.

what is the problem then ? Are you saying that it's wrong to have an sg
which is not aligned to wMaxPacketSize somewhere in the middle of an
sg-table ? How so ? What does that have to do with USB at all ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux