50 #include <dev/aic7xxx/aic7xxx_osm.h>
51 #include <dev/aic7xxx/aic7xxx_inline.h>
52 #include <dev/aic7xxx/aic7xxx_93cx6.h>
70 #define AHC_PCI_IOADDR PCIR_MAPS
71 #define AHC_PCI_MEMADDR (PCIR_MAPS + 4)
73 #define DEVID_9005_TYPE(id) ((id) & 0xF)
74 #define DEVID_9005_TYPE_HBA 0x0
75 #define DEVID_9005_TYPE_AAA 0x3
76 #define DEVID_9005_TYPE_SISL 0x5
77 #define DEVID_9005_TYPE_MB 0xF
79 #define DEVID_9005_MAXRATE(id) (((id) & 0x30) >> 4)
80 #define DEVID_9005_MAXRATE_U160 0x0
81 #define DEVID_9005_MAXRATE_ULTRA2 0x1
82 #define DEVID_9005_MAXRATE_ULTRA 0x2
83 #define DEVID_9005_MAXRATE_FAST 0x3
85 #define DEVID_9005_MFUNC(id) (((id) & 0x40) >> 6)
87 #define DEVID_9005_CLASS(id) (((id) & 0xFF00) >> 8)
88 #define DEVID_9005_CLASS_SPI 0x0
90 #define SUBID_9005_TYPE(id) ((id) & 0xF)
91 #define SUBID_9005_TYPE_MB 0xF
92 #define SUBID_9005_TYPE_CARD 0x0
93 #define SUBID_9005_TYPE_LCCARD 0x1
94 #define SUBID_9005_TYPE_RAID 0x3
96 #define SUBID_9005_TYPE_KNOWN(id) \
97 ((((id) & 0xF) == SUBID_9005_TYPE_MB) \
98 || (((id) & 0xF) == SUBID_9005_TYPE_CARD) \
99 || (((id) & 0xF) == SUBID_9005_TYPE_LCCARD) \
100 || (((id) & 0xF) == SUBID_9005_TYPE_RAID))
102 #define SUBID_9005_MAXRATE(id) (((id) & 0x30) >> 4)
103 #define SUBID_9005_MAXRATE_ULTRA2 0x0
104 #define SUBID_9005_MAXRATE_ULTRA 0x1
105 #define SUBID_9005_MAXRATE_U160 0x2
106 #define SUBID_9005_MAXRATE_RESERVED 0x3
108 #define SUBID_9005_SEEPTYPE(id) \
109 ((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
110 ? ((id) & 0xC0) >> 6 \
111 : ((id) & 0x300) >> 8)
112 #define SUBID_9005_SEEPTYPE_NONE 0x0
113 #define SUBID_9005_SEEPTYPE_1K 0x1
114 #define SUBID_9005_SEEPTYPE_2K_4K 0x2
115 #define SUBID_9005_SEEPTYPE_RESERVED 0x3
116 #define SUBID_9005_AUTOTERM(id) \
117 ((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
118 ? (((id) & 0x400) >> 10) == 0 \
119 : (((id) & 0x40) >> 6) == 0)
121 #define SUBID_9005_NUMCHAN(id) \
122 ((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
123 ? ((id) & 0x300) >> 8 \
124 : ((id) & 0xC00) >> 10)
126 #define SUBID_9005_LEGACYCONN(id) \
127 ((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
129 : ((id) & 0x80) >> 7)
131 #define SUBID_9005_MFUNCENB(id) \
132 ((SUBID_9005_TYPE(id) == SUBID_9005_TYPE_MB) \
133 ? ((id) & 0x800) >> 11 \
134 : ((id) & 0x1000) >> 12)
139 #define SUBID_9005_CARD_SCSIWIDTH_MASK 0x2000
140 #define SUBID_9005_CARD_PCIWIDTH_MASK 0x4000
141 #define SUBID_9005_CARD_SEDIFF_MASK 0x8000
176 "Adaptec 2902/04/10/15/20C/30C SCSI adapter",
183 "Adaptec 2930CU SCSI adapter",
189 "Adaptec 1480A Ultra SCSI adapter",
195 "Adaptec 2940A Ultra SCSI adapter",
201 "Adaptec 2940A/CN Ultra SCSI adapter",
207 "Adaptec 2930C Ultra SCSI adapter (VAR)",
214 "Adaptec 2940 SCSI adapter",
220 "Adaptec 3940 SCSI adapter",
226 "Adaptec 398X SCSI RAID adapter",
232 "Adaptec 2944 SCSI adapter",
238 "Adaptec 3944 SCSI adapter",
244 "Adaptec 4944 SCSI adapter",
251 "Adaptec 2940 Ultra SCSI adapter",
257 "Adaptec 3940 Ultra SCSI adapter",
263 "Adaptec 2944 Ultra SCSI adapter",
269 "Adaptec 3944 Ultra SCSI adapter",
275 "Adaptec 398X Ultra SCSI RAID adapter",
285 "Adaptec 4944 Ultra SCSI adapter",
291 "Adaptec 2930 Ultra SCSI adapter",
297 "Adaptec 2940 Pro Ultra SCSI adapter",
303 "Adaptec 2940/CN Ultra SCSI adapter",
317 "Adaptec 2930 Ultra2 SCSI adapter",
323 "Adaptec 2940B Ultra2 SCSI adapter",
329 "Adaptec 2940 Ultra2 SCSI adapter (OEM)",
335 "Adaptec 2940 Ultra2 SCSI adapter",
341 "Adaptec 2950 Ultra2 SCSI adapter",
347 "Adaptec aic7890/91 Ultra2 SCSI adapter (ARO)",
353 "Adaptec AAA-131 Ultra2 RAID adapter",
360 "Adaptec 29160 Ultra160 SCSI adapter",
366 "Adaptec (Compaq OEM) 29160 Ultra160 SCSI adapter",
372 "Adaptec 29160N Ultra160 SCSI adapter",
378 "Adaptec 29160C Ultra160 SCSI adapter",
384 "Adaptec 29160B Ultra160 SCSI adapter",
390 "Adaptec 19160B Ultra160 SCSI adapter",
396 "Adaptec aic7892 Ultra160 SCSI adapter (ARO)",
402 "Adaptec 2915/30LP Ultra160 SCSI adapter",
409 "Adaptec 2940/DUAL Ultra SCSI adapter",
415 "Adaptec 3940A Ultra SCSI adapter",
421 "Adaptec 3944A Ultra SCSI adapter",
427 "Adaptec aic7895 Ultra SCSI adapter (ARO)",
434 "Adaptec 3950B Ultra2 SCSI adapter",
440 "Adaptec 3950B Ultra2 SCSI adapter",
446 "Adaptec 3950D Ultra2 SCSI adapter",
452 "Adaptec 3950D Ultra2 SCSI adapter",
458 "Adaptec aic7896/97 Ultra2 SCSI adapter (ARO)",
465 "Adaptec 3960D Ultra160 SCSI adapter",
471 "Adaptec (Compaq OEM) 3960D Ultra160 SCSI adapter",
477 "Adaptec aic7899 Ultra160 SCSI adapter (ARO)",
484 "Adaptec aic7850 SCSI adapter",
490 "Adaptec aic7855 SCSI adapter",
496 "Adaptec aic7859 SCSI adapter",
502 "Adaptec aic7860 Ultra SCSI adapter",
508 "Adaptec aic7870 SCSI adapter",
514 "Adaptec aic7880 Ultra SCSI adapter",
520 "Adaptec aic7890/91 Ultra2 SCSI adapter",
526 "Adaptec aic7892 Ultra160 SCSI adapter",
532 "Adaptec aic7895 Ultra SCSI adapter",
538 "Adaptec aic7896/97 Ultra2 SCSI adapter",
544 "Adaptec aic7899 Ultra160 SCSI adapter",
550 "Adaptec aic7810 RAID memory controller",
556 "Adaptec aic7815 RAID memory controller",
563 #define AHC_394X_SLOT_CHANNEL_A 4
564 #define AHC_394X_SLOT_CHANNEL_B 5
566 #define AHC_398X_SLOT_CHANNEL_A 4
567 #define AHC_398X_SLOT_CHANNEL_B 8
568 #define AHC_398X_SLOT_CHANNEL_C 12
570 #define AHC_494X_SLOT_CHANNEL_A 4
571 #define AHC_494X_SLOT_CHANNEL_B 5
572 #define AHC_494X_SLOT_CHANNEL_C 6
573 #define AHC_494X_SLOT_CHANNEL_D 7
575 #define DEVCONFIG 0x40
576 #define PCIERRGENDIS 0x80000000ul
577 #define SCBSIZE32 0x00010000ul
578 #define REXTVALID 0x00001000ul
579 #define MPORTMODE 0x00000400ul
580 #define RAMPSM 0x00000200ul
581 #define VOLSENSE 0x00000100ul
582 #define PCI64BIT 0x00000080ul
583 #define SCBRAMSEL 0x00000080ul
584 #define MRDCEN 0x00000040ul
585 #define EXTSCBTIME 0x00000020ul
586 #define EXTSCBPEN 0x00000010ul
587 #define BERREN 0x00000008ul
588 #define DACEN 0x00000004ul
589 #define STPWLEVEL 0x00000002ul
590 #define DIFACTNEGEN 0x00000001ul
592 #define CSIZE_LATTIME 0x0c
593 #define CACHESIZE 0x0000003ful
594 #define LATTIME 0x0000ff00ul
606 static int ahc_ext_scbram_present(
struct ahc_softc *ahc);
608 int pcheck,
int fast,
int large);
609 static void ahc_probe_ext_scbram(
struct ahc_softc *ahc);
610 static void check_extport(
struct ahc_softc *ahc,
u_int *sxfrctl1);
611 static void ahc_parse_pci_eeprom(
struct ahc_softc *ahc,
613 static void configure_termination(
struct ahc_softc *ahc,
615 u_int adapter_control,
618 static void ahc_new_term_detect(
struct ahc_softc *ahc,
623 int *eeprom_present);
624 static void aic787X_cable_detect(
struct ahc_softc *ahc,
int *internal50_present,
625 int *internal68_present,
626 int *externalcable_present,
627 int *eeprom_present);
628 static void aic785X_cable_detect(
struct ahc_softc *ahc,
int *internal50_present,
629 int *externalcable_present,
630 int *eeprom_present);
633 static void ahc_pci_intr(
struct ahc_softc *ahc);
634 static int ahc_pci_chip_init(
struct ahc_softc *ahc);
645 && subvendor == 0x9005
646 && subdevice != device
685 full_id = ahc_compose_id(device, vendor, subdevice, subvendor);
694 if (ahc_get_pci_function(pci) > 0
695 && ahc_9005_subdevinfo_valid(vendor, device, subvendor, subdevice)
699 for (i = 0; i < ahc_num_pci_devs; i++) {
700 entry = &ahc_pci_ident_table[
i];
724 error = entry->
setup(ahc);
755 printk(
"%s: Enabling 39Bit Addressing\n",
876 check_extport(ahc, &sxfrctl1);
899 printk(
"%s: Using left over BIOS settings\n",
921 ahc_probe_ext_scbram(ahc);
927 if ((sxfrctl1 &
STPWEN) != 0)
976 ahc_ext_scbram_present(
struct ahc_softc *ahc)
986 single_user = (devconfig &
MPORTMODE) != 0;
999 ramps = (devconfig &
RAMPSM) != 0;
1003 if (ramps && single_user)
1013 int fast,
int large)
1070 ahc_probe_ext_scbram(
struct ahc_softc *ahc)
1085 if (ahc_ext_scbram_present(ahc) == 0)
1091 ahc_scbram_config(ahc,
TRUE, pcheck, fast, large);
1093 if (num_scbs == 0) {
1109 ahc_scbram_config(ahc, enable,
TRUE, fast, large);
1120 ahc_scbram_config(ahc, enable, pcheck,
TRUE, large);
1122 if (test_num_scbs == num_scbs
1132 ahc_scbram_config(ahc, enable, pcheck, fast,
TRUE);
1134 if (test_num_scbs >= num_scbs) {
1136 num_scbs = test_num_scbs;
1137 if (num_scbs >= 64) {
1158 printk(
"%s: External SRAM, %s access%s, %dbytes/SCB\n",
1159 ahc_name(ahc), fast ?
"fast" :
"slow",
1160 pcheck ?
", parity checking enabled" :
"",
1163 ahc_scbram_config(ahc, enable, pcheck, fast, large);
1201 if ((hcntrl &
CHIPRST) != 0) {
1238 if ((status1 &
STA) != 0)
1295 printk(
"%s: Reading SEEPROM...", ahc_name(ahc));
1300 start_addr = 32 * (ahc->
channel -
'A');
1309 if (have_seeprom != 0 ||
sd.sd_chip ==
C56_66) {
1311 if (have_seeprom == 0)
1312 printk (
"checksum error\n");
1327 if (!have_seeprom) {
1344 for (i = 0; i < 32; i++, sc_data++) {
1363 if (!have_seeprom) {
1365 printk(
"%s: No SEEPROM available.\n", ahc_name(ahc));
1371 ahc_parse_pci_eeprom(ahc, sc);
1380 have_autoterm = have_seeprom;
1389 have_autoterm =
FALSE;
1392 if (have_autoterm) {
1397 }
else if (have_seeprom) {
1402 printk(
"%s: Low byte termination %sabled\n",
1404 (*sxfrctl1 &
STPWEN) ?
"en" :
"dis");
1428 for (i = 0; i < max_targ; i++) {
1436 for (i = 0; i < max_targ; i++) {
1440 target_mask = 0x01 <<
i;
1442 discenable |= target_mask;
1445 ultraenb |= target_mask;
1447 ultraenb |= target_mask;
1450 && (ultraenb & target_mask) != 0) {
1453 ultraenb &= ~target_mask;
1470 | ((ultraenb & target_mask) ? 0x8 : 0x0);
1484 scsi_conf = (ahc->
our_id & 0x7);
1527 configure_termination(
struct ahc_softc *ahc,
1550 int internal50_present;
1551 int internal68_present;
1552 int externalcable_present;
1565 ahc_new_term_detect(ahc, &enableSEC_low,
1572 printk(
"%s: Manual SE Termination\n",
1578 if ((adapter_control & CFAUTOTERM) == 0) {
1580 printk(
"%s: Manual LVD Termination\n",
1582 enablePRI_low = (adapter_control &
CFSTERM);
1583 enablePRI_high = (adapter_control &
CFWSTERM);
1586 internal50_present = 0;
1587 internal68_present = 1;
1588 externalcable_present = 1;
1590 aic785X_cable_detect(ahc, &internal50_present,
1591 &externalcable_present,
1594 internal68_present = 0;
1596 aic787X_cable_detect(ahc, &internal50_present,
1597 &internal68_present,
1598 &externalcable_present,
1603 internal68_present = 0;
1607 printk(
"%s: internal 50 cable %s present",
1609 internal50_present ?
"is":
"not");
1612 printk(
", internal 68 cable %s present",
1613 internal68_present ?
"is":
"not");
1614 printk(
"\n%s: external cable %s present\n",
1616 externalcable_present ?
"is":
"not");
1619 printk(
"%s: BIOS eeprom %s present\n",
1620 ahc_name(ahc), eeprom_present ?
"is" :
"not");
1630 internal50_present = 0;
1642 && (internal50_present != 0)
1643 && (internal68_present != 0)
1644 && (externalcable_present != 0)) {
1645 printk(
"%s: Illegal cable configuration!!. "
1646 "Only two connectors on the "
1647 "adapter may be used at a "
1648 "time!\n", ahc_name(ahc));
1655 internal50_present = 0;
1656 internal68_present = 0;
1657 externalcable_present = 0;
1661 && ((externalcable_present == 0)
1662 || (internal68_present == 0)
1663 || (enableSEC_high != 0))) {
1667 printk(
"%s: 68 pin termination "
1668 "Enabled\n", ahc_name(ahc));
1670 printk(
"%s: %sHigh byte termination "
1671 "Enabled\n", ahc_name(ahc),
1672 enableSEC_high ?
"Secondary "
1677 sum = internal50_present + internal68_present
1678 + externalcable_present;
1679 if (sum < 2 || (enableSEC_low != 0)) {
1686 printk(
"%s: 50 pin termination "
1687 "Enabled\n", ahc_name(ahc));
1689 printk(
"%s: %sLow byte termination "
1690 "Enabled\n", ahc_name(ahc),
1691 enableSEC_low ?
"Secondary "
1696 if (enablePRI_low != 0) {
1699 printk(
"%s: Primary Low Byte termination "
1700 "Enabled\n", ahc_name(ahc));
1709 if (enablePRI_high != 0) {
1712 printk(
"%s: Primary High Byte "
1713 "termination Enabled\n",
1717 write_brdctl(ahc, brddat);
1720 if ((adapter_control &
CFSTERM) != 0) {
1724 printk(
"%s: %sLow byte termination Enabled\n",
1730 if ((adapter_control &
CFWSTERM) != 0
1734 printk(
"%s: %sHigh byte termination Enabled\n",
1737 ?
"Secondary " :
"");
1747 write_brdctl(ahc, brddat);
1753 ahc_new_term_detect(
struct ahc_softc *ahc,
int *enableSEC_low,
1754 int *enableSEC_high,
int *enablePRI_low,
1755 int *enablePRI_high,
int *eeprom_present)
1766 brdctl = read_brdctl(ahc);
1767 *eeprom_present = brdctl &
BRDDAT7;
1768 *enableSEC_high = (brdctl &
BRDDAT6);
1769 *enableSEC_low = (brdctl &
BRDDAT5);
1770 *enablePRI_high = (brdctl &
BRDDAT4);
1771 *enablePRI_low = (brdctl &
BRDDAT3);
1775 aic787X_cable_detect(
struct ahc_softc *ahc,
int *internal50_present,
1776 int *internal68_present,
int *externalcable_present,
1777 int *eeprom_present)
1788 write_brdctl(ahc, 0);
1795 brdctl = read_brdctl(ahc);
1796 *internal50_present = (brdctl &
BRDDAT6) ? 0 : 1;
1797 *internal68_present = (brdctl &
BRDDAT7) ? 0 : 1;
1810 brdctl = read_brdctl(ahc);
1811 *externalcable_present = (brdctl &
BRDDAT6) ? 0 : 1;
1812 *eeprom_present = (brdctl &
BRDDAT7) ? 1 : 0;
1816 aic785X_cable_detect(
struct ahc_softc *ahc,
int *internal50_present,
1817 int *externalcable_present,
int *eeprom_present)
1824 spiocap |= EXT_BRDCTL;
1827 ahc_flush_device_writes(ahc);
1830 ahc_flush_device_writes(ahc);
1833 *internal50_present = (brdctl &
BRDDAT5) ? 0 : 1;
1834 *externalcable_present = (brdctl &
BRDDAT6) ? 0 : 1;
1888 ahc_flush_device_writes(ahc);
1891 ahc_flush_device_writes(ahc);
1897 ahc_flush_device_writes(ahc);
1921 ahc_flush_device_writes(ahc);
1940 printk(
"%s: PCI error Interrupt at seqaddr = 0x%x\n",
1944 if (status1 &
DPE) {
1946 printk(
"%s: Data Parity Error Detected during address "
1947 "or write data phase\n", ahc_name(ahc));
1949 if (status1 &
SSE) {
1950 printk(
"%s: Signal System Error Detected\n", ahc_name(ahc));
1952 if (status1 &
RMA) {
1953 printk(
"%s: Received a Master Abort\n", ahc_name(ahc));
1955 if (status1 &
RTA) {
1956 printk(
"%s: Received a Target Abort\n", ahc_name(ahc));
1958 if (status1 &
STA) {
1959 printk(
"%s: Signaled a Target Abort\n", ahc_name(ahc));
1961 if (status1 &
DPR) {
1962 printk(
"%s: Data Parity Error has been reported via PERR#\n",
1970 if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) {
1971 printk(
"%s: Latched PCIERR interrupt with "
1972 "no status bits set\n", ahc_name(ahc));
1979 "%s: WARNING WARNING WARNING WARNING\n"
1980 "%s: Too many PCI parity errors observed as a target.\n"
1981 "%s: Some device on this bus is generating bad parity.\n"
1982 "%s: This is an error *observed by*, not *generated by*, this controller.\n"
1983 "%s: PCI parity error checking has been disabled.\n"
1984 "%s: WARNING WARNING WARNING WARNING\n",
1985 ahc_name(ahc), ahc_name(ahc), ahc_name(ahc),
1986 ahc_name(ahc), ahc_name(ahc), ahc_name(ahc));
1994 ahc_pci_chip_init(
struct ahc_softc *ahc)
2044 configure_termination(ahc, &sd,
2053 ahc_aic785X_setup(
struct ahc_softc *ahc)
2071 ahc_aic7860_setup(
struct ahc_softc *ahc)
2089 ahc_apa1480_setup(
struct ahc_softc *ahc)
2093 error = ahc_aic7860_setup(ahc);
2101 ahc_aic7870_setup(
struct ahc_softc *ahc)
2113 ahc_aic7870h_setup(
struct ahc_softc *ahc)
2115 int error = ahc_aic7870_setup(ahc);
2123 ahc_aha394X_setup(
struct ahc_softc *ahc)
2127 error = ahc_aic7870_setup(ahc);
2129 error = ahc_aha394XX_setup(ahc);
2134 ahc_aha394Xh_setup(
struct ahc_softc *ahc)
2136 int error = ahc_aha394X_setup(ahc);
2144 ahc_aha398X_setup(
struct ahc_softc *ahc)
2148 error = ahc_aic7870_setup(ahc);
2150 error = ahc_aha398XX_setup(ahc);
2155 ahc_aha494X_setup(
struct ahc_softc *ahc)
2159 error = ahc_aic7870_setup(ahc);
2161 error = ahc_aha494XX_setup(ahc);
2166 ahc_aha494Xh_setup(
struct ahc_softc *ahc)
2168 int error = ahc_aha494X_setup(ahc);
2176 ahc_aic7880_setup(
struct ahc_softc *ahc)
2197 ahc_aic7880h_setup(
struct ahc_softc *ahc)
2199 int error = ahc_aic7880_setup(ahc);
2208 ahc_aha2940Pro_setup(
struct ahc_softc *ahc)
2212 return (ahc_aic7880_setup(ahc));
2216 ahc_aha394XU_setup(
struct ahc_softc *ahc)
2220 error = ahc_aic7880_setup(ahc);
2222 error = ahc_aha394XX_setup(ahc);
2227 ahc_aha394XUh_setup(
struct ahc_softc *ahc)
2229 int error = ahc_aha394XU_setup(ahc);
2237 ahc_aha398XU_setup(
struct ahc_softc *ahc)
2241 error = ahc_aic7880_setup(ahc);
2243 error = ahc_aha398XX_setup(ahc);
2248 ahc_aic7890_setup(
struct ahc_softc *ahc)
2266 ahc_aic7892_setup(
struct ahc_softc *ahc)
2279 ahc_aic7895_setup(
struct ahc_softc *ahc)
2285 ahc->
channel = ahc_get_pci_function(pci) == 1 ?
'B' :
'A';
2335 ahc_aic7895h_setup(
struct ahc_softc *ahc)
2337 int error = ahc_aic7895_setup(ahc);
2345 ahc_aic7896_setup(
struct ahc_softc *ahc)
2350 ahc->
channel = ahc_get_pci_function(pci) == 1 ?
'B' :
'A';
2360 ahc_aic7899_setup(
struct ahc_softc *ahc)
2365 ahc->
channel = ahc_get_pci_function(pci) == 1 ?
'B' :
'A';
2375 ahc_aha29160C_setup(
struct ahc_softc *ahc)
2379 error = ahc_aic7899_setup(ahc);
2389 printk(
"RAID functionality unsupported\n");
2394 ahc_aha394XX_setup(
struct ahc_softc *ahc)
2399 switch (ahc_get_pci_slot(pci)) {
2407 printk(
"adapter at unexpected slot %d\n"
2408 "unable to map to a channel\n",
2409 ahc_get_pci_slot(pci));
2416 ahc_aha398XX_setup(
struct ahc_softc *ahc)
2421 switch (ahc_get_pci_slot(pci)) {
2432 printk(
"adapter at unexpected slot %d\n"
2433 "unable to map to a channel\n",
2434 ahc_get_pci_slot(pci));
2443 ahc_aha494XX_setup(
struct ahc_softc *ahc)
2448 switch (ahc_get_pci_slot(pci)) {
2462 printk(
"adapter at unexpected slot %d\n"
2463 "unable to map to a channel\n",
2464 ahc_get_pci_slot(pci));