diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2014-04-18 17:06:00 -0400 |
commit | a215aa7b9ab3759c047201199fba64d3042d7f13 (patch) | |
tree | bca37493d9b2233450e6d3ffced1261d0e4f71fe /drivers/usb | |
parent | d31199a77ef606f1d06894385f1852181ba6136b (diff) |
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'drivers/usb')
66 files changed, 847 insertions, 154 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index ea071a5b6eee..44447f54942f 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c | |||
@@ -2301,7 +2301,7 @@ out: | |||
2301 | return ret; | 2301 | return ret; |
2302 | } | 2302 | } |
2303 | 2303 | ||
2304 | static DEVICE_ATTR(stat_status, S_IWUGO | S_IRUGO, read_status, reboot); | 2304 | static DEVICE_ATTR(stat_status, S_IWUSR | S_IRUGO, read_status, reboot); |
2305 | 2305 | ||
2306 | static ssize_t read_human_status(struct device *dev, | 2306 | static ssize_t read_human_status(struct device *dev, |
2307 | struct device_attribute *attr, char *buf) | 2307 | struct device_attribute *attr, char *buf) |
@@ -2364,8 +2364,7 @@ out: | |||
2364 | return ret; | 2364 | return ret; |
2365 | } | 2365 | } |
2366 | 2366 | ||
2367 | static DEVICE_ATTR(stat_human_status, S_IWUGO | S_IRUGO, | 2367 | static DEVICE_ATTR(stat_human_status, S_IRUGO, read_human_status, NULL); |
2368 | read_human_status, NULL); | ||
2369 | 2368 | ||
2370 | static ssize_t read_delin(struct device *dev, struct device_attribute *attr, | 2369 | static ssize_t read_delin(struct device *dev, struct device_attribute *attr, |
2371 | char *buf) | 2370 | char *buf) |
@@ -2397,7 +2396,7 @@ out: | |||
2397 | return ret; | 2396 | return ret; |
2398 | } | 2397 | } |
2399 | 2398 | ||
2400 | static DEVICE_ATTR(stat_delin, S_IWUGO | S_IRUGO, read_delin, NULL); | 2399 | static DEVICE_ATTR(stat_delin, S_IRUGO, read_delin, NULL); |
2401 | 2400 | ||
2402 | #define UEA_ATTR(name, reset) \ | 2401 | #define UEA_ATTR(name, reset) \ |
2403 | \ | 2402 | \ |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index bc62fae0680f..3ffa43477609 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -1607,6 +1607,7 @@ static const struct usb_device_id acm_ids[] = { | |||
1607 | { NOKIA_PCSUITE_ACM_INFO(0x0154), }, /* Nokia 5800 XpressMusic */ | 1607 | { NOKIA_PCSUITE_ACM_INFO(0x0154), }, /* Nokia 5800 XpressMusic */ |
1608 | { NOKIA_PCSUITE_ACM_INFO(0x04ce), }, /* Nokia E90 */ | 1608 | { NOKIA_PCSUITE_ACM_INFO(0x04ce), }, /* Nokia E90 */ |
1609 | { NOKIA_PCSUITE_ACM_INFO(0x01d4), }, /* Nokia E55 */ | 1609 | { NOKIA_PCSUITE_ACM_INFO(0x01d4), }, /* Nokia E55 */ |
1610 | { NOKIA_PCSUITE_ACM_INFO(0x0302), }, /* Nokia N8 */ | ||
1610 | { SAMSUNG_PCSUITE_ACM_INFO(0x6651), }, /* Samsung GTi8510 (INNOV8) */ | 1611 | { SAMSUNG_PCSUITE_ACM_INFO(0x6651), }, /* Samsung GTi8510 (INNOV8) */ |
1611 | 1612 | ||
1612 | /* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */ | 1613 | /* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */ |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index f1aaff6202a5..045bb4b823e1 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -965,10 +965,11 @@ static int proc_getdriver(struct dev_state *ps, void __user *arg) | |||
965 | 965 | ||
966 | static int proc_connectinfo(struct dev_state *ps, void __user *arg) | 966 | static int proc_connectinfo(struct dev_state *ps, void __user *arg) |
967 | { | 967 | { |
968 | struct usbdevfs_connectinfo ci; | 968 | struct usbdevfs_connectinfo ci = { |
969 | .devnum = ps->dev->devnum, | ||
970 | .slow = ps->dev->speed == USB_SPEED_LOW | ||
971 | }; | ||
969 | 972 | ||
970 | ci.devnum = ps->dev->devnum; | ||
971 | ci.slow = ps->dev->speed == USB_SPEED_LOW; | ||
972 | if (copy_to_user(arg, &ci, sizeof(ci))) | 973 | if (copy_to_user(arg, &ci, sizeof(ci))) |
973 | return -EFAULT; | 974 | return -EFAULT; |
974 | return 0; | 975 | return 0; |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 5cca00a6d09d..b5c965c031f9 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1945,7 +1945,6 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) | |||
1945 | 1945 | ||
1946 | dev_dbg(&rhdev->dev, "usb %s%s\n", | 1946 | dev_dbg(&rhdev->dev, "usb %s%s\n", |
1947 | (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume"); | 1947 | (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume"); |
1948 | clear_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags); | ||
1949 | if (!hcd->driver->bus_resume) | 1948 | if (!hcd->driver->bus_resume) |
1950 | return -ENOENT; | 1949 | return -ENOENT; |
1951 | if (hcd->state == HC_STATE_RUNNING) | 1950 | if (hcd->state == HC_STATE_RUNNING) |
@@ -1953,6 +1952,7 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) | |||
1953 | 1952 | ||
1954 | hcd->state = HC_STATE_RESUMING; | 1953 | hcd->state = HC_STATE_RESUMING; |
1955 | status = hcd->driver->bus_resume(hcd); | 1954 | status = hcd->driver->bus_resume(hcd); |
1955 | clear_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags); | ||
1956 | if (status == 0) { | 1956 | if (status == 0) { |
1957 | /* TRSMRCY = 10 msec */ | 1957 | /* TRSMRCY = 10 msec */ |
1958 | msleep(10); | 1958 | msleep(10); |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 84c1897188d2..6c16c4f2c741 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -677,6 +677,8 @@ static void hub_init_func3(struct work_struct *ws); | |||
677 | static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | 677 | static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) |
678 | { | 678 | { |
679 | struct usb_device *hdev = hub->hdev; | 679 | struct usb_device *hdev = hub->hdev; |
680 | struct usb_hcd *hcd; | ||
681 | int ret; | ||
680 | int port1; | 682 | int port1; |
681 | int status; | 683 | int status; |
682 | bool need_debounce_delay = false; | 684 | bool need_debounce_delay = false; |
@@ -715,6 +717,25 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | |||
715 | usb_autopm_get_interface_no_resume( | 717 | usb_autopm_get_interface_no_resume( |
716 | to_usb_interface(hub->intfdev)); | 718 | to_usb_interface(hub->intfdev)); |
717 | return; /* Continues at init2: below */ | 719 | return; /* Continues at init2: below */ |
720 | } else if (type == HUB_RESET_RESUME) { | ||
721 | /* The internal host controller state for the hub device | ||
722 | * may be gone after a host power loss on system resume. | ||
723 | * Update the device's info so the HW knows it's a hub. | ||
724 | */ | ||
725 | hcd = bus_to_hcd(hdev->bus); | ||
726 | if (hcd->driver->update_hub_device) { | ||
727 | ret = hcd->driver->update_hub_device(hcd, hdev, | ||
728 | &hub->tt, GFP_NOIO); | ||
729 | if (ret < 0) { | ||
730 | dev_err(hub->intfdev, "Host not " | ||
731 | "accepting hub info " | ||
732 | "update.\n"); | ||
733 | dev_err(hub->intfdev, "LS/FS devices " | ||
734 | "and hubs may not work " | ||
735 | "under this hub\n."); | ||
736 | } | ||
737 | } | ||
738 | hub_power_on(hub, true); | ||
718 | } else { | 739 | } else { |
719 | hub_power_on(hub, true); | 740 | hub_power_on(hub, true); |
720 | } | 741 | } |
@@ -2722,6 +2743,11 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, | |||
2722 | udev->ttport = hdev->ttport; | 2743 | udev->ttport = hdev->ttport; |
2723 | } else if (udev->speed != USB_SPEED_HIGH | 2744 | } else if (udev->speed != USB_SPEED_HIGH |
2724 | && hdev->speed == USB_SPEED_HIGH) { | 2745 | && hdev->speed == USB_SPEED_HIGH) { |
2746 | if (!hub->tt.hub) { | ||
2747 | dev_err(&udev->dev, "parent hub has no TT\n"); | ||
2748 | retval = -EINVAL; | ||
2749 | goto fail; | ||
2750 | } | ||
2725 | udev->tt = &hub->tt; | 2751 | udev->tt = &hub->tt; |
2726 | udev->ttport = port1; | 2752 | udev->ttport = port1; |
2727 | } | 2753 | } |
@@ -2860,13 +2886,16 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, | |||
2860 | else | 2886 | else |
2861 | i = udev->descriptor.bMaxPacketSize0; | 2887 | i = udev->descriptor.bMaxPacketSize0; |
2862 | if (le16_to_cpu(udev->ep0.desc.wMaxPacketSize) != i) { | 2888 | if (le16_to_cpu(udev->ep0.desc.wMaxPacketSize) != i) { |
2863 | if (udev->speed != USB_SPEED_FULL || | 2889 | if (udev->speed == USB_SPEED_LOW || |
2864 | !(i == 8 || i == 16 || i == 32 || i == 64)) { | 2890 | !(i == 8 || i == 16 || i == 32 || i == 64)) { |
2865 | dev_err(&udev->dev, "ep0 maxpacket = %d\n", i); | 2891 | dev_err(&udev->dev, "Invalid ep0 maxpacket: %d\n", i); |
2866 | retval = -EMSGSIZE; | 2892 | retval = -EMSGSIZE; |
2867 | goto fail; | 2893 | goto fail; |
2868 | } | 2894 | } |
2869 | dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i); | 2895 | if (udev->speed == USB_SPEED_FULL) |
2896 | dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i); | ||
2897 | else | ||
2898 | dev_warn(&udev->dev, "Using ep0 maxpacket: %d\n", i); | ||
2870 | udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i); | 2899 | udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i); |
2871 | usb_ep0_reinit(udev); | 2900 | usb_ep0_reinit(udev); |
2872 | } | 2901 | } |
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 9f0ce7de0e36..d6e3e410477e 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -1140,13 +1140,6 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) | |||
1140 | { | 1140 | { |
1141 | int i; | 1141 | int i; |
1142 | 1142 | ||
1143 | dev_dbg(&dev->dev, "%s nuking %s URBs\n", __func__, | ||
1144 | skip_ep0 ? "non-ep0" : "all"); | ||
1145 | for (i = skip_ep0; i < 16; ++i) { | ||
1146 | usb_disable_endpoint(dev, i, true); | ||
1147 | usb_disable_endpoint(dev, i + USB_DIR_IN, true); | ||
1148 | } | ||
1149 | |||
1150 | /* getting rid of interfaces will disconnect | 1143 | /* getting rid of interfaces will disconnect |
1151 | * any drivers bound to them (a key side effect) | 1144 | * any drivers bound to them (a key side effect) |
1152 | */ | 1145 | */ |
@@ -1176,6 +1169,13 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) | |||
1176 | if (dev->state == USB_STATE_CONFIGURED) | 1169 | if (dev->state == USB_STATE_CONFIGURED) |
1177 | usb_set_device_state(dev, USB_STATE_ADDRESS); | 1170 | usb_set_device_state(dev, USB_STATE_ADDRESS); |
1178 | } | 1171 | } |
1172 | |||
1173 | dev_dbg(&dev->dev, "%s nuking %s URBs\n", __func__, | ||
1174 | skip_ep0 ? "non-ep0" : "all"); | ||
1175 | for (i = skip_ep0; i < 16; ++i) { | ||
1176 | usb_disable_endpoint(dev, i, true); | ||
1177 | usb_disable_endpoint(dev, i + USB_DIR_IN, true); | ||
1178 | } | ||
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | /** | 1181 | /** |
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index d623c7bda1f6..2d19d88846ef 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -2014,6 +2014,9 @@ static int __init usba_udc_probe(struct platform_device *pdev) | |||
2014 | } else { | 2014 | } else { |
2015 | disable_irq(gpio_to_irq(udc->vbus_pin)); | 2015 | disable_irq(gpio_to_irq(udc->vbus_pin)); |
2016 | } | 2016 | } |
2017 | } else { | ||
2018 | /* gpio_request fail so use -EINVAL for gpio_is_valid */ | ||
2019 | udc->vbus_pin = -EINVAL; | ||
2017 | } | 2020 | } |
2018 | } | 2021 | } |
2019 | 2022 | ||
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 1160c55de7f2..67746b19ac54 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -901,7 +901,8 @@ unknown: | |||
901 | */ | 901 | */ |
902 | switch (ctrl->bRequestType & USB_RECIP_MASK) { | 902 | switch (ctrl->bRequestType & USB_RECIP_MASK) { |
903 | case USB_RECIP_INTERFACE: | 903 | case USB_RECIP_INTERFACE: |
904 | f = cdev->config->interface[intf]; | 904 | if (cdev->config) |
905 | f = cdev->config->interface[intf]; | ||
905 | break; | 906 | break; |
906 | 907 | ||
907 | case USB_RECIP_ENDPOINT: | 908 | case USB_RECIP_ENDPOINT: |
@@ -1082,14 +1083,6 @@ static int composite_bind(struct usb_gadget *gadget) | |||
1082 | */ | 1083 | */ |
1083 | usb_ep_autoconfig_reset(cdev->gadget); | 1084 | usb_ep_autoconfig_reset(cdev->gadget); |
1084 | 1085 | ||
1085 | /* standardized runtime overrides for device ID data */ | ||
1086 | if (idVendor) | ||
1087 | cdev->desc.idVendor = cpu_to_le16(idVendor); | ||
1088 | if (idProduct) | ||
1089 | cdev->desc.idProduct = cpu_to_le16(idProduct); | ||
1090 | if (bcdDevice) | ||
1091 | cdev->desc.bcdDevice = cpu_to_le16(bcdDevice); | ||
1092 | |||
1093 | /* composite gadget needs to assign strings for whole device (like | 1086 | /* composite gadget needs to assign strings for whole device (like |
1094 | * serial number), register function drivers, potentially update | 1087 | * serial number), register function drivers, potentially update |
1095 | * power state and consumption, etc | 1088 | * power state and consumption, etc |
@@ -1101,6 +1094,14 @@ static int composite_bind(struct usb_gadget *gadget) | |||
1101 | cdev->desc = *composite->dev; | 1094 | cdev->desc = *composite->dev; |
1102 | cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; | 1095 | cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; |
1103 | 1096 | ||
1097 | /* standardized runtime overrides for device ID data */ | ||
1098 | if (idVendor) | ||
1099 | cdev->desc.idVendor = cpu_to_le16(idVendor); | ||
1100 | if (idProduct) | ||
1101 | cdev->desc.idProduct = cpu_to_le16(idProduct); | ||
1102 | if (bcdDevice) | ||
1103 | cdev->desc.bcdDevice = cpu_to_le16(bcdDevice); | ||
1104 | |||
1104 | /* strings can't be assigned before bind() allocates the | 1105 | /* strings can't be assigned before bind() allocates the |
1105 | * releavnt identifiers | 1106 | * releavnt identifiers |
1106 | */ | 1107 | */ |
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index d47a123f15ab..bd6226cbae86 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c | |||
@@ -111,7 +111,7 @@ acm_iad_descriptor = { | |||
111 | .bInterfaceCount = 2, // control + data | 111 | .bInterfaceCount = 2, // control + data |
112 | .bFunctionClass = USB_CLASS_COMM, | 112 | .bFunctionClass = USB_CLASS_COMM, |
113 | .bFunctionSubClass = USB_CDC_SUBCLASS_ACM, | 113 | .bFunctionSubClass = USB_CDC_SUBCLASS_ACM, |
114 | .bFunctionProtocol = USB_CDC_PROTO_NONE, | 114 | .bFunctionProtocol = USB_CDC_ACM_PROTO_AT_V25TER, |
115 | /* .iFunction = DYNAMIC */ | 115 | /* .iFunction = DYNAMIC */ |
116 | }; | 116 | }; |
117 | 117 | ||
diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c index a9474f8d5325..3c2f0a43c9c6 100644 --- a/drivers/usb/gadget/g_ffs.c +++ b/drivers/usb/gadget/g_ffs.c | |||
@@ -53,8 +53,8 @@ MODULE_AUTHOR("Michal Nazarewicz"); | |||
53 | MODULE_LICENSE("GPL"); | 53 | MODULE_LICENSE("GPL"); |
54 | 54 | ||
55 | 55 | ||
56 | static unsigned short gfs_vendor_id = 0x0525; /* XXX NetChip */ | 56 | static unsigned short gfs_vendor_id = 0x1d6b; /* Linux Foundation */ |
57 | static unsigned short gfs_product_id = 0xa4ac; /* XXX */ | 57 | static unsigned short gfs_product_id = 0x0105; /* FunctionFS Gadget */ |
58 | 58 | ||
59 | static struct usb_device_descriptor gfs_dev_desc = { | 59 | static struct usb_device_descriptor gfs_dev_desc = { |
60 | .bLength = sizeof gfs_dev_desc, | 60 | .bLength = sizeof gfs_dev_desc, |
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 795d76232167..36d67a32abef 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c | |||
@@ -74,8 +74,8 @@ MODULE_LICENSE("GPL"); | |||
74 | 74 | ||
75 | /***************************** Device Descriptor ****************************/ | 75 | /***************************** Device Descriptor ****************************/ |
76 | 76 | ||
77 | #define MULTI_VENDOR_NUM 0x0525 /* XXX NetChip */ | 77 | #define MULTI_VENDOR_NUM 0x1d6b /* Linux Foundation */ |
78 | #define MULTI_PRODUCT_NUM 0xa4ab /* XXX */ | 78 | #define MULTI_PRODUCT_NUM 0x0104 /* Multifunction Composite Gadget */ |
79 | 79 | ||
80 | 80 | ||
81 | enum { | 81 | enum { |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index cf241c371a71..15222ebf3422 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -131,31 +131,31 @@ static struct printer_dev usb_printer_gadget; | |||
131 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). | 131 | * parameters are in UTF-8 (superset of ASCII's 7 bit characters). |
132 | */ | 132 | */ |
133 | 133 | ||
134 | static ushort __initdata idVendor; | 134 | static ushort idVendor; |
135 | module_param(idVendor, ushort, S_IRUGO); | 135 | module_param(idVendor, ushort, S_IRUGO); |
136 | MODULE_PARM_DESC(idVendor, "USB Vendor ID"); | 136 | MODULE_PARM_DESC(idVendor, "USB Vendor ID"); |
137 | 137 | ||
138 | static ushort __initdata idProduct; | 138 | static ushort idProduct; |
139 | module_param(idProduct, ushort, S_IRUGO); | 139 | module_param(idProduct, ushort, S_IRUGO); |
140 | MODULE_PARM_DESC(idProduct, "USB Product ID"); | 140 | MODULE_PARM_DESC(idProduct, "USB Product ID"); |
141 | 141 | ||
142 | static ushort __initdata bcdDevice; | 142 | static ushort bcdDevice; |
143 | module_param(bcdDevice, ushort, S_IRUGO); | 143 | module_param(bcdDevice, ushort, S_IRUGO); |
144 | MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)"); | 144 | MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)"); |
145 | 145 | ||
146 | static char *__initdata iManufacturer; | 146 | static char *iManufacturer; |
147 | module_param(iManufacturer, charp, S_IRUGO); | 147 | module_param(iManufacturer, charp, S_IRUGO); |
148 | MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string"); | 148 | MODULE_PARM_DESC(iManufacturer, "USB Manufacturer string"); |
149 | 149 | ||
150 | static char *__initdata iProduct; | 150 | static char *iProduct; |
151 | module_param(iProduct, charp, S_IRUGO); | 151 | module_param(iProduct, charp, S_IRUGO); |
152 | MODULE_PARM_DESC(iProduct, "USB Product string"); | 152 | MODULE_PARM_DESC(iProduct, "USB Product string"); |
153 | 153 | ||
154 | static char *__initdata iSerialNum; | 154 | static char *iSerialNum; |
155 | module_param(iSerialNum, charp, S_IRUGO); | 155 | module_param(iSerialNum, charp, S_IRUGO); |
156 | MODULE_PARM_DESC(iSerialNum, "1"); | 156 | MODULE_PARM_DESC(iSerialNum, "1"); |
157 | 157 | ||
158 | static char *__initdata iPNPstring; | 158 | static char *iPNPstring; |
159 | module_param(iPNPstring, charp, S_IRUGO); | 159 | module_param(iPNPstring, charp, S_IRUGO); |
160 | MODULE_PARM_DESC(iPNPstring, "MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;"); | 160 | MODULE_PARM_DESC(iPNPstring, "MFG:linux;MDL:g_printer;CLS:PRINTER;SN:1;"); |
161 | 161 | ||
@@ -1596,13 +1596,12 @@ cleanup(void) | |||
1596 | int status; | 1596 | int status; |
1597 | 1597 | ||
1598 | mutex_lock(&usb_printer_gadget.lock_printer_io); | 1598 | mutex_lock(&usb_printer_gadget.lock_printer_io); |
1599 | class_destroy(usb_gadget_class); | ||
1600 | unregister_chrdev_region(g_printer_devno, 2); | ||
1601 | |||
1602 | status = usb_gadget_unregister_driver(&printer_driver); | 1599 | status = usb_gadget_unregister_driver(&printer_driver); |
1603 | if (status) | 1600 | if (status) |
1604 | ERROR(dev, "usb_gadget_unregister_driver %x\n", status); | 1601 | ERROR(dev, "usb_gadget_unregister_driver %x\n", status); |
1605 | 1602 | ||
1603 | unregister_chrdev_region(g_printer_devno, 2); | ||
1604 | class_destroy(usb_gadget_class); | ||
1606 | mutex_unlock(&usb_printer_gadget.lock_printer_io); | 1605 | mutex_unlock(&usb_printer_gadget.lock_printer_io); |
1607 | } | 1606 | } |
1608 | module_exit(cleanup); | 1607 | module_exit(cleanup); |
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index 2baf8a849086..a869e3c103d3 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c | |||
@@ -227,8 +227,8 @@ static int ehci_hcd_au1xxx_drv_suspend(struct device *dev) | |||
227 | * mark HW unaccessible. The PM and USB cores make sure that | 227 | * mark HW unaccessible. The PM and USB cores make sure that |
228 | * the root hub is either suspended or stopped. | 228 | * the root hub is either suspended or stopped. |
229 | */ | 229 | */ |
230 | spin_lock_irqsave(&ehci->lock, flags); | ||
231 | ehci_prepare_ports_for_controller_suspend(ehci, device_may_wakeup(dev)); | 230 | ehci_prepare_ports_for_controller_suspend(ehci, device_may_wakeup(dev)); |
231 | spin_lock_irqsave(&ehci->lock, flags); | ||
232 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); | 232 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); |
233 | (void)ehci_readl(ehci, &ehci->regs->intr_enable); | 233 | (void)ehci_readl(ehci, &ehci->regs->intr_enable); |
234 | 234 | ||
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 76b7fd2d838a..b349021c052b 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c | |||
@@ -1063,7 +1063,7 @@ static inline void create_debug_files (struct ehci_hcd *ehci) | |||
1063 | &debug_registers_fops)) | 1063 | &debug_registers_fops)) |
1064 | goto file_error; | 1064 | goto file_error; |
1065 | 1065 | ||
1066 | if (!debugfs_create_file("lpm", S_IRUGO|S_IWUGO, ehci->debug_dir, bus, | 1066 | if (!debugfs_create_file("lpm", S_IRUGO|S_IWUSR, ehci->debug_dir, bus, |
1067 | &debug_lpm_fops)) | 1067 | &debug_lpm_fops)) |
1068 | goto file_error; | 1068 | goto file_error; |
1069 | 1069 | ||
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 34a928d3b7d2..597ed102d54f 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -114,6 +114,9 @@ MODULE_PARM_DESC(hird, "host initiated resume duration, +1 for each 75us\n"); | |||
114 | 114 | ||
115 | #define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) | 115 | #define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) |
116 | 116 | ||
117 | /* for ASPM quirk of ISOC on AMD SB800 */ | ||
118 | static struct pci_dev *amd_nb_dev; | ||
119 | |||
117 | /*-------------------------------------------------------------------------*/ | 120 | /*-------------------------------------------------------------------------*/ |
118 | 121 | ||
119 | #include "ehci.h" | 122 | #include "ehci.h" |
@@ -514,6 +517,11 @@ static void ehci_stop (struct usb_hcd *hcd) | |||
514 | spin_unlock_irq (&ehci->lock); | 517 | spin_unlock_irq (&ehci->lock); |
515 | ehci_mem_cleanup (ehci); | 518 | ehci_mem_cleanup (ehci); |
516 | 519 | ||
520 | if (amd_nb_dev) { | ||
521 | pci_dev_put(amd_nb_dev); | ||
522 | amd_nb_dev = NULL; | ||
523 | } | ||
524 | |||
517 | #ifdef EHCI_STATS | 525 | #ifdef EHCI_STATS |
518 | ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n", | 526 | ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n", |
519 | ehci->stats.normal, ehci->stats.error, ehci->stats.reclaim, | 527 | ehci->stats.normal, ehci->stats.error, ehci->stats.reclaim, |
@@ -549,6 +557,8 @@ static int ehci_init(struct usb_hcd *hcd) | |||
549 | ehci->iaa_watchdog.function = ehci_iaa_watchdog; | 557 | ehci->iaa_watchdog.function = ehci_iaa_watchdog; |
550 | ehci->iaa_watchdog.data = (unsigned long) ehci; | 558 | ehci->iaa_watchdog.data = (unsigned long) ehci; |
551 | 559 | ||
560 | hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params); | ||
561 | |||
552 | /* | 562 | /* |
553 | * hw default: 1K periodic list heads, one per frame. | 563 | * hw default: 1K periodic list heads, one per frame. |
554 | * periodic_size can shrink by USBCMD update if hcc_params allows. | 564 | * periodic_size can shrink by USBCMD update if hcc_params allows. |
@@ -556,11 +566,20 @@ static int ehci_init(struct usb_hcd *hcd) | |||
556 | ehci->periodic_size = DEFAULT_I_TDPS; | 566 | ehci->periodic_size = DEFAULT_I_TDPS; |
557 | INIT_LIST_HEAD(&ehci->cached_itd_list); | 567 | INIT_LIST_HEAD(&ehci->cached_itd_list); |
558 | INIT_LIST_HEAD(&ehci->cached_sitd_list); | 568 | INIT_LIST_HEAD(&ehci->cached_sitd_list); |
569 | |||
570 | if (HCC_PGM_FRAMELISTLEN(hcc_params)) { | ||
571 | /* periodic schedule size can be smaller than default */ | ||
572 | switch (EHCI_TUNE_FLS) { | ||
573 | case 0: ehci->periodic_size = 1024; break; | ||
574 | case 1: ehci->periodic_size = 512; break; | ||
575 | case 2: ehci->periodic_size = 256; break; | ||
576 | default: BUG(); | ||
577 | } | ||
578 | } | ||
559 | if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0) | 579 | if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0) |
560 | return retval; | 580 | return retval; |
561 | 581 | ||
562 | /* controllers may cache some of the periodic schedule ... */ | 582 | /* controllers may cache some of the periodic schedule ... */ |
563 | hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params); | ||
564 | if (HCC_ISOC_CACHE(hcc_params)) // full frame cache | 583 | if (HCC_ISOC_CACHE(hcc_params)) // full frame cache |
565 | ehci->i_thresh = 2 + 8; | 584 | ehci->i_thresh = 2 + 8; |
566 | else // N microframes cached | 585 | else // N microframes cached |
@@ -614,12 +633,6 @@ static int ehci_init(struct usb_hcd *hcd) | |||
614 | /* periodic schedule size can be smaller than default */ | 633 | /* periodic schedule size can be smaller than default */ |
615 | temp &= ~(3 << 2); | 634 | temp &= ~(3 << 2); |
616 | temp |= (EHCI_TUNE_FLS << 2); | 635 | temp |= (EHCI_TUNE_FLS << 2); |
617 | switch (EHCI_TUNE_FLS) { | ||
618 | case 0: ehci->periodic_size = 1024; break; | ||
619 | case 1: ehci->periodic_size = 512; break; | ||
620 | case 2: ehci->periodic_size = 256; break; | ||
621 | default: BUG(); | ||
622 | } | ||
623 | } | 636 | } |
624 | if (HCC_LPM(hcc_params)) { | 637 | if (HCC_LPM(hcc_params)) { |
625 | /* support link power management EHCI 1.1 addendum */ | 638 | /* support link power management EHCI 1.1 addendum */ |
@@ -1048,10 +1061,11 @@ rescan: | |||
1048 | tmp && tmp != qh; | 1061 | tmp && tmp != qh; |
1049 | tmp = tmp->qh_next.qh) | 1062 | tmp = tmp->qh_next.qh) |
1050 | continue; | 1063 | continue; |
1051 | /* periodic qh self-unlinks on empty */ | 1064 | /* periodic qh self-unlinks on empty, and a COMPLETING qh |
1052 | if (!tmp) | 1065 | * may already be unlinked. |
1053 | goto nogood; | 1066 | */ |
1054 | unlink_async (ehci, qh); | 1067 | if (tmp) |
1068 | unlink_async(ehci, qh); | ||
1055 | /* FALL THROUGH */ | 1069 | /* FALL THROUGH */ |
1056 | case QH_STATE_UNLINK: /* wait for hw to finish? */ | 1070 | case QH_STATE_UNLINK: /* wait for hw to finish? */ |
1057 | case QH_STATE_UNLINK_WAIT: | 1071 | case QH_STATE_UNLINK_WAIT: |
@@ -1068,7 +1082,6 @@ idle_timeout: | |||
1068 | } | 1082 | } |
1069 | /* else FALL THROUGH */ | 1083 | /* else FALL THROUGH */ |
1070 | default: | 1084 | default: |
1071 | nogood: | ||
1072 | /* caller was supposed to have unlinked any requests; | 1085 | /* caller was supposed to have unlinked any requests; |
1073 | * that's not our job. just leak this memory. | 1086 | * that's not our job. just leak this memory. |
1074 | */ | 1087 | */ |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 796ea0c8900f..8a515f0d5988 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -111,6 +111,7 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, | |||
111 | { | 111 | { |
112 | int port; | 112 | int port; |
113 | u32 temp; | 113 | u32 temp; |
114 | unsigned long flags; | ||
114 | 115 | ||
115 | /* If remote wakeup is enabled for the root hub but disabled | 116 | /* If remote wakeup is enabled for the root hub but disabled |
116 | * for the controller, we must adjust all the port wakeup flags | 117 | * for the controller, we must adjust all the port wakeup flags |
@@ -120,6 +121,8 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, | |||
120 | if (!ehci_to_hcd(ehci)->self.root_hub->do_remote_wakeup || do_wakeup) | 121 | if (!ehci_to_hcd(ehci)->self.root_hub->do_remote_wakeup || do_wakeup) |
121 | return; | 122 | return; |
122 | 123 | ||
124 | spin_lock_irqsave(&ehci->lock, flags); | ||
125 | |||
123 | /* clear phy low-power mode before changing wakeup flags */ | 126 | /* clear phy low-power mode before changing wakeup flags */ |
124 | if (ehci->has_hostpc) { | 127 | if (ehci->has_hostpc) { |
125 | port = HCS_N_PORTS(ehci->hcs_params); | 128 | port = HCS_N_PORTS(ehci->hcs_params); |
@@ -131,7 +134,9 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, | |||
131 | temp = ehci_readl(ehci, hostpc_reg); | 134 | temp = ehci_readl(ehci, hostpc_reg); |
132 | ehci_writel(ehci, temp & ~HOSTPC_PHCD, hostpc_reg); | 135 | ehci_writel(ehci, temp & ~HOSTPC_PHCD, hostpc_reg); |
133 | } | 136 | } |
137 | spin_unlock_irqrestore(&ehci->lock, flags); | ||
134 | msleep(5); | 138 | msleep(5); |
139 | spin_lock_irqsave(&ehci->lock, flags); | ||
135 | } | 140 | } |
136 | 141 | ||
137 | port = HCS_N_PORTS(ehci->hcs_params); | 142 | port = HCS_N_PORTS(ehci->hcs_params); |
@@ -170,6 +175,8 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, | |||
170 | /* Does the root hub have a port wakeup pending? */ | 175 | /* Does the root hub have a port wakeup pending? */ |
171 | if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD)) | 176 | if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD)) |
172 | usb_hcd_resume_root_hub(ehci_to_hcd(ehci)); | 177 | usb_hcd_resume_root_hub(ehci_to_hcd(ehci)); |
178 | |||
179 | spin_unlock_irqrestore(&ehci->lock, flags); | ||
173 | } | 180 | } |
174 | 181 | ||
175 | static int ehci_bus_suspend (struct usb_hcd *hcd) | 182 | static int ehci_bus_suspend (struct usb_hcd *hcd) |
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index a1e8d273103f..566791e04e8c 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -41,6 +41,42 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) | |||
41 | return 0; | 41 | return 0; |
42 | } | 42 | } |
43 | 43 | ||
44 | static int ehci_quirk_amd_hudson(struct ehci_hcd *ehci) | ||
45 | { | ||
46 | struct pci_dev *amd_smbus_dev; | ||
47 | u8 rev = 0; | ||
48 | |||
49 | amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_ATI, 0x4385, NULL); | ||
50 | if (amd_smbus_dev) { | ||
51 | pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); | ||
52 | if (rev < 0x40) { | ||
53 | pci_dev_put(amd_smbus_dev); | ||
54 | amd_smbus_dev = NULL; | ||
55 | return 0; | ||
56 | } | ||
57 | } else { | ||
58 | amd_smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x780b, NULL); | ||
59 | if (!amd_smbus_dev) | ||
60 | return 0; | ||
61 | pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); | ||
62 | if (rev < 0x11 || rev > 0x18) { | ||
63 | pci_dev_put(amd_smbus_dev); | ||
64 | amd_smbus_dev = NULL; | ||
65 | return 0; | ||
66 | } | ||
67 | } | ||
68 | |||
69 | if (!amd_nb_dev) | ||
70 | amd_nb_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1510, NULL); | ||
71 | |||
72 | ehci_info(ehci, "QUIRK: Enable exception for AMD Hudson ASPM\n"); | ||
73 | |||
74 | pci_dev_put(amd_smbus_dev); | ||
75 | amd_smbus_dev = NULL; | ||
76 | |||
77 | return 1; | ||
78 | } | ||
79 | |||
44 | /* called during probe() after chip reset completes */ | 80 | /* called during probe() after chip reset completes */ |
45 | static int ehci_pci_setup(struct usb_hcd *hcd) | 81 | static int ehci_pci_setup(struct usb_hcd *hcd) |
46 | { | 82 | { |
@@ -99,6 +135,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
99 | /* cache this readonly data; minimize chip reads */ | 135 | /* cache this readonly data; minimize chip reads */ |
100 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); | 136 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
101 | 137 | ||
138 | if (ehci_quirk_amd_hudson(ehci)) | ||
139 | ehci->amd_l1_fix = 1; | ||
140 | |||
102 | retval = ehci_halt(ehci); | 141 | retval = ehci_halt(ehci); |
103 | if (retval) | 142 | if (retval) |
104 | return retval; | 143 | return retval; |
@@ -148,6 +187,18 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
148 | if (pdev->revision < 0xa4) | 187 | if (pdev->revision < 0xa4) |
149 | ehci->no_selective_suspend = 1; | 188 | ehci->no_selective_suspend = 1; |
150 | break; | 189 | break; |
190 | |||
191 | /* MCP89 chips on the MacBookAir3,1 give EPROTO when | ||
192 | * fetching device descriptors unless LPM is disabled. | ||
193 | * There are also intermittent problems enumerating | ||
194 | * devices with PPCD enabled. | ||
195 | */ | ||
196 | case 0x0d9d: | ||
197 | ehci_info(ehci, "disable lpm/ppcd for nvidia mcp89"); | ||
198 | ehci->has_lpm = 0; | ||
199 | ehci->has_ppcd = 0; | ||
200 | ehci->command &= ~CMD_PPCEE; | ||
201 | break; | ||
151 | } | 202 | } |
152 | break; | 203 | break; |
153 | case PCI_VENDOR_ID_VIA: | 204 | case PCI_VENDOR_ID_VIA: |
@@ -296,8 +347,8 @@ static int ehci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) | |||
296 | * mark HW unaccessible. The PM and USB cores make sure that | 347 | * mark HW unaccessible. The PM and USB cores make sure that |
297 | * the root hub is either suspended or stopped. | 348 | * the root hub is either suspended or stopped. |
298 | */ | 349 | */ |
299 | spin_lock_irqsave (&ehci->lock, flags); | ||
300 | ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup); | 350 | ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup); |
351 | spin_lock_irqsave (&ehci->lock, flags); | ||
301 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); | 352 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); |
302 | (void)ehci_readl(ehci, &ehci->regs->intr_enable); | 353 | (void)ehci_readl(ehci, &ehci->regs->intr_enable); |
303 | 354 | ||
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index a92526d6e5ae..724ba7133c4f 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1583,6 +1583,63 @@ itd_link (struct ehci_hcd *ehci, unsigned frame, struct ehci_itd *itd) | |||
1583 | *hw_p = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD); | 1583 | *hw_p = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD); |
1584 | } | 1584 | } |
1585 | 1585 | ||
1586 | #define AB_REG_BAR_LOW 0xe0 | ||
1587 | #define AB_REG_BAR_HIGH 0xe1 | ||
1588 | #define AB_INDX(addr) ((addr) + 0x00) | ||
1589 | #define AB_DATA(addr) ((addr) + 0x04) | ||
1590 | #define NB_PCIE_INDX_ADDR 0xe0 | ||
1591 | #define NB_PCIE_INDX_DATA 0xe4 | ||
1592 | #define NB_PIF0_PWRDOWN_0 0x01100012 | ||
1593 | #define NB_PIF0_PWRDOWN_1 0x01100013 | ||
1594 | |||
1595 | static void ehci_quirk_amd_L1(struct ehci_hcd *ehci, int disable) | ||
1596 | { | ||
1597 | u32 addr, addr_low, addr_high, val; | ||
1598 | |||
1599 | outb_p(AB_REG_BAR_LOW, 0xcd6); | ||
1600 | addr_low = inb_p(0xcd7); | ||
1601 | outb_p(AB_REG_BAR_HIGH, 0xcd6); | ||
1602 | addr_high = inb_p(0xcd7); | ||
1603 | addr = addr_high << 8 | addr_low; | ||
1604 | outl_p(0x30, AB_INDX(addr)); | ||
1605 | outl_p(0x40, AB_DATA(addr)); | ||
1606 | outl_p(0x34, AB_INDX(addr)); | ||
1607 | val = inl_p(AB_DATA(addr)); | ||
1608 | |||
1609 | if (disable) { | ||
1610 | val &= ~0x8; | ||
1611 | val |= (1 << 4) | (1 << 9); | ||
1612 | } else { | ||
1613 | val |= 0x8; | ||
1614 | val &= ~((1 << 4) | (1 << 9)); | ||
1615 | } | ||
1616 | outl_p(val, AB_DATA(addr)); | ||
1617 | |||
1618 | if (amd_nb_dev) { | ||
1619 | addr = NB_PIF0_PWRDOWN_0; | ||
1620 | pci_write_config_dword(amd_nb_dev, NB_PCIE_INDX_ADDR, addr); | ||
1621 | pci_read_config_dword(amd_nb_dev, NB_PCIE_INDX_DATA, &val); | ||
1622 | if (disable) | ||
1623 | val &= ~(0x3f << 7); | ||
1624 | else | ||
1625 | val |= 0x3f << 7; | ||
1626 | |||
1627 | pci_write_config_dword(amd_nb_dev, NB_PCIE_INDX_DATA, val); | ||
1628 | |||
1629 | addr = NB_PIF0_PWRDOWN_1; | ||
1630 | pci_write_config_dword(amd_nb_dev, NB_PCIE_INDX_ADDR, addr); | ||
1631 | pci_read_config_dword(amd_nb_dev, NB_PCIE_INDX_DATA, &val); | ||
1632 | if (disable) | ||
1633 | val &= ~(0x3f << 7); | ||
1634 | else | ||
1635 | val |= 0x3f << 7; | ||
1636 | |||
1637 | pci_write_config_dword(amd_nb_dev, NB_PCIE_INDX_DATA, val); | ||
1638 | } | ||
1639 | |||
1640 | return; | ||
1641 | } | ||
1642 | |||
1586 | /* fit urb's itds into the selected schedule slot; activate as needed */ | 1643 | /* fit urb's itds into the selected schedule slot; activate as needed */ |
1587 | static int | 1644 | static int |
1588 | itd_link_urb ( | 1645 | itd_link_urb ( |
@@ -1609,6 +1666,12 @@ itd_link_urb ( | |||
1609 | urb->interval, | 1666 | urb->interval, |
1610 | next_uframe >> 3, next_uframe & 0x7); | 1667 | next_uframe >> 3, next_uframe & 0x7); |
1611 | } | 1668 | } |
1669 | |||
1670 | if (ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs == 0) { | ||
1671 | if (ehci->amd_l1_fix == 1) | ||
1672 | ehci_quirk_amd_L1(ehci, 1); | ||
1673 | } | ||
1674 | |||
1612 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; | 1675 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; |
1613 | 1676 | ||
1614 | /* fill iTDs uframe by uframe */ | 1677 | /* fill iTDs uframe by uframe */ |
@@ -1733,6 +1796,11 @@ itd_complete ( | |||
1733 | (void) disable_periodic(ehci); | 1796 | (void) disable_periodic(ehci); |
1734 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; | 1797 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; |
1735 | 1798 | ||
1799 | if (ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs == 0) { | ||
1800 | if (ehci->amd_l1_fix == 1) | ||
1801 | ehci_quirk_amd_L1(ehci, 0); | ||
1802 | } | ||
1803 | |||
1736 | if (unlikely(list_is_singular(&stream->td_list))) { | 1804 | if (unlikely(list_is_singular(&stream->td_list))) { |
1737 | ehci_to_hcd(ehci)->self.bandwidth_allocated | 1805 | ehci_to_hcd(ehci)->self.bandwidth_allocated |
1738 | -= stream->bandwidth; | 1806 | -= stream->bandwidth; |
@@ -2018,6 +2086,12 @@ sitd_link_urb ( | |||
2018 | (next_uframe >> 3) & (ehci->periodic_size - 1), | 2086 | (next_uframe >> 3) & (ehci->periodic_size - 1), |
2019 | stream->interval, hc32_to_cpu(ehci, stream->splits)); | 2087 | stream->interval, hc32_to_cpu(ehci, stream->splits)); |
2020 | } | 2088 | } |
2089 | |||
2090 | if (ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs == 0) { | ||
2091 | if (ehci->amd_l1_fix == 1) | ||
2092 | ehci_quirk_amd_L1(ehci, 1); | ||
2093 | } | ||
2094 | |||
2021 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; | 2095 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs++; |
2022 | 2096 | ||
2023 | /* fill sITDs frame by frame */ | 2097 | /* fill sITDs frame by frame */ |
@@ -2118,6 +2192,11 @@ sitd_complete ( | |||
2118 | (void) disable_periodic(ehci); | 2192 | (void) disable_periodic(ehci); |
2119 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; | 2193 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; |
2120 | 2194 | ||
2195 | if (ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs == 0) { | ||
2196 | if (ehci->amd_l1_fix == 1) | ||
2197 | ehci_quirk_amd_L1(ehci, 0); | ||
2198 | } | ||
2199 | |||
2121 | if (list_is_singular(&stream->td_list)) { | 2200 | if (list_is_singular(&stream->td_list)) { |
2122 | ehci_to_hcd(ehci)->self.bandwidth_allocated | 2201 | ehci_to_hcd(ehci)->self.bandwidth_allocated |
2123 | -= stream->bandwidth; | 2202 | -= stream->bandwidth; |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index bde823f704e9..fd1c53da89e4 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -130,6 +130,7 @@ struct ehci_hcd { /* one per controller */ | |||
130 | unsigned has_amcc_usb23:1; | 130 | unsigned has_amcc_usb23:1; |
131 | unsigned need_io_watchdog:1; | 131 | unsigned need_io_watchdog:1; |
132 | unsigned broken_periodic:1; | 132 | unsigned broken_periodic:1; |
133 | unsigned amd_l1_fix:1; | ||
133 | unsigned fs_i_thresh:1; /* Intel iso scheduling */ | 134 | unsigned fs_i_thresh:1; /* Intel iso scheduling */ |
134 | 135 | ||
135 | /* required for usb32 quirk */ | 136 | /* required for usb32 quirk */ |
diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c index 10e1872f3ab9..931d588c3fb5 100644 --- a/drivers/usb/host/ohci-jz4740.c +++ b/drivers/usb/host/ohci-jz4740.c | |||
@@ -273,4 +273,4 @@ static struct platform_driver ohci_hcd_jz4740_driver = { | |||
273 | }, | 273 | }, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | MODULE_ALIAS("platfrom:jz4740-ohci"); | 276 | MODULE_ALIAS("platform:jz4740-ohci"); |
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h index 95d0f5adfdcf..25563e9a90bc 100644 --- a/drivers/usb/host/r8a66597.h +++ b/drivers/usb/host/r8a66597.h | |||
@@ -227,7 +227,7 @@ static inline void r8a66597_write_fifo(struct r8a66597 *r8a66597, | |||
227 | int odd = len & 0x0001; | 227 | int odd = len & 0x0001; |
228 | 228 | ||
229 | len = len / 2; | 229 | len = len / 2; |
230 | ioread16_rep(fifoaddr, buf, len); | 230 | iowrite16_rep(fifoaddr, buf, len); |
231 | if (unlikely(odd)) { | 231 | if (unlikely(odd)) { |
232 | buf = &buf[len]; | 232 | buf = &buf[len]; |
233 | iowrite8((unsigned char)*buf, fifoaddr); | 233 | iowrite8((unsigned char)*buf, fifoaddr); |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index a1a7a9795536..480936a870ce 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -132,6 +132,13 @@ static u32 xhci_port_state_to_neutral(u32 state) | |||
132 | static void xhci_disable_port(struct xhci_hcd *xhci, u16 wIndex, | 132 | static void xhci_disable_port(struct xhci_hcd *xhci, u16 wIndex, |
133 | u32 __iomem *addr, u32 port_status) | 133 | u32 __iomem *addr, u32 port_status) |
134 | { | 134 | { |
135 | /* Don't allow the USB core to disable SuperSpeed ports. */ | ||
136 | if (xhci->port_array[wIndex] == 0x03) { | ||
137 | xhci_dbg(xhci, "Ignoring request to disable " | ||
138 | "SuperSpeed port.\n"); | ||
139 | return; | ||
140 | } | ||
141 | |||
135 | /* Write 1 to disable the port */ | 142 | /* Write 1 to disable the port */ |
136 | xhci_writel(xhci, port_status | PORT_PE, addr); | 143 | xhci_writel(xhci, port_status | PORT_PE, addr); |
137 | port_status = xhci_readl(xhci, addr); | 144 | port_status = xhci_readl(xhci, addr); |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 4e51343ddffc..6627a956fa8e 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1043,7 +1043,7 @@ static inline u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, | |||
1043 | if (udev->speed == USB_SPEED_SUPER) | 1043 | if (udev->speed == USB_SPEED_SUPER) |
1044 | return ep->ss_ep_comp.wBytesPerInterval; | 1044 | return ep->ss_ep_comp.wBytesPerInterval; |
1045 | 1045 | ||
1046 | max_packet = ep->desc.wMaxPacketSize & 0x3ff; | 1046 | max_packet = GET_MAX_PACKET(ep->desc.wMaxPacketSize); |
1047 | max_burst = (ep->desc.wMaxPacketSize & 0x1800) >> 11; | 1047 | max_burst = (ep->desc.wMaxPacketSize & 0x1800) >> 11; |
1048 | /* A 0 in max burst means 1 transfer per ESIT */ | 1048 | /* A 0 in max burst means 1 transfer per ESIT */ |
1049 | return max_packet * (max_burst + 1); | 1049 | return max_packet * (max_burst + 1); |
@@ -1133,7 +1133,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1133 | /* Fall through */ | 1133 | /* Fall through */ |
1134 | case USB_SPEED_FULL: | 1134 | case USB_SPEED_FULL: |
1135 | case USB_SPEED_LOW: | 1135 | case USB_SPEED_LOW: |
1136 | max_packet = ep->desc.wMaxPacketSize & 0x3ff; | 1136 | max_packet = GET_MAX_PACKET(ep->desc.wMaxPacketSize); |
1137 | ep_ctx->ep_info2 |= MAX_PACKET(max_packet); | 1137 | ep_ctx->ep_info2 |= MAX_PACKET(max_packet); |
1138 | break; | 1138 | break; |
1139 | default: | 1139 | default: |
@@ -1441,6 +1441,13 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
1441 | xhci->dcbaa = NULL; | 1441 | xhci->dcbaa = NULL; |
1442 | 1442 | ||
1443 | scratchpad_free(xhci); | 1443 | scratchpad_free(xhci); |
1444 | |||
1445 | xhci->num_usb2_ports = 0; | ||
1446 | xhci->num_usb3_ports = 0; | ||
1447 | kfree(xhci->usb2_ports); | ||
1448 | kfree(xhci->usb3_ports); | ||
1449 | kfree(xhci->port_array); | ||
1450 | |||
1444 | xhci->page_size = 0; | 1451 | xhci->page_size = 0; |
1445 | xhci->page_shift = 0; | 1452 | xhci->page_shift = 0; |
1446 | } | 1453 | } |
@@ -1624,6 +1631,166 @@ static void xhci_set_hc_event_deq(struct xhci_hcd *xhci) | |||
1624 | &xhci->ir_set->erst_dequeue); | 1631 | &xhci->ir_set->erst_dequeue); |
1625 | } | 1632 | } |
1626 | 1633 | ||
1634 | static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, | ||
1635 | u32 __iomem *addr, u8 major_revision) | ||
1636 | { | ||
1637 | u32 temp, port_offset, port_count; | ||
1638 | int i; | ||
1639 | |||
1640 | if (major_revision > 0x03) { | ||
1641 | xhci_warn(xhci, "Ignoring unknown port speed, " | ||
1642 | "Ext Cap %p, revision = 0x%x\n", | ||
1643 | addr, major_revision); | ||
1644 | /* Ignoring port protocol we can't understand. FIXME */ | ||
1645 | return; | ||
1646 | } | ||
1647 | |||
1648 | /* Port offset and count in the third dword, see section 7.2 */ | ||
1649 | temp = xhci_readl(xhci, addr + 2); | ||
1650 | port_offset = XHCI_EXT_PORT_OFF(temp); | ||
1651 | port_count = XHCI_EXT_PORT_COUNT(temp); | ||
1652 | xhci_dbg(xhci, "Ext Cap %p, port offset = %u, " | ||
1653 | "count = %u, revision = 0x%x\n", | ||
1654 | addr, port_offset, port_count, major_revision); | ||
1655 | /* Port count includes the current port offset */ | ||
1656 | if (port_offset == 0 || (port_offset + port_count - 1) > num_ports) | ||
1657 | /* WTF? "Valid values are ‘1’ to MaxPorts" */ | ||
1658 | return; | ||
1659 | port_offset--; | ||
1660 | for (i = port_offset; i < (port_offset + port_count); i++) { | ||
1661 | /* Duplicate entry. Ignore the port if the revisions differ. */ | ||
1662 | if (xhci->port_array[i] != 0) { | ||
1663 | xhci_warn(xhci, "Duplicate port entry, Ext Cap %p," | ||
1664 | " port %u\n", addr, i); | ||
1665 | xhci_warn(xhci, "Port was marked as USB %u, " | ||
1666 | "duplicated as USB %u\n", | ||
1667 | xhci->port_array[i], major_revision); | ||
1668 | /* Only adjust the roothub port counts if we haven't | ||
1669 | * found a similar duplicate. | ||
1670 | */ | ||
1671 | if (xhci->port_array[i] != major_revision && | ||
1672 | xhci->port_array[i] != (u8) -1) { | ||
1673 | if (xhci->port_array[i] == 0x03) | ||
1674 | xhci->num_usb3_ports--; | ||
1675 | else | ||
1676 | xhci->num_usb2_ports--; | ||
1677 | xhci->port_array[i] = (u8) -1; | ||
1678 | } | ||
1679 | /* FIXME: Should we disable the port? */ | ||
1680 | continue; | ||
1681 | } | ||
1682 | xhci->port_array[i] = major_revision; | ||
1683 | if (major_revision == 0x03) | ||
1684 | xhci->num_usb3_ports++; | ||
1685 | else | ||
1686 | xhci->num_usb2_ports++; | ||
1687 | } | ||
1688 | /* FIXME: Should we disable ports not in the Extended Capabilities? */ | ||
1689 | } | ||
1690 | |||
1691 | /* | ||
1692 | * Scan the Extended Capabilities for the "Supported Protocol Capabilities" that | ||
1693 | * specify what speeds each port is supposed to be. We can't count on the port | ||
1694 | * speed bits in the PORTSC register being correct until a device is connected, | ||
1695 | * but we need to set up the two fake roothubs with the correct number of USB | ||
1696 | * 3.0 and USB 2.0 ports at host controller initialization time. | ||
1697 | */ | ||
1698 | static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags) | ||
1699 | { | ||
1700 | u32 __iomem *addr; | ||
1701 | u32 offset; | ||
1702 | unsigned int num_ports; | ||
1703 | int i, port_index; | ||
1704 | |||
1705 | addr = &xhci->cap_regs->hcc_params; | ||
1706 | offset = XHCI_HCC_EXT_CAPS(xhci_readl(xhci, addr)); | ||
1707 | if (offset == 0) { | ||
1708 | xhci_err(xhci, "No Extended Capability registers, " | ||
1709 | "unable to set up roothub.\n"); | ||
1710 | return -ENODEV; | ||
1711 | } | ||
1712 | |||
1713 | num_ports = HCS_MAX_PORTS(xhci->hcs_params1); | ||
1714 | xhci->port_array = kzalloc(sizeof(*xhci->port_array)*num_ports, flags); | ||
1715 | if (!xhci->port_array) | ||
1716 | return -ENOMEM; | ||
1717 | |||
1718 | /* | ||
1719 | * For whatever reason, the first capability offset is from the | ||
1720 | * capability register base, not from the HCCPARAMS register. | ||
1721 | * See section 5.3.6 for offset calculation. | ||
1722 | */ | ||
1723 | addr = &xhci->cap_regs->hc_capbase + offset; | ||
1724 | while (1) { | ||
1725 | u32 cap_id; | ||
1726 | |||
1727 | cap_id = xhci_readl(xhci, addr); | ||
1728 | if (XHCI_EXT_CAPS_ID(cap_id) == XHCI_EXT_CAPS_PROTOCOL) | ||
1729 | xhci_add_in_port(xhci, num_ports, addr, | ||
1730 | (u8) XHCI_EXT_PORT_MAJOR(cap_id)); | ||
1731 | offset = XHCI_EXT_CAPS_NEXT(cap_id); | ||
1732 | if (!offset || (xhci->num_usb2_ports + xhci->num_usb3_ports) | ||
1733 | == num_ports) | ||
1734 | break; | ||
1735 | /* | ||
1736 | * Once you're into the Extended Capabilities, the offset is | ||
1737 | * always relative to the register holding the offset. | ||
1738 | */ | ||
1739 | addr += offset; | ||
1740 | } | ||
1741 | |||
1742 | if (xhci->num_usb2_ports == 0 && xhci->num_usb3_ports == 0) { | ||
1743 | xhci_warn(xhci, "No ports on the roothubs?\n"); | ||
1744 | return -ENODEV; | ||
1745 | } | ||
1746 | xhci_dbg(xhci, "Found %u USB 2.0 ports and %u USB 3.0 ports.\n", | ||
1747 | xhci->num_usb2_ports, xhci->num_usb3_ports); | ||
1748 | /* | ||
1749 | * Note we could have all USB 3.0 ports, or all USB 2.0 ports. | ||
1750 | * Not sure how the USB core will handle a hub with no ports... | ||
1751 | */ | ||
1752 | if (xhci->num_usb2_ports) { | ||
1753 | xhci->usb2_ports = kmalloc(sizeof(*xhci->usb2_ports)* | ||
1754 | xhci->num_usb2_ports, flags); | ||
1755 | if (!xhci->usb2_ports) | ||
1756 | return -ENOMEM; | ||
1757 | |||
1758 | port_index = 0; | ||
1759 | for (i = 0; i < num_ports; i++) { | ||
1760 | if (xhci->port_array[i] == 0x03 || | ||
1761 | xhci->port_array[i] == 0 || | ||
1762 | xhci->port_array[i] == -1) | ||
1763 | continue; | ||
1764 | |||
1765 | xhci->usb2_ports[port_index] = | ||
1766 | &xhci->op_regs->port_status_base + | ||
1767 | NUM_PORT_REGS*i; | ||
1768 | xhci_dbg(xhci, "USB 2.0 port at index %u, " | ||
1769 | "addr = %p\n", i, | ||
1770 | xhci->usb2_ports[port_index]); | ||
1771 | port_index++; | ||
1772 | } | ||
1773 | } | ||
1774 | if (xhci->num_usb3_ports) { | ||
1775 | xhci->usb3_ports = kmalloc(sizeof(*xhci->usb3_ports)* | ||
1776 | xhci->num_usb3_ports, flags); | ||
1777 | if (!xhci->usb3_ports) | ||
1778 | return -ENOMEM; | ||
1779 | |||
1780 | port_index = 0; | ||
1781 | for (i = 0; i < num_ports; i++) | ||
1782 | if (xhci->port_array[i] == 0x03) { | ||
1783 | xhci->usb3_ports[port_index] = | ||
1784 | &xhci->op_regs->port_status_base + | ||
1785 | NUM_PORT_REGS*i; | ||
1786 | xhci_dbg(xhci, "USB 3.0 port at index %u, " | ||
1787 | "addr = %p\n", i, | ||
1788 | xhci->usb3_ports[port_index]); | ||
1789 | port_index++; | ||
1790 | } | ||
1791 | } | ||
1792 | return 0; | ||
1793 | } | ||
1627 | 1794 | ||
1628 | int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | 1795 | int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) |
1629 | { | 1796 | { |
@@ -1804,6 +1971,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | |||
1804 | 1971 | ||
1805 | if (scratchpad_alloc(xhci, flags)) | 1972 | if (scratchpad_alloc(xhci, flags)) |
1806 | goto fail; | 1973 | goto fail; |
1974 | if (xhci_setup_port_arrays(xhci, flags)) | ||
1975 | goto fail; | ||
1807 | 1976 | ||
1808 | return 0; | 1977 | return 0; |
1809 | 1978 | ||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 48e60d166ff0..e7547d8b3d67 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -2028,7 +2028,6 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd) | |||
2028 | 2028 | ||
2029 | if (!(status & STS_EINT)) { | 2029 | if (!(status & STS_EINT)) { |
2030 | spin_unlock(&xhci->lock); | 2030 | spin_unlock(&xhci->lock); |
2031 | xhci_warn(xhci, "Spurious interrupt.\n"); | ||
2032 | return IRQ_NONE; | 2031 | return IRQ_NONE; |
2033 | } | 2032 | } |
2034 | xhci_dbg(xhci, "op reg status = %08x\n", status); | 2033 | xhci_dbg(xhci, "op reg status = %08x\n", status); |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index d5c550ea3e68..96ef552cfeb3 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -508,9 +508,10 @@ void xhci_stop(struct usb_hcd *hcd) | |||
508 | spin_lock_irq(&xhci->lock); | 508 | spin_lock_irq(&xhci->lock); |
509 | xhci_halt(xhci); | 509 | xhci_halt(xhci); |
510 | xhci_reset(xhci); | 510 | xhci_reset(xhci); |
511 | xhci_cleanup_msix(xhci); | ||
512 | spin_unlock_irq(&xhci->lock); | 511 | spin_unlock_irq(&xhci->lock); |
513 | 512 | ||
513 | xhci_cleanup_msix(xhci); | ||
514 | |||
514 | #ifdef CONFIG_USB_XHCI_HCD_DEBUGGING | 515 | #ifdef CONFIG_USB_XHCI_HCD_DEBUGGING |
515 | /* Tell the event ring poll function not to reschedule */ | 516 | /* Tell the event ring poll function not to reschedule */ |
516 | xhci->zombie = 1; | 517 | xhci->zombie = 1; |
@@ -544,9 +545,10 @@ void xhci_shutdown(struct usb_hcd *hcd) | |||
544 | 545 | ||
545 | spin_lock_irq(&xhci->lock); | 546 | spin_lock_irq(&xhci->lock); |
546 | xhci_halt(xhci); | 547 | xhci_halt(xhci); |
547 | xhci_cleanup_msix(xhci); | ||
548 | spin_unlock_irq(&xhci->lock); | 548 | spin_unlock_irq(&xhci->lock); |
549 | 549 | ||
550 | xhci_cleanup_msix(xhci); | ||
551 | |||
550 | xhci_dbg(xhci, "xhci_shutdown completed - status = %x\n", | 552 | xhci_dbg(xhci, "xhci_shutdown completed - status = %x\n", |
551 | xhci_readl(xhci, &xhci->op_regs->status)); | 553 | xhci_readl(xhci, &xhci->op_regs->status)); |
552 | } | 554 | } |
@@ -1284,6 +1286,15 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci, | |||
1284 | cmd_completion = command->completion; | 1286 | cmd_completion = command->completion; |
1285 | cmd_status = &command->status; | 1287 | cmd_status = &command->status; |
1286 | command->command_trb = xhci->cmd_ring->enqueue; | 1288 | command->command_trb = xhci->cmd_ring->enqueue; |
1289 | |||
1290 | /* Enqueue pointer can be left pointing to the link TRB, | ||
1291 | * we must handle that | ||
1292 | */ | ||
1293 | if ((command->command_trb->link.control & TRB_TYPE_BITMASK) | ||
1294 | == TRB_TYPE(TRB_LINK)) | ||
1295 | command->command_trb = | ||
1296 | xhci->cmd_ring->enq_seg->next->trbs; | ||
1297 | |||
1287 | list_add_tail(&command->cmd_list, &virt_dev->cmd_list); | 1298 | list_add_tail(&command->cmd_list, &virt_dev->cmd_list); |
1288 | } else { | 1299 | } else { |
1289 | in_ctx = virt_dev->in_ctx; | 1300 | in_ctx = virt_dev->in_ctx; |
@@ -1993,6 +2004,15 @@ int xhci_reset_device(struct usb_hcd *hcd, struct usb_device *udev) | |||
1993 | /* Attempt to submit the Reset Device command to the command ring */ | 2004 | /* Attempt to submit the Reset Device command to the command ring */ |
1994 | spin_lock_irqsave(&xhci->lock, flags); | 2005 | spin_lock_irqsave(&xhci->lock, flags); |
1995 | reset_device_cmd->command_trb = xhci->cmd_ring->enqueue; | 2006 | reset_device_cmd->command_trb = xhci->cmd_ring->enqueue; |
2007 | |||
2008 | /* Enqueue pointer can be left pointing to the link TRB, | ||
2009 | * we must handle that | ||
2010 | */ | ||
2011 | if ((reset_device_cmd->command_trb->link.control & TRB_TYPE_BITMASK) | ||
2012 | == TRB_TYPE(TRB_LINK)) | ||
2013 | reset_device_cmd->command_trb = | ||
2014 | xhci->cmd_ring->enq_seg->next->trbs; | ||
2015 | |||
1996 | list_add_tail(&reset_device_cmd->cmd_list, &virt_dev->cmd_list); | 2016 | list_add_tail(&reset_device_cmd->cmd_list, &virt_dev->cmd_list); |
1997 | ret = xhci_queue_reset_device(xhci, slot_id); | 2017 | ret = xhci_queue_reset_device(xhci, slot_id); |
1998 | if (ret) { | 2018 | if (ret) { |
@@ -2148,8 +2168,12 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) | |||
2148 | xhci_err(xhci, "Error while assigning device slot ID\n"); | 2168 | xhci_err(xhci, "Error while assigning device slot ID\n"); |
2149 | return 0; | 2169 | return 0; |
2150 | } | 2170 | } |
2151 | /* xhci_alloc_virt_device() does not touch rings; no need to lock */ | 2171 | /* xhci_alloc_virt_device() does not touch rings; no need to lock. |
2152 | if (!xhci_alloc_virt_device(xhci, xhci->slot_id, udev, GFP_KERNEL)) { | 2172 | * Use GFP_NOIO, since this function can be called from |
2173 | * xhci_discover_or_reset_device(), which may be called as part of | ||
2174 | * mass storage driver error handling. | ||
2175 | */ | ||
2176 | if (!xhci_alloc_virt_device(xhci, xhci->slot_id, udev, GFP_NOIO)) { | ||
2153 | /* Disable slot, if we can do it without mem alloc */ | 2177 | /* Disable slot, if we can do it without mem alloc */ |
2154 | xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n"); | 2178 | xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n"); |
2155 | spin_lock_irqsave(&xhci->lock, flags); | 2179 | spin_lock_irqsave(&xhci->lock, flags); |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 34a60d9f056a..404ecbce5128 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -448,6 +448,24 @@ struct xhci_doorbell_array { | |||
448 | 448 | ||
449 | 449 | ||
450 | /** | 450 | /** |
451 | * struct xhci_protocol_caps | ||
452 | * @revision: major revision, minor revision, capability ID, | ||
453 | * and next capability pointer. | ||
454 | * @name_string: Four ASCII characters to say which spec this xHC | ||
455 | * follows, typically "USB ". | ||
456 | * @port_info: Port offset, count, and protocol-defined information. | ||
457 | */ | ||
458 | struct xhci_protocol_caps { | ||
459 | u32 revision; | ||
460 | u32 name_string; | ||
461 | u32 port_info; | ||
462 | }; | ||
463 | |||
464 | #define XHCI_EXT_PORT_MAJOR(x) (((x) >> 24) & 0xff) | ||
465 | #define XHCI_EXT_PORT_OFF(x) ((x) & 0xff) | ||
466 | #define XHCI_EXT_PORT_COUNT(x) (((x) >> 8) & 0xff) | ||
467 | |||
468 | /** | ||
451 | * struct xhci_container_ctx | 469 | * struct xhci_container_ctx |
452 | * @type: Type of context. Used to calculated offsets to contained contexts. | 470 | * @type: Type of context. Used to calculated offsets to contained contexts. |
453 | * @size: Size of the context data | 471 | * @size: Size of the context data |
@@ -614,6 +632,11 @@ struct xhci_ep_ctx { | |||
614 | #define MAX_PACKET_MASK (0xffff << 16) | 632 | #define MAX_PACKET_MASK (0xffff << 16) |
615 | #define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff) | 633 | #define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff) |
616 | 634 | ||
635 | /* Get max packet size from ep desc. Bit 10..0 specify the max packet size. | ||
636 | * USB2.0 spec 9.6.6. | ||
637 | */ | ||
638 | #define GET_MAX_PACKET(p) ((p) & 0x7ff) | ||
639 | |||
617 | /* tx_info bitmasks */ | 640 | /* tx_info bitmasks */ |
618 | #define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff) | 641 | #define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff) |
619 | #define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16) | 642 | #define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16) |
@@ -1199,6 +1222,15 @@ struct xhci_hcd { | |||
1199 | #define XHCI_LINK_TRB_QUIRK (1 << 0) | 1222 | #define XHCI_LINK_TRB_QUIRK (1 << 0) |
1200 | #define XHCI_RESET_EP_QUIRK (1 << 1) | 1223 | #define XHCI_RESET_EP_QUIRK (1 << 1) |
1201 | #define XHCI_NEC_HOST (1 << 2) | 1224 | #define XHCI_NEC_HOST (1 << 2) |
1225 | |||
1226 | /* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */ | ||
1227 | u8 *port_array; | ||
1228 | /* Array of pointers to USB 3.0 PORTSC registers */ | ||
1229 | u32 __iomem **usb3_ports; | ||
1230 | unsigned int num_usb3_ports; | ||
1231 | /* Array of pointers to USB 2.0 PORTSC registers */ | ||
1232 | u32 __iomem **usb2_ports; | ||
1233 | unsigned int num_usb2_ports; | ||
1202 | }; | 1234 | }; |
1203 | 1235 | ||
1204 | /* For testing purposes */ | 1236 | /* For testing purposes */ |
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index 2f43c57743c9..9251773ecef4 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c | |||
@@ -196,11 +196,9 @@ static ssize_t get_port1_handler(struct device *dev, | |||
196 | return read_port(dev, attr, buf, 1, CYPRESS_READ_PORT_ID1); | 196 | return read_port(dev, attr, buf, 1, CYPRESS_READ_PORT_ID1); |
197 | } | 197 | } |
198 | 198 | ||
199 | static DEVICE_ATTR(port0, S_IWUGO | S_IRUGO, | 199 | static DEVICE_ATTR(port0, S_IRUGO | S_IWUSR, get_port0_handler, set_port0_handler); |
200 | get_port0_handler, set_port0_handler); | ||
201 | 200 | ||
202 | static DEVICE_ATTR(port1, S_IWUGO | S_IRUGO, | 201 | static DEVICE_ATTR(port1, S_IRUGO | S_IWUSR, get_port1_handler, set_port1_handler); |
203 | get_port1_handler, set_port1_handler); | ||
204 | 202 | ||
205 | 203 | ||
206 | static int cypress_probe(struct usb_interface *interface, | 204 | static int cypress_probe(struct usb_interface *interface, |
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index bc88c79875a1..0db05b252e3b 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c | |||
@@ -553,6 +553,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd, | |||
553 | /* needed for power consumption */ | 553 | /* needed for power consumption */ |
554 | struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc; | 554 | struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc; |
555 | 555 | ||
556 | memset(&info, 0, sizeof(info)); | ||
556 | /* directly from the descriptor */ | 557 | /* directly from the descriptor */ |
557 | info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor); | 558 | info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor); |
558 | info.product = dev->product_id; | 559 | info.product = dev->product_id; |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 70d00e99a4b4..dd573abd2d1e 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -3008,6 +3008,7 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
3008 | #else | 3008 | #else |
3009 | x.sisusb_conactive = 0; | 3009 | x.sisusb_conactive = 0; |
3010 | #endif | 3010 | #endif |
3011 | memset(x.sisusb_reserved, 0, sizeof(x.sisusb_reserved)); | ||
3011 | 3012 | ||
3012 | if (copy_to_user((void __user *)arg, &x, sizeof(x))) | 3013 | if (copy_to_user((void __user *)arg, &x, sizeof(x))) |
3013 | retval = -EFAULT; | 3014 | retval = -EFAULT; |
diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index d77aba46ae85..f63776a48e2a 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c | |||
@@ -86,7 +86,7 @@ static ssize_t set_speed(struct device *dev, struct device_attribute *attr, | |||
86 | return count; | 86 | return count; |
87 | } | 87 | } |
88 | 88 | ||
89 | static DEVICE_ATTR(speed, S_IWUGO | S_IRUGO, show_speed, set_speed); | 89 | static DEVICE_ATTR(speed, S_IRUGO | S_IWUSR, show_speed, set_speed); |
90 | 90 | ||
91 | static int tv_probe(struct usb_interface *interface, | 91 | static int tv_probe(struct usb_interface *interface, |
92 | const struct usb_device_id *id) | 92 | const struct usb_device_id *id) |
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c index 63da2c3c838f..c96f51de1696 100644 --- a/drivers/usb/misc/usbled.c +++ b/drivers/usb/misc/usbled.c | |||
@@ -94,7 +94,7 @@ static ssize_t set_##value(struct device *dev, struct device_attribute *attr, co | |||
94 | change_color(led); \ | 94 | change_color(led); \ |
95 | return count; \ | 95 | return count; \ |
96 | } \ | 96 | } \ |
97 | static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value); | 97 | static DEVICE_ATTR(value, S_IRUGO | S_IWUSR, show_##value, set_##value); |
98 | show_set(blue); | 98 | show_set(blue); |
99 | show_set(red); | 99 | show_set(red); |
100 | show_set(green); | 100 | show_set(green); |
diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c index de8ef945b536..417b8f207e8b 100644 --- a/drivers/usb/misc/usbsevseg.c +++ b/drivers/usb/misc/usbsevseg.c | |||
@@ -192,7 +192,7 @@ static ssize_t set_attr_##name(struct device *dev, \ | |||
192 | \ | 192 | \ |
193 | return count; \ | 193 | return count; \ |
194 | } \ | 194 | } \ |
195 | static DEVICE_ATTR(name, S_IWUGO | S_IRUGO, show_attr_##name, set_attr_##name); | 195 | static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show_attr_##name, set_attr_##name); |
196 | 196 | ||
197 | static ssize_t show_attr_text(struct device *dev, | 197 | static ssize_t show_attr_text(struct device *dev, |
198 | struct device_attribute *attr, char *buf) | 198 | struct device_attribute *attr, char *buf) |
@@ -223,7 +223,7 @@ static ssize_t set_attr_text(struct device *dev, | |||
223 | return count; | 223 | return count; |
224 | } | 224 | } |
225 | 225 | ||
226 | static DEVICE_ATTR(text, S_IWUGO | S_IRUGO, show_attr_text, set_attr_text); | 226 | static DEVICE_ATTR(text, S_IRUGO | S_IWUSR, show_attr_text, set_attr_text); |
227 | 227 | ||
228 | static ssize_t show_attr_decimals(struct device *dev, | 228 | static ssize_t show_attr_decimals(struct device *dev, |
229 | struct device_attribute *attr, char *buf) | 229 | struct device_attribute *attr, char *buf) |
@@ -272,8 +272,7 @@ static ssize_t set_attr_decimals(struct device *dev, | |||
272 | return count; | 272 | return count; |
273 | } | 273 | } |
274 | 274 | ||
275 | static DEVICE_ATTR(decimals, S_IWUGO | S_IRUGO, | 275 | static DEVICE_ATTR(decimals, S_IRUGO | S_IWUSR, show_attr_decimals, set_attr_decimals); |
276 | show_attr_decimals, set_attr_decimals); | ||
277 | 276 | ||
278 | static ssize_t show_attr_textmode(struct device *dev, | 277 | static ssize_t show_attr_textmode(struct device *dev, |
279 | struct device_attribute *attr, char *buf) | 278 | struct device_attribute *attr, char *buf) |
@@ -319,8 +318,7 @@ static ssize_t set_attr_textmode(struct device *dev, | |||
319 | return -EINVAL; | 318 | return -EINVAL; |
320 | } | 319 | } |
321 | 320 | ||
322 | static DEVICE_ATTR(textmode, S_IWUGO | S_IRUGO, | 321 | static DEVICE_ATTR(textmode, S_IRUGO | S_IWUSR, show_attr_textmode, set_attr_textmode); |
323 | show_attr_textmode, set_attr_textmode); | ||
324 | 322 | ||
325 | 323 | ||
326 | MYDEV_ATTR_SIMPLE_UNSIGNED(powered, update_display_powered); | 324 | MYDEV_ATTR_SIMPLE_UNSIGNED(powered, update_display_powered); |
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index 796e2f68f749..4ff21587ab03 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * uss720.c -- USS720 USB Parport Cable. | 4 | * uss720.c -- USS720 USB Parport Cable. |
5 | * | 5 | * |
6 | * Copyright (C) 1999, 2005 | 6 | * Copyright (C) 1999, 2005, 2010 |
7 | * Thomas Sailer (t.sailer@alumni.ethz.ch) | 7 | * Thomas Sailer (t.sailer@alumni.ethz.ch) |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
@@ -776,6 +776,8 @@ static const struct usb_device_id uss720_table[] = { | |||
776 | { USB_DEVICE(0x0557, 0x2001) }, | 776 | { USB_DEVICE(0x0557, 0x2001) }, |
777 | { USB_DEVICE(0x0729, 0x1284) }, | 777 | { USB_DEVICE(0x0729, 0x1284) }, |
778 | { USB_DEVICE(0x1293, 0x0002) }, | 778 | { USB_DEVICE(0x1293, 0x0002) }, |
779 | { USB_DEVICE(0x1293, 0x0002) }, | ||
780 | { USB_DEVICE(0x050d, 0x0002) }, | ||
779 | { } /* Terminating entry */ | 781 | { } /* Terminating entry */ |
780 | }; | 782 | }; |
781 | 783 | ||
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index b611420a8050..611a9d274363 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -342,8 +342,10 @@ int __init musb_platform_init(struct musb *musb, void *board_data) | |||
342 | 342 | ||
343 | usb_nop_xceiv_register(); | 343 | usb_nop_xceiv_register(); |
344 | musb->xceiv = otg_get_transceiver(); | 344 | musb->xceiv = otg_get_transceiver(); |
345 | if (!musb->xceiv) | 345 | if (!musb->xceiv) { |
346 | gpio_free(musb->config->gpio_vrsel); | ||
346 | return -ENODEV; | 347 | return -ENODEV; |
348 | } | ||
347 | 349 | ||
348 | if (ANOMALY_05000346) { | 350 | if (ANOMALY_05000346) { |
349 | bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value); | 351 | bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value); |
@@ -394,8 +396,9 @@ int __init musb_platform_init(struct musb *musb, void *board_data) | |||
394 | 396 | ||
395 | int musb_platform_exit(struct musb *musb) | 397 | int musb_platform_exit(struct musb *musb) |
396 | { | 398 | { |
397 | |||
398 | gpio_free(musb->config->gpio_vrsel); | 399 | gpio_free(musb->config->gpio_vrsel); |
399 | 400 | ||
401 | otg_put_transceiver(musb->xceiv); | ||
402 | usb_nop_xceiv_unregister(); | ||
400 | return 0; | 403 | return 0; |
401 | } | 404 | } |
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 57624361c1de..6e67629f50cc 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c | |||
@@ -446,6 +446,7 @@ int __init musb_platform_init(struct musb *musb, void *board_data) | |||
446 | fail: | 446 | fail: |
447 | clk_disable(musb->clock); | 447 | clk_disable(musb->clock); |
448 | 448 | ||
449 | otg_put_transceiver(musb->xceiv); | ||
449 | usb_nop_xceiv_unregister(); | 450 | usb_nop_xceiv_unregister(); |
450 | return -ENODEV; | 451 | return -ENODEV; |
451 | } | 452 | } |
@@ -496,6 +497,7 @@ int musb_platform_exit(struct musb *musb) | |||
496 | 497 | ||
497 | clk_disable(musb->clock); | 498 | clk_disable(musb->clock); |
498 | 499 | ||
500 | otg_put_transceiver(musb->xceiv); | ||
499 | usb_nop_xceiv_unregister(); | 501 | usb_nop_xceiv_unregister(); |
500 | 502 | ||
501 | return 0; | 503 | return 0; |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 540c766c4f86..0707b296cce4 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1921,10 +1921,6 @@ static void musb_free(struct musb *musb) | |||
1921 | dma_controller_destroy(c); | 1921 | dma_controller_destroy(c); |
1922 | } | 1922 | } |
1923 | 1923 | ||
1924 | #ifdef CONFIG_USB_MUSB_OTG | ||
1925 | put_device(musb->xceiv->dev); | ||
1926 | #endif | ||
1927 | |||
1928 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | 1924 | #ifdef CONFIG_USB_MUSB_HDRC_HCD |
1929 | usb_put_hcd(musb_to_hcd(musb)); | 1925 | usb_put_hcd(musb_to_hcd(musb)); |
1930 | #else | 1926 | #else |
@@ -2247,7 +2243,6 @@ static int __exit musb_remove(struct platform_device *pdev) | |||
2247 | #endif | 2243 | #endif |
2248 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | 2244 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); |
2249 | musb_platform_exit(musb); | 2245 | musb_platform_exit(musb); |
2250 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
2251 | 2246 | ||
2252 | musb_free(musb); | 2247 | musb_free(musb); |
2253 | iounmap(ctrl_base); | 2248 | iounmap(ctrl_base); |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 2111a241dd03..ed618bde1eec 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -320,5 +320,6 @@ int musb_platform_exit(struct musb *musb) | |||
320 | 320 | ||
321 | musb_platform_suspend(musb); | 321 | musb_platform_suspend(musb); |
322 | 322 | ||
323 | otg_put_transceiver(musb->xceiv); | ||
323 | return 0; | 324 | return 0; |
324 | } | 325 | } |
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 3c48e77a0aa2..bde40efc7046 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c | |||
@@ -1152,6 +1152,8 @@ done: | |||
1152 | if (ret < 0) { | 1152 | if (ret < 0) { |
1153 | if (sync) | 1153 | if (sync) |
1154 | iounmap(sync); | 1154 | iounmap(sync); |
1155 | |||
1156 | otg_put_transceiver(musb->xceiv); | ||
1155 | usb_nop_xceiv_unregister(); | 1157 | usb_nop_xceiv_unregister(); |
1156 | } | 1158 | } |
1157 | return ret; | 1159 | return ret; |
@@ -1166,6 +1168,8 @@ int musb_platform_exit(struct musb *musb) | |||
1166 | musb->board_set_power(0); | 1168 | musb->board_set_power(0); |
1167 | 1169 | ||
1168 | iounmap(musb->sync_va); | 1170 | iounmap(musb->sync_va); |
1171 | |||
1172 | otg_put_transceiver(musb->xceiv); | ||
1169 | usb_nop_xceiv_unregister(); | 1173 | usb_nop_xceiv_unregister(); |
1170 | return 0; | 1174 | return 0; |
1171 | } | 1175 | } |
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 63f7cc45bcac..7b8815ddf368 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c | |||
@@ -486,12 +486,22 @@ static void ch341_read_int_callback(struct urb *urb) | |||
486 | if (actual_length >= 4) { | 486 | if (actual_length >= 4) { |
487 | struct ch341_private *priv = usb_get_serial_port_data(port); | 487 | struct ch341_private *priv = usb_get_serial_port_data(port); |
488 | unsigned long flags; | 488 | unsigned long flags; |
489 | u8 prev_line_status = priv->line_status; | ||
489 | 490 | ||
490 | spin_lock_irqsave(&priv->lock, flags); | 491 | spin_lock_irqsave(&priv->lock, flags); |
491 | priv->line_status = (~(data[2])) & CH341_BITS_MODEM_STAT; | 492 | priv->line_status = (~(data[2])) & CH341_BITS_MODEM_STAT; |
492 | if ((data[1] & CH341_MULT_STAT)) | 493 | if ((data[1] & CH341_MULT_STAT)) |
493 | priv->multi_status_change = 1; | 494 | priv->multi_status_change = 1; |
494 | spin_unlock_irqrestore(&priv->lock, flags); | 495 | spin_unlock_irqrestore(&priv->lock, flags); |
496 | |||
497 | if ((priv->line_status ^ prev_line_status) & CH341_BIT_DCD) { | ||
498 | struct tty_struct *tty = tty_port_tty_get(&port->port); | ||
499 | if (tty) | ||
500 | usb_serial_handle_dcd_change(port, tty, | ||
501 | priv->line_status & CH341_BIT_DCD); | ||
502 | tty_kref_put(tty); | ||
503 | } | ||
504 | |||
495 | wake_up_interruptible(&priv->delta_msr_wait); | 505 | wake_up_interruptible(&priv->delta_msr_wait); |
496 | } | 506 | } |
497 | 507 | ||
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 4f1744c5871f..735ea03157ab 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -49,11 +49,11 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *, | |||
49 | static void cp210x_break_ctl(struct tty_struct *, int); | 49 | static void cp210x_break_ctl(struct tty_struct *, int); |
50 | static int cp210x_startup(struct usb_serial *); | 50 | static int cp210x_startup(struct usb_serial *); |
51 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on); | 51 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on); |
52 | static int cp210x_carrier_raised(struct usb_serial_port *p); | ||
53 | 52 | ||
54 | static int debug; | 53 | static int debug; |
55 | 54 | ||
56 | static const struct usb_device_id id_table[] = { | 55 | static const struct usb_device_id id_table[] = { |
56 | { USB_DEVICE(0x045B, 0x0053) }, /* Renesas RX610 RX-Stick */ | ||
57 | { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */ | 57 | { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */ |
58 | { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ | 58 | { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
59 | { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ | 59 | { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
@@ -86,7 +86,6 @@ static const struct usb_device_id id_table[] = { | |||
86 | { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */ | 86 | { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */ |
87 | { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ | 87 | { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ |
88 | { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ | 88 | { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ |
89 | { USB_DEVICE(0x10C4, 0x8149) }, /* West Mountain Radio Computerized Battery Analyzer */ | ||
90 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ | 89 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ |
91 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ | 90 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ |
92 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ | 91 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ |
@@ -109,7 +108,9 @@ static const struct usb_device_id id_table[] = { | |||
109 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ | 108 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ |
110 | { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */ | 109 | { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */ |
111 | { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ | 110 | { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ |
111 | { USB_DEVICE(0x10C4, 0x83D8) }, /* DekTec DTA Plus VHF/UHF Booster/Attenuator */ | ||
112 | { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ | 112 | { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ |
113 | { USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */ | ||
113 | { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ | 114 | { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ |
114 | { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */ | 115 | { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */ |
115 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ | 116 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ |
@@ -132,6 +133,7 @@ static const struct usb_device_id id_table[] = { | |||
132 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ | 133 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ |
133 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ | 134 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
134 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | 135 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
136 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ | ||
135 | { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ | 137 | { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ |
136 | { } /* Terminating Entry */ | 138 | { } /* Terminating Entry */ |
137 | }; | 139 | }; |
@@ -163,8 +165,7 @@ static struct usb_serial_driver cp210x_device = { | |||
163 | .tiocmget = cp210x_tiocmget, | 165 | .tiocmget = cp210x_tiocmget, |
164 | .tiocmset = cp210x_tiocmset, | 166 | .tiocmset = cp210x_tiocmset, |
165 | .attach = cp210x_startup, | 167 | .attach = cp210x_startup, |
166 | .dtr_rts = cp210x_dtr_rts, | 168 | .dtr_rts = cp210x_dtr_rts |
167 | .carrier_raised = cp210x_carrier_raised | ||
168 | }; | 169 | }; |
169 | 170 | ||
170 | /* Config request types */ | 171 | /* Config request types */ |
@@ -763,15 +764,6 @@ static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) | |||
763 | return result; | 764 | return result; |
764 | } | 765 | } |
765 | 766 | ||
766 | static int cp210x_carrier_raised(struct usb_serial_port *p) | ||
767 | { | ||
768 | unsigned int control; | ||
769 | cp210x_get_config(p, CP210X_GET_MDMSTS, &control, 1); | ||
770 | if (control & CONTROL_DCD) | ||
771 | return 1; | ||
772 | return 0; | ||
773 | } | ||
774 | |||
775 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) | 767 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) |
776 | { | 768 | { |
777 | struct usb_serial_port *port = tty->driver_data; | 769 | struct usb_serial_port *port = tty->driver_data; |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index b92070c103cd..666e5a6edd82 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -455,7 +455,6 @@ static int digi_write_room(struct tty_struct *tty); | |||
455 | static int digi_chars_in_buffer(struct tty_struct *tty); | 455 | static int digi_chars_in_buffer(struct tty_struct *tty); |
456 | static int digi_open(struct tty_struct *tty, struct usb_serial_port *port); | 456 | static int digi_open(struct tty_struct *tty, struct usb_serial_port *port); |
457 | static void digi_close(struct usb_serial_port *port); | 457 | static void digi_close(struct usb_serial_port *port); |
458 | static int digi_carrier_raised(struct usb_serial_port *port); | ||
459 | static void digi_dtr_rts(struct usb_serial_port *port, int on); | 458 | static void digi_dtr_rts(struct usb_serial_port *port, int on); |
460 | static int digi_startup_device(struct usb_serial *serial); | 459 | static int digi_startup_device(struct usb_serial *serial); |
461 | static int digi_startup(struct usb_serial *serial); | 460 | static int digi_startup(struct usb_serial *serial); |
@@ -511,7 +510,6 @@ static struct usb_serial_driver digi_acceleport_2_device = { | |||
511 | .open = digi_open, | 510 | .open = digi_open, |
512 | .close = digi_close, | 511 | .close = digi_close, |
513 | .dtr_rts = digi_dtr_rts, | 512 | .dtr_rts = digi_dtr_rts, |
514 | .carrier_raised = digi_carrier_raised, | ||
515 | .write = digi_write, | 513 | .write = digi_write, |
516 | .write_room = digi_write_room, | 514 | .write_room = digi_write_room, |
517 | .write_bulk_callback = digi_write_bulk_callback, | 515 | .write_bulk_callback = digi_write_bulk_callback, |
@@ -1339,14 +1337,6 @@ static void digi_dtr_rts(struct usb_serial_port *port, int on) | |||
1339 | digi_set_modem_signals(port, on * (TIOCM_DTR|TIOCM_RTS), 1); | 1337 | digi_set_modem_signals(port, on * (TIOCM_DTR|TIOCM_RTS), 1); |
1340 | } | 1338 | } |
1341 | 1339 | ||
1342 | static int digi_carrier_raised(struct usb_serial_port *port) | ||
1343 | { | ||
1344 | struct digi_port *priv = usb_get_serial_port_data(port); | ||
1345 | if (priv->dp_modem_signals & TIOCM_CD) | ||
1346 | return 1; | ||
1347 | return 0; | ||
1348 | } | ||
1349 | |||
1350 | static int digi_open(struct tty_struct *tty, struct usb_serial_port *port) | 1340 | static int digi_open(struct tty_struct *tty, struct usb_serial_port *port) |
1351 | { | 1341 | { |
1352 | int ret; | 1342 | int ret; |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 97cc87d654ce..88bef0276876 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -99,6 +99,7 @@ struct ftdi_sio_quirk { | |||
99 | static int ftdi_jtag_probe(struct usb_serial *serial); | 99 | static int ftdi_jtag_probe(struct usb_serial *serial); |
100 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); | 100 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); |
101 | static int ftdi_NDI_device_setup(struct usb_serial *serial); | 101 | static int ftdi_NDI_device_setup(struct usb_serial *serial); |
102 | static int ftdi_stmclite_probe(struct usb_serial *serial); | ||
102 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); | 103 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); |
103 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); | 104 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); |
104 | 105 | ||
@@ -122,6 +123,10 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { | |||
122 | .port_probe = ftdi_HE_TIRA1_setup, | 123 | .port_probe = ftdi_HE_TIRA1_setup, |
123 | }; | 124 | }; |
124 | 125 | ||
126 | static struct ftdi_sio_quirk ftdi_stmclite_quirk = { | ||
127 | .probe = ftdi_stmclite_probe, | ||
128 | }; | ||
129 | |||
125 | /* | 130 | /* |
126 | * The 8U232AM has the same API as the sio except for: | 131 | * The 8U232AM has the same API as the sio except for: |
127 | * - it can support MUCH higher baudrates; up to: | 132 | * - it can support MUCH higher baudrates; up to: |
@@ -177,6 +182,7 @@ static struct usb_device_id id_table_combined [] = { | |||
177 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_SNIFFER_PID) }, | 182 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_SNIFFER_PID) }, |
178 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) }, | 183 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) }, |
179 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) }, | 184 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) }, |
185 | { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_PID) }, | ||
180 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, | 186 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, |
181 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, | 187 | { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, |
182 | { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, | 188 | { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, |
@@ -200,6 +206,7 @@ static struct usb_device_id id_table_combined [] = { | |||
200 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, | 206 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, |
201 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, | 207 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, |
202 | { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, | 208 | { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, |
209 | { USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) }, | ||
203 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, | 210 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, |
204 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, | 211 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, |
205 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) }, | 212 | { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) }, |
@@ -613,6 +620,7 @@ static struct usb_device_id id_table_combined [] = { | |||
613 | { USB_DEVICE(FTDI_VID, FTDI_OCEANIC_PID) }, | 620 | { USB_DEVICE(FTDI_VID, FTDI_OCEANIC_PID) }, |
614 | { USB_DEVICE(TTI_VID, TTI_QL355P_PID) }, | 621 | { USB_DEVICE(TTI_VID, TTI_QL355P_PID) }, |
615 | { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, | 622 | { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) }, |
623 | { USB_DEVICE(ACTON_VID, ACTON_SPECTRAPRO_PID) }, | ||
616 | { USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) }, | 624 | { USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) }, |
617 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, | 625 | { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, |
618 | { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, | 626 | { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, |
@@ -673,8 +681,17 @@ static struct usb_device_id id_table_combined [] = { | |||
673 | { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) }, | 681 | { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) }, |
674 | { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) }, | 682 | { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) }, |
675 | { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) }, | 683 | { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) }, |
676 | { USB_DEVICE(ICOM_ID1_VID, ICOM_ID1_PID) }, | 684 | { USB_DEVICE(ICOM_VID, ICOM_ID_1_PID) }, |
677 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) }, | 685 | { USB_DEVICE(ICOM_VID, ICOM_OPC_U_UC_PID) }, |
686 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C1_PID) }, | ||
687 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C2_PID) }, | ||
688 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2D_PID) }, | ||
689 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2VT_PID) }, | ||
690 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2VR_PID) }, | ||
691 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP4KVT_PID) }, | ||
692 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP4KVR_PID) }, | ||
693 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2KVT_PID) }, | ||
694 | { USB_DEVICE(ICOM_VID, ICOM_ID_RP2KVR_PID) }, | ||
678 | { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) }, | 695 | { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) }, |
679 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, | 696 | { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, |
680 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, | 697 | { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, |
@@ -696,6 +713,7 @@ static struct usb_device_id id_table_combined [] = { | |||
696 | .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, | 713 | .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk }, |
697 | { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, | 714 | { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, |
698 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, | 715 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, |
716 | { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, | ||
699 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, | 717 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, |
700 | { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, | 718 | { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, |
701 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, | 719 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, |
@@ -715,8 +733,37 @@ static struct usb_device_id id_table_combined [] = { | |||
715 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 733 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
716 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, | 734 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, |
717 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, | 735 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, |
736 | |||
737 | /* Papouch devices based on FTDI chip */ | ||
738 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485_PID) }, | ||
739 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AP485_PID) }, | ||
740 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB422_PID) }, | ||
741 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485_2_PID) }, | ||
742 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AP485_2_PID) }, | ||
743 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB422_2_PID) }, | ||
744 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485S_PID) }, | ||
745 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485C_PID) }, | ||
746 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_LEC_PID) }, | ||
747 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB232_PID) }, | ||
748 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) }, | ||
749 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_IRAMP_PID) }, | ||
750 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_DRAK5_PID) }, | ||
751 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO8x8_PID) }, | ||
718 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, | 752 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, |
753 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO2x2_PID) }, | ||
754 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO10x1_PID) }, | ||
755 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO30x3_PID) }, | ||
756 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO60x3_PID) }, | ||
757 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO2x16_PID) }, | ||
758 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO3x32_PID) }, | ||
759 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_DRAK6_PID) }, | ||
760 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_UPSUSB_PID) }, | ||
761 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_MU_PID) }, | ||
762 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_SIMUKEY_PID) }, | ||
719 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) }, | 763 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) }, |
764 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_GMUX_PID) }, | ||
765 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_GMSR_PID) }, | ||
766 | |||
720 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, | 767 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, |
721 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, | 768 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, |
722 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, | 769 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, |
@@ -751,6 +798,7 @@ static struct usb_device_id id_table_combined [] = { | |||
751 | { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID), | 798 | { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID), |
752 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 799 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
753 | { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) }, | 800 | { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) }, |
801 | { USB_DEVICE(FTDI_VID, ACCESIO_COM4SM_PID) }, | ||
754 | { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID), | 802 | { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID), |
755 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 803 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
756 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) }, | 804 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) }, |
@@ -761,6 +809,14 @@ static struct usb_device_id id_table_combined [] = { | |||
761 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MAXI_WING_PID) }, | 809 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MAXI_WING_PID) }, |
762 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MEDIA_WING_PID) }, | 810 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MEDIA_WING_PID) }, |
763 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_WING_PID) }, | 811 | { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_WING_PID) }, |
812 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) }, | ||
813 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) }, | ||
814 | { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) }, | ||
815 | { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, | ||
816 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), | ||
817 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | ||
818 | { USB_DEVICE(ST_VID, ST_STMCLT1030_PID), | ||
819 | .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk }, | ||
764 | { }, /* Optional parameter entry */ | 820 | { }, /* Optional parameter entry */ |
765 | { } /* Terminating entry */ | 821 | { } /* Terminating entry */ |
766 | }; | 822 | }; |
@@ -1642,6 +1698,25 @@ static int ftdi_jtag_probe(struct usb_serial *serial) | |||
1642 | } | 1698 | } |
1643 | 1699 | ||
1644 | /* | 1700 | /* |
1701 | * First and second port on STMCLiteadaptors is reserved for JTAG interface | ||
1702 | * and the forth port for pio | ||
1703 | */ | ||
1704 | static int ftdi_stmclite_probe(struct usb_serial *serial) | ||
1705 | { | ||
1706 | struct usb_device *udev = serial->dev; | ||
1707 | struct usb_interface *interface = serial->interface; | ||
1708 | |||
1709 | dbg("%s", __func__); | ||
1710 | |||
1711 | if (interface == udev->actconfig->interface[2]) | ||
1712 | return 0; | ||
1713 | |||
1714 | dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n"); | ||
1715 | |||
1716 | return -ENODEV; | ||
1717 | } | ||
1718 | |||
1719 | /* | ||
1645 | * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. | 1720 | * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. |
1646 | * We have to correct it if we want to read from it. | 1721 | * We have to correct it if we want to read from it. |
1647 | */ | 1722 | */ |
@@ -2028,8 +2103,6 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2028 | "urb failed to set to rts/cts flow control\n"); | 2103 | "urb failed to set to rts/cts flow control\n"); |
2029 | } | 2104 | } |
2030 | 2105 | ||
2031 | /* raise DTR/RTS */ | ||
2032 | set_mctrl(port, TIOCM_DTR | TIOCM_RTS); | ||
2033 | } else { | 2106 | } else { |
2034 | /* | 2107 | /* |
2035 | * Xon/Xoff code | 2108 | * Xon/Xoff code |
@@ -2077,8 +2150,6 @@ static void ftdi_set_termios(struct tty_struct *tty, | |||
2077 | } | 2150 | } |
2078 | } | 2151 | } |
2079 | 2152 | ||
2080 | /* lower DTR/RTS */ | ||
2081 | clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); | ||
2082 | } | 2153 | } |
2083 | return; | 2154 | return; |
2084 | } | 2155 | } |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 15a4583775ad..3523df534a27 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
@@ -61,6 +61,7 @@ | |||
61 | #define FTDI_OPENDCC_SNIFFER_PID 0xBFD9 | 61 | #define FTDI_OPENDCC_SNIFFER_PID 0xBFD9 |
62 | #define FTDI_OPENDCC_THROTTLE_PID 0xBFDA | 62 | #define FTDI_OPENDCC_THROTTLE_PID 0xBFDA |
63 | #define FTDI_OPENDCC_GATEWAY_PID 0xBFDB | 63 | #define FTDI_OPENDCC_GATEWAY_PID 0xBFDB |
64 | #define FTDI_OPENDCC_GBM_PID 0xBFDC | ||
64 | 65 | ||
65 | /* | 66 | /* |
66 | * RR-CirKits LocoBuffer USB (http://www.rr-cirkits.com) | 67 | * RR-CirKits LocoBuffer USB (http://www.rr-cirkits.com) |
@@ -113,6 +114,9 @@ | |||
113 | /* Lenz LI-USB Computer Interface. */ | 114 | /* Lenz LI-USB Computer Interface. */ |
114 | #define FTDI_LENZ_LIUSB_PID 0xD780 | 115 | #define FTDI_LENZ_LIUSB_PID 0xD780 |
115 | 116 | ||
117 | /* Vardaan Enterprises Serial Interface VEUSB422R3 */ | ||
118 | #define FTDI_VARDAAN_PID 0xF070 | ||
119 | |||
116 | /* | 120 | /* |
117 | * Xsens Technologies BV products (http://www.xsens.com). | 121 | * Xsens Technologies BV products (http://www.xsens.com). |
118 | */ | 122 | */ |
@@ -514,6 +518,12 @@ | |||
514 | #define RATOC_PRODUCT_ID_USB60F 0xb020 | 518 | #define RATOC_PRODUCT_ID_USB60F 0xb020 |
515 | 519 | ||
516 | /* | 520 | /* |
521 | * Acton Research Corp. | ||
522 | */ | ||
523 | #define ACTON_VID 0x0647 /* Vendor ID */ | ||
524 | #define ACTON_SPECTRAPRO_PID 0x0100 | ||
525 | |||
526 | /* | ||
517 | * Contec products (http://www.contec.com) | 527 | * Contec products (http://www.contec.com) |
518 | * Submitted by Daniel Sangorrin | 528 | * Submitted by Daniel Sangorrin |
519 | */ | 529 | */ |
@@ -565,11 +575,23 @@ | |||
565 | #define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */ | 575 | #define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */ |
566 | 576 | ||
567 | /* | 577 | /* |
568 | * Icom ID-1 digital transceiver | 578 | * Definitions for Icom Inc. devices |
569 | */ | 579 | */ |
570 | 580 | #define ICOM_VID 0x0C26 /* Icom vendor ID */ | |
571 | #define ICOM_ID1_VID 0x0C26 | 581 | /* Note: ID-1 is a communications tranceiver for HAM-radio operators */ |
572 | #define ICOM_ID1_PID 0x0004 | 582 | #define ICOM_ID_1_PID 0x0004 /* ID-1 USB to RS-232 */ |
583 | /* Note: OPC is an Optional cable to connect an Icom Tranceiver */ | ||
584 | #define ICOM_OPC_U_UC_PID 0x0018 /* OPC-478UC, OPC-1122U cloning cable */ | ||
585 | /* Note: ID-RP* devices are Icom Repeater Devices for HAM-radio */ | ||
586 | #define ICOM_ID_RP2C1_PID 0x0009 /* ID-RP2C Asset 1 to RS-232 */ | ||
587 | #define ICOM_ID_RP2C2_PID 0x000A /* ID-RP2C Asset 2 to RS-232 */ | ||
588 | #define ICOM_ID_RP2D_PID 0x000B /* ID-RP2D configuration port*/ | ||
589 | #define ICOM_ID_RP2VT_PID 0x000C /* ID-RP2V Transmit config port */ | ||
590 | #define ICOM_ID_RP2VR_PID 0x000D /* ID-RP2V Receive config port */ | ||
591 | #define ICOM_ID_RP4KVT_PID 0x0010 /* ID-RP4000V Transmit config port */ | ||
592 | #define ICOM_ID_RP4KVR_PID 0x0011 /* ID-RP4000V Receive config port */ | ||
593 | #define ICOM_ID_RP2KVT_PID 0x0012 /* ID-RP2000V Transmit config port */ | ||
594 | #define ICOM_ID_RP2KVR_PID 0x0013 /* ID-RP2000V Receive config port */ | ||
573 | 595 | ||
574 | /* | 596 | /* |
575 | * GN Otometrics (http://www.otometrics.com) | 597 | * GN Otometrics (http://www.otometrics.com) |
@@ -720,6 +742,7 @@ | |||
720 | */ | 742 | */ |
721 | #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ | 743 | #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ |
722 | #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ | 744 | #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ |
745 | #define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */ | ||
723 | 746 | ||
724 | /* | 747 | /* |
725 | * Bayer Ascensia Contour blood glucose meter USB-converter cable. | 748 | * Bayer Ascensia Contour blood glucose meter USB-converter cable. |
@@ -1017,14 +1040,45 @@ | |||
1017 | #define WHT_PID 0x0004 /* Wireless Handheld Terminal */ | 1040 | #define WHT_PID 0x0004 /* Wireless Handheld Terminal */ |
1018 | 1041 | ||
1019 | /* | 1042 | /* |
1043 | * STMicroelectonics | ||
1044 | */ | ||
1045 | #define ST_VID 0x0483 | ||
1046 | #define ST_STMCLT1030_PID 0x3747 /* ST Micro Connect Lite STMCLT1030 */ | ||
1047 | |||
1048 | /* | ||
1020 | * Papouch products (http://www.papouch.com/) | 1049 | * Papouch products (http://www.papouch.com/) |
1021 | * Submitted by Folkert van Heusden | 1050 | * Submitted by Folkert van Heusden |
1022 | */ | 1051 | */ |
1023 | 1052 | ||
1024 | #define PAPOUCH_VID 0x5050 /* Vendor ID */ | 1053 | #define PAPOUCH_VID 0x5050 /* Vendor ID */ |
1054 | #define PAPOUCH_SB485_PID 0x0100 /* Papouch SB485 USB-485/422 Converter */ | ||
1055 | #define PAPOUCH_AP485_PID 0x0101 /* AP485 USB-RS485 Converter */ | ||
1056 | #define PAPOUCH_SB422_PID 0x0102 /* Papouch SB422 USB-RS422 Converter */ | ||
1057 | #define PAPOUCH_SB485_2_PID 0x0103 /* Papouch SB485 USB-485/422 Converter */ | ||
1058 | #define PAPOUCH_AP485_2_PID 0x0104 /* AP485 USB-RS485 Converter */ | ||
1059 | #define PAPOUCH_SB422_2_PID 0x0105 /* Papouch SB422 USB-RS422 Converter */ | ||
1060 | #define PAPOUCH_SB485S_PID 0x0106 /* Papouch SB485S USB-485/422 Converter */ | ||
1061 | #define PAPOUCH_SB485C_PID 0x0107 /* Papouch SB485C USB-485/422 Converter */ | ||
1062 | #define PAPOUCH_LEC_PID 0x0300 /* LEC USB Converter */ | ||
1063 | #define PAPOUCH_SB232_PID 0x0301 /* Papouch SB232 USB-RS232 Converter */ | ||
1025 | #define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */ | 1064 | #define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */ |
1026 | #define PAPOUCH_QUIDO4x4_PID 0x0900 /* Quido 4/4 Module */ | 1065 | #define PAPOUCH_IRAMP_PID 0x0500 /* Papouch IRAmp Duplex */ |
1066 | #define PAPOUCH_DRAK5_PID 0x0700 /* Papouch DRAK5 */ | ||
1067 | #define PAPOUCH_QUIDO8x8_PID 0x0800 /* Papouch Quido 8/8 Module */ | ||
1068 | #define PAPOUCH_QUIDO4x4_PID 0x0900 /* Papouch Quido 4/4 Module */ | ||
1069 | #define PAPOUCH_QUIDO2x2_PID 0x0a00 /* Papouch Quido 2/2 Module */ | ||
1070 | #define PAPOUCH_QUIDO10x1_PID 0x0b00 /* Papouch Quido 10/1 Module */ | ||
1071 | #define PAPOUCH_QUIDO30x3_PID 0x0c00 /* Papouch Quido 30/3 Module */ | ||
1072 | #define PAPOUCH_QUIDO60x3_PID 0x0d00 /* Papouch Quido 60(100)/3 Module */ | ||
1073 | #define PAPOUCH_QUIDO2x16_PID 0x0e00 /* Papouch Quido 2/16 Module */ | ||
1074 | #define PAPOUCH_QUIDO3x32_PID 0x0f00 /* Papouch Quido 3/32 Module */ | ||
1075 | #define PAPOUCH_DRAK6_PID 0x1000 /* Papouch DRAK6 */ | ||
1076 | #define PAPOUCH_UPSUSB_PID 0x8000 /* Papouch UPS-USB adapter */ | ||
1077 | #define PAPOUCH_MU_PID 0x8001 /* MU controller */ | ||
1078 | #define PAPOUCH_SIMUKEY_PID 0x8002 /* Papouch SimuKey */ | ||
1027 | #define PAPOUCH_AD4USB_PID 0x8003 /* AD4USB Measurement Module */ | 1079 | #define PAPOUCH_AD4USB_PID 0x8003 /* AD4USB Measurement Module */ |
1080 | #define PAPOUCH_GMUX_PID 0x8004 /* Papouch GOLIATH MUX */ | ||
1081 | #define PAPOUCH_GMSR_PID 0x8005 /* Papouch GOLIATH MSR */ | ||
1028 | 1082 | ||
1029 | /* | 1083 | /* |
1030 | * Marvell SheevaPlug | 1084 | * Marvell SheevaPlug |
@@ -1051,6 +1105,11 @@ | |||
1051 | #define MJSG_HD_RADIO_PID 0x937C | 1105 | #define MJSG_HD_RADIO_PID 0x937C |
1052 | 1106 | ||
1053 | /* | 1107 | /* |
1108 | * D.O.Tec products (http://www.directout.eu) | ||
1109 | */ | ||
1110 | #define FTDI_DOTEC_PID 0x9868 | ||
1111 | |||
1112 | /* | ||
1054 | * Xverve Signalyzer tools (http://www.signalyzer.com/) | 1113 | * Xverve Signalyzer tools (http://www.signalyzer.com/) |
1055 | */ | 1114 | */ |
1056 | #define XVERVE_SIGNALYZER_ST_PID 0xBCA0 | 1115 | #define XVERVE_SIGNALYZER_ST_PID 0xBCA0 |
@@ -1063,3 +1122,21 @@ | |||
1063 | * Submitted by John G. Rogers | 1122 | * Submitted by John G. Rogers |
1064 | */ | 1123 | */ |
1065 | #define SEGWAY_RMP200_PID 0xe729 | 1124 | #define SEGWAY_RMP200_PID 0xe729 |
1125 | |||
1126 | |||
1127 | /* | ||
1128 | * Accesio USB Data Acquisition products (http://www.accesio.com/) | ||
1129 | */ | ||
1130 | #define ACCESIO_COM4SM_PID 0xD578 | ||
1131 | |||
1132 | /* www.sciencescope.co.uk educational dataloggers */ | ||
1133 | #define FTDI_SCIENCESCOPE_LOGBOOKML_PID 0xFF18 | ||
1134 | #define FTDI_SCIENCESCOPE_LS_LOGBOOK_PID 0xFF1C | ||
1135 | #define FTDI_SCIENCESCOPE_HS_LOGBOOK_PID 0xFF1D | ||
1136 | |||
1137 | /* | ||
1138 | * Milkymist One JTAG/Serial | ||
1139 | */ | ||
1140 | #define QIHARDWARE_VID 0x20B7 | ||
1141 | #define MILKYMISTONE_JTAGSERIAL_PID 0x0713 | ||
1142 | |||
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index e6833e216fc9..e4db5ad2bc55 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -479,6 +479,26 @@ int usb_serial_handle_break(struct usb_serial_port *port) | |||
479 | } | 479 | } |
480 | EXPORT_SYMBOL_GPL(usb_serial_handle_break); | 480 | EXPORT_SYMBOL_GPL(usb_serial_handle_break); |
481 | 481 | ||
482 | /** | ||
483 | * usb_serial_handle_dcd_change - handle a change of carrier detect state | ||
484 | * @port: usb_serial_port structure for the open port | ||
485 | * @tty: tty_struct structure for the port | ||
486 | * @status: new carrier detect status, nonzero if active | ||
487 | */ | ||
488 | void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | ||
489 | struct tty_struct *tty, unsigned int status) | ||
490 | { | ||
491 | struct tty_port *port = &usb_port->port; | ||
492 | |||
493 | dbg("%s - port %d, status %d", __func__, usb_port->number, status); | ||
494 | |||
495 | if (status) | ||
496 | wake_up_interruptible(&port->open_wait); | ||
497 | else if (tty && !C_CLOCAL(tty)) | ||
498 | tty_hangup(tty); | ||
499 | } | ||
500 | EXPORT_SYMBOL_GPL(usb_serial_handle_dcd_change); | ||
501 | |||
482 | int usb_serial_generic_resume(struct usb_serial *serial) | 502 | int usb_serial_generic_resume(struct usb_serial *serial) |
483 | { | 503 | { |
484 | struct usb_serial_port *port; | 504 | struct usb_serial_port *port; |
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 76e6fb3aab7a..db0e3fe4acf5 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -2894,8 +2894,8 @@ static void load_application_firmware(struct edgeport_serial *edge_serial) | |||
2894 | 2894 | ||
2895 | dbg("%s %d.%d.%d", fw_info, rec->data[0], rec->data[1], build); | 2895 | dbg("%s %d.%d.%d", fw_info, rec->data[0], rec->data[1], build); |
2896 | 2896 | ||
2897 | edge_serial->product_info.FirmwareMajorVersion = fw->data[0]; | 2897 | edge_serial->product_info.FirmwareMajorVersion = rec->data[0]; |
2898 | edge_serial->product_info.FirmwareMinorVersion = fw->data[1]; | 2898 | edge_serial->product_info.FirmwareMinorVersion = rec->data[1]; |
2899 | edge_serial->product_info.FirmwareBuildNumber = cpu_to_le16(build); | 2899 | edge_serial->product_info.FirmwareBuildNumber = cpu_to_le16(build); |
2900 | 2900 | ||
2901 | for (rec = ihex_next_binrec(rec); rec; | 2901 | for (rec = ihex_next_binrec(rec); rec; |
diff --git a/drivers/usb/serial/io_tables.h b/drivers/usb/serial/io_tables.h index feb56a4ca799..1021a2c1c927 100644 --- a/drivers/usb/serial/io_tables.h +++ b/drivers/usb/serial/io_tables.h | |||
@@ -196,6 +196,7 @@ static struct usb_serial_driver epic_device = { | |||
196 | .name = "epic", | 196 | .name = "epic", |
197 | }, | 197 | }, |
198 | .description = "EPiC device", | 198 | .description = "EPiC device", |
199 | .usb_driver = &io_driver, | ||
199 | .id_table = Epic_port_id_table, | 200 | .id_table = Epic_port_id_table, |
200 | .num_ports = 1, | 201 | .num_ports = 1, |
201 | .open = edge_open, | 202 | .open = edge_open, |
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index efc72113216b..7d26e3558721 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c | |||
@@ -1276,6 +1276,7 @@ static struct usb_serial_driver iuu_device = { | |||
1276 | .name = "iuu_phoenix", | 1276 | .name = "iuu_phoenix", |
1277 | }, | 1277 | }, |
1278 | .id_table = id_table, | 1278 | .id_table = id_table, |
1279 | .usb_driver = &iuu_driver, | ||
1279 | .num_ports = 1, | 1280 | .num_ports = 1, |
1280 | .bulk_in_size = 512, | 1281 | .bulk_in_size = 512, |
1281 | .bulk_out_size = 512, | 1282 | .bulk_out_size = 512, |
diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h index bf3297ddd186..1ab6ea8c4602 100644 --- a/drivers/usb/serial/keyspan.h +++ b/drivers/usb/serial/keyspan.h | |||
@@ -546,6 +546,7 @@ static struct usb_serial_driver keyspan_pre_device = { | |||
546 | .name = "keyspan_no_firm", | 546 | .name = "keyspan_no_firm", |
547 | }, | 547 | }, |
548 | .description = "Keyspan - (without firmware)", | 548 | .description = "Keyspan - (without firmware)", |
549 | .usb_driver = &keyspan_driver, | ||
549 | .id_table = keyspan_pre_ids, | 550 | .id_table = keyspan_pre_ids, |
550 | .num_ports = 1, | 551 | .num_ports = 1, |
551 | .attach = keyspan_fake_startup, | 552 | .attach = keyspan_fake_startup, |
@@ -557,6 +558,7 @@ static struct usb_serial_driver keyspan_1port_device = { | |||
557 | .name = "keyspan_1", | 558 | .name = "keyspan_1", |
558 | }, | 559 | }, |
559 | .description = "Keyspan 1 port adapter", | 560 | .description = "Keyspan 1 port adapter", |
561 | .usb_driver = &keyspan_driver, | ||
560 | .id_table = keyspan_1port_ids, | 562 | .id_table = keyspan_1port_ids, |
561 | .num_ports = 1, | 563 | .num_ports = 1, |
562 | .open = keyspan_open, | 564 | .open = keyspan_open, |
@@ -579,6 +581,7 @@ static struct usb_serial_driver keyspan_2port_device = { | |||
579 | .name = "keyspan_2", | 581 | .name = "keyspan_2", |
580 | }, | 582 | }, |
581 | .description = "Keyspan 2 port adapter", | 583 | .description = "Keyspan 2 port adapter", |
584 | .usb_driver = &keyspan_driver, | ||
582 | .id_table = keyspan_2port_ids, | 585 | .id_table = keyspan_2port_ids, |
583 | .num_ports = 2, | 586 | .num_ports = 2, |
584 | .open = keyspan_open, | 587 | .open = keyspan_open, |
@@ -601,6 +604,7 @@ static struct usb_serial_driver keyspan_4port_device = { | |||
601 | .name = "keyspan_4", | 604 | .name = "keyspan_4", |
602 | }, | 605 | }, |
603 | .description = "Keyspan 4 port adapter", | 606 | .description = "Keyspan 4 port adapter", |
607 | .usb_driver = &keyspan_driver, | ||
604 | .id_table = keyspan_4port_ids, | 608 | .id_table = keyspan_4port_ids, |
605 | .num_ports = 4, | 609 | .num_ports = 4, |
606 | .open = keyspan_open, | 610 | .open = keyspan_open, |
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 185fe9a7d4e0..2cbd661a92f7 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -680,22 +680,6 @@ static void keyspan_pda_dtr_rts(struct usb_serial_port *port, int on) | |||
680 | } | 680 | } |
681 | } | 681 | } |
682 | 682 | ||
683 | static int keyspan_pda_carrier_raised(struct usb_serial_port *port) | ||
684 | { | ||
685 | struct usb_serial *serial = port->serial; | ||
686 | unsigned char modembits; | ||
687 | |||
688 | /* If we can read the modem status and the DCD is low then | ||
689 | carrier is not raised yet */ | ||
690 | if (keyspan_pda_get_modem_info(serial, &modembits) >= 0) { | ||
691 | if (!(modembits & (1>>6))) | ||
692 | return 0; | ||
693 | } | ||
694 | /* Carrier raised, or we failed (eg disconnected) so | ||
695 | progress accordingly */ | ||
696 | return 1; | ||
697 | } | ||
698 | |||
699 | 683 | ||
700 | static int keyspan_pda_open(struct tty_struct *tty, | 684 | static int keyspan_pda_open(struct tty_struct *tty, |
701 | struct usb_serial_port *port) | 685 | struct usb_serial_port *port) |
@@ -882,7 +866,6 @@ static struct usb_serial_driver keyspan_pda_device = { | |||
882 | .id_table = id_table_std, | 866 | .id_table = id_table_std, |
883 | .num_ports = 1, | 867 | .num_ports = 1, |
884 | .dtr_rts = keyspan_pda_dtr_rts, | 868 | .dtr_rts = keyspan_pda_dtr_rts, |
885 | .carrier_raised = keyspan_pda_carrier_raised, | ||
886 | .open = keyspan_pda_open, | 869 | .open = keyspan_pda_open, |
887 | .close = keyspan_pda_close, | 870 | .close = keyspan_pda_close, |
888 | .write = keyspan_pda_write, | 871 | .write = keyspan_pda_write, |
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 7aa01b95b1d4..2849f8c32015 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -549,9 +549,12 @@ static void mct_u232_close(struct usb_serial_port *port) | |||
549 | { | 549 | { |
550 | dbg("%s port %d", __func__, port->number); | 550 | dbg("%s port %d", __func__, port->number); |
551 | 551 | ||
552 | usb_serial_generic_close(port); | 552 | if (port->serial->dev) { |
553 | if (port->serial->dev) | 553 | /* shutdown our urbs */ |
554 | usb_kill_urb(port->write_urb); | ||
555 | usb_kill_urb(port->read_urb); | ||
554 | usb_kill_urb(port->interrupt_in_urb); | 556 | usb_kill_urb(port->interrupt_in_urb); |
557 | } | ||
555 | } /* mct_u232_close */ | 558 | } /* mct_u232_close */ |
556 | 559 | ||
557 | 560 | ||
diff --git a/drivers/usb/serial/moto_modem.c b/drivers/usb/serial/moto_modem.c index cf1718394e18..653465f61d4a 100644 --- a/drivers/usb/serial/moto_modem.c +++ b/drivers/usb/serial/moto_modem.c | |||
@@ -44,6 +44,7 @@ static struct usb_serial_driver moto_device = { | |||
44 | .name = "moto-modem", | 44 | .name = "moto-modem", |
45 | }, | 45 | }, |
46 | .id_table = id_table, | 46 | .id_table = id_table, |
47 | .usb_driver = &moto_driver, | ||
47 | .num_ports = 1, | 48 | .num_ports = 1, |
48 | }; | 49 | }; |
49 | 50 | ||
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index ed01f3b2de8c..9ff19c8a122e 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
@@ -96,8 +96,8 @@ static void opticon_bulk_callback(struct urb *urb) | |||
96 | /* real data, send it to the tty layer */ | 96 | /* real data, send it to the tty layer */ |
97 | tty = tty_port_tty_get(&port->port); | 97 | tty = tty_port_tty_get(&port->port); |
98 | if (tty) { | 98 | if (tty) { |
99 | tty_insert_flip_string(tty, data, | 99 | tty_insert_flip_string(tty, data + 2, |
100 | data_length); | 100 | data_length); |
101 | tty_flip_buffer_push(tty); | 101 | tty_flip_buffer_push(tty); |
102 | tty_kref_put(tty); | 102 | tty_kref_put(tty); |
103 | } | 103 | } |
@@ -130,7 +130,7 @@ exit: | |||
130 | priv->bulk_address), | 130 | priv->bulk_address), |
131 | priv->bulk_in_buffer, priv->buffer_size, | 131 | priv->bulk_in_buffer, priv->buffer_size, |
132 | opticon_bulk_callback, priv); | 132 | opticon_bulk_callback, priv); |
133 | result = usb_submit_urb(port->read_urb, GFP_ATOMIC); | 133 | result = usb_submit_urb(priv->bulk_read_urb, GFP_ATOMIC); |
134 | if (result) | 134 | if (result) |
135 | dev_err(&port->dev, | 135 | dev_err(&port->dev, |
136 | "%s - failed resubmitting read urb, error %d\n", | 136 | "%s - failed resubmitting read urb, error %d\n", |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index c46911af282f..0dbcf124689d 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -382,7 +382,16 @@ static void option_instat_callback(struct urb *urb); | |||
382 | #define HAIER_VENDOR_ID 0x201e | 382 | #define HAIER_VENDOR_ID 0x201e |
383 | #define HAIER_PRODUCT_CE100 0x2009 | 383 | #define HAIER_PRODUCT_CE100 0x2009 |
384 | 384 | ||
385 | #define CINTERION_VENDOR_ID 0x0681 | 385 | /* Cinterion (formerly Siemens) products */ |
386 | #define SIEMENS_VENDOR_ID 0x0681 | ||
387 | #define CINTERION_VENDOR_ID 0x1e2d | ||
388 | #define CINTERION_PRODUCT_HC25_MDM 0x0047 | ||
389 | #define CINTERION_PRODUCT_HC25_MDMNET 0x0040 | ||
390 | #define CINTERION_PRODUCT_HC28_MDM 0x004C | ||
391 | #define CINTERION_PRODUCT_HC28_MDMNET 0x004A /* same for HC28J */ | ||
392 | #define CINTERION_PRODUCT_EU3_E 0x0051 | ||
393 | #define CINTERION_PRODUCT_EU3_P 0x0052 | ||
394 | #define CINTERION_PRODUCT_PH8 0x0053 | ||
386 | 395 | ||
387 | /* Olivetti products */ | 396 | /* Olivetti products */ |
388 | #define OLIVETTI_VENDOR_ID 0x0b3c | 397 | #define OLIVETTI_VENDOR_ID 0x0b3c |
@@ -512,7 +521,7 @@ static const struct usb_device_id option_ids[] = { | |||
512 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff) }, | 521 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff) }, |
513 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) }, | 522 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) }, |
514 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, | 523 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, |
515 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC) }, | 524 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) }, |
516 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, | 525 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, |
517 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, | 526 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, |
518 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, | 527 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, |
@@ -622,6 +631,7 @@ static const struct usb_device_id option_ids[] = { | |||
622 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) }, | 631 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) }, |
623 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff) }, | 632 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff) }, |
624 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, | 633 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, |
634 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, | ||
625 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, | 635 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, |
626 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, | 636 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, |
627 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff) }, | 637 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff) }, |
@@ -633,38 +643,52 @@ static const struct usb_device_id option_ids[] = { | |||
633 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) }, | 643 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) }, |
634 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, | 644 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, |
635 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff) }, | 645 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff) }, |
636 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, | 646 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */ |
637 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, | 647 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, |
638 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, | 648 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, |
639 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, | 649 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, |
640 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) }, | 650 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) }, |
641 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) }, | 651 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) }, |
642 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) }, | 652 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) }, |
653 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) }, | ||
643 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff) }, | 654 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff) }, |
655 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0038, 0xff, 0xff, 0xff) }, | ||
644 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) }, | 656 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) }, |
657 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0040, 0xff, 0xff, 0xff) }, | ||
645 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff) }, | 658 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff) }, |
646 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) }, | 659 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) }, |
660 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0044, 0xff, 0xff, 0xff) }, | ||
647 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) }, | 661 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) }, |
648 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff) }, | 662 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff) }, |
663 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0050, 0xff, 0xff, 0xff) }, | ||
649 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, | 664 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, |
650 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff) }, | 665 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff) }, |
666 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */ | ||
651 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, | 667 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, |
652 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff) }, | 668 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff) }, |
669 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0056, 0xff, 0xff, 0xff) }, | ||
653 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, | 670 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, |
654 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff) }, | 671 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff) }, |
672 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | ||
655 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, | 673 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, |
656 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, | 674 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, |
657 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff) }, | 675 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff) }, |
658 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) }, | 676 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) }, |
677 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0065, 0xff, 0xff, 0xff) }, | ||
659 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, | 678 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, |
679 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, | ||
660 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, | 680 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, |
681 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | ||
661 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, | 682 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, |
683 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, | ||
662 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, | 684 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, |
685 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0079, 0xff, 0xff, 0xff) }, | ||
663 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0082, 0xff, 0xff, 0xff) }, | 686 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0082, 0xff, 0xff, 0xff) }, |
687 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0083, 0xff, 0xff, 0xff) }, | ||
664 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) }, | 688 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) }, |
665 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) }, | 689 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0087, 0xff, 0xff, 0xff) }, |
666 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | ||
667 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff) }, | 690 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff) }, |
691 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, | ||
668 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0106, 0xff, 0xff, 0xff) }, | 692 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0106, 0xff, 0xff, 0xff) }, |
669 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0108, 0xff, 0xff, 0xff) }, | 693 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0108, 0xff, 0xff, 0xff) }, |
670 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff) }, | 694 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff) }, |
@@ -880,6 +904,8 @@ static const struct usb_device_id option_ids[] = { | |||
880 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, | 904 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, |
881 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, | 905 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, |
882 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, | 906 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, |
907 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) }, | ||
908 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | ||
883 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, | 909 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, |
884 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, | 910 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, |
885 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | 911 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, |
@@ -922,7 +948,17 @@ static const struct usb_device_id option_ids[] = { | |||
922 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F) }, | 948 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F) }, |
923 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, | 949 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, |
924 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, | 950 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, |
925 | { USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) }, | 951 | /* Cinterion */ |
952 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) }, | ||
953 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, | ||
954 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8) }, | ||
955 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, | ||
956 | { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, | ||
957 | { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) }, | ||
958 | { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDMNET) }, | ||
959 | { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, /* HC28 enumerates with Siemens or Cinterion VID depending on FW revision */ | ||
960 | { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, | ||
961 | |||
926 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, | 962 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, |
927 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ | 963 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ |
928 | { } /* Terminating entry */ | 964 | { } /* Terminating entry */ |
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index e199b0f4f99c..1c46a863295b 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c | |||
@@ -157,6 +157,7 @@ static struct usb_serial_driver oti6858_device = { | |||
157 | .name = "oti6858", | 157 | .name = "oti6858", |
158 | }, | 158 | }, |
159 | .id_table = id_table, | 159 | .id_table = id_table, |
160 | .usb_driver = &oti6858_driver, | ||
160 | .num_ports = 1, | 161 | .num_ports = 1, |
161 | .open = oti6858_open, | 162 | .open = oti6858_open, |
162 | .close = oti6858_close, | 163 | .close = oti6858_close, |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 8ae4c6cbc38a..08c9181b8e48 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -50,6 +50,7 @@ static const struct usb_device_id id_table[] = { | |||
50 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, | 50 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, |
51 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, | 51 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, |
52 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) }, | 52 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) }, |
53 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MOTOROLA) }, | ||
53 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, | 54 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, |
54 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, | 55 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, |
55 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, | 56 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, |
@@ -677,9 +678,11 @@ static void pl2303_update_line_status(struct usb_serial_port *port, | |||
677 | { | 678 | { |
678 | 679 | ||
679 | struct pl2303_private *priv = usb_get_serial_port_data(port); | 680 | struct pl2303_private *priv = usb_get_serial_port_data(port); |
681 | struct tty_struct *tty; | ||
680 | unsigned long flags; | 682 | unsigned long flags; |
681 | u8 status_idx = UART_STATE; | 683 | u8 status_idx = UART_STATE; |
682 | u8 length = UART_STATE + 1; | 684 | u8 length = UART_STATE + 1; |
685 | u8 prev_line_status; | ||
683 | u16 idv, idp; | 686 | u16 idv, idp; |
684 | 687 | ||
685 | idv = le16_to_cpu(port->serial->dev->descriptor.idVendor); | 688 | idv = le16_to_cpu(port->serial->dev->descriptor.idVendor); |
@@ -701,11 +704,20 @@ static void pl2303_update_line_status(struct usb_serial_port *port, | |||
701 | 704 | ||
702 | /* Save off the uart status for others to look at */ | 705 | /* Save off the uart status for others to look at */ |
703 | spin_lock_irqsave(&priv->lock, flags); | 706 | spin_lock_irqsave(&priv->lock, flags); |
707 | prev_line_status = priv->line_status; | ||
704 | priv->line_status = data[status_idx]; | 708 | priv->line_status = data[status_idx]; |
705 | spin_unlock_irqrestore(&priv->lock, flags); | 709 | spin_unlock_irqrestore(&priv->lock, flags); |
706 | if (priv->line_status & UART_BREAK_ERROR) | 710 | if (priv->line_status & UART_BREAK_ERROR) |
707 | usb_serial_handle_break(port); | 711 | usb_serial_handle_break(port); |
708 | wake_up_interruptible(&priv->delta_msr_wait); | 712 | wake_up_interruptible(&priv->delta_msr_wait); |
713 | |||
714 | tty = tty_port_tty_get(&port->port); | ||
715 | if (!tty) | ||
716 | return; | ||
717 | if ((priv->line_status ^ prev_line_status) & UART_DCD) | ||
718 | usb_serial_handle_dcd_change(port, tty, | ||
719 | priv->line_status & UART_DCD); | ||
720 | tty_kref_put(tty); | ||
709 | } | 721 | } |
710 | 722 | ||
711 | static void pl2303_read_int_callback(struct urb *urb) | 723 | static void pl2303_read_int_callback(struct urb *urb) |
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index 43eb9bdad422..1b025f75dafd 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define PL2303_PRODUCT_ID_MMX 0x0612 | 21 | #define PL2303_PRODUCT_ID_MMX 0x0612 |
22 | #define PL2303_PRODUCT_ID_GPRS 0x0609 | 22 | #define PL2303_PRODUCT_ID_GPRS 0x0609 |
23 | #define PL2303_PRODUCT_ID_HCR331 0x331a | 23 | #define PL2303_PRODUCT_ID_HCR331 0x331a |
24 | #define PL2303_PRODUCT_ID_MOTOROLA 0x0307 | ||
24 | 25 | ||
25 | #define ATEN_VENDOR_ID 0x0557 | 26 | #define ATEN_VENDOR_ID 0x0557 |
26 | #define ATEN_VENDOR_ID2 0x0547 | 27 | #define ATEN_VENDOR_ID2 0x0547 |
diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c index 214a3e504292..30b73e68a904 100644 --- a/drivers/usb/serial/qcaux.c +++ b/drivers/usb/serial/qcaux.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #define UTSTARCOM_PRODUCT_UM175_V1 0x3712 | 36 | #define UTSTARCOM_PRODUCT_UM175_V1 0x3712 |
37 | #define UTSTARCOM_PRODUCT_UM175_V2 0x3714 | 37 | #define UTSTARCOM_PRODUCT_UM175_V2 0x3714 |
38 | #define UTSTARCOM_PRODUCT_UM175_ALLTEL 0x3715 | 38 | #define UTSTARCOM_PRODUCT_UM175_ALLTEL 0x3715 |
39 | #define PANTECH_PRODUCT_UML290_VZW 0x3718 | ||
39 | 40 | ||
40 | /* CMOTECH devices */ | 41 | /* CMOTECH devices */ |
41 | #define CMOTECH_VENDOR_ID 0x16d8 | 42 | #define CMOTECH_VENDOR_ID 0x16d8 |
@@ -66,6 +67,7 @@ static struct usb_device_id id_table[] = { | |||
66 | { USB_DEVICE_AND_INTERFACE_INFO(LG_VENDOR_ID, LG_PRODUCT_VX4400_6000, 0xff, 0xff, 0x00) }, | 67 | { USB_DEVICE_AND_INTERFACE_INFO(LG_VENDOR_ID, LG_PRODUCT_VX4400_6000, 0xff, 0xff, 0x00) }, |
67 | { USB_DEVICE_AND_INTERFACE_INFO(SANYO_VENDOR_ID, SANYO_PRODUCT_KATANA_LX, 0xff, 0xff, 0x00) }, | 68 | { USB_DEVICE_AND_INTERFACE_INFO(SANYO_VENDOR_ID, SANYO_PRODUCT_KATANA_LX, 0xff, 0xff, 0x00) }, |
68 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_U520, 0xff, 0x00, 0x00) }, | 69 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_U520, 0xff, 0x00, 0x00) }, |
70 | { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xff, 0xff) }, | ||
69 | { }, | 71 | { }, |
70 | }; | 72 | }; |
71 | MODULE_DEVICE_TABLE(usb, id_table); | 73 | MODULE_DEVICE_TABLE(usb, id_table); |
@@ -84,6 +86,7 @@ static struct usb_serial_driver qcaux_device = { | |||
84 | .name = "qcaux", | 86 | .name = "qcaux", |
85 | }, | 87 | }, |
86 | .id_table = id_table, | 88 | .id_table = id_table, |
89 | .usb_driver = &qcaux_driver, | ||
87 | .num_ports = 1, | 90 | .num_ports = 1, |
88 | }; | 91 | }; |
89 | 92 | ||
diff --git a/drivers/usb/serial/siemens_mpi.c b/drivers/usb/serial/siemens_mpi.c index cb8195cabfde..74cd4ccdb3fc 100644 --- a/drivers/usb/serial/siemens_mpi.c +++ b/drivers/usb/serial/siemens_mpi.c | |||
@@ -42,6 +42,7 @@ static struct usb_serial_driver siemens_usb_mpi_device = { | |||
42 | .name = "siemens_mpi", | 42 | .name = "siemens_mpi", |
43 | }, | 43 | }, |
44 | .id_table = id_table, | 44 | .id_table = id_table, |
45 | .usb_driver = &siemens_usb_mpi_driver, | ||
45 | .num_ports = 1, | 46 | .num_ports = 1, |
46 | }; | 47 | }; |
47 | 48 | ||
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 329d311a35d9..f88bc511da65 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c | |||
@@ -133,7 +133,7 @@ struct spcp8x5_usb_ctrl_arg { | |||
133 | 133 | ||
134 | /* how come ??? */ | 134 | /* how come ??? */ |
135 | #define UART_STATE 0x08 | 135 | #define UART_STATE 0x08 |
136 | #define UART_STATE_TRANSIENT_MASK 0x74 | 136 | #define UART_STATE_TRANSIENT_MASK 0x75 |
137 | #define UART_DCD 0x01 | 137 | #define UART_DCD 0x01 |
138 | #define UART_DSR 0x02 | 138 | #define UART_DSR 0x02 |
139 | #define UART_BREAK_ERROR 0x04 | 139 | #define UART_BREAK_ERROR 0x04 |
@@ -526,6 +526,10 @@ static void spcp8x5_process_read_urb(struct urb *urb) | |||
526 | /* overrun is special, not associated with a char */ | 526 | /* overrun is special, not associated with a char */ |
527 | if (status & UART_OVERRUN_ERROR) | 527 | if (status & UART_OVERRUN_ERROR) |
528 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 528 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); |
529 | |||
530 | if (status & UART_DCD) | ||
531 | usb_serial_handle_dcd_change(port, tty, | ||
532 | priv->line_status & MSR_STATUS_LINE_DCD); | ||
529 | } | 533 | } |
530 | 534 | ||
531 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | 535 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, |
@@ -646,6 +650,7 @@ static struct usb_serial_driver spcp8x5_device = { | |||
646 | .name = "SPCP8x5", | 650 | .name = "SPCP8x5", |
647 | }, | 651 | }, |
648 | .id_table = id_table, | 652 | .id_table = id_table, |
653 | .usb_driver = &spcp8x5_driver, | ||
649 | .num_ports = 1, | 654 | .num_ports = 1, |
650 | .open = spcp8x5_open, | 655 | .open = spcp8x5_open, |
651 | .dtr_rts = spcp8x5_dtr_rts, | 656 | .dtr_rts = spcp8x5_dtr_rts, |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 90979a1f5311..c58ef5434733 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -365,9 +365,9 @@ failed_1port: | |||
365 | 365 | ||
366 | static void __exit ti_exit(void) | 366 | static void __exit ti_exit(void) |
367 | { | 367 | { |
368 | usb_deregister(&ti_usb_driver); | ||
368 | usb_serial_deregister(&ti_1port_device); | 369 | usb_serial_deregister(&ti_1port_device); |
369 | usb_serial_deregister(&ti_2port_device); | 370 | usb_serial_deregister(&ti_2port_device); |
370 | usb_deregister(&ti_usb_driver); | ||
371 | } | 371 | } |
372 | 372 | ||
373 | 373 | ||
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 7a2177c79bde..6afd8e848117 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -52,6 +52,7 @@ static struct usb_driver usb_serial_driver = { | |||
52 | .suspend = usb_serial_suspend, | 52 | .suspend = usb_serial_suspend, |
53 | .resume = usb_serial_resume, | 53 | .resume = usb_serial_resume, |
54 | .no_dynamic_id = 1, | 54 | .no_dynamic_id = 1, |
55 | .supports_autosuspend = 1, | ||
55 | }; | 56 | }; |
56 | 57 | ||
57 | /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead | 58 | /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead |
@@ -1334,6 +1335,12 @@ int usb_serial_register(struct usb_serial_driver *driver) | |||
1334 | 1335 | ||
1335 | if (!driver->description) | 1336 | if (!driver->description) |
1336 | driver->description = driver->driver.name; | 1337 | driver->description = driver->driver.name; |
1338 | if (!driver->usb_driver) { | ||
1339 | WARN(1, "Serial driver %s has no usb_driver\n", | ||
1340 | driver->description); | ||
1341 | return -EINVAL; | ||
1342 | } | ||
1343 | driver->usb_driver->supports_autosuspend = 1; | ||
1337 | 1344 | ||
1338 | /* Add this device to our list of devices */ | 1345 | /* Add this device to our list of devices */ |
1339 | mutex_lock(&table_lock); | 1346 | mutex_lock(&table_lock); |
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index f2ed6a31be77..95a82148ee81 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c | |||
@@ -75,6 +75,7 @@ static struct usb_serial_driver debug_device = { | |||
75 | .name = "debug", | 75 | .name = "debug", |
76 | }, | 76 | }, |
77 | .id_table = id_table, | 77 | .id_table = id_table, |
78 | .usb_driver = &debug_driver, | ||
78 | .num_ports = 1, | 79 | .num_ports = 1, |
79 | .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE, | 80 | .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE, |
80 | .break_ctl = usb_debug_break_ctl, | 81 | .break_ctl = usb_debug_break_ctl, |
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index eb76aaef4268..15a5d89b7f39 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c | |||
@@ -606,6 +606,10 @@ static int treo_attach(struct usb_serial *serial) | |||
606 | 606 | ||
607 | static int clie_5_attach(struct usb_serial *serial) | 607 | static int clie_5_attach(struct usb_serial *serial) |
608 | { | 608 | { |
609 | struct usb_serial_port *port; | ||
610 | unsigned int pipe; | ||
611 | int j; | ||
612 | |||
609 | dbg("%s", __func__); | 613 | dbg("%s", __func__); |
610 | 614 | ||
611 | /* TH55 registers 2 ports. | 615 | /* TH55 registers 2 ports. |
@@ -621,9 +625,14 @@ static int clie_5_attach(struct usb_serial *serial) | |||
621 | return -1; | 625 | return -1; |
622 | 626 | ||
623 | /* port 0 now uses the modified endpoint Address */ | 627 | /* port 0 now uses the modified endpoint Address */ |
624 | serial->port[0]->bulk_out_endpointAddress = | 628 | port = serial->port[0]; |
629 | port->bulk_out_endpointAddress = | ||
625 | serial->port[1]->bulk_out_endpointAddress; | 630 | serial->port[1]->bulk_out_endpointAddress; |
626 | 631 | ||
632 | pipe = usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress); | ||
633 | for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j) | ||
634 | port->write_urbs[j]->pipe = pipe; | ||
635 | |||
627 | return 0; | 636 | return 0; |
628 | } | 637 | } |
629 | 638 | ||
diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c index 57fc2f532cab..ceba512f84d0 100644 --- a/drivers/usb/storage/sierra_ms.c +++ b/drivers/usb/storage/sierra_ms.c | |||
@@ -121,7 +121,7 @@ static ssize_t show_truinst(struct device *dev, struct device_attribute *attr, | |||
121 | } | 121 | } |
122 | return result; | 122 | return result; |
123 | } | 123 | } |
124 | static DEVICE_ATTR(truinst, S_IWUGO | S_IRUGO, show_truinst, NULL); | 124 | static DEVICE_ATTR(truinst, S_IRUGO, show_truinst, NULL); |
125 | 125 | ||
126 | int sierra_ms_init(struct us_data *us) | 126 | int sierra_ms_init(struct us_data *us) |
127 | { | 127 | { |
diff --git a/drivers/usb/storage/unusual_cypress.h b/drivers/usb/storage/unusual_cypress.h index 44be6d75dab6..fba2824085b4 100644 --- a/drivers/usb/storage/unusual_cypress.h +++ b/drivers/usb/storage/unusual_cypress.h | |||
@@ -31,4 +31,9 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999, | |||
31 | "Cypress ISD-300LP", | 31 | "Cypress ISD-300LP", |
32 | US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0), | 32 | US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0), |
33 | 33 | ||
34 | UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x9999, | ||
35 | "Super Top", | ||
36 | "USB 2.0 SATA BRIDGE", | ||
37 | US_SC_CYP_ATACB, US_PR_DEVICE, NULL, 0), | ||
38 | |||
34 | #endif /* defined(CONFIG_USB_STORAGE_CYPRESS_ATACB) || ... */ | 39 | #endif /* defined(CONFIG_USB_STORAGE_CYPRESS_ATACB) || ... */ |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 2c897eefadde..b0c0a33910e8 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -481,6 +481,13 @@ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220, | |||
481 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 481 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
482 | US_FL_MAX_SECTORS_64), | 482 | US_FL_MAX_SECTORS_64), |
483 | 483 | ||
484 | /* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */ | ||
485 | UNUSUAL_DEV( 0x04e8, 0x5122, 0x0000, 0x9999, | ||
486 | "Samsung", | ||
487 | "YP-CP3", | ||
488 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
489 | US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG), | ||
490 | |||
484 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. | 491 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. |
485 | * Device uses standards-violating 32-byte Bulk Command Block Wrappers and | 492 | * Device uses standards-violating 32-byte Bulk Command Block Wrappers and |
486 | * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011. | 493 | * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011. |
@@ -1036,6 +1043,15 @@ UNUSUAL_DEV( 0x084d, 0x0011, 0x0110, 0x0110, | |||
1036 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1043 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1037 | US_FL_BULK32), | 1044 | US_FL_BULK32), |
1038 | 1045 | ||
1046 | /* Reported by <ttkspam@free.fr> | ||
1047 | * The device reports a vendor-specific device class, requiring an | ||
1048 | * explicit vendor/product match. | ||
1049 | */ | ||
1050 | UNUSUAL_DEV( 0x0851, 0x1542, 0x0002, 0x0002, | ||
1051 | "MagicPixel", | ||
1052 | "FW_Omega2", | ||
1053 | US_SC_DEVICE, US_PR_DEVICE, NULL, 0), | ||
1054 | |||
1039 | /* Andrew Lunn <andrew@lunn.ch> | 1055 | /* Andrew Lunn <andrew@lunn.ch> |
1040 | * PanDigital Digital Picture Frame. Does not like ALLOW_MEDIUM_REMOVAL | 1056 | * PanDigital Digital Picture Frame. Does not like ALLOW_MEDIUM_REMOVAL |
1041 | * on LUN 4. | 1057 | * on LUN 4. |
@@ -1380,6 +1396,13 @@ UNUSUAL_DEV( 0x0f19, 0x0105, 0x0100, 0x0100, | |||
1380 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1396 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1381 | US_FL_IGNORE_RESIDUE ), | 1397 | US_FL_IGNORE_RESIDUE ), |
1382 | 1398 | ||
1399 | /* Submitted by Nick Holloway */ | ||
1400 | UNUSUAL_DEV( 0x0f88, 0x042e, 0x0100, 0x0100, | ||
1401 | "VTech", | ||
1402 | "Kidizoom", | ||
1403 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
1404 | US_FL_FIX_CAPACITY ), | ||
1405 | |||
1383 | /* Reported by Michael Stattmann <michael@stattmann.com> */ | 1406 | /* Reported by Michael Stattmann <michael@stattmann.com> */ |
1384 | UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, | 1407 | UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, |
1385 | "Sony Ericsson", | 1408 | "Sony Ericsson", |
@@ -1859,6 +1882,22 @@ UNUSUAL_DEV( 0x1908, 0x1320, 0x0000, 0x0000, | |||
1859 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1882 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1860 | US_FL_BAD_SENSE ), | 1883 | US_FL_BAD_SENSE ), |
1861 | 1884 | ||
1885 | /* Patch by Richard Schütz <r.schtz@t-online.de> | ||
1886 | * This external hard drive enclosure uses a JMicron chip which | ||
1887 | * needs the US_FL_IGNORE_RESIDUE flag to work properly. */ | ||
1888 | UNUSUAL_DEV( 0x1e68, 0x001b, 0x0000, 0x0000, | ||
1889 | "TrekStor GmbH & Co. KG", | ||
1890 | "DataStation maxi g.u", | ||
1891 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
1892 | US_FL_IGNORE_RESIDUE | US_FL_SANE_SENSE ), | ||
1893 | |||
1894 | /* Reported by Jasper Mackenzie <scarletpimpernal@hotmail.com> */ | ||
1895 | UNUSUAL_DEV( 0x1e74, 0x4621, 0x0000, 0x0000, | ||
1896 | "Coby Electronics", | ||
1897 | "MP3 Player", | ||
1898 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
1899 | US_FL_BULK_IGNORE_TAG | US_FL_MAX_SECTORS_64 ), | ||
1900 | |||
1862 | UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, | 1901 | UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, |
1863 | "ST", | 1902 | "ST", |
1864 | "2A", | 1903 | "2A", |