diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-01-09 14:49:41 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-01-09 14:49:41 +0000 |
commit | 6419a6b9a169da67c1bbca9478312363e49b9de6 (patch) | |
tree | f1a1bfc6c91c5f45e81b0134f1d887771aa929f3 /sys | |
parent | 0a3118c2475e3bd9524360c7422d43988fc761a1 (diff) | |
download | FreeBSD-src-6419a6b9a169da67c1bbca9478312363e49b9de6.zip FreeBSD-src-6419a6b9a169da67c1bbca9478312363e49b9de6.tar.gz |
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>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ida/ida_eisa.c | 21 | ||||
-rw-r--r-- | sys/dev/ida/ida_pci.c | 38 | ||||
-rw-r--r-- | sys/dev/ida/idavar.h | 1 |
3 files changed, 38 insertions, 22 deletions
diff --git a/sys/dev/ida/ida_eisa.c b/sys/dev/ida/ida_eisa.c index e76b599..7c54e13 100644 --- a/sys/dev/ida/ida_eisa.c +++ b/sys/dev/ida/ida_eisa.c @@ -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 }, - - { 0, "", 0 } + { 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 } }; 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); diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index 839fbbe..19930b3 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -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 }, - - { 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 }, - - { 0, "", 0 }, + { 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, 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 }, }; 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); diff --git a/sys/dev/ida/idavar.h b/sys/dev/ida/idavar.h index ff5202f..2540f30 100644 --- a/sys/dev/ida/idavar.h +++ b/sys/dev/ida/idavar.h @@ -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); |