#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include "aic7xxx_93cx6.h"
#include "aic7xxx_pci.h"
static inline uint64_t
ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
{ … }
#define AHC_PCI_IOADDR …
#define AHC_PCI_MEMADDR …
#define DEVID_9005_TYPE(id) …
#define DEVID_9005_TYPE_HBA …
#define DEVID_9005_TYPE_AAA …
#define DEVID_9005_TYPE_SISL …
#define DEVID_9005_TYPE_MB …
#define DEVID_9005_MAXRATE(id) …
#define DEVID_9005_MAXRATE_U160 …
#define DEVID_9005_MAXRATE_ULTRA2 …
#define DEVID_9005_MAXRATE_ULTRA …
#define DEVID_9005_MAXRATE_FAST …
#define DEVID_9005_MFUNC(id) …
#define DEVID_9005_CLASS(id) …
#define DEVID_9005_CLASS_SPI …
#define SUBID_9005_TYPE(id) …
#define SUBID_9005_TYPE_MB …
#define SUBID_9005_TYPE_CARD …
#define SUBID_9005_TYPE_LCCARD …
#define SUBID_9005_TYPE_RAID …
#define SUBID_9005_TYPE_KNOWN(id) …
#define SUBID_9005_MAXRATE(id) …
#define SUBID_9005_MAXRATE_ULTRA2 …
#define SUBID_9005_MAXRATE_ULTRA …
#define SUBID_9005_MAXRATE_U160 …
#define SUBID_9005_MAXRATE_RESERVED …
#define SUBID_9005_SEEPTYPE(id) …
#define SUBID_9005_SEEPTYPE_NONE …
#define SUBID_9005_SEEPTYPE_1K …
#define SUBID_9005_SEEPTYPE_2K_4K …
#define SUBID_9005_SEEPTYPE_RESERVED …
#define SUBID_9005_AUTOTERM(id) …
#define SUBID_9005_NUMCHAN(id) …
#define SUBID_9005_LEGACYCONN(id) …
#define SUBID_9005_MFUNCENB(id) …
#define SUBID_9005_CARD_SCSIWIDTH_MASK …
#define SUBID_9005_CARD_PCIWIDTH_MASK …
#define SUBID_9005_CARD_SEDIFF_MASK …
static ahc_device_setup_t ahc_aic785X_setup;
static ahc_device_setup_t ahc_aic7860_setup;
static ahc_device_setup_t ahc_apa1480_setup;
static ahc_device_setup_t ahc_aic7870_setup;
static ahc_device_setup_t ahc_aic7870h_setup;
static ahc_device_setup_t ahc_aha394X_setup;
static ahc_device_setup_t ahc_aha394Xh_setup;
static ahc_device_setup_t ahc_aha494X_setup;
static ahc_device_setup_t ahc_aha494Xh_setup;
static ahc_device_setup_t ahc_aha398X_setup;
static ahc_device_setup_t ahc_aic7880_setup;
static ahc_device_setup_t ahc_aic7880h_setup;
static ahc_device_setup_t ahc_aha2940Pro_setup;
static ahc_device_setup_t ahc_aha394XU_setup;
static ahc_device_setup_t ahc_aha394XUh_setup;
static ahc_device_setup_t ahc_aha398XU_setup;
static ahc_device_setup_t ahc_aic7890_setup;
static ahc_device_setup_t ahc_aic7892_setup;
static ahc_device_setup_t ahc_aic7895_setup;
static ahc_device_setup_t ahc_aic7895h_setup;
static ahc_device_setup_t ahc_aic7896_setup;
static ahc_device_setup_t ahc_aic7899_setup;
static ahc_device_setup_t ahc_aha29160C_setup;
static ahc_device_setup_t ahc_raid_setup;
static ahc_device_setup_t ahc_aha394XX_setup;
static ahc_device_setup_t ahc_aha494XX_setup;
static ahc_device_setup_t ahc_aha398XX_setup;
static const struct ahc_pci_identity ahc_pci_ident_table[] = …;
static const u_int ahc_num_pci_devs = …;
#define AHC_394X_SLOT_CHANNEL_A …
#define AHC_394X_SLOT_CHANNEL_B …
#define AHC_398X_SLOT_CHANNEL_A …
#define AHC_398X_SLOT_CHANNEL_B …
#define AHC_398X_SLOT_CHANNEL_C …
#define AHC_494X_SLOT_CHANNEL_A …
#define AHC_494X_SLOT_CHANNEL_B …
#define AHC_494X_SLOT_CHANNEL_C …
#define AHC_494X_SLOT_CHANNEL_D …
#define DEVCONFIG …
#define PCIERRGENDIS …
#define SCBSIZE32 …
#define REXTVALID …
#define MPORTMODE …
#define RAMPSM …
#define VOLSENSE …
#define PCI64BIT …
#define SCBRAMSEL …
#define MRDCEN …
#define EXTSCBTIME …
#define EXTSCBPEN …
#define BERREN …
#define DACEN …
#define STPWLEVEL …
#define DIFACTNEGEN …
#define CSIZE_LATTIME …
#define CACHESIZE …
#define LATTIME …
#define DPE …
#define SSE …
#define RMA …
#define RTA …
#define STA …
#define DPR …
static int ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor,
uint16_t subdevice, uint16_t subvendor);
static int ahc_ext_scbram_present(struct ahc_softc *ahc);
static void ahc_scbram_config(struct ahc_softc *ahc, int enable,
int pcheck, int fast, int large);
static void ahc_probe_ext_scbram(struct ahc_softc *ahc);
static void check_extport(struct ahc_softc *ahc, u_int *sxfrctl1);
static void ahc_parse_pci_eeprom(struct ahc_softc *ahc,
struct seeprom_config *sc);
static void configure_termination(struct ahc_softc *ahc,
struct seeprom_descriptor *sd,
u_int adapter_control,
u_int *sxfrctl1);
static void ahc_new_term_detect(struct ahc_softc *ahc,
int *enableSEC_low,
int *enableSEC_high,
int *enablePRI_low,
int *enablePRI_high,
int *eeprom_present);
static void aic787X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
int *internal68_present,
int *externalcable_present,
int *eeprom_present);
static void aic785X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
int *externalcable_present,
int *eeprom_present);
static void write_brdctl(struct ahc_softc *ahc, uint8_t value);
static uint8_t read_brdctl(struct ahc_softc *ahc);
static void ahc_pci_intr(struct ahc_softc *ahc);
static int ahc_pci_chip_init(struct ahc_softc *ahc);
static int
ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor,
uint16_t subdevice, uint16_t subvendor)
{ … }
const struct ahc_pci_identity *
ahc_find_pci_device(ahc_dev_softc_t pci)
{ … }
int
ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry)
{ … }
static int
ahc_ext_scbram_present(struct ahc_softc *ahc)
{ … }
static void
ahc_scbram_config(struct ahc_softc *ahc, int enable, int pcheck,
int fast, int large)
{ … }
static void
ahc_probe_ext_scbram(struct ahc_softc *ahc)
{ … }
int
ahc_pci_test_register_access(struct ahc_softc *ahc)
{ … }
static void
check_extport(struct ahc_softc *ahc, u_int *sxfrctl1)
{ … }
static void
ahc_parse_pci_eeprom(struct ahc_softc *ahc, struct seeprom_config *sc)
{ … }
static void
configure_termination(struct ahc_softc *ahc,
struct seeprom_descriptor *sd,
u_int adapter_control,
u_int *sxfrctl1)
{ … }
static void
ahc_new_term_detect(struct ahc_softc *ahc, int *enableSEC_low,
int *enableSEC_high, int *enablePRI_low,
int *enablePRI_high, int *eeprom_present)
{ … }
static void
aic787X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
int *internal68_present, int *externalcable_present,
int *eeprom_present)
{ … }
static void
aic785X_cable_detect(struct ahc_softc *ahc, int *internal50_present,
int *externalcable_present, int *eeprom_present)
{ … }
int
ahc_acquire_seeprom(struct ahc_softc *ahc, struct seeprom_descriptor *sd)
{ … }
void
ahc_release_seeprom(struct seeprom_descriptor *sd)
{ … }
static void
write_brdctl(struct ahc_softc *ahc, uint8_t value)
{ … }
static uint8_t
read_brdctl(struct ahc_softc *ahc)
{ … }
static void
ahc_pci_intr(struct ahc_softc *ahc)
{ … }
static int
ahc_pci_chip_init(struct ahc_softc *ahc)
{ … }
void __maybe_unused
ahc_pci_resume(struct ahc_softc *ahc)
{ … }
static int
ahc_aic785X_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7860_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_apa1480_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7870_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7870h_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha394X_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha394Xh_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha398X_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha494X_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha494Xh_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7880_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7880h_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha2940Pro_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha394XU_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha394XUh_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha398XU_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7890_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7892_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7895_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7895h_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7896_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aic7899_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha29160C_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_raid_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha394XX_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha398XX_setup(struct ahc_softc *ahc)
{ … }
static int
ahc_aha494XX_setup(struct ahc_softc *ahc)
{ … }