HCD sg_tablesize

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

 



Recently Ramya tried to enqueue a very large transfer to the xHCI driver
and filled the endpoint ring for that bulk endpoint.  Because of that
I've been looking at doing dynamic ring resizing.  I've run into a
slight problem.

In xhci-pci.c, David Vrabel set hcd->self.sg_tablesize to
(TRBS_PER_SEGMENT - 1), or 63 entries.  The USB storage driver currently
sets the Scsi_Host->sg_tablesize based on the hcd's table size, which
limits the number of scatter-gather entries.  So even if I add more
segments to the rings,  the driver will never enqueue a transfer with
more than 63 sglist entries.

If I want to dynamically expand the rings to include multiple segments
and thus support more sglist entries, what should I set
hcd->self.sg_tablesize to?  If I set it to something large (like EHCI
sets it to ~0), can I reject transfers if I run out of memory while
allocating new ring segments?  Should I use -E2BIG or -ENOMEM?

Sarah Sharp
--
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