On Tue, 2 Sep 2003 11:01:49 -0400 Adam Lazur <[EMAIL PROTECTED]> wrote:
> This is a repost of a patch I sent to the linux-usb-devel list ~4 months > ago. > > The patch updates the wIndex field for the printer class GET_DEVICE_ID > control request to take into account the interface and alternate > numbers. As per the printer class spec, for GET_DEVICE_ID requests, the > high byte is the device interface and the low byte is the alternate. > > The current code ignores the alternate, and sticks the interface number > in the low byte... which works fine for other printer class requests. > With GET_DEVICE_ID we're just getting lucky that most printers are 0/0 > for alternate/interface, so it doesn't matter. > > Attached is a patch which will fill in the alternate/interface numbers > for GET_DEVICE_ID requests. > > A patch for 2.4.23-pre2 will follow shortly. I have tried your patch in the hope it might fix the LaserJet 1300 lockup problem (see the thread "HP LaserJet 1300 printer lockup") - unfortunately it does not. However, looks like the patch has a bug: you check only (request == USBLP_REQ_GET_ID), but USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST has the same value, so the patch will change wIndex for that request too. You should also check for type == USB_TYPE_CLASS (and possibly for recip == USB_RECIP_INTERFACE). ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel