Skip to content

Commit 683df50

Browse files
jhovoldgregkh
authored andcommitted
USB: serial: spcp8x5: drop broken carrier detect support
commit d37186b upstream. The driver does not support modem status notifications and instead used to fetch the modem status once at open() and subsequently operate on and report stale state. As part of fixing this, a call to fetch the status was added to carrier_raised(), which does not work as that callback must not sleep (e.g. unlike tiocmget()). Drop the broken carrier detect support. Fixes: e1ed212 ("USB: spcp8x5: add proper modem-status support") Cc: stable@vger.kernel.org # 3.10 Reported-by: syzbot+3b514b87202742f22c44@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/6a73cea2.01d0871a.3a0d52.000d.GAE@google.com Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2ef5560 commit 683df50

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

drivers/usb/serial/spcp8x5.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,6 @@ static void spcp8x5_set_work_mode(struct usb_serial_port *port, u16 value,
237237
dev_err(&port->dev, "failed to set work mode: %d\n", ret);
238238
}
239239

240-
static int spcp8x5_carrier_raised(struct usb_serial_port *port)
241-
{
242-
u8 msr;
243-
int ret;
244-
245-
ret = spcp8x5_get_msr(port, &msr);
246-
if (ret || msr & MSR_STATUS_LINE_DCD)
247-
return 1;
248-
249-
return 0;
250-
}
251-
252240
static void spcp8x5_dtr_rts(struct usb_serial_port *port, int on)
253241
{
254242
struct spcp8x5_private *priv = usb_get_serial_port_data(port);
@@ -460,7 +448,6 @@ static struct usb_serial_driver spcp8x5_device = {
460448
.num_bulk_out = 1,
461449
.open = spcp8x5_open,
462450
.dtr_rts = spcp8x5_dtr_rts,
463-
.carrier_raised = spcp8x5_carrier_raised,
464451
.set_termios = spcp8x5_set_termios,
465452
.init_termios = spcp8x5_init_termios,
466453
.tiocmget = spcp8x5_tiocmget,

0 commit comments

Comments
 (0)