Re: [PATCH] serial: 8250_fintek: Fix rs485 disablement on nonsensical ioctl()

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

 



On Thu, Oct 26, 2017 at 10:26:27AM +0200, Ricardo Ribalda Delgado wrote:
> On Tue, Oct 24, 2017 at 8:37 PM, Lukas Wunner <lukas@xxxxxxxxx> wrote:
> > This driver's ->rs485_config callback checks if SER_RS485_RTS_ON_SEND
> > and SER_RS485_RTS_AFTER_SEND have the same value.  If they do, it means
> > the user has passed in nonsensical data with the TIOCSRS485 ioctl()
> > since RTS must have a different polarity when sending and when not
> > sending.  In this case, rs485 mode is not enabled (the RS485_URA bit
> > is not set in the RS485 Enable Register) and this is supposed to be
> > signaled back to the user by clearing the SER_RS485_ENABLED bit in
> > struct serial_rs485 ... except a missing tilde character is preventing
> > that from happening.
>
> Thanks for your patch.  Hope you haven't lost much time debugging it.

I haven't, I don't even have the hardware, just stumbled across the bug
while reading the rs485 code of various drivers.  I did have to chase
down the datasheet of this chip though to find out what the RS485_URA bit
exactly does. :-)  There's an older version of the datasheet which doesn't
specify the RS485 bits yet.


> Your patch looks good to me. I would only replace "nonsensical" with
> "invalid" on the subject of the patch.

Happy to respin.  Could you provide an Acked-by for the patch?  Thanks!

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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux