Skip to contentSkip to conversation

USB: serial: spcp8x5: drop broken carrier detect support

PATCH New Johan Hovold 1 participant 1 message Aug 6

Subsystems (3)
lore
Share & tools
lore

Johan Hovold

author maintainer
#0 lore raw

PATCH 1/1 USB: serial: spcp8x5: drop broken carrier detect support

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 e1ed212d8593 ("USB: spcp8x5: add proper modem-status support")
Reported-by [email protected]
---
 drivers/usb/serial/spcp8x5.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/usb/serial/spcp8x5.c +0 -13
index c11d64bf08fb..f610aef6bf59 100644
@@ -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,
Signature · 1 line
2.55.0