aic79xx hostraid support
Subsystems (2)
PATCH 1/1 aic79xx hostraid support
Hi,
Below is a patch ported to 2.6.8 by John A. Hull ([email protected]) to add support for the aic79xx hostraid family support. Please consider.
Greetings,
Arjan van de Ven
drivers/scsi/aic7xxx/aic79xx.h +2 -1
@@ -375,7 +375,8 @@ typedef enum {AHD_RESET_POLL_ACTIVE =0x200000 ,AHD_UPDATE_PEND_CMDS =0x400000 ,AHD_RUNNING_QOUTFIFO =0x800000 , - AHD_HAD_FIRST_SEL = 0x1000000 +AHD_HAD_FIRST_SEL =0x1000000 , + AHD_HOSTRAID_BOARD = 0x2000000 } ahd_flag;/************************* Hardware SCB Definition ***************************/
drivers/scsi/aic7xxx/aic79xx_osm_pci.c +4 -0
@@ -64,6 +64,10 @@ static struct pci_device_id ahd_linux_pc 0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0 }, + { + 0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, + PCI_CLASS_STORAGE_RAID << 8, 0xFFFF00, 0 + }, { 0 } };
drivers/scsi/aic7xxx/aic79xx_pci.c +24 -20
105 lines not on this page · raw message
Quoted 4 lines · Arjan van de Ven
Hi,
Below is a patch ported to 2.6.8 by John A. Hull ([email protected]) to add support for the aic79xx hostraid family support. Please consider.
since AHD_HOSTRAID_BOARD wasn't actually used... a more minimal patch:
drivers/scsi/aic7xxx/aic79xx_osm_pci.c +4 -0
@@ -64,6 +64,10 @@ static struct pci_device_id ahd_linux_pc 0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0 }, + { + 0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, + PCI_CLASS_STORAGE_RAID << 8, 0xFFFF00, 0 + }, { 0 } };
drivers/scsi/aic7xxx/aic79xx_pci.c +15 -20
@@ -65,10 +65,10 @@ ahd_compose_id(u_int device, u_int vendo }#define ID_ALL_MASK 0xFFFFFFFFFFFFFFFFull -#define ID_ALL_IROC_MASK 0xFFFFFF7FFFFFFFFFull +#define ID_ALL_IROC_MASK 0xFF7FFFFFFFFFFFFFull#define ID_DEV_VENDOR_MASK 0xFFFFFFFF00000000ull#define ID_9005_GENERIC_MASK 0xFFF0FFFF00000000ull -#define ID_9005_GENERIC_IROC_MASK 0xFFF0FF7F00000000ull +#define ID_9005_GENERIC_IROC_MASK 0xFF70FFFF00000000ull#define ID_AIC7901 0x800F9005FFFF9005ull#define ID_AHA_29320A 0x8000900500609005ull
@@ -92,6 +92,8 @@ ahd_compose_id(u_int device, u_int vendo#define ID_AIC7902_PCI_REV_B0 0x10#define SUBID_HP 0x0E11 +#define DEVID_9005_HOSTRAID (id) ((id) & 0x80) +#define DEVID_9005_TYPE (id) ((id) & 0xF)#define DEVID_9005_TYPE_HBA 0x0/* Standard Card */ #define DEVID_9005_TYPE_HBA_2EXT 0x1/* 2 External Ports */
@@ -134,18 +136,18 @@ struct ahd_pci_identity ahd_pci_ident_ta"Adaptec 29320ALP Ultra320 SCSI adapter" , ahd_aic7901_setup }, -/* aic7901A based controllers */ +/* aic7902 based controllers */ {ID_AHA_29320 ,ID_ALL_MASK ,"Adaptec 29320 Ultra320 SCSI adapter" , - ahd_aic7901A_setup + ahd_aic7902_setup }, {ID_AHA_29320B ,ID_ALL_MASK ,"Adaptec 29320B Ultra320 SCSI adapter" , - ahd_aic7901A_setup + ahd_aic7902_setup }, { ID_AHA_29320LP,
@@ -153,7 +155,6 @@ struct ahd_pci_identity ahd_pci_ident_ta"Adaptec 29320LP Ultra320 SCSI adapter" , ahd_aic7901A_setup }, -/* aic7902 based controllers */ {ID_AHA_39320 , ID_ALL_MASK,
@@ -196,22 +197,10 @@ struct ahd_pci_identity ahd_pci_ident_ta"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter" , ahd_aic7902_setup }, - { -ID_AHA_29320 , -ID_ALL_MASK , -"Adaptec 29320 Ultra320 SCSI adapter" , - ahd_aic7902_setup - }, - { -ID_AHA_29320B , -ID_ALL_MASK , -"Adaptec 29320B Ultra320 SCSI adapter" , - ahd_aic7902_setup - },/* Generic chip probes for devices we don't know 'exactly' */ { -ID_AIC7901 &ID_DEV_VENDOR_MASK , -ID_DEV_VENDOR_MASK , +ID_AIC7901 &ID_9005_GENERIC_MASK , +ID_9005_GENERIC_MASK ,"Adaptec AIC7901 Ultra320 SCSI adapter" , ahd_aic7901_setup },
@@ -294,6 +283,12 @@ ahd_find_pci_device(ahd_dev_softc_t pci) subdevice, subvendor); +/* +* Controllers, mask out the IROC/HostRAID bit +*/ + + full_id &=ID_ALL_IROC_MASK ; +for (i =0 ; i < ahd_num_pci_devs; i++) { entry = &ahd_pci_ident_table[i];if (entry->full_id == (full_id & entry->id_mask)) {
Those patches are from the more recent versions of the AIC drivers, from Justin's website, verbatim but somehow reworked to compile for older versions of the drivers.
Please don't claim that you wrote it or as your own work.
I've been sent _several_ such patches privately for review. This seems to be a version of one.
Also, those patches do no allow one to disable probing for HostRAID drivers, which some users of Linux prefer.
Luben
Quoted 128 lines · Arjan van de Ven
Quoted 3 lines · Arjan van de Ven
Hi,
Below is a patch ported to 2.6.8 by John A. Hull ([email protected])
to add
Quoted 1 line
support for the aic79xx hostraid family support. Please consider.
since
AHD_HOSTRAID_BOARDwasn't actually used... a more minimal patch:diff -purN
linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_osm_pci.clinux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c---linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_osm_pci.c2004-08-14
07:36:33.000000000 +0200
+++linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c2004-08-21
15:27:18.902556250 +0200drivers/scsi/aic7xxx/aic79xx_osm_pci.c +4
-0@@ -64,6 +64,10 @@ static struct pci_device_id ahd_linux_pc 0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SCSI << 8, 0xFFFF00, 0 }, + { + 0x9005, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, + PCI_CLASS_STORAGE_RAID << 8, 0xFFFF00, 0 + }, { 0 } };diff -purN
linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_pci.clinux/drivers/scsi/aic7xxx/aic79xx_pci.c
---linux-2.6.8/drivers/scsi/aic7xxx/aic79xx_pci.c2004-08-14
07:36:57.000000000 +0200
+++linux/drivers/scsi/aic7xxx/aic79xx_pci.c2004-08-21
15:27:18.903556130 +0200drivers/scsi/aic7xxx/aic79xx_pci.c +4
-2@@ -65,10 +65,10 @@ ahd_compose_id(u_int device, u_int vendo }#define ID_ALL_MASK 0xFFFFFFFFFFFFFFFFull -#define ID_ALL_IROC_MASK 0xFFFFFF7FFFFFFFFFull +#define ID_ALL_IROC_MASK 0xFF7FFFFFFFFFFFFFull#define ID_DEV_VENDOR_MASK 0xFFFFFFFF00000000ull#define ID_9005_GENERIC_MASK 0xFFF0FFFF00000000ull -#define ID_9005_GENERIC_IROC_MASK 0xFFF0FF7F00000000ull +#define ID_9005_GENERIC_IROC_MASK 0xFF70FFFF00000000ull#define ID_AIC7901 0x800F9005FFFF9005ull#define ID_AHA_29320A 0x8000900500609005ull@@ -92,6 +92,8 @@ ahd_compose_id(u_int device, u_int vendo#define ID_AIC7902_PCI_REV_B0 0x10#define SUBID_HP 0x0E11 +#define DEVID_9005_HOSTRAID (id) ((id) & 0x80) +#define DEVID_9005_TYPE (id) ((id) & 0xF)#define DEVID_9005_TYPE_HBA 0x0/* Standard Card */
#defineDEVID_9005_TYPE_HBA_2EXT0x1/* 2
External Ports */drivers/scsi/aic7xxx/aic79xx_pci.c +11
-19@@ -134,18 +136,18 @@ struct ahd_pci_identity ahd_pci_ident_ta"Adaptec 29320ALP Ultra320 SCSI adapter" , ahd_aic7901_setup }, -/* aic7901A based controllers */ +/* aic7902 based controllers */ {ID_AHA_29320 ,ID_ALL_MASK ,"Adaptec 29320 Ultra320 SCSI adapter" , - ahd_aic7901A_setup + ahd_aic7902_setup }, {ID_AHA_29320B ,ID_ALL_MASK ,"Adaptec 29320B Ultra320 SCSI adapter" , - ahd_aic7901A_setup + ahd_aic7902_setup }, { ID_AHA_29320LP,@@ -153,7 +155,6 @@ struct ahd_pci_identity ahd_pci_ident_ta"Adaptec 29320LP Ultra320 SCSI adapter" , ahd_aic7901A_setup }, -/* aic7902 based controllers */ {ID_AHA_39320 , ID_ALL_MASK,@@ -196,22 +197,10 @@ struct ahd_pci_identity ahd_pci_ident_ta"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter" , ahd_aic7902_setup }, - { -ID_AHA_29320 , -ID_ALL_MASK , -"Adaptec 29320 Ultra320 SCSI adapter" , - ahd_aic7902_setup - }, - { -ID_AHA_29320B , -ID_ALL_MASK , -"Adaptec 29320B Ultra320 SCSI adapter" , - ahd_aic7902_setup - },/* Generic chip probes for devices we don't know 'exactly' */ { -ID_AIC7901 &ID_DEV_VENDOR_MASK , -ID_DEV_VENDOR_MASK , +ID_AIC7901 &ID_9005_GENERIC_MASK , +ID_9005_GENERIC_MASK ,"Adaptec AIC7901 Ultra320 SCSI adapter" , ahd_aic7901_setup },@@ -294,6 +283,12 @@ ahd_find_pci_device(ahd_dev_softc_t pci) subdevice, subvendor); +/* +* Controllers, mask out the IROC/HostRAID bit +*/ + + full_id &=ID_ALL_IROC_MASK ; +for (i =0 ; i < ahd_num_pci_devs; i++) { entry = &ahd_pci_ident_table[i];if (entry->full_id == (full_id & entry->id_mask)) { -To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Luben Tuikov
Those patches are from the more recent versions of the AIC drivers, from Justin's website, verbatim but somehow reworked to compile for older versions of the drivers.
Please don't claim that you wrote it or as your own work.
I do not and never have claimed it as my own work.
Do you agree that this patch is a useful addition for now, until you start sending similar small improvements to linux-scsi for the drivers?
(I for sure think it would be a bad thing if aic7xxx entirely halted pending that)
Quoted 6 lines · Arjan van de Ven
Quoted 4 lines · Luben Tuikov
Those patches are from the more recent versions of the AIC drivers, from Justin's website, verbatim but somehow reworked to compile for older versions of the drivers.
Quoted 7 lines
Quoted 1 line
Please don't claim that you wrote it or as your own work.
I do not and never have claimed it as my own work.
Do you agree that this patch is a useful addition for now, until you start sending similar small improvements to linux-scsi for the drivers?
Yes, sure, if it works for people _and_ they realize that it is:
a) temporary,
b) taken from the later version of the driver on Justin's website, and
c) it will be scrapped completely since the later versions which I'll be sending *contain and absolve* this or any other similar patches.
Quoted 2 lines
(I for sure think it would be a bad thing if aic7xxx entirely halted pending that)
Yes, I agree.
Luben
Quoted 12 lines · Luben Tuikov
Quoted 11 lines · Arjan van de Ven
Quoted 5 lines · Luben Tuikov
Those patches are from the more recent versions of the AIC drivers, from Justin's website, verbatim but somehow reworked to compile for older versions of the drivers.
Please don't claim that you wrote it or as your own work.
I do not and never have claimed it as my own work.
Quoted 8 lines
Quoted 2 lines
Do you agree that this patch is a useful addition for now, until you start sending similar small improvements to linux-scsi for the drivers?
Yes, sure, if it works for people _and_ they realize that it is:
a) temporary,
b) taken from the later version of the driver on Justin's website, and
c) it will be scrapped completely since the later versions which I'll be sending *contain and absolve* this or any other similar patches.
sure since I assume your later drop will also just support the hardware I dont see a user regression in this... I mean, when you replace the code the hardware keeps working, end user remains happy. Nobody is married to this patch; I just care about getting this new hardware working without having to go to a whopping gigantic patch immediately.
So it seems we are basically in agreement ;)
Thanks.
Quoted 1 line · Arjan van de Ven
So it seems we are basically in agreement ;)
OK, I'll put it in, then.
James