mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
USB serial fixes for 7.2-rc7
Here is a fix for a long-standing issue in the spcp8x5 driver which syzbot just started hitting and a change adding lockdep annotation to digi_acceleport to suppress a false positive deadlock warning. Note that only the digi_acceleport commit has been in linux-next (and with no reported issues). -----BEGIN PGP SIGNATURE----- iJEEABYKADkWIQQHbPq+cpGvN/peuzMLxc3C7H1lCAUCanXwpBsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIACgkQC8XNwux9ZQhhtgD8Cup01TId2ScE+750zDMX 0rTVhmBkTQIVzX1FjVdG1zsA/jdPLkV9cXUQhkJDS5mIqLcCLU606omTWzdiBnsl zI0P =naXW -----END PGP SIGNATURE----- Merge tag 'usb-serial-7.2-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB serial fixes for 7.2-rc7 Here is a fix for a long-standing issue in the spcp8x5 driver which syzbot just started hitting and a change adding lockdep annotation to digi_acceleport to suppress a false positive deadlock warning. Note that only the digi_acceleport commit has been in linux-next (and with no reported issues). * tag 'usb-serial-7.2-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: spcp8x5: drop broken carrier detect support USB: serial: digi_acceleport: add port lock nesting annotation
This commit is contained in:
commit
248fe6d163
|
|
@ -1228,6 +1228,7 @@ static int digi_startup_device(struct usb_serial *serial)
|
|||
|
||||
static int digi_port_init(struct usb_serial_port *port, unsigned port_num)
|
||||
{
|
||||
struct digi_serial *serial_priv = usb_get_serial_data(port->serial);
|
||||
struct digi_port *priv;
|
||||
|
||||
priv = kzalloc_obj(*priv);
|
||||
|
|
@ -1235,6 +1236,10 @@ static int digi_port_init(struct usb_serial_port *port, unsigned port_num)
|
|||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&priv->dp_port_lock);
|
||||
|
||||
if (port == serial_priv->ds_oob_port)
|
||||
lockdep_set_subclass(&priv->dp_port_lock, SINGLE_DEPTH_NESTING);
|
||||
|
||||
priv->dp_port_num = port_num;
|
||||
init_waitqueue_head(&priv->dp_transmit_idle_wait);
|
||||
init_waitqueue_head(&priv->dp_flush_wait);
|
||||
|
|
@ -1279,6 +1284,8 @@ static int digi_startup(struct usb_serial *serial)
|
|||
serial_priv->ds_oob_port_num = oob_port_num;
|
||||
serial_priv->ds_oob_port = serial->port[oob_port_num];
|
||||
|
||||
usb_set_serial_data(serial, serial_priv);
|
||||
|
||||
ret = digi_port_init(serial_priv->ds_oob_port,
|
||||
serial_priv->ds_oob_port_num);
|
||||
if (ret) {
|
||||
|
|
@ -1286,8 +1293,6 @@ static int digi_startup(struct usb_serial *serial)
|
|||
return ret;
|
||||
}
|
||||
|
||||
usb_set_serial_data(serial, serial_priv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,18 +235,6 @@ static void spcp8x5_set_work_mode(struct usb_serial_port *port, u16 value,
|
|||
dev_err(&port->dev, "failed to set work mode: %d\n", ret);
|
||||
}
|
||||
|
||||
static int spcp8x5_carrier_raised(struct usb_serial_port *port)
|
||||
{
|
||||
u8 msr;
|
||||
int ret;
|
||||
|
||||
ret = spcp8x5_get_msr(port, &msr);
|
||||
if (ret || msr & MSR_STATUS_LINE_DCD)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void spcp8x5_dtr_rts(struct usb_serial_port *port, int on)
|
||||
{
|
||||
struct spcp8x5_private *priv = usb_get_serial_port_data(port);
|
||||
|
|
@ -458,7 +446,6 @@ static struct usb_serial_driver spcp8x5_device = {
|
|||
.num_bulk_out = 1,
|
||||
.open = spcp8x5_open,
|
||||
.dtr_rts = spcp8x5_dtr_rts,
|
||||
.carrier_raised = spcp8x5_carrier_raised,
|
||||
.set_termios = spcp8x5_set_termios,
|
||||
.init_termios = spcp8x5_init_termios,
|
||||
.tiocmget = spcp8x5_tiocmget,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user