1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Add a flag value to the board identifiers, and use this to enable the

firmware for selected revisions of the controller.

Spotted by:  Alexander Hausner <alex@hugo.bmg.gv.at>
This commit is contained in:
Jonathan Lemon 2001-01-09 14:49:41 +00:00
parent 2137646abe
commit 7c258c0ef8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70845
3 changed files with 35 additions and 19 deletions

View File

@ -174,13 +174,18 @@ static struct ida_access ida_v2_access = {
};
static struct ida_board board_id[] = {
{ 0x0e114001, "Compaq IDA controller", &ida_v1_access },
{ 0x0e114002, "Compaq IDA-2 controller", &ida_v1_access },
{ 0x0e114010, "Compaq IAES controller", &ida_v1_access },
{ 0x0e114020, "Compaq SMART array controller", &ida_v1_access },
{ 0x0e114030, "Compaq SMART-2/E array controller", &ida_v2_access },
{ 0x0e114001, "Compaq IDA controller",
&ida_v1_access, 0 },
{ 0x0e114002, "Compaq IDA-2 controller",
&ida_v1_access, 0 },
{ 0x0e114010, "Compaq IAES controller",
&ida_v1_access, 0 },
{ 0x0e114020, "Compaq SMART array controller",
&ida_v1_access, 0 },
{ 0x0e114030, "Compaq SMART-2/E array controller",
&ida_v2_access, 0 },
{ 0, "", 0 }
{ 0, "", 0, 0 }
};
static struct ida_board *ida_eisa_match(eisa_id_t);
@ -268,6 +273,7 @@ ida_eisa_attach(device_t dev)
board = ida_eisa_match(eisa_get_id(dev));
ida->cmd = *board->accessor;
ida->flags = board->flags;
ida->regs_res_type = SYS_RES_IOPORT;
ida->regs_res_id = 0;
@ -315,7 +321,6 @@ ida_eisa_attach(device_t dev)
return (ENOMEM);
}
ida->flags = 0;
error = ida_init(ida);
if (error) {
ida_free(ida);

View File

@ -140,19 +140,29 @@ static struct ida_access ida_v4_access = {
};
static struct ida_board board_id[] = {
{ 0x40300E11, "Compaq SMART-2/P array controller", &ida_v3_access },
{ 0x40310E11, "Compaq SMART-2SL array controller", &ida_v3_access },
{ 0x40320E11, "Compaq Smart Array 3200 controller", &ida_v3_access },
{ 0x40330E11, "Compaq Smart Array 3100ES controller", &ida_v3_access },
{ 0x40340E11, "Compaq Smart Array 221 controller", &ida_v3_access },
{ 0x40300E11, "Compaq SMART-2/P array controller",
&ida_v3_access, 0 },
{ 0x40310E11, "Compaq SMART-2SL array controller",
&ida_v3_access, 0 },
{ 0x40320E11, "Compaq Smart Array 3200 controller",
&ida_v3_access, 0 },
{ 0x40330E11, "Compaq Smart Array 3100ES controller",
&ida_v3_access, 0 },
{ 0x40340E11, "Compaq Smart Array 221 controller",
&ida_v3_access, 0 },
{ 0x40400E11, "Compaq Integrated Array controller", &ida_v4_access },
{ 0x40480E11, "Compaq RAID LC2 controller", &ida_v4_access },
{ 0x40500E11, "Compaq Smart Array 4200 controller", &ida_v4_access },
{ 0x40510E11, "Compaq Smart Array 4250ES controller", &ida_v4_access },
{ 0x40580E11, "Compaq Smart Array 431 controller", &ida_v4_access },
{ 0x40400E11, "Compaq Integrated Array controller",
&ida_v4_access, IDA_FIRMWARE },
{ 0x40480E11, "Compaq RAID LC2 controller",
&ida_v4_access, IDA_FIRMWARE },
{ 0x40500E11, "Compaq Smart Array 4200 controller",
&ida_v4_access, 0 },
{ 0x40510E11, "Compaq Smart Array 4250ES controller",
&ida_v4_access, 0 },
{ 0x40580E11, "Compaq Smart Array 431 controller",
&ida_v4_access, 0 },
{ 0, "", 0 },
{ 0, "", 0, 0 },
};
static int ida_pci_probe(device_t dev);
@ -229,6 +239,7 @@ ida_pci_attach(device_t dev)
ida = (struct ida_softc *)device_get_softc(dev);
ida->dev = dev;
ida->cmd = *board->accessor;
ida->flags = board->flags;
ida->regs_res_type = SYS_RES_MEMORY;
ida->regs_res_id = IDA_PCI_MEMADDR;
@ -270,7 +281,6 @@ ida_pci_attach(device_t dev)
return (ENOMEM);
}
ida->flags = 0;
error = ida_init(ida);
if (error) {
ida_free(ida);

View File

@ -184,6 +184,7 @@ struct ida_board {
u_int32_t board;
char *desc;
struct ida_access *accessor;
int flags;
};
extern int ida_detach(device_t dev);