--- 1.67/drivers/usb/core/message.c Tue Oct 26 09:42:33 2004 +++ edited/drivers/usb/core/message.c Wed Oct 27 16:02:03 2004 @@ -704,6 +704,8 @@ int err; unsigned int u, idx; + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; if (size <= 0 || !buf || !index) return -EINVAL; buf[0] = 0; --- 1.67/drivers/usb/core/devio.c Wed Oct 20 11:45:30 2004 +++ edited/drivers/usb/core/devio.c Wed Oct 27 16:07:40 2004 @@ -411,6 +411,8 @@ static int checkintf(struct dev_state *ps, unsigned int ifnum) { + if (ps->dev->state != USB_STATE_CONFIGURED) + return -EHOSTUNREACH; if (ifnum >= 8*sizeof(ps->ifclaimed)) return -EINVAL; if (test_bit(ifnum, &ps->ifclaimed)) @@ -450,6 +452,8 @@ { int ret = 0; + if (ps->dev->state != USB_STATE_CONFIGURED) + return -EHOSTUNREACH; if (USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype)) return 0; @@ -1131,7 +1135,7 @@ } if (ps->dev->state != USB_STATE_CONFIGURED) - retval = -ENODEV; + retval = -EHOSTUNREACH; else if (!(intf = usb_ifnum_to_if (ps->dev, ctrl.ifno))) retval = -EINVAL; else switch (ctrl.ioctl_code) {