RE: xhci ring expansion

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

 



> From: Sarah Sharp [mailto:sarah.a.sharp@xxxxxxxxxxxxxxx]
>
> On Thu, Oct 31, 2013 at 04:16:14PM -0000, David Laight wrote:
> > Code was recently added to the xhci driver to dynamically add extra ring
> > segments if there is insufficient space for all the fragments of the
> > URB being sent.
> >
> > ISTM that it would be better to just queue the URB (on the ring)
> > and process it when space becomes available.
> 
> Hmm, better why?  I'm reluctant to touch code that Just Works (TM).
> Especially anything having do with the xHCI ring code, since it's quite
> complex.

I was thinking that queueing URB would make it possible to significantly
simplify the ring code - especially since it could be changed to only
have a single fragment in every ring.

> > This wouldn't solve the problem of pathologically badly fragmented,
> > or very long URB, but there are simpler solutions to that.
> >
> > I believe that very long bulk transfers can be split into
> > separate TD on USB block boundaries - so they can be safely
> > added to the ring in several pieces.
> 
> No, that's not a good idea.  Think about the case where the device
> driver sets up an IN transfer to receive a specific amount of data from
> the device.  The device can choose to send less data, resulting in a
> short packet TD completion event.

IN transfers are unlikely to be badly fragmented.
The problem arise with OUT transfers.

> Frankly, since these are your first kernel patches, I can't trust any
> big sweeping changes you make unless I can throughly understand them.
> That's just a fact about being a kernel maintainer; I have to understand
> the code that gets contributed because the contributor is highly likely
> to disappear, leaving me to fix bugs in their code years later.
> 
> So, I would recommend you work on small fixes and earn my trust before
> making big sweeping changes.  Let's get the scatter gather issue fixed
> before you completely re-architect the xHCI driver, okay? :)

I've only been thinking about those changes.
Although I'm new to the usb mailing list, I've been writing Unix
device drivers, comms stack drivers and low level hardware interfacing
code for most of the last 30 years.

	David



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux