Add PCI identification for another SmartArray 4200, which identifies

itself as a DEC card instead of Compaq.
This commit is contained in:
Jonathan Lemon 2000-05-04 20:23:56 +00:00
parent b4b03426ca
commit f3cddbbdeb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59999

View file

@ -53,6 +53,7 @@
#define IDA_PCI_MEMADDR (PCIR_MAPS + 4) /* Mem I/O Address */
#define IDA_DEVICEID_SMART 0xAE100E11
#define IDA_DEVICEID_DEC_SMART 0x00461011
static int
ida_v3_fifo_full(struct ida_softc *ida)
@ -148,6 +149,9 @@ static struct ida_board board_id[] = {
{ 0x4050, "Compaq Smart Array 4200 controller", &ida_v4_access },
{ 0x4051, "Compaq Smart Array 4250ES controller", &ida_v4_access },
{ IDA_DEVICEID_DEC_SMART,
"DEC/Compaq Smart Array 4200 controller", &ida_v4_access },
{ 0, "", 0 },
};
@ -186,14 +190,16 @@ ida_pci_match(u_int32_t id)
static int
ida_pci_probe(device_t dev)
{
struct ida_board *board;
struct ida_board *board = NULL;
u_int32_t id = pci_get_devid(dev);
if (pci_get_devid(dev) == IDA_DEVICEID_SMART) {
if (id == IDA_DEVICEID_SMART)
board = ida_pci_match(pci_get_subdevice(dev));
if (board != NULL) {
device_set_desc(dev, board->desc);
return (0);
}
if (id == IDA_DEVICEID_DEC_SMART)
board = ida_pci_match(id);
if (board != NULL) {
device_set_desc(dev, board->desc);
return (0);
}
return (ENXIO);
}
@ -220,6 +226,8 @@ ida_pci_attach(device_t dev)
ida->dev = dev;
board = ida_pci_match(pci_get_subdevice(dev));
if (board == NULL)
board = ida_pci_match(pci_get_devid(dev));
ida->cmd = *board->accessor;
ida->regs_res_type = SYS_RES_MEMORY;