Hi!
This allows end-user to configure if he wants high bandwidth and slow
PCI or if he wants high bandwidth and possible unfairness. I never
seen that unfairness in real life. Please apply,
Pavel
--- clean/drivers/usb/uhci.c Sun Oct 21 04:13:11 2001
+++ linux/drivers/usb/uhci.c Thu Oct 25 13:25:40 2001
@@ -85,6 +85,25 @@
#include "uhci-debug.h"
+/* CONFIG_USB_UHCI_HIGH_BANDWITH turns on Full Speed Bandwidth
+ * Reclamation: feature that puts loop on descriptor loop when
+ * there's some transfer going on. With FSBR, USB performance
+ * is optimal, but PCI is slowed down up-to 5 times, slowing down
+ * system performance.
+ */
+#define CONFIG_USB_UHCI_HIGH_BANDWIDTH 0
+/* *_DEPTH_FIRST puts descriptor in depth-first mode. This has
+ * somehow similar effect to FSBR (higher speed), but does not
+ * slow PCI down. OTOH USB performace is slightly slower than
+ * in FSBR case and single device could hog whole USB, starving
+ * other devices.
+ */
+#define USE_BULK_DEPTH_FIRST 1 // 0: Breadth first, 1: Depth first
+/* Turning off both CONFIG_USB_UHCI_HIGH_BANDWITH and *_DEPTH_FIRST
+ * will lead to 64KB/sec performance over USB, max. You probably
+ * do not want to do that.
+ */
+
static kmem_cache_t *uhci_up_cachep; /* urb_priv */
static int rh_submit_urb(struct urb *urb);
@@ -736,7 +755,8 @@
spin_lock_irqsave(&uhci->frame_list_lock, flags);
- if ((!(urb->transfer_flags & USB_NO_FSBR)) && !urbp->fsbr) {
+ if (CONFIG_USB_UHCI_HIGH_BANDWIDTH
+ && (!(urb->transfer_flags & USB_NO_FSBR)) && !urbp->fsbr) {
urbp->fsbr = 1;
if (!uhci->fsbr++)
uhci->skel_term_qh->link =
uhci->skel_hs_control_qh->dma_handle | UHCI_PTR_QH;
@@ -752,7 +772,8 @@
spin_lock_irqsave(&uhci->frame_list_lock, flags);
- if ((!(urb->transfer_flags & USB_NO_FSBR)) && urbp->fsbr) {
+ if (CONFIG_USB_UHCI_HIGH_BANDWIDTH
+ && (!(urb->transfer_flags & USB_NO_FSBR)) && urbp->fsbr) {
urbp->fsbr = 0;
if (!--uhci->fsbr)
uhci->skel_term_qh->link = UHCI_PTR_TERM;
@@ -1282,7 +1303,7 @@
qh->urbp = urbp;
/* Always assume breadth first */
- uhci_insert_tds_in_qh(qh, urb, 1);
+ uhci_insert_tds_in_qh(qh, urb, (!USE_BULK_DEPTH_FIRST));
if (urb->transfer_flags & USB_QUEUE_BULK && eurb)
uhci_append_queued_urb(uhci, eurb, urb);
--
"I do not steal MS software. It is not worth it."
-- Pavel Kankovsky
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel