From: Guenter Roeck <linux@roeck-us.net>
To: Jerry Hoemann <jerry.hoemann@hpe.com>
Cc: wim@linux-watchdog.org, linux-watchdog@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] watchdog/hpwdt: Do not claim unsupported hardware
Date: Tue, 4 Dec 2018 18:47:56 -0800 [thread overview]
Message-ID: <bdd17fda-00ca-3c7a-81d7-fc08c8c21164@roeck-us.net> (raw)
In-Reply-To: <1543976538-75532-1-git-send-email-jerry.hoemann@hpe.com>
On 12/4/18 6:22 PM, Jerry Hoemann wrote:
> Do not claim when SSID 0x0289 as the watchdog features
> are not enabled/validated by the firmware.
>
> Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
> ---
> drivers/watchdog/hpwdt.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index 9356230..b99ef0a4 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -281,6 +281,17 @@ static int hpwdt_init_one(struct pci_dev *dev,
> dev->subsystem_device == 0x1979)
> return -ENODEV;
>
> + /*
> + * Ignore unsupported hardware
> + */
> + if (dev->vendor == PCI_VENDOR_ID_HP &&
> + dev->device == 0x3306 &&
> + dev->subsystem_vendor == PCI_VENDOR_ID_HP_3PAR &&
> + dev->subsystem_device == 0x0289) {
> + dev_info(&dev->dev, "Not supported on this platform\n");
> + return -ENODEV;
> + }
> +
Please use a pci_device_id table with PCI_DEVICE_SUB() to create
a blacklist, and pci_match_id() to match against it.
Thanks,
Guenter
> if (pci_enable_device(dev)) {
> dev_warn(&dev->dev,
> "Not possible to enable PCI Device: 0x%x:0x%x.\n",
>
prev parent reply other threads:[~2018-12-05 2:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-05 2:22 [PATCH 1/1] watchdog/hpwdt: Do not claim unsupported hardware Jerry Hoemann
2018-12-05 2:47 ` Guenter Roeck [this message]
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=bdd17fda-00ca-3c7a-81d7-fc08c8c21164@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jerry.hoemann@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@linux-watchdog.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).