Speedtouch "extended reach"
David Woodhouse
dwmw2 at infradead.org
Thu Jun 29 09:24:37 EDT 2006
This patch, based on observation of the current Windows 'Extended Reach'
driver with usbsnoop, improves line sync speed for me by about 20%.
The improvement in sync speed only occurs when using the new firmware --
I'm using bin/sachu3/zzzlp2.eni from the driver at
http://www.speedtouch.co.uk/downloads/330/301/UK3012%20Extended.zip
However, the change doesn't seem to have any adverse effects when used
with the old firmware -- so I think it's safe to make it unconditional.
I also noticed that the current drivers use '00, 00, 01' in what we call
"URB149" and "URB150" in the initialisation sequence, rather than our
"01, 00, 01". That doesn't seem to make any difference here, so I've
left it as we had it before.
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
index 956b7a1..106def7 100644
--- a/drivers/usb/atm/speedtch.c
+++ b/drivers/usb/atm/speedtch.c
@@ -123,7 +123,7 @@ struct speedtch_instance_data {
struct urb *int_urb;
unsigned char int_data[16];
- unsigned char scratch_buffer[TOTAL];
+ unsigned char scratch_buffer[16];
};
/***************
@@ -186,6 +186,31 @@ static void speedtch_test_sequence(struc
0x01, 0x40, 0x04, 0x00, buf, 3, CTRL_TIMEOUT);
if (ret < 0)
usb_warn(usbatm, "%s failed on URB150: %d\n", __func__, ret);
+
+ /* Extra initialisation in '301.0.0.12 Extended Reach' driver */
+ buf[0] = 0x0b;
+ ret = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0),
+ 0x01, 0x40, 0x11, 0x00, buf, 1, CTRL_TIMEOUT);
+ if (ret < 0)
+ usb_warn(usbatm, "%s failed on URBext1: %d\n", __func__, ret);
+
+ /* This seems to be the one which actually triggers the higher sync
+ rate -- it does require the new firmware too, although it works OK
+ with older firmware */
+ memset(buf, 0, 0x10);
+ buf[0] = 0x10;
+ buf[4] = 0x20;
+ ret = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0),
+ 0x01, 0x40, 0x14, 0x00, buf, 0x10, CTRL_TIMEOUT);
+ if (ret < 0)
+ usb_warn(usbatm, "%s failed on URBext2: %d\n", __func__, ret);
+
+ buf[0] = 0xc0;
+ buf[1] = 0x1f;
+ ret = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0),
+ 0x01, 0x40, 0x12, 0x00, buf, 2, CTRL_TIMEOUT);
+ if (ret < 0)
+ usb_warn(usbatm, "%s failed on URBext3: %d\n", __func__, ret);
}
static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
--
dwmw2
More information about the Usbatm
mailing list