lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 24 Oct 2023 10:10:16 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Crescent CY Hsieh <crescentcy.hsieh@...a.com>
Cc:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Jiri Slaby <jirislaby@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-serial <linux-serial@...r.kernel.org>
Subject: Re: [PATCH v3 6/6] tty: serial: 8250: Add support for MOXA PCIe
 boards to switch interface between RS422/RS485

On Tue, Oct 24, 2023 at 03:48:07PM +0800, Crescent CY Hsieh wrote:
> On Mon, Oct 23, 2023 at 12:25:18PM +0300, Ilpo Järvinen wrote:
> > On Wed, 18 Oct 2023, Crescent CY Hsieh wrote:
> > > +		/*
> > > +		 * RS232 is not supported for MOXA PCIe boards with device IDs
> > > +		 * matching the pattern 0x*3**.
> > > +		 */
> > > +		if (pci_moxa_match_second_digit(device, 0x0300))
> > > +			return -EOPNOTSUPP;
> > 
> > This is not the correct error code I think. Maybe return -ENXIO instead.
> 
> I think EOPNOTSUPP or ENOTSUPP would be more reasonable, they directly
> indicates "operation is not supported".
> 
> However, EOPNOTSUPP is used for network-related and ENOTSUPP is used for
> NFSv3 protocol, even though they are already been used throughout the
> kernel.
> 
> Maybe add a new one stand for serial, or clean them up into a general
> one, or use EOPNOTSUPP and ENOTSUPP just for now?

-ENODEV should be the proper one here.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ