From: Linus Torvalds Date: Mon, 1 Oct 2012 20:23:01 +0000 (-0700) Subject: Merge tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d9a807461fc8cc0d6ba589ea0730d139122af012;p=linux-beck.git Merge tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB changes from Greg Kroah-Hartman: "Here is the big USB pull request for 3.7-rc1 There are lots of gadget driver changes (including copying a bunch of files into the drivers/staging/ccg/ directory so that the other gadget drivers can be fixed up properly without breaking that driver), and we remove the old obsolete ub.c driver from the tree. There are also the usual XHCI set of updates, and other various driver changes and updates. We also are trying hard to remove the old dbg() macro, but the final bits of that removal will be coming in through the networking tree before we can delete it for good. All of these patches have been in the linux-next tree. Signed-off-by: Greg Kroah-Hartman " Fix up several annoying - but fairly mindless - conflicts due to the termios structure having moved into the tty device, and often clashing with dbg -> dev_dbg conversion. * tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits) USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc USB: uas: fix gcc warning USB: uas: fix locking USB: Fix race condition when removing host controllers USB: uas: add locking USB: uas: fix abort USB: uas: remove aborted field, replace with status bit. USB: uas: fix task management USB: uas: keep track of command urbs xhci: Intel Panther Point BEI quirk. powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support Revert "usb : Add sysfs files to control port power." USB: serial: remove vizzini driver usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems Increase XHCI suspend timeout to 16ms USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq USB: sierra_ms: don't keep unused variable fsl/usb: Add support for USB controller version 2.4 USB: qcaux: add Pantech vendor class match ... --- d9a807461fc8cc0d6ba589ea0730d139122af012 diff --cc drivers/staging/serqt_usb2/serqt_usb2.c index 5c969ade2eb7,376269b2bbfc..099bc69ca00c --- a/drivers/staging/serqt_usb2/serqt_usb2.c +++ b/drivers/staging/serqt_usb2/serqt_usb2.c @@@ -421,10 -419,10 +417,10 @@@ static void qt_read_bulk_callback(struc qt_read_bulk_callback, port); result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if (result) - dbg("%s - failed resubmitting read urb, error %d", - __func__, result); + dev_dbg(&port->dev, "%s - failed resubmitting read urb, error %d", + __func__, result); else { - if (tty && RxCount) { + if (RxCount) { tty_flip_buffer_push(tty); tty_schedule_flip(tty); } @@@ -1294,10 -1276,10 +1274,10 @@@ static void qt_set_termios(struct tty_s /* disable SW flow control */ status = BoxDisable_SW_FlowCtrl(port->serial, index); if (status < 0) - dbg(__FILE__ "BoxSetSW_FlowCtrl (diabling) failed\n"); + dev_dbg(&port->dev, "BoxSetSW_FlowCtrl (diabling) failed\n"); } - tty->termios->c_cflag &= ~CMSPAR; + termios->c_cflag &= ~CMSPAR; /* FIXME: Error cases should be returning the actual bits changed only */ } diff --cc drivers/usb/serial/cypress_m8.c index be34f153e566,3f13cdd159d4..1befce21e173 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@@ -1017,11 -1017,10 +1017,10 @@@ static void cypress_set_termios(struct spin_lock_irqsave(&priv->lock, flags); if (priv->chiptype == CT_EARTHMATE && priv->baud_rate == 4800) { - dbg("Using custom termios settings for a baud rate of " - "4800bps."); + dev_dbg(dev, "Using custom termios settings for a baud rate of 4800bps.\n"); /* define custom termios settings for NMEA protocol */ - tty->termios->c_iflag /* input modes - */ + tty->termios.c_iflag /* input modes - */ &= ~(IGNBRK /* disable ignore break */ | BRKINT /* disable break causes interrupt */ | PARMRK /* disable mark parity errors */ @@@ -1200,9 -1199,9 +1199,9 @@@ static void cypress_read_int_callback(s /* hangup, as defined in acm.c... this might be a bad place for it * though */ - if (tty && !(tty->termios->c_cflag & CLOCAL) && + if (tty && !(tty->termios.c_cflag & CLOCAL) && !(priv->current_status & UART_CD)) { - dbg("%s - calling hangup", __func__); + dev_dbg(dev, "%s - calling hangup\n", __func__); tty_hangup(tty); goto continue_read; } diff --cc drivers/usb/serial/digi_acceleport.c index afd9d2ec577b,d3a8941f66bc..c86f68c6b078 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@@ -687,8 -685,9 +685,9 @@@ static void digi_set_termios(struct tty struct usb_serial_port *port, struct ktermios *old_termios) { struct digi_port *priv = usb_get_serial_port_data(port); + struct device *dev = &port->dev; - unsigned int iflag = tty->termios->c_iflag; - unsigned int cflag = tty->termios->c_cflag; + unsigned int iflag = tty->termios.c_iflag; + unsigned int cflag = tty->termios.c_cflag; unsigned int old_iflag = old_termios->c_iflag; unsigned int old_cflag = old_termios->c_cflag; unsigned char buf[32]; diff --cc drivers/usb/serial/ftdi_sio.c index 0c8d1c226273,9169f51777ef..be845873e23d --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@@ -2101,8 -2097,9 +2097,9 @@@ static void ftdi_set_termios(struct tty struct usb_serial_port *port, struct ktermios *old_termios) { struct usb_device *dev = port->serial->dev; + struct device *ddev = &port->dev; struct ftdi_private *priv = usb_get_serial_port_data(port); - struct ktermios *termios = tty->termios; + struct ktermios *termios = &tty->termios; unsigned int cflag = termios->c_cflag; __u16 urb_value; /* will hold the new flags */ diff --cc drivers/usb/serial/io_edgeport.c index f435575c4e6e,75b7ccdd2652..8e6faaf3580c --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c @@@ -1516,13 -1497,9 +1497,9 @@@ static void edge_set_termios(struct tty struct edgeport_port *edge_port = usb_get_serial_port_data(port); unsigned int cflag; - cflag = tty->termios->c_cflag; - dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__, tty->termios->c_cflag, tty->termios->c_iflag); + cflag = tty->termios.c_cflag; - dbg("%s - clfag %08x iflag %08x", __func__, - tty->termios.c_cflag, tty->termios.c_iflag); - dbg("%s - old clfag %08x old iflag %08x", __func__, - old_termios->c_cflag, old_termios->c_iflag); - - dbg("%s - port %d", __func__, port->number); ++ dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__, tty->termios.c_cflag, tty->termios.c_iflag); + dev_dbg(&port->dev, "%s - old clfag %08x old iflag %08x\n", __func__, old_termios->c_cflag, old_termios->c_iflag); if (edge_port == NULL) return; diff --cc drivers/usb/serial/io_ti.c index 765978ae752e,21c7efa57acf..a2209cd45093 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@@ -2272,9 -2218,8 +2218,8 @@@ static void change_port_settings(struc config = kmalloc (sizeof (*config), GFP_KERNEL); if (!config) { - *tty->termios = *old_termios; + tty->termios = *old_termios; - dev_err(&edge_port->port->dev, "%s - out of memory\n", - __func__); + dev_err(dev, "%s - out of memory\n", __func__); return; } @@@ -2357,12 -2302,12 +2302,12 @@@ /* if we are implementing OUTBOUND XON/XOFF */ if (I_IXON(tty)) { config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X; - dbg("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", - __func__, config->cXon, config->cXoff); + dev_dbg(dev, "%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x\n", + __func__, config->cXon, config->cXoff); } else - dbg("%s - OUTBOUND XON/XOFF is disabled", __func__); + dev_dbg(dev, "%s - OUTBOUND XON/XOFF is disabled\n", __func__); - tty->termios->c_cflag &= ~CMSPAR; + tty->termios.c_cflag &= ~CMSPAR; /* Round the baud rate */ baud = tty_get_baud_rate(tty); @@@ -2408,13 -2352,13 +2352,13 @@@ static void edge_set_termios(struct tty struct edgeport_port *edge_port = usb_get_serial_port_data(port); unsigned int cflag; - cflag = tty->termios->c_cflag; + cflag = tty->termios.c_cflag; - dbg("%s - clfag %08x iflag %08x", __func__, - tty->termios.c_cflag, tty->termios.c_iflag); - dbg("%s - old clfag %08x old iflag %08x", __func__, - old_termios->c_cflag, old_termios->c_iflag); - dbg("%s - port %d", __func__, port->number); + dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__, - tty->termios->c_cflag, tty->termios->c_iflag); ++ tty->termios.c_cflag, tty->termios.c_iflag); + dev_dbg(&port->dev, "%s - old clfag %08x old iflag %08x\n", __func__, + old_termios->c_cflag, old_termios->c_iflag); + dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number); if (edge_port == NULL) return; diff --cc drivers/usb/serial/iuu_phoenix.c index bf3864045c18,91e6e372cf17..01da3ea36e89 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c @@@ -930,9 -914,9 +914,9 @@@ static void iuu_set_termios(struct tty_ u32 newval = cflag & supported_mask; /* Just use the ospeed. ispeed should be the same. */ - baud = tty->termios->c_ospeed; + baud = tty->termios.c_ospeed; - dbg("%s - enter c_ospeed or baud=%d", __func__, baud); + dev_dbg(&port->dev, "%s - enter c_ospeed or baud=%d\n", __func__, baud); /* compute the parity parameter */ parity = 0; diff --cc drivers/usb/serial/kl5kusb105.c index def9ad258715,e4aa6c0632d7..3f6d7376c02d --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c @@@ -445,9 -445,10 +445,10 @@@ static void klsi_105_set_termios(struc struct ktermios *old_termios) { struct klsi_105_private *priv = usb_get_serial_port_data(port); + struct device *dev = &port->dev; - unsigned int iflag = tty->termios->c_iflag; + unsigned int iflag = tty->termios.c_iflag; unsigned int old_iflag = old_termios->c_iflag; - unsigned int cflag = tty->termios->c_cflag; + unsigned int cflag = tty->termios.c_cflag; unsigned int old_cflag = old_termios->c_cflag; struct klsi_105_port_settings *cfg; unsigned long flags; diff --cc drivers/usb/serial/mos7720.c index 012f67b2e4cc,af7bc9b6280c..1bf1ad066666 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@@ -1751,19 -1706,15 +1706,15 @@@ static void mos7720_set_termios(struct return; } - dbg("%s\n", "setting termios - ASPIRE"); + dev_dbg(&port->dev, "setting termios - ASPIRE\n"); - cflag = tty->termios->c_cflag; + cflag = tty->termios.c_cflag; - dbg("%s - cflag %08x iflag %08x", __func__, - tty->termios.c_cflag, - RELEVANT_IFLAG(tty->termios.c_iflag)); + dev_dbg(&port->dev, "%s - cflag %08x iflag %08x\n", __func__, - tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag)); ++ tty->termios.c_cflag, RELEVANT_IFLAG(tty->termios.c_iflag)); - dbg("%s - old cflag %08x old iflag %08x", __func__, - old_termios->c_cflag, - RELEVANT_IFLAG(old_termios->c_iflag)); - - dbg("%s - port %d", __func__, port->number); + dev_dbg(&port->dev, "%s - old cflag %08x old iflag %08x\n", __func__, + old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag)); /* change the port settings to the new ones specified */ change_port_settings(tty, mos7720_port, old_termios); diff --cc drivers/usb/serial/mos7840.c index 402c32d7accb,a94297d9c7ac..d6d4eeca8c68 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@@ -2159,15 -2084,15 +2084,15 @@@ static void mos7840_set_termios(struct return; } - dbg("%s", "setting termios - "); + dev_dbg(&port->dev, "%s", "setting termios - \n"); - cflag = tty->termios->c_cflag; + cflag = tty->termios.c_cflag; - dbg("%s - clfag %08x iflag %08x", __func__, - tty->termios.c_cflag, RELEVANT_IFLAG(tty->termios.c_iflag)); - dbg("%s - old clfag %08x old iflag %08x", __func__, - old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag)); - dbg("%s - port %d", __func__, port->number); + dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__, - tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag)); ++ tty->termios.c_cflag, RELEVANT_IFLAG(tty->termios.c_iflag)); + dev_dbg(&port->dev, "%s - old clfag %08x old iflag %08x\n", __func__, + old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag)); + dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number); /* change the port settings to the new ones specified */ diff --cc drivers/usb/serial/oti6858.c index 9f555560bfbf,1498b3ddfead..933241f03fd8 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c @@@ -420,12 -418,10 +418,10 @@@ static void oti6858_set_termios(struct __le16 divisor; int br; - if (!tty) { - dbg("%s(): no tty structures", __func__); + if (!tty) return; - } - cflag = tty->termios->c_cflag; + cflag = tty->termios.c_cflag; spin_lock_irqsave(&priv->lock, flags); divisor = priv->pending_setup.divisor; diff --cc drivers/usb/serial/ssu100.c index cf2d30cf7588,6635743bd8c2..015810b3785b --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c @@@ -319,10 -317,10 +317,10 @@@ static int ssu100_open(struct tty_struc /* set to 9600 */ result = ssu100_control_msg(dev, QT_GET_SET_UART, 0x30, 0x0300); if (result < 0) - dbg("%s - set uart failed", __func__); + dev_dbg(&port->dev, "%s - set uart failed\n", __func__); if (tty) - ssu100_set_termios(tty, port, tty->termios); + ssu100_set_termios(tty, port, &tty->termios); return usb_serial_generic_open(tty, port); } diff --cc drivers/usb/serial/ti_usb_3410_5052.c index f502a16aac21,648249e74125..6f49392cda5b --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@@ -520,9 -507,9 +507,9 @@@ static int ti_open(struct tty_struct *t } if (tty) - ti_set_termios(tty, port, tty->termios); + ti_set_termios(tty, port, &tty->termios); - dbg("%s - sending TI_OPEN_PORT", __func__); + dev_dbg(&port->dev, "%s - sending TI_OPEN_PORT\n", __func__); status = ti_command_out_sync(tdev, TI_OPEN_PORT, (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0); if (status) { @@@ -562,9 -549,9 +549,9 @@@ usb_clear_halt(dev, port->read_urb->pipe); if (tty) - ti_set_termios(tty, port, tty->termios); + ti_set_termios(tty, port, &tty->termios); - dbg("%s - sending TI_OPEN_PORT (2)", __func__); + dev_dbg(&port->dev, "%s - sending TI_OPEN_PORT (2)\n", __func__); status = ti_command_out_sync(tdev, TI_OPEN_PORT, (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0); if (status) { @@@ -831,12 -817,12 +817,12 @@@ static void ti_set_termios(struct tty_s int port_number = port->number - port->serial->minor; unsigned int mcr; - cflag = tty->termios->c_cflag; - iflag = tty->termios->c_iflag; + cflag = tty->termios.c_cflag; + iflag = tty->termios.c_iflag; - dbg("%s - cflag %08x, iflag %08x", __func__, cflag, iflag); - dbg("%s - old clfag %08x, old iflag %08x", __func__, - old_termios->c_cflag, old_termios->c_iflag); + dev_dbg(&port->dev, "%s - cflag %08x, iflag %08x\n", __func__, cflag, iflag); + dev_dbg(&port->dev, "%s - old clfag %08x, old iflag %08x\n", __func__, + old_termios->c_cflag, old_termios->c_iflag); if (tport == NULL) return; diff --cc drivers/usb/serial/whiteheat.c index b36077de72b9,efa32bf5f758..346c7efc20b0 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@@ -723,8 -651,9 +651,9 @@@ static int firm_close(struct usb_serial static void firm_setup_port(struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; + struct device *dev = &port->dev; struct whiteheat_port_settings port_settings; - unsigned int cflag = tty->termios->c_cflag; + unsigned int cflag = tty->termios.c_cflag; port_settings.port = port->number + 1;