Re: [PATCH] USB: qcserial: expose methods for modem control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 23, 2017 at 10:58:43PM -0700, Magnus Lynch wrote:
> 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 left that for lack of
> familiarity.
> 
> Signed-off-by: Magnus Lynch <maglyx@xxxxxxxxx>

Thanks for the patch. The change itself looks good to me, but the patch
is whitespace damaged (tabs replaced with spaces, possibly your mailers
fault) and does not apply. I suggest taking a look at git-send-email.

Please fix this up and resend a v2. 

> diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
> index fd509ed6c..4ac137d 100644
> --- a/drivers/usb/serial/qcserial.c
> +++ b/drivers/usb/serial/qcserial.c
> @@ -454,6 +454,8 @@ static void qc_release(struct usb_serial *serial)
>   .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,

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux