mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: hpwdt: add support for iLO5
@ 2016-09-26 18:57 Brian Boylston
  2016-09-27  2:20 ` Guenter Roeck
  2016-10-08 14:05 ` Wim Van Sebroeck
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Boylston @ 2016-09-26 18:57 UTC (permalink / raw)
  To: linux-watchdog; +Cc: linux-kernel, wim, linux, nigel.croxon, Brian Boylston

iLO5 will offer the same watchdog timer as previous generations, but the
PCI subsystem vendor ID will be PCI_VENDOR_ID_HP_3PAR (0x1590) instead of
PCI_VENDOR_ID_HP (0x103c).  Add 0x1590 to the whitelist and be more
specific when ignoring the 103c,1979 device.

Signed-off-by: Brian Boylston <brian.boylston@hpe.com>
---
 drivers/watchdog/hpwdt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 8f89bd8..70c7194 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -39,7 +39,7 @@
 #include <asm/nmi.h>
 #include <asm/frame.h>
 
-#define HPWDT_VERSION			"1.3.3"
+#define HPWDT_VERSION			"1.4.0"
 #define SECS_TO_TICKS(secs)		((secs) * 1000 / 128)
 #define TICKS_TO_SECS(ticks)		((ticks) * 128 / 1000)
 #define HPWDT_MAX_TIMER			TICKS_TO_SECS(65535)
@@ -814,7 +814,8 @@ static int hpwdt_init_one(struct pci_dev *dev,
 	 * not run on a legacy ASM box.
 	 * So we only support the G5 ProLiant servers and higher.
 	 */
-	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP) {
+	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP &&
+	    dev->subsystem_vendor != PCI_VENDOR_ID_HP_3PAR) {
 		dev_warn(&dev->dev,
 			"This server does not have an iLO2+ ASIC.\n");
 		return -ENODEV;
@@ -823,7 +824,8 @@ static int hpwdt_init_one(struct pci_dev *dev,
 	/*
 	 * Ignore all auxilary iLO devices with the following PCI ID
 	 */
-	if (dev->subsystem_device == 0x1979)
+	if (dev->subsystem_vendor == PCI_VENDOR_ID_HP &&
+	    dev->subsystem_device == 0x1979)
 		return -ENODEV;
 
 	if (pci_enable_device(dev)) {
-- 
2.8.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: hpwdt: add support for iLO5
  2016-09-26 18:57 [PATCH] watchdog: hpwdt: add support for iLO5 Brian Boylston
@ 2016-09-27  2:20 ` Guenter Roeck
  2016-10-08 14:05 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2016-09-27  2:20 UTC (permalink / raw)
  To: Brian Boylston, linux-watchdog; +Cc: linux-kernel, wim, nigel.croxon

On 09/26/2016 11:57 AM, Brian Boylston wrote:
> iLO5 will offer the same watchdog timer as previous generations, but the
> PCI subsystem vendor ID will be PCI_VENDOR_ID_HP_3PAR (0x1590) instead of
> PCI_VENDOR_ID_HP (0x103c).  Add 0x1590 to the whitelist and be more
> specific when ignoring the 103c,1979 device.
>
> Signed-off-by: Brian Boylston <brian.boylston@hpe.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/hpwdt.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index 8f89bd8..70c7194 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -39,7 +39,7 @@
>  #include <asm/nmi.h>
>  #include <asm/frame.h>
>
> -#define HPWDT_VERSION			"1.3.3"
> +#define HPWDT_VERSION			"1.4.0"
>  #define SECS_TO_TICKS(secs)		((secs) * 1000 / 128)
>  #define TICKS_TO_SECS(ticks)		((ticks) * 128 / 1000)
>  #define HPWDT_MAX_TIMER			TICKS_TO_SECS(65535)
> @@ -814,7 +814,8 @@ static int hpwdt_init_one(struct pci_dev *dev,
>  	 * not run on a legacy ASM box.
>  	 * So we only support the G5 ProLiant servers and higher.
>  	 */
> -	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP) {
> +	if (dev->subsystem_vendor != PCI_VENDOR_ID_HP &&
> +	    dev->subsystem_vendor != PCI_VENDOR_ID_HP_3PAR) {
>  		dev_warn(&dev->dev,
>  			"This server does not have an iLO2+ ASIC.\n");
>  		return -ENODEV;
> @@ -823,7 +824,8 @@ static int hpwdt_init_one(struct pci_dev *dev,
>  	/*
>  	 * Ignore all auxilary iLO devices with the following PCI ID
>  	 */
> -	if (dev->subsystem_device == 0x1979)
> +	if (dev->subsystem_vendor == PCI_VENDOR_ID_HP &&
> +	    dev->subsystem_device == 0x1979)
>  		return -ENODEV;
>
>  	if (pci_enable_device(dev)) {
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: hpwdt: add support for iLO5
  2016-09-26 18:57 [PATCH] watchdog: hpwdt: add support for iLO5 Brian Boylston
  2016-09-27  2:20 ` Guenter Roeck
@ 2016-10-08 14:05 ` Wim Van Sebroeck
  1 sibling, 0 replies; 3+ messages in thread
From: Wim Van Sebroeck @ 2016-10-08 14:05 UTC (permalink / raw)
  To: Brian Boylston; +Cc: linux-watchdog, linux-kernel, linux, nigel.croxon

Hi Brian,

> iLO5 will offer the same watchdog timer as previous generations, but the
> PCI subsystem vendor ID will be PCI_VENDOR_ID_HP_3PAR (0x1590) instead of
> PCI_VENDOR_ID_HP (0x103c).  Add 0x1590 to the whitelist and be more
> specific when ignoring the 103c,1979 device.
> 
> Signed-off-by: Brian Boylston <brian.boylston@hpe.com>
> ---

This patch was added to linux-watchdog-next.

Kind regards,
Wim.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-08 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26 18:57 [PATCH] watchdog: hpwdt: add support for iLO5 Brian Boylston
2016-09-27  2:20 ` Guenter Roeck
2016-10-08 14:05 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®