linux-megacli and linsysfs

Andrey Ignatov andr.pl at gmail.com
Fri Aug 22 10:50:20 UTC 2008


Hi;

Workaround is found.

The linsysfs create directories /compat/linux/sys/class/scsi_host/host*
for each device of class PCIC_STORAGE by default.

I has changed this behaviour and resolved my problem by this patch:

--8<--------------------------------------------------------------------
--- src/sys/compat/linsysfs/linsysfs.c.orig	2007-03-12 15:16:52.000000000 +0300
+++ src/sys/compat/linsysfs/linsysfs.c	2008-08-21 13:59:06.000000000 +0400
@@ -177,7 +177,7 @@
 				dir = pfs_create_dir(dir, device,
 				    NULL, NULL, NULL, 0);
 
-				if (dinfo->cfg.baseclass == PCIC_STORAGE) {
+				if (dinfo->cfg.baseclass == PCIC_STORAGE && dinfo->cfg.subclass == PCIS_STORAGE_RAID) {
 					/* DJA only make this if needed */
 					sprintf(host, "host%d", host_number++);
 					strcat(new_path, "/");
-->8--------------------------------------------------------------------


With this patch linsysfs created directories
/compat/linux/sys/class/scsi_host/host* for RAID controllers only and
not created for SCSI controllers like mpt. The RAID controller mfi0
detected so as /compat/linux/sys/class/scsi_host/host0 in linsysfs and
linux-megacli works correctly.

The topic is closed. Thanks.

P.S.

FreeBSD 7.0-STABLE amd64
linux-megacli-1.01.40_1
PERC 5/E, PERC 6/E
Dell PowerVault MD1000


-- 
Andrey Ignatov


More information about the freebsd-emulation mailing list