All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Crescent CY Hsieh <crescentcy.hsieh@moxa.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-serial <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v3 6/6] tty: serial: 8250: Add support for MOXA PCIe boards to switch interface between RS422/RS485
Date: Tue, 24 Oct 2023 10:10:16 +0200	[thread overview]
Message-ID: <2023102403-clash-utmost-8377@gregkh> (raw)
In-Reply-To: <ZTd2t9nsBx9pZKD9@moxa-ThinkCentre-M90t>

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

  reply	other threads:[~2023-10-24  8:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18  9:17 [PATCH v3 0/6] tty: serial: 8250: Changes of MOXA PCIe boards in 8250_pci.c Crescent CY Hsieh
2023-10-18  9:17 ` [PATCH v3 1/6] tty: serial: 8250: Modify MOXA enum name within 8250_pci.c Crescent CY Hsieh
2023-10-18  9:17 ` [PATCH v3 2/6] tty: serial: 8250: Cleanup MOXA configurations Crescent CY Hsieh
2023-10-18  9:17 ` [PATCH v3 3/6] tty: serial: 8250: Relocate macros within 8250_pci.c Crescent CY Hsieh
2023-10-18  9:17 ` [PATCH v3 4/6] tty: serial: 8250: Add support for MOXA Mini PCIe boards Crescent CY Hsieh
2023-10-18  9:17 ` [PATCH v3 5/6] tty: serial: 8250: Fix MOXA RS422/RS485 PCIe boards not work by default Crescent CY Hsieh
2023-10-19  5:59   ` Jiri Slaby
2023-10-19  6:16   ` Jiri Slaby
2023-10-23  9:21   ` Ilpo Järvinen
2023-10-18  9:17 ` [PATCH v3 6/6] tty: serial: 8250: Add support for MOXA PCIe boards to switch interface between RS422/RS485 Crescent CY Hsieh
2023-10-19  6:06   ` Jiri Slaby
2023-10-19  6:24   ` Jiri Slaby
2023-10-23  9:25   ` Ilpo Järvinen
2023-10-24  7:48     ` Crescent CY Hsieh
2023-10-24  8:10       ` Greg Kroah-Hartman [this message]
2023-10-21 16:31 ` [PATCH v3 0/6] tty: serial: 8250: Changes of MOXA PCIe boards in 8250_pci.c Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023102403-clash-utmost-8377@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=crescentcy.hsieh@moxa.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.