hpsa: add support for legacy boards
Subsystems (2)
PATCH 1/1 hpsa: add support for legacy boards
Add support for legacy boards, ensuring to enable the driver for those boards only when 'hpsa_allow_any' is set.
--- drivers/scsi/hpsa.c | 35 +++++++++++++++++++++++++++++++++-- drivers/scsi/hpsa.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 2 deletions(-)
drivers/scsi/hpsa.c +33 -2
@@ -148,6 +148,8 @@ {PCI_VENDOR_ID_HP, 0x333f, 0x103c, 0x333f}, {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0}, + {PCI_VENDOR_ID_COMPAQ, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, + PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0}, {0,} };
@@ -158,6 +160,26 @@* access = Address of the struct of function pointers */ static struct board_type products[] = { + {0x40700E11 ,"Smart Array 5300" , &SA5A_access}, + {0x40800E11 ,"Smart Array 5i" , &SA5B_access}, + {0x40820E11 ,"Smart Array 532" , &SA5B_access}, + {0x40830E11 ,"Smart Array 5312" , &SA5B_access}, + {0x409A0E11 ,"Smart Array 641" , &SA5A_access}, + {0x409B0E11 ,"Smart Array 642" , &SA5A_access}, + {0x409C0E11 ,"Smart Array 6400" , &SA5A_access}, + {0x409D0E11 ,"Smart Array 6400 EM" , &SA5A_access}, + {0x40910E11 ,"Smart Array 6i" , &SA5A_access}, + {0x3225103C ,"Smart Array P600" , &SA5A_access}, + {0x3223103C ,"Smart Array P800" , &SA5A_access}, + {0x3234103C ,"Smart Array P400" , &SA5A_access}, + {0x3235103C ,"Smart Array P400i" , &SA5A_access}, + {0x3211103C ,"Smart Array E200i" , &SA5A_access}, + {0x3212103C ,"Smart Array E200" , &SA5A_access}, + {0x3213103C ,"Smart Array E200i" , &SA5A_access}, + {0x3214103C ,"Smart Array E200i" , &SA5A_access}, + {0x3215103C ,"Smart Array E200i" , &SA5A_access}, + {0x3237103C ,"Smart Array E500" , &SA5A_access}, + {0x323D103C ,"Smart Array P700m" , &SA5A_access}, {0x3241103C ,"Smart Array P212" , &SA5_access}, {0x3243103C ,"Smart Array P410" , &SA5_access}, {0x3245103C ,"Smart Array P410i" , &SA5_access},
@@ -7243,8 +7265,17 @@ static int hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id) subsystem_vendor_id;for (i =0 ; i <ARRAY_SIZE (products); i++) -if (*board_id == products[i].board_id) -return i; +if (*board_id == products[i].board_id) { +if (products[i].access != &SA5A_access && + products[i].access != &SA5B_access) +return i; +if (hpsa_allow_any) { +dev_warn (&pdev->dev, +"unsupported board ID: 0x%08x\n" , + *board_id); +return i; + } + } if ((subsystem_vendor_id != PCI_VENDOR_ID_HP && subsystem_vendor_id != PCI_VENDOR_ID_COMPAQ) ||
drivers/scsi/hpsa.h +44 -0
62 lines not on this page · raw message
Signature · 1 line
1.8.5.6
Quoted 2 lines
Add support for legacy boards, ensuring to enable the driver for those boards only when '
hpsa_allow_any' is set.
Applied this patch, made sure I had compiled in hpsa and not cciss to avoid any variables from initramfs, and still I get this:
[ 4.015080] hpsa 0000:00:04.0: unrecognized board ID: 0x40800e11, ignoring. [ 4.098473] hpsa 0000:00:04.0: Board ID not found
Boot command line was "root=/dev/sda1 console=ttyS0,9600 ro hpsa_allow_any=1" - seems correct.
By looking at the code, I should see "unsupported board ID:" and it should work, but I see "unrecognized board ID:" and it does not work.
Hmm, trying hpsa.hpsa_allow_any=1. Much better:
[ 3.891531] hpsa 0000:00:04.0: unsupported board ID: 0x40800e11 [ 3.962367] hpsa 0000:00:04.0: unsupported board ID: 0x40800e11 [ 4.033493] hpsa 0000:00:04.0: Controller reports max supported commands of 0 Using 16 instead. Ensure that firmware is up to date. [ 4.175134] hpsa 0000:00:04.0: Physical aborts not supported [ 4.242931] hpsa 0000:00:04.0: Logical aborts not supported [ 4.309594] hpsa 0000:00:04.0: HP SSD Smart Path aborts not supported [ 4.460889] hpsa 0000:00:04.0: Controller reports max supported commands of 0 Using 16 instead. Ensure that firmware is up to date. [ 4.584679] scsi host0: hpsa [ 4.587842] hpsa 0000:00:04.0: report luns requested format 2, got 0 [ 4.613215] hpsa 0000:00:04.0: scsi 0:0:0:0: masked Direct-Access COMPAQ BD03685A24 PHYS DRV SSDSmartPathCap- En- Exp=0 [ 4.613219] hpsa 0000:00:04.0: C0:B1:T0:L0 Volume status is not available through vital product data pages. [ 4.613224] hpsa 0000:00:04.0: scsi 0:1:0:0: offline Direct-Access COMPAQ LOGICAL VOLUME RAID-1(+0) SSDSmartPathCap- En- Exp=1 [ 4.613229] hpsa 0000:00:04.0: scsi 0:3:0:0: added RAID COMPAQ Smart Array 5i controller SSDSmartPathCap- En- Exp=1 [ 6.187725] scsi 0:3:0:0: RAID COMPAQ Smart Array 5i 2.62 PQ: 0 ANSI: 0 [...] [ 6.726872] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6 [ 6.814364] Please append a correct "root=" boot option; here are the available partitions: [ 6.914403] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Controller is detected, there is something behind it but no sda is detected and no bootup.
What next?
And, for readability, we should use something like "Using unsupported board ID", not plain "unsupported board ID" - the last one leaves assumption that it will not work, although it should.
Signature · 1 line
Meelis Roos ([email protected])
Quoted 65 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Meelis Roos
Sent: Tuesday, July 11, 2017 9:26 AM
To: Hannes Reinecke <[email protected]>
Cc: Martin K. Petersen <[email protected]>; Christoph Hellwig <[email protected]>; James Bottomley <[email protected]>; Don Brace <[email protected]>; Jens Axboe <[email protected]>; linux- [email protected]; Hannes Reinecke <[email protected]>
Subject: Re: [PATCH] hpsa: add support for legacy boardsEXTERNAL EMAIL
Quoted 2 lines
Add support for legacy boards, ensuring to enable the driver for those boards only when '
hpsa_allow_any' is set.Applied this patch, made sure I had compiled in hpsa and not cciss to avoid any variables from initramfs, and still I get this:
[ 4.015080] hpsa 0000:00:04.0: unrecognized board ID: 0x40800e11, ignoring. [ 4.098473] hpsa 0000:00:04.0: Board ID not foundBoot command line was "root=/dev/sda1 console=ttyS0,9600 ro hpsa_allow_any=1" -
seems correct.By looking at the code, I should see "unsupported board ID:" and it should work, but I see "unrecognized board ID:" and it does not work.
Hmm, trying hpsa.hpsa_allow_any=1. Much better:
[ 3.891531] hpsa 0000:00:04.0: unsupported board ID: 0x40800e11 [ 3.962367] hpsa 0000:00:04.0: unsupported board ID: 0x40800e11 [ 4.033493] hpsa 0000:00:04.0: Controller reports max supported commands of 0 Using 16 instead. Ensure that firmware is up to date. [ 4.175134] hpsa 0000:00:04.0: Physical aborts not supported [ 4.242931] hpsa 0000:00:04.0: Logical aborts not supported [ 4.309594] hpsa 0000:00:04.0: HP SSD Smart Path aborts not supported [ 4.460889] hpsa 0000:00:04.0: Controller reports max supported commands of 0 Using 16 instead. Ensure that firmware is up to date. [ 4.584679] scsi host0: hpsa [ 4.587842] hpsa 0000:00:04.0: report luns requested format 2, got 0 [ 4.613215] hpsa 0000:00:04.0: scsi 0:0:0:0: masked Direct-Access COMPAQ BD03685A24 PHYS DRV SSDSmartPathCap- En- Exp=0 [ 4.613219] hpsa 0000:00:04.0: C0:B1:T0:L0 Volume status is not available through vital product data pages. [ 4.613224] hpsa 0000:00:04.0: scsi 0:1:0:0: offline Direct-Access COMPAQ LOGICAL VOLUME RAID-1(+0) SSDSmartPathCap- En- Exp=1 [ 4.613229] hpsa 0000:00:04.0: scsi 0:3:0:0: added RAID COMPAQ Smart Array 5i controller SSDSmartPathCap- En- Exp=1 [ 6.187725] scsi 0:3:0:0: RAID COMPAQ Smart Array 5i 2.62 PQ: 0 ANSI: 0 [...] [ 6.726872] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6 [ 6.814364] Please append a correct "root=" boot option; here are the available partitions: [ 6.914403] Kernel panic - not syncing: VFS: Unable to mount root fs onunknown-block(0,0)
Controller is detected, there is something behind it but no sda is detected and no bootup.
Quoted 8 lines
What next?
And, for readability, we should use something like "Using unsupported board ID", not plain "unsupported board ID" - the last one leaves assumption that it will not work, although it should.
--
Meelis Roos ([email protected])
The 5i controller is probably too old for the hpsa driver to support.
The hpsa driver is looking for information to determine if the drive is online/offline and this information is not available.
What was the original issue you were having with the cciss driver?
Quoted 5 lines
The 5i controller is probably too old for the hpsa driver to support.
The hpsa driver is looking for information to determine if the drive is online/offline and this information is not available.What was the original issue you were having with the cciss driver?
Christoph Hellwig updated block layer with "block: Make most scsi_req_init() calls implicit" and at first try, cciss was left without the needed initialization. This caused OOPS in udev probing but the system worked. The issue was fixed by Christoph quickly.
But he suggested it might be worth trying hpsa driver instead of cciss, with a longer term goal to to move users of cciss over to hpsa if possible. Now that I have tested it, it seems not all older cards are supported in hpsa - it's more than ID-s and interrupt masks.
Signature · 1 line
Meelis Roos ([email protected])
Quoted 10 lines · Meelis Roos
Quoted 5 lines
The 5i controller is probably too old for the hpsa driver to support.
The hpsa driver is looking for information to determine if the drive is online/offline and this information is not available.What was the original issue you were having with the cciss driver?
Christoph Hellwig updated block layer with "block: Make most
scsi_req_init()calls implicit" and at first try, cciss was left without the needed initialization. This caused OOPS in udev probing but the system worked. The issue was fixed by Christoph quickly.
The original patch is from Bart, but otherwise correct.
Quoted 4 lines
But he suggested it might be worth trying hpsa driver instead of cciss, with a longer term goal to to move users of cciss over to hpsa if possible. Now that I have tested it, it seems not all older cards are supported in hpsa - it's more than ID-s and interrupt masks.
Seems like it. And the idea behind this game is that we'd like to slowly get rid of old request_fn based drivers. Given that hpsa supports very similar hardware cciss is a target for removal once that hardware is switched over. But it seems like we'll need more work in this area..
Quoted 3 lines
Signature · 2 lines
-- Meelis Roos ([email protected])
---end quoted text---
Quoted 19 lines · Christoph Hellwig
Quoted 10 lines · Meelis Roos
Quoted 5 lines
The 5i controller is probably too old for the hpsa driver to support.
The hpsa driver is looking for information to determine if the drive is online/offline and this information is not available.What was the original issue you were having with the cciss driver?
Christoph Hellwig updated block layer with "block: Make most
scsi_req_init()calls implicit" and at first try, cciss was left without the needed initialization. This caused OOPS in udev probing but the system worked. The issue was fixed by Christoph quickly.The original patch is from Bart, but otherwise correct.
Quoted 4 lines
But he suggested it might be worth trying hpsa driver instead of cciss, with a longer term goal to to move users of cciss over to hpsa if possible. Now that I have tested it, it seems not all older cards are supported in hpsa - it's more than ID-s and interrupt masks.
Quoted 5 lines
Seems like it. And the idea behind this game is that we'd like to slowly get rid of old
request_fnbased drivers. Given that hpsa supports very similar hardware cciss is a target for removal once that hardware is switched over. But it seems like we'll need more work in this area..
I'll give it a shot.
I seem to have an oldish cciss board floating about; let's see how far I get with those.
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke Teamlead Storage & Networking [email protected] +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)
Quoted 36 lines · Meelis Roos
Quoted 2 lines
Add support for legacy boards, ensuring to enable the driver for those boards only when '
hpsa_allow_any' is set.Applied this patch, made sure I had compiled in hpsa and not cciss to avoid any variables from initramfs, and still I get this:
[ 4.015080] hpsa 0000:00:04.0: unrecognized board ID: 0x40800e11, ignoring. [ 4.098473] hpsa 0000:00:04.0: Board ID not foundBoot command line was "root=/dev/sda1 console=ttyS0,9600 ro hpsa_allow_any=1" - seems correct.
By looking at the code, I should see "unsupported board ID:" and it should work, but I see "unrecognized board ID:" and it does not work.
Hmm, trying hpsa.hpsa_allow_any=1. Much better:
[ 3.891531] hpsa 0000:00:04.0: unsupported board ID: 0x40800e11 [ 3.962367] hpsa 0000:00:04.0: unsupported board ID: 0x40800e11 [ 4.033493] hpsa 0000:00:04.0: Controller reports max supported commands of 0 Using 16 instead. Ensure that firmware is up to date. [ 4.175134] hpsa 0000:00:04.0: Physical aborts not supported [ 4.242931] hpsa 0000:00:04.0: Logical aborts not supported [ 4.309594] hpsa 0000:00:04.0: HP SSD Smart Path aborts not supported [ 4.460889] hpsa 0000:00:04.0: Controller reports max supported commands of 0 Using 16 instead. Ensure that firmware is up to date. [ 4.584679] scsi host0: hpsa [ 4.587842] hpsa 0000:00:04.0: report luns requested format 2, got 0 [ 4.613215] hpsa 0000:00:04.0: scsi 0:0:0:0: masked Direct-Access COMPAQ BD03685A24 PHYS DRV SSDSmartPathCap- En- Exp=0 [ 4.613219] hpsa 0000:00:04.0: C0:B1:T0:L0 Volume status is not available through vital product data pages. [ 4.613224] hpsa 0000:00:04.0: scsi 0:1:0:0: offline Direct-Access COMPAQ LOGICAL VOLUME RAID-1(+0) SSDSmartPathCap- En- Exp=1 [ 4.613229] hpsa 0000:00:04.0: scsi 0:3:0:0: added RAID COMPAQ Smart Array 5i controller SSDSmartPathCap- En- Exp=1 [ 6.187725] scsi 0:3:0:0: RAID COMPAQ Smart Array 5i 2.62 PQ: 0 ANSI: 0 [...] [ 6.726872] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6 [ 6.814364] Please append a correct "root=" boot option; here are the available partitions: [ 6.914403] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Quoted 5 lines
Controller is detected, there is something behind it but no sda is detected and no bootup.
What next?
As Don indicated, older controller probably don't support volume state information. But that shouldn't distract us. Will be sending a patch.
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke Teamlead Storage & Networking [email protected] +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)