--- qlogic_cs.c.org Tue Oct 26 05:03:18 1999 +++ qlogic_cs.c Sun Nov 21 15:34:47 1999 @@ -1,3 +1,4 @@ +#undef QLOGIC_LEN32_ID_CHECK /*====================================================================== A driver for the Qlogic SCSI card @@ -239,6 +240,7 @@ #if (LINUX_VERSION_CODE >= VERSION(2,1,75)) struct Scsi_Host *host; #endif + u_short prod_id; handle = link->handle; info = link->priv; @@ -256,8 +258,10 @@ tuple.DesiredTuple = CISTPL_MANFID; if ((CardServices(GetFirstTuple, handle, &tuple) == CS_SUCCESS) && - (CardServices(GetTupleData, handle, &tuple) == CS_SUCCESS)) + (CardServices(GetTupleData, handle, &tuple) == CS_SUCCESS)){ info->manf_id = le16_to_cpu(tuple.TupleData[0]); + prod_id = le16_to_cpu(tuple_data[1]); + } /* Configure card */ #if (LINUX_VERSION_CODE >= VERSION(2,1,23)) @@ -274,6 +278,9 @@ CFG_CHECK(ParseTuple, handle, &tuple, &parse); link->conf.ConfigIndex = parse.cftable_entry.index; link->io.BasePort1 = parse.cftable_entry.io.win[0].base; +#if 1 + link->io.NumPorts1 = parse.cftable_entry.io.win[0].len; +#endif if (link->io.BasePort1 != 0) { i = CardServices(RequestIO, handle, &link->io); if (i == CS_SUCCESS) break; @@ -296,6 +303,17 @@ /* A bad hack... */ release_region(link->io.BasePort1, link->io.NumPorts1); +#if 1 + if (link->io.NumPorts1 == 32 +#ifdef QLOGIC_LEN32_ID_CHECK + && ((info->manf_id == 0x0032 && prod_id == 0x0604)/*KXLC004*/ || + (info->manf_id == 0x0032 && prod_id == 0x0504)/*KXLC003*/ + ) +#endif /* QLOGIC_LEN32_ID_CHECK */ + ){ + qlogic_preset(link->io.BasePort1 + 16, link->irq.AssignedIRQ); + } else +#endif qlogic_preset(link->io.BasePort1, link->irq.AssignedIRQ); scsi_register_module(MODULE_SCSI_HA, &driver_template);