|
Line
Link Here
|
|
-- |
|
|
| 1 |
drivers/usb/core/sysfs.c | 33 +++++++++--------------- |
|
drivers/usb/core/sysfs.c | 33 +++++++++--------------- |
| 2 |
drivers/usb/core/usb.c | 63 +++++++++++++++++------------------------------ |
1 |
drivers/usb/core/usb.c | 63 +++++++++++++++++------------------------------ |
| 3 |
2 files changed, 36 insertions(+), 60 deletions(-) |
2 |
2 files changed, 36 insertions(+), 60 deletions(-) |
| 4 |
-- gregkh-2.6.orig/drivers/usb/core/sysfs.c |
3 |
++ gregkh-2.6/drivers/usb/core/sysfs.c |
|
Lines 462-491
static ssize_t show_modalias(struct devi
Link Here
|
| 462 |
{ |
462 |
{ |
| 463 |
struct usb_interface *intf; |
463 |
struct usb_interface *intf; |
| 464 |
struct usb_device *udev; |
464 |
struct usb_device *udev; |
| 465 |
int len; |
465 |
struct usb_host_interface *alt; |
| 466 |
|
466 |
|
| 467 |
intf = to_usb_interface(dev); |
467 |
intf = to_usb_interface(dev); |
| 468 |
udev = interface_to_usbdev(intf); |
468 |
udev = interface_to_usbdev(intf); |
|
|
469 |
alt = intf->cur_altsetting; |
| 469 |
|
470 |
|
| 470 |
len = sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic", |
471 |
return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02X" |
| 471 |
le16_to_cpu(udev->descriptor.idVendor), |
472 |
"ic%02Xisc%02Xip%02X\n", |
| 472 |
le16_to_cpu(udev->descriptor.idProduct), |
473 |
le16_to_cpu(udev->descriptor.idVendor), |
| 473 |
le16_to_cpu(udev->descriptor.bcdDevice), |
474 |
le16_to_cpu(udev->descriptor.idProduct), |
| 474 |
udev->descriptor.bDeviceClass, |
475 |
le16_to_cpu(udev->descriptor.bcdDevice), |
| 475 |
udev->descriptor.bDeviceSubClass, |
476 |
udev->descriptor.bDeviceClass, |
| 476 |
udev->descriptor.bDeviceProtocol); |
477 |
udev->descriptor.bDeviceSubClass, |
| 477 |
buf += len; |
478 |
udev->descriptor.bDeviceProtocol, |
| 478 |
|
479 |
alt->desc.bInterfaceClass, |
| 479 |
if (udev->descriptor.bDeviceClass == 0) { |
480 |
alt->desc.bInterfaceSubClass, |
| 480 |
struct usb_host_interface *alt = intf->cur_altsetting; |
481 |
alt->desc.bInterfaceProtocol); |
| 481 |
|
|
|
| 482 |
return len + sprintf(buf, "%02Xisc%02Xip%02X\n", |
| 483 |
alt->desc.bInterfaceClass, |
| 484 |
alt->desc.bInterfaceSubClass, |
| 485 |
alt->desc.bInterfaceProtocol); |
| 486 |
} else { |
| 487 |
return len + sprintf(buf, "*isc*ip*\n"); |
| 488 |
} |
| 489 |
} |
482 |
} |
| 490 |
static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL); |
483 |
static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL); |
| 491 |
|
484 |
|
| 492 |
-- gregkh-2.6.orig/drivers/usb/core/usb.c |
485 |
++ gregkh-2.6/drivers/usb/core/usb.c |
|
Lines 569-574
static int usb_hotplug (struct device *d
Link Here
|
| 569 |
{ |
569 |
{ |
| 570 |
struct usb_interface *intf; |
570 |
struct usb_interface *intf; |
| 571 |
struct usb_device *usb_dev; |
571 |
struct usb_device *usb_dev; |
|
|
572 |
struct usb_host_interface *alt; |
| 572 |
int i = 0; |
573 |
int i = 0; |
| 573 |
int length = 0; |
574 |
int length = 0; |
| 574 |
|
575 |
|
|
Lines 585-591
static int usb_hotplug (struct device *d
Link Here
|
| 585 |
|
586 |
|
| 586 |
intf = to_usb_interface(dev); |
587 |
intf = to_usb_interface(dev); |
| 587 |
usb_dev = interface_to_usbdev (intf); |
588 |
usb_dev = interface_to_usbdev (intf); |
| 588 |
|
589 |
alt = intf->cur_altsetting; |
|
|
590 |
|
| 589 |
if (usb_dev->devnum < 0) { |
591 |
if (usb_dev->devnum < 0) { |
| 590 |
pr_debug ("usb %s: already deleted?\n", dev->bus_id); |
592 |
pr_debug ("usb %s: already deleted?\n", dev->bus_id); |
| 591 |
return -ENODEV; |
593 |
return -ENODEV; |
|
Lines 627-672
static int usb_hotplug (struct device *d
Link Here
|
| 627 |
usb_dev->descriptor.bDeviceProtocol)) |
629 |
usb_dev->descriptor.bDeviceProtocol)) |
| 628 |
return -ENOMEM; |
630 |
return -ENOMEM; |
| 629 |
|
631 |
|
| 630 |
if (usb_dev->descriptor.bDeviceClass == 0) { |
632 |
if (add_hotplug_env_var(envp, num_envp, &i, |
| 631 |
struct usb_host_interface *alt = intf->cur_altsetting; |
633 |
buffer, buffer_size, &length, |
|
|
634 |
"INTERFACE=%d/%d/%d", |
| 635 |
alt->desc.bInterfaceClass, |
| 636 |
alt->desc.bInterfaceSubClass, |
| 637 |
alt->desc.bInterfaceProtocol)) |
| 638 |
return -ENOMEM; |
| 632 |
|
639 |
|
| 633 |
/* 2.4 only exposed interface zero. in 2.5, hotplug |
640 |
if (add_hotplug_env_var(envp, num_envp, &i, |
| 634 |
* agents are called for all interfaces, and can use |
641 |
buffer, buffer_size, &length, |
| 635 |
* $DEVPATH/bInterfaceNumber if necessary. |
642 |
"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X", |
| 636 |
*/ |
643 |
le16_to_cpu(usb_dev->descriptor.idVendor), |
| 637 |
if (add_hotplug_env_var(envp, num_envp, &i, |
644 |
le16_to_cpu(usb_dev->descriptor.idProduct), |
| 638 |
buffer, buffer_size, &length, |
645 |
le16_to_cpu(usb_dev->descriptor.bcdDevice), |
| 639 |
"INTERFACE=%d/%d/%d", |
646 |
usb_dev->descriptor.bDeviceClass, |
| 640 |
alt->desc.bInterfaceClass, |
647 |
usb_dev->descriptor.bDeviceSubClass, |
| 641 |
alt->desc.bInterfaceSubClass, |
648 |
usb_dev->descriptor.bDeviceProtocol, |
| 642 |
alt->desc.bInterfaceProtocol)) |
649 |
alt->desc.bInterfaceClass, |
| 643 |
return -ENOMEM; |
650 |
alt->desc.bInterfaceSubClass, |
| 644 |
|
651 |
alt->desc.bInterfaceProtocol)) |
| 645 |
if (add_hotplug_env_var(envp, num_envp, &i, |
652 |
return -ENOMEM; |
| 646 |
buffer, buffer_size, &length, |
|
|
| 647 |
"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X", |
| 648 |
le16_to_cpu(usb_dev->descriptor.idVendor), |
| 649 |
le16_to_cpu(usb_dev->descriptor.idProduct), |
| 650 |
le16_to_cpu(usb_dev->descriptor.bcdDevice), |
| 651 |
usb_dev->descriptor.bDeviceClass, |
| 652 |
usb_dev->descriptor.bDeviceSubClass, |
| 653 |
usb_dev->descriptor.bDeviceProtocol, |
| 654 |
alt->desc.bInterfaceClass, |
| 655 |
alt->desc.bInterfaceSubClass, |
| 656 |
alt->desc.bInterfaceProtocol)) |
| 657 |
return -ENOMEM; |
| 658 |
} else { |
| 659 |
if (add_hotplug_env_var(envp, num_envp, &i, |
| 660 |
buffer, buffer_size, &length, |
| 661 |
"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*", |
| 662 |
le16_to_cpu(usb_dev->descriptor.idVendor), |
| 663 |
le16_to_cpu(usb_dev->descriptor.idProduct), |
| 664 |
le16_to_cpu(usb_dev->descriptor.bcdDevice), |
| 665 |
usb_dev->descriptor.bDeviceClass, |
| 666 |
usb_dev->descriptor.bDeviceSubClass, |
| 667 |
usb_dev->descriptor.bDeviceProtocol)) |
| 668 |
return -ENOMEM; |
| 669 |
} |
| 670 |
|
653 |
|
| 671 |
envp[i] = NULL; |
654 |
envp[i] = NULL; |
| 672 |
|
655 |
|