Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'usb-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg Kroah-Hartman:
"Here are some small USB driver fixes that resolve some reported
problems for 3.10-rc6

Nothing major, just 3 USB serial driver fixes, and two chipidea fixes"

* tag 'usb-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: chipidea: fix id change handling
usb: chipidea: fix no transceiver case
USB: pl2303: fix device initialisation at open
USB: spcp8x5: fix device initialisation at open
USB: f81232: fix device initialisation at open

+23 -21
+2 -1
drivers/usb/chipidea/core.c
··· 276 276 277 277 ci_role_stop(ci); 278 278 ci_role_start(ci, role); 279 - enable_irq(ci->irq); 280 279 } 280 + 281 + enable_irq(ci->irq); 281 282 } 282 283 283 284 static irqreturn_t ci_irq(int irq, void *data)
+8 -5
drivers/usb/chipidea/udc.c
··· 1678 1678 1679 1679 ci->gadget.ep0 = &ci->ep0in->ep; 1680 1680 1681 - if (ci->global_phy) 1681 + if (ci->global_phy) { 1682 1682 ci->transceiver = usb_get_phy(USB_PHY_TYPE_USB2); 1683 + if (IS_ERR(ci->transceiver)) 1684 + ci->transceiver = NULL; 1685 + } 1683 1686 1684 1687 if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) { 1685 1688 if (ci->transceiver == NULL) { ··· 1697 1694 goto put_transceiver; 1698 1695 } 1699 1696 1700 - if (!IS_ERR_OR_NULL(ci->transceiver)) { 1697 + if (ci->transceiver) { 1701 1698 retval = otg_set_peripheral(ci->transceiver->otg, 1702 1699 &ci->gadget); 1703 1700 if (retval) ··· 1714 1711 return retval; 1715 1712 1716 1713 remove_trans: 1717 - if (!IS_ERR_OR_NULL(ci->transceiver)) { 1714 + if (ci->transceiver) { 1718 1715 otg_set_peripheral(ci->transceiver->otg, NULL); 1719 1716 if (ci->global_phy) 1720 1717 usb_put_phy(ci->transceiver); ··· 1722 1719 1723 1720 dev_err(dev, "error = %i\n", retval); 1724 1721 put_transceiver: 1725 - if (!IS_ERR_OR_NULL(ci->transceiver) && ci->global_phy) 1722 + if (ci->transceiver && ci->global_phy) 1726 1723 usb_put_phy(ci->transceiver); 1727 1724 destroy_eps: 1728 1725 destroy_eps(ci); ··· 1750 1747 dma_pool_destroy(ci->td_pool); 1751 1748 dma_pool_destroy(ci->qh_pool); 1752 1749 1753 - if (!IS_ERR_OR_NULL(ci->transceiver)) { 1750 + if (ci->transceiver) { 1754 1751 otg_set_peripheral(ci->transceiver->otg, NULL); 1755 1752 if (ci->global_phy) 1756 1753 usb_put_phy(ci->transceiver);
+4 -4
drivers/usb/serial/f81232.c
··· 165 165 /* FIXME - Stubbed out for now */ 166 166 167 167 /* Don't change anything if nothing has changed */ 168 - if (!tty_termios_hw_change(&tty->termios, old_termios)) 168 + if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios)) 169 169 return; 170 170 171 171 /* Do the real work here... */ 172 - tty_termios_copy_hw(&tty->termios, old_termios); 172 + if (old_termios) 173 + tty_termios_copy_hw(&tty->termios, old_termios); 173 174 } 174 175 175 176 static int f81232_tiocmget(struct tty_struct *tty) ··· 188 187 189 188 static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port) 190 189 { 191 - struct ktermios tmp_termios; 192 190 int result; 193 191 194 192 /* Setup termios */ 195 193 if (tty) 196 - f81232_set_termios(tty, port, &tmp_termios); 194 + f81232_set_termios(tty, port, NULL); 197 195 198 196 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 199 197 if (result) {
+5 -5
drivers/usb/serial/pl2303.c
··· 284 284 serial settings even to the same values as before. Thus 285 285 we actually need to filter in this specific case */ 286 286 287 - if (!tty_termios_hw_change(&tty->termios, old_termios)) 287 + if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios)) 288 288 return; 289 289 290 290 cflag = tty->termios.c_cflag; ··· 293 293 if (!buf) { 294 294 dev_err(&port->dev, "%s - out of memory.\n", __func__); 295 295 /* Report back no change occurred */ 296 - tty->termios = *old_termios; 296 + if (old_termios) 297 + tty->termios = *old_termios; 297 298 return; 298 299 } 299 300 ··· 434 433 control = priv->line_control; 435 434 if ((cflag & CBAUD) == B0) 436 435 priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); 437 - else if ((old_termios->c_cflag & CBAUD) == B0) 436 + else if (old_termios && (old_termios->c_cflag & CBAUD) == B0) 438 437 priv->line_control |= (CONTROL_DTR | CONTROL_RTS); 439 438 if (control != priv->line_control) { 440 439 control = priv->line_control; ··· 493 492 494 493 static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port) 495 494 { 496 - struct ktermios tmp_termios; 497 495 struct usb_serial *serial = port->serial; 498 496 struct pl2303_serial_private *spriv = usb_get_serial_data(serial); 499 497 int result; ··· 508 508 509 509 /* Setup termios */ 510 510 if (tty) 511 - pl2303_set_termios(tty, port, &tmp_termios); 511 + pl2303_set_termios(tty, port, NULL); 512 512 513 513 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 514 514 if (result) {
+4 -6
drivers/usb/serial/spcp8x5.c
··· 291 291 struct spcp8x5_private *priv = usb_get_serial_port_data(port); 292 292 unsigned long flags; 293 293 unsigned int cflag = tty->termios.c_cflag; 294 - unsigned int old_cflag = old_termios->c_cflag; 295 294 unsigned short uartdata; 296 295 unsigned char buf[2] = {0, 0}; 297 296 int baud; ··· 298 299 u8 control; 299 300 300 301 /* check that they really want us to change something */ 301 - if (!tty_termios_hw_change(&tty->termios, old_termios)) 302 + if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios)) 302 303 return; 303 304 304 305 /* set DTR/RTS active */ 305 306 spin_lock_irqsave(&priv->lock, flags); 306 307 control = priv->line_control; 307 - if ((old_cflag & CBAUD) == B0) { 308 + if (old_termios && (old_termios->c_cflag & CBAUD) == B0) { 308 309 priv->line_control |= MCR_DTR; 309 - if (!(old_cflag & CRTSCTS)) 310 + if (!(old_termios->c_cflag & CRTSCTS)) 310 311 priv->line_control |= MCR_RTS; 311 312 } 312 313 if (control != priv->line_control) { ··· 393 394 394 395 static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port) 395 396 { 396 - struct ktermios tmp_termios; 397 397 struct usb_serial *serial = port->serial; 398 398 struct spcp8x5_private *priv = usb_get_serial_port_data(port); 399 399 int ret; ··· 409 411 spcp8x5_set_ctrl_line(port, priv->line_control); 410 412 411 413 if (tty) 412 - spcp8x5_set_termios(tty, port, &tmp_termios); 414 + spcp8x5_set_termios(tty, port, NULL); 413 415 414 416 port->port.drain_delay = 256; 415 417