From: "andriy.shevchenko@intel.com" <andriy.shevchenko@intel.com>
To: Matthew Howell <matthew.howell@sealevel.com>
Cc: "linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
Darren Beeson <darren.beeson@sealevel.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
Jeff Baldwin <jeff.baldwin@sealevel.com>,
"ilpo.jarvinen@linux.intel.com" <ilpo.jarvinen@linux.intel.com>,
Ryan Wenglarz <ryan.wenglarz@sealevel.com>,
James Olson <james.olson@sealevel.com>
Subject: Re: [PATCH V8 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards
Date: Mon, 25 Sep 2023 11:40:40 +0300 [thread overview]
Message-ID: <ZRFHiDJW8Bf7JsKQ@smile.fi.intel.com> (raw)
In-Reply-To: <c48ef137af419953b6752ce31e9e82c701efffa3.camel@sealevel.com>
On Fri, Sep 22, 2023 at 03:33:05PM +0000, Matthew Howell wrote:
> On Fri, 2023-09-22 at 17:48 +0300, andriy.shevchenko@intel.com wrote:
> > On Fri, Sep 22, 2023 at 02:22:11PM +0000, Matthew Howell wrote:
...
> > > +static int pci_sealevel_setup(struct exar8250 *priv, struct pci_dev *pcidev,
> > > + struct uart_8250_port *port, int idx)
> > > +{
> > > + int ret;
> > > +
> > > + ret = pci_xr17v35x_setup(priv, pcidev, port, idx);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + port->port.rs485_config = sealevel_rs485_config;
> > > +
> > > + return 0;
> > > +}
> >
> > This actually can be embedded into original pci_xr17v35x_setup() as
> >
> > if (pdev->subsystem_vendor == PCI_VENDOR_ID_SEALEVEL)
> > port->port.rs485_config = sealevel_rs485_config;
>
> That was my original thought prior to the first submission, but I wasn't
> sure about adding vendor-specific changes into pci_xr17v35x_setup()
> since it appears that the convention in 8250_exar.c has been for vendors
> to have their own setup function when they needed to change the
> init/setup behaviour.
>
> If that is not the case though and having this in pci_xr17v35x_setup()
Just use the common sense. The case you are now adding is using PCI IDs
(vendor and device) that are Exar's. So, I do not see any violation of
the above assumption. Checking for _sub_ IDs is fine, it's just a quirk
for the Exar based chips.
> is more appropriate I'll be happy to put it there instead of having yet
> another setup function.
...
> > > + SEALEVEL_DEVICE(XR17V4358, pbn_sealevel_16),
> >
> > This is kinda worries me. Original Exar card has 12 ports, why 16 is in use
> > for this one?
>
> Ah, good catch. I had actually forgotten about the 12 port version. Will
> either fix or make redundant with move to pci_xr17v35x_setup() depending
> on feedback from my statement above about what is most appropriate.
>
> > > + SEALEVEL_DEVICE(XR17V8358, pbn_sealevel_16),
> > With the above suggestion this will be fixed automatically.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-09-25 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 14:20 [PATCH V8 1/2] serial: exar: Revert "serial: exar: Add support for Sealevel 7xxxC serial cards" Matthew Howell
2023-09-22 14:22 ` [PATCH V8 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards Matthew Howell
2023-09-22 14:48 ` andriy.shevchenko
2023-09-22 15:33 ` Matthew Howell
2023-09-25 8:40 ` andriy.shevchenko [this message]
2023-09-22 14:46 ` [PATCH V8 1/2] serial: exar: Revert "serial: exar: Add support for Sealevel 7xxxC serial cards" andriy.shevchenko
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=ZRFHiDJW8Bf7JsKQ@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=darren.beeson@sealevel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=james.olson@sealevel.com \
--cc=jeff.baldwin@sealevel.com \
--cc=linux-serial@vger.kernel.org \
--cc=matthew.howell@sealevel.com \
--cc=ryan.wenglarz@sealevel.com \
/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.