Skip to content

Commit b942791

Browse files
committed
Merge tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are some USB fixes for 3.18-rc4. Just a bunch of little fixes resolving reported issues and new device ids for existing drivers. Full details are in the shortlog" * tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits) USB: Update default usb-storage delay_use value in kernel-parameters.txt USB: cdc-acm: add quirk for control-line state requests phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly USB: storage: Fix timeout in usb_stor_euscsi_init() and usb_stor_huawei_e220_init() USB: cdc-acm: only raise DTR on transitions from B0 Revert "storage: Replace magic number with define in usb_stor_euscsi_init()" usb: core: notify disconnection when core detects disconnect usb: core: need to call usb_phy_notify_connect after device setup uas: Add US_FL_NO_ATA_1X quirk for 2 more Seagate models xhci: no switching back on non-ULT Haswell USB: quirks: enable device-qualifier quirk for yet another Elan touchscreen USB: quirks: enable device-qualifier quirk for another Elan touchscreen MAINTAINERS: Remove duplicate entry for usbip driver usb: storage: fix build warnings !CONFIG_PM usb: Remove references to non-existent PLAT_S5P symbol uas: Add NO_ATA_1X for VIA VL711 devices xhci: Disable streams on Asmedia 1042 xhci controllers USB: HWA: fix a warning message uas: Add US_FL_NO_ATA_1X quirk for 1 more Seagate model usb-storage: handle a skipped data phase ...
2 parents fe606df + 1910195 commit b942791

18 files changed

Lines changed: 111 additions & 40 deletions

File tree

‎Documentation/kernel-parameters.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3621,7 +3621,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
36213621

36223622
usb-storage.delay_use=
36233623
[UMS] The delay in seconds before a new device is
3624-
scanned for Logical Units (default 5).
3624+
scanned for Logical Units (default 1).
36253625

36263626
usb-storage.quirks=
36273627
[UMS] A list of quirks entries to supplement or

‎MAINTAINERS‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9703,11 +9703,6 @@ S: Maintained
97039703
F: Documentation/hid/hiddev.txt
97049704
F: drivers/hid/usbhid/
97059705

9706-
USB/IP DRIVERS
9707-
L: linux-usb@vger.kernel.org
9708-
S: Orphan
9709-
F: drivers/staging/usbip/
9710-
97119706
USB ISP116X DRIVER
97129707
M: Olav Kongas <ok@artecdesign.ee>
97139708
L: linux-usb@vger.kernel.org

‎drivers/phy/phy-omap-usb2.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
258258
otg->phy = &phy->phy;
259259

260260
platform_set_drvdata(pdev, phy);
261+
pm_runtime_enable(phy->dev);
261262

262263
generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL);
263-
if (IS_ERR(generic_phy))
264+
if (IS_ERR(generic_phy)) {
265+
pm_runtime_disable(phy->dev);
264266
return PTR_ERR(generic_phy);
267+
}
265268

266269
phy_set_drvdata(generic_phy, phy);
267270

268-
pm_runtime_enable(phy->dev);
269271
phy_provider = devm_of_phy_provider_register(phy->dev,
270272
of_phy_simple_xlate);
271273
if (IS_ERR(phy_provider)) {

‎drivers/usb/class/cdc-acm.c‎

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ static struct acm *acm_table[ACM_TTY_MINORS];
6060

6161
static DEFINE_MUTEX(acm_table_lock);
6262

63+
static void acm_tty_set_termios(struct tty_struct *tty,
64+
struct ktermios *termios_old);
65+
6366
/*
6467
* acm_table accessors
6568
*/
@@ -145,8 +148,15 @@ static int acm_ctrl_msg(struct acm *acm, int request, int value,
145148
/* devices aren't required to support these requests.
146149
* the cdc acm descriptor tells whether they do...
147150
*/
148-
#define acm_set_control(acm, control) \
149-
acm_ctrl_msg(acm, USB_CDC_REQ_SET_CONTROL_LINE_STATE, control, NULL, 0)
151+
static inline int acm_set_control(struct acm *acm, int control)
152+
{
153+
if (acm->quirks & QUIRK_CONTROL_LINE_STATE)
154+
return -EOPNOTSUPP;
155+
156+
return acm_ctrl_msg(acm, USB_CDC_REQ_SET_CONTROL_LINE_STATE,
157+
control, NULL, 0);
158+
}
159+
150160
#define acm_set_line(acm, line) \
151161
acm_ctrl_msg(acm, USB_CDC_REQ_SET_LINE_CODING, 0, line, sizeof *(line))
152162
#define acm_send_break(acm, ms) \
@@ -554,6 +564,8 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
554564
goto error_submit_urb;
555565
}
556566

567+
acm_tty_set_termios(tty, NULL);
568+
557569
/*
558570
* Unthrottle device in case the TTY was closed while throttled.
559571
*/
@@ -980,11 +992,12 @@ static void acm_tty_set_termios(struct tty_struct *tty,
980992
/* FIXME: Needs to clear unsupported bits in the termios */
981993
acm->clocal = ((termios->c_cflag & CLOCAL) != 0);
982994

983-
if (!newline.dwDTERate) {
995+
if (C_BAUD(tty) == B0) {
984996
newline.dwDTERate = acm->line.dwDTERate;
985997
newctrl &= ~ACM_CTRL_DTR;
986-
} else
998+
} else if (termios_old && (termios_old->c_cflag & CBAUD) == B0) {
987999
newctrl |= ACM_CTRL_DTR;
1000+
}
9881001

9891002
if (newctrl != acm->ctrlout)
9901003
acm_set_control(acm, acm->ctrlout = newctrl);
@@ -1314,6 +1327,7 @@ static int acm_probe(struct usb_interface *intf,
13141327
tty_port_init(&acm->port);
13151328
acm->port.ops = &acm_port_ops;
13161329
init_usb_anchor(&acm->delayed);
1330+
acm->quirks = quirks;
13171331

13181332
buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
13191333
if (!buf) {
@@ -1681,6 +1695,9 @@ static const struct usb_device_id acm_ids[] = {
16811695
{ USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */
16821696
.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
16831697
},
1698+
{ USB_DEVICE(0x20df, 0x0001), /* Simtec Electronics Entropy Key */
1699+
.driver_info = QUIRK_CONTROL_LINE_STATE, },
1700+
{ USB_DEVICE(0x2184, 0x001c) }, /* GW Instek AFG-2225 */
16841701
{ USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */
16851702
},
16861703
/* Motorola H24 HSPA module: */

‎drivers/usb/class/cdc-acm.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ struct acm {
121121
unsigned int throttle_req:1; /* throttle requested */
122122
u8 bInterval;
123123
struct usb_anchor delayed; /* writes queued for a device about to be woken */
124+
unsigned long quirks;
124125
};
125126

126127
#define CDC_DATA_INTERFACE_TYPE 0x0a
@@ -132,3 +133,4 @@ struct acm {
132133
#define NOT_A_MODEM BIT(3)
133134
#define NO_DATA_INTERFACE BIT(4)
134135
#define IGNORE_DEVICE BIT(5)
136+
#define QUIRK_CONTROL_LINE_STATE BIT(6)

‎drivers/usb/core/hcd.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,8 @@ int usb_alloc_streams(struct usb_interface *interface,
20602060
return -EINVAL;
20612061
if (dev->speed != USB_SPEED_SUPER)
20622062
return -EINVAL;
2063+
if (dev->state < USB_STATE_CONFIGURED)
2064+
return -ENODEV;
20632065

20642066
for (i = 0; i < num_eps; i++) {
20652067
/* Streams only apply to bulk endpoints. */

‎drivers/usb/core/hub.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4468,9 +4468,6 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
44684468
if (retval)
44694469
goto fail;
44704470

4471-
if (hcd->usb_phy && !hdev->parent)
4472-
usb_phy_notify_connect(hcd->usb_phy, udev->speed);
4473-
44744471
/*
44754472
* Some superspeed devices have finished the link training process
44764473
* and attached to a superspeed hub port, but the device descriptor
@@ -4627,8 +4624,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
46274624

46284625
/* Disconnect any existing devices under this port */
46294626
if (udev) {
4630-
if (hcd->usb_phy && !hdev->parent &&
4631-
!(portstatus & USB_PORT_STAT_CONNECTION))
4627+
if (hcd->usb_phy && !hdev->parent)
46324628
usb_phy_notify_disconnect(hcd->usb_phy, udev->speed);
46334629
usb_disconnect(&port_dev->child);
46344630
}
@@ -4783,6 +4779,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
47834779
port_dev->child = NULL;
47844780
spin_unlock_irq(&device_state_lock);
47854781
mutex_unlock(&usb_port_peer_mutex);
4782+
} else {
4783+
if (hcd->usb_phy && !hdev->parent)
4784+
usb_phy_notify_connect(hcd->usb_phy,
4785+
udev->speed);
47864786
}
47874787
}
47884788

‎drivers/usb/core/quirks.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ static const struct usb_device_id usb_quirk_list[] = {
9797
{ USB_DEVICE(0x04f3, 0x0089), .driver_info =
9898
USB_QUIRK_DEVICE_QUALIFIER },
9999

100+
{ USB_DEVICE(0x04f3, 0x009b), .driver_info =
101+
USB_QUIRK_DEVICE_QUALIFIER },
102+
103+
{ USB_DEVICE(0x04f3, 0x016f), .driver_info =
104+
USB_QUIRK_DEVICE_QUALIFIER },
105+
100106
/* Roland SC-8820 */
101107
{ USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },
102108

‎drivers/usb/dwc2/gadget.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2327,7 +2327,7 @@ static irqreturn_t s3c_hsotg_irq(int irq, void *pw)
23272327

23282328
u32 usb_status = readl(hsotg->regs + GOTGCTL);
23292329

2330-
dev_info(hsotg->dev, "%s: USBRst\n", __func__);
2330+
dev_dbg(hsotg->dev, "%s: USBRst\n", __func__);
23312331
dev_dbg(hsotg->dev, "GNPTXSTS=%08x\n",
23322332
readl(hsotg->regs + GNPTXSTS));
23332333

‎drivers/usb/host/Kconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ config USB_EHCI_SH
234234

235235
config USB_EHCI_EXYNOS
236236
tristate "EHCI support for Samsung S5P/EXYNOS SoC Series"
237-
depends on PLAT_S5P || ARCH_EXYNOS
237+
depends on ARCH_S5PV210 || ARCH_EXYNOS
238238
help
239239
Enable support for the Samsung Exynos SOC's on-chip EHCI controller.
240240

@@ -550,7 +550,7 @@ config USB_OHCI_SH
550550

551551
config USB_OHCI_EXYNOS
552552
tristate "OHCI support for Samsung S5P/EXYNOS SoC Series"
553-
depends on PLAT_S5P || ARCH_EXYNOS
553+
depends on ARCH_S5PV210 || ARCH_EXYNOS
554554
help
555555
Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
556556

0 commit comments

Comments
 (0)