Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success - DL380G5 & P400 - Debian 11 (Kernel 5.10) #26

Open
KiralyCraft opened this issue Mar 15, 2022 · 2 comments
Open

Success - DL380G5 & P400 - Debian 11 (Kernel 5.10) #26

KiralyCraft opened this issue Mar 15, 2022 · 2 comments

Comments

@KiralyCraft
Copy link

KiralyCraft commented Mar 15, 2022

First and foremost let me thank you for this amazing piece of software. I have a HP DL380 G5 with a P400 running firmware 7.24.

Call me crazy, but I'm doing the tests via iLO of all things. I've used the DKMS installation for the driver, applied the kernel arguments as specified and rebooted. Much to my surprise, it says it's supported! So I bit the bullet, turned on HBA mode. Amazingly, doing a ls afterwards showed Input/Output error! I could not believe it.

Rebooted via iLO and I do indeed see the message that "Raid is disabled from NVRAM ..."

I could not resist reporting, so here we are. I nuked my system but it was a kamikaze install, so no losses there.

I'll be back with more info once I installed a pre-patched system on the drives. Stay tuned!

EDIT: Controller details

VENDOR_ID='HP'
PRODUCT_ID='P400'
BOARD_ID='0x3234103c'
SOFTWARE_NAME=''
HARDWARE_NAME=''
RUNNING_FIRM_REV='7.24'
ROM_FIRM_REV='7.24'
REC_ROM_INACTIVE_REV='7.24'
YET_MORE_CONTROLLER_FLAGS='0x5a51a206'
NVRAM_FLAGS='0x00'
HBA_MODE_SUPPORTED=1
HBA_MODE_ENABLED=0
@KiralyCraft
Copy link
Author

Well, good news:

[root@sysrescue ~/hpsahba/contrib/dkms]# modprobe hpsa hpsa_use_nvram_hba_flag=1
[root@sysrescue ~/hpsahba/contrib/dkms]# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 631.9M  1 loop /run/archiso/sfs/airootfs
sda      8:0    0 931.5G  0 disk 
sdb      8:16   0 931.5G  0 disk 
sdc      8:32   0 931.5G  0 disk 
sdd      8:48   0 279.4G  0 disk 
├─sdd1   8:49   0 278.4G  0 part 
├─sdd2   8:50   0     1K  0 part 
└─sdd5   8:53   0   976M  0 part 
sde      8:64   0 279.4G  0 disk 
├─sde1   8:65   0 278.4G  0 part 
├─sde2   8:66   0     1K  0 part 
└─sde5   8:69   0   976M  0 part 
sdf      8:80   0 931.5G  0 disk 
sdg      8:96   0 931.5G  0 disk 
sdh      8:112  0 931.5G  0 disk 
sr0     11:0    1   703M  0 rom  /run/archiso/bootmnt

I ran this on Systemrescue 9.0 running kernel 5.15.22, I had to patch hpsa.c from dkms, patch coming soon

@KiralyCraft
Copy link
Author

KiralyCraft commented Mar 15, 2022

The patching dkms script assumes kernel 5.8 if none specified. So the patch below should be applied on top of the 5.8 kernel patch, although I have not checked the newer ones to see if they would work without modifications.

--- hpsa.c	2022-03-15 22:05:12.046873522 +0200
+++ hpsa_new.c	2022-03-15 21:50:31.490115346 +0200
@@ -79,7 +79,7 @@
 MODULE_AUTHOR("Hewlett-Packard Company");
 MODULE_DESCRIPTION("Driver for HP Smart Array Controller version " \
 	HPSA_DRIVER_VERSION);
-MODULE_SUPPORTED_DEVICE("HP Smart Array Controllers");
+//MODULE_SUPPORTED_DEVICE("HP Smart Array Controllers");
 MODULE_VERSION(HPSA_DRIVER_VERSION);
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("cciss");
@@ -5774,7 +5774,7 @@
 	/* Get the ptr to our adapter structure out of cmd->host. */
 	h = sdev_to_hba(cmd->device);
 
-	BUG_ON(cmd->request->tag < 0);
+	BUG_ON(scsi_cmd_to_rq(cmd)->tag < 0);
 
 	dev = cmd->device->hostdata;
 	if (!dev) {
@@ -5813,7 +5813,7 @@
 	 * Retries always go down the normal I/O path.
 	 */
 	if (likely(cmd->retries == 0 &&
-			!blk_rq_is_passthrough(cmd->request) &&
+			!blk_rq_is_passthrough(scsi_cmd_to_rq(cmd)) &&
 			h->acciopath_status)) {
 		rc = hpsa_ioaccel_submit(h, c, cmd);
 		if (rc == 0)
@@ -5977,7 +5977,7 @@
  */
 static int hpsa_get_cmd_index(struct scsi_cmnd *scmd)
 {
-	int idx = scmd->request->tag;
+	int idx = scsi_cmd_to_rq(scmd)->tag;
 
 	if (idx < 0)
 		return idx;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant