linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Guan Yung Tseng <guan.yung.tseng@ni.com>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] 8250_pci.c: Update NI specific devices class to multi serial
Date: Tue, 15 Jan 2019 05:31:18 -0800	[thread overview]
Message-ID: <20190115133118.GA31202@infradead.org> (raw)
In-Reply-To: <1547547005-2149-1-git-send-email-guan.yung.tseng@ni.com>

On Tue, Jan 15, 2019 at 06:10:05PM +0800, Guan Yung Tseng wrote:
> +/*
> + * NI Serial devices incorrectly identify themselves
> + * PCI_CLASS_COMMUNICATION_OTHER, instead of what
> + * they really are: PCI_CLASS_COMMUNICATION_MULTISERIAL
> + */
> +static int pci_ni_probe(struct pci_dev *dev)
> +{
> +	dev->class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8 |
> +			(dev->class & 0xff);
> +	return 0;
> +}

This looks odd.  dev->class should just contain the class code read from
config space.  I think you need to work around this in the places that
check the classcode instead and add a quirk for these devices.

  reply	other threads:[~2019-01-15 13:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 10:10 [PATCH v2] 8250_pci.c: Update NI specific devices class to multi serial Guan Yung Tseng
2019-01-15 13:31 ` Christoph Hellwig [this message]
2019-01-22  9:19 Guan Yung Tseng

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=20190115133118.GA31202@infradead.org \
    --to=hch@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=guan.yung.tseng@ni.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).