linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] misc: hpilo: Do not claim on unsupported hardware
@ 2019-02-27  3:25 Matt Hsiao
  2019-02-27  3:25 ` [PATCH v2 1/2] misc: hpilo: Exclude unsupported device via blacklist Matt Hsiao
  2019-02-27  3:25 ` [PATCH v2 2/2] misc: hpilo: Do not claim unsupported hardware Matt Hsiao
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Hsiao @ 2019-02-27  3:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: arnd, gregkh, david.altobelli, mark.rusk, jerry.hoemann, Matt Hsiao

This patch series prevent unsupported hardwares from using the hpilo module:
1) Instead of having explicit if statement to check SSID 0x1979,
   provide a pci_device_id table of devices to blacklist.
2) Add unsupported hardware with SSID 0x0289 to the blacklist table.

Changes since v1:
- Merge v1 patches 1 and 2 as v2 patch 1.
- Drop v1 patch 4 that bumps up version.
- Improve documentation of each patch.

Matt Hsiao (2):
  misc: hpilo: Exclude unsupported device via blacklist
  misc: hpilo: Do not claim unsupported hardware

 drivers/misc/hpilo.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

-- 
1.8.3.1


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

* [PATCH v2 1/2] misc: hpilo: Exclude unsupported device via blacklist
  2019-02-27  3:25 [PATCH v2 0/2] misc: hpilo: Do not claim on unsupported hardware Matt Hsiao
@ 2019-02-27  3:25 ` Matt Hsiao
  2019-02-27  3:25 ` [PATCH v2 2/2] misc: hpilo: Do not claim unsupported hardware Matt Hsiao
  1 sibling, 0 replies; 3+ messages in thread
From: Matt Hsiao @ 2019-02-27  3:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: arnd, gregkh, david.altobelli, mark.rusk, jerry.hoemann, Matt Hsiao

Instead of having explicit if statements excluding devices,
use a pci_device_id table of devices to blacklist.

HPE will put out minor updates to the iLO using the same device
info except for the subsystem device id. hpilo driver takes the
approach to claim based upon {Vendor, Device, SubVendor} and it
allows old software to work on new hardware without patching.

As our primary way to support our customers is via distros, the
patching process could take months to go upstream and then
backported to multiple releases of multiple distros.

This approach worked fairly well as this is only the second time
in 10+ years that we need to blacklist an instance.

Signed-off-by: Matt Hsiao <matt.hsiao@hpe.com>
---
 drivers/misc/hpilo.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index e9c9ef5..0224e50 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -29,6 +29,11 @@
 static unsigned int ilo_major;
 static unsigned int max_ccb = 16;
 static char ilo_hwdev[MAX_ILO_DEV];
+static const struct pci_device_id ilo_blacklist[] = {
+	/* auxiliary iLO */
+	{PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP, 0x1979)},
+	{}
+};
 
 static inline int get_entry_id(int entry)
 {
@@ -763,9 +768,10 @@ static int ilo_probe(struct pci_dev *pdev,
 	int devnum, minor, start, error = 0;
 	struct ilo_hwinfo *ilo_hw;
 
-	/* Ignore subsystem_device = 0x1979 (set by BIOS)  */
-	if (pdev->subsystem_device == 0x1979)
-		return 0;
+	if (pci_match_id(ilo_blacklist, pdev)) {
+		dev_dbg(&pdev->dev, "Not supported on this device\n");
+		return -ENODEV;
+	}
 
 	if (max_ccb > MAX_CCB)
 		max_ccb = MAX_CCB;
-- 
1.8.3.1


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

* [PATCH v2 2/2] misc: hpilo: Do not claim unsupported hardware
  2019-02-27  3:25 [PATCH v2 0/2] misc: hpilo: Do not claim on unsupported hardware Matt Hsiao
  2019-02-27  3:25 ` [PATCH v2 1/2] misc: hpilo: Exclude unsupported device via blacklist Matt Hsiao
@ 2019-02-27  3:25 ` Matt Hsiao
  1 sibling, 0 replies; 3+ messages in thread
From: Matt Hsiao @ 2019-02-27  3:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: arnd, gregkh, david.altobelli, mark.rusk, jerry.hoemann, Matt Hsiao

CL2600/CL2800 servers leveraged Proliant hardware but are targeted to a
different market segment and come with a different firmware base. Based
upon targeted market needs, the servers de-featured certain aspects of iLO.

As a result, hpilo driver still claims the hardware but is not functional,
so we decided to blacklist it with SSID 0x0289 to reduce confusion to
customers.

Signed-off-by: Matt Hsiao <matt.hsiao@hpe.com>
---
 drivers/misc/hpilo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index 0224e50..927309b 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -32,6 +32,8 @@
 static const struct pci_device_id ilo_blacklist[] = {
 	/* auxiliary iLO */
 	{PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP, 0x1979)},
+	/* CL */
+	{PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP_3PAR, 0x0289)},
 	{}
 };
 
-- 
1.8.3.1


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

end of thread, other threads:[~2019-02-27  3:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27  3:25 [PATCH v2 0/2] misc: hpilo: Do not claim on unsupported hardware Matt Hsiao
2019-02-27  3:25 ` [PATCH v2 1/2] misc: hpilo: Exclude unsupported device via blacklist Matt Hsiao
2019-02-27  3:25 ` [PATCH v2 2/2] misc: hpilo: Do not claim unsupported hardware Matt Hsiao

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).