summaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorMagnus Lynch <maglyx@gmail.com>2017-06-12 21:52:41 +0300
committerJohan Hovold <johan@kernel.org>2017-06-13 10:06:25 +0300
commit08f741a93333dc81b6d17d25f712ca167f250b1a (patch)
treeb2fff1bff105317204972d26ed16841328c24cca /drivers/usb/serial
parent4cd4475effd8fb6fd021fc7c881b4aa74480fa9e (diff)
downloadlinux-08f741a93333dc81b6d17d25f712ca167f250b1a.tar.xz
USB: serial: qcserial: expose methods for modem control
The qcserial driver fails to expose the .tiocmget and .tiocmset methods available from usb_wwan. These methods are required by ioctl commands dealing with the modem control signals DTR, RTS, etc. With these methods not set ioctl calls intended to control the DTR state will fail. For example, pppd drops and raises DTR in preparation to dialing the modem, which handles the case of the modem already being connected by making it hang up and return to command mode. DTR control being unavailable will lead to a protracted failure to connect as the modem will be stuck in a state not responsive to command. I have tested that with this patch the described case is handled successfully. There is an analogous method for .ioctl available from usb_wwan (as used in option.c) but I conservatively omitted that for lack of familiarity. Signed-off-by: Magnus Lynch <maglyx@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/qcserial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index fd509ed6cf70..4ac137d070fb 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -454,6 +454,8 @@ static struct usb_serial_driver qcdevice = {
.write = usb_wwan_write,
.write_room = usb_wwan_write_room,
.chars_in_buffer = usb_wwan_chars_in_buffer,
+ .tiocmget = usb_wwan_tiocmget,
+ .tiocmset = usb_wwan_tiocmset,
.attach = qc_attach,
.release = qc_release,
.port_probe = usb_wwan_port_probe,