diff mbox series

scsi: hpsa: prevent hpsa to severly delay boot

Message ID 20220204131247.1684875-1-clabbe@baylibre.com
State New
Headers show
Series scsi: hpsa: prevent hpsa to severly delay boot | expand

Commit Message

Corentin Labbe Feb. 4, 2022, 1:12 p.m. UTC
On my HPE Proliant microserver gen 10+, modprobing hpsa lead to:
hpsa 0000:01:00.7: unrecognized board ID: 0x00e41590
hpsa 0000:01:00.7: unrecognized board ID: 0x00e41590
hpsa 0000:01:00.7: can't disable ASPM; OS doesnt't have ASPM control
hpsa 0000:01:00.7: board not ready, timed out.

And the boot is severly delayed until the timeout.

The controller is HPE Smart Array S100i SR Gen10

I have tried to add (naivly) to struct board_type products:
	{0x00e41590, "Smart Array S100i SR Gen10", &SA5_access},
but the board still time out.

With further search, I found that the S100i seems to be a fake SW RAID controller usefull for windows only.

So I use the following patch to fix the boot stuck.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/scsi/hpsa.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Raphael Lisicki March 11, 2022, 1:11 p.m. UTC | #1
On 04.02.22 14:12, Corentin Labbe wrote:
> On my HPE Proliant microserver gen 10+, modprobing hpsa lead to:
> hpsa 0000:01:00.7: unrecognized board ID: 0x00e41590
> hpsa 0000:01:00.7: unrecognized board ID: 0x00e41590
> hpsa 0000:01:00.7: can't disable ASPM; OS doesnt't have ASPM control
> hpsa 0000:01:00.7: board not ready, timed ou >
> And the boot is severly delayed until the timeout.

The same happens with ProLiant DL360 Gen10.


> 
> The controller is HPE Smart Array S100i SR Gen10
> 
> I have tried to add (naivly) to struct board_type products:
> 	{0x00e41590, "Smart Array S100i SR Gen10", &SA5_access},
> but the board still time out.
> 
> With further search, I found that the S100i seems to be a fake SW RAID controller usefull for windows only.
> 
> So I use the following patch to fix the boot stuck.


Also confirmed on ProLiant DL360 Gen10 as working, but not sure about 
the general approach.
diff mbox series

Patch

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a47bcce3c9c7..dbc753a30500 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -231,6 +231,7 @@  static struct board_type products[] = {
 	{0x007D1590, "HP Storage P1228 Array Controller", &SA5_access},
 	{0x00881590, "HP Storage P1228e Array Controller", &SA5_access},
 	{0x333f103c, "HP StorageWorks 1210m Array Controller", &SA5_access},
+	{0x00e41590, "Smart Array S100i SR Gen10", NULL},
 	{0xFFFF103C, "Unknown Smart Array", &SA5_access},
 };
 
@@ -7554,6 +7555,10 @@  static int hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id,
 		*legacy_board = false;
 	for (i = 0; i < ARRAY_SIZE(products); i++)
 		if (*board_id == products[i].board_id) {
+			if (!products[i].access) {
+				dev_info(&pdev->dev, "This is a SW RAID controller for windows only\n");
+				return -ENODEV;
+			}
 			if (products[i].access != &SA5A_access &&
 			    products[i].access != &SA5B_access)
 				return i;
@@ -8676,7 +8681,8 @@  static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	rc = hpsa_lookup_board_id(pdev, &board_id, NULL);
 	if (rc < 0) {
-		dev_warn(&pdev->dev, "Board ID not found\n");
+		if (rc != -ENODEV)
+			dev_warn(&pdev->dev, "Board ID not found\n");
 		return rc;
 	}