diff options
author | gibbs <gibbs@FreeBSD.org> | 2002-06-06 16:35:58 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2002-06-06 16:35:58 +0000 |
commit | 282bbce194b9920c9aec04e1d809fe2101de1d79 (patch) | |
tree | 24da434170c184a54a65283835e1f6531d7e2569 | |
parent | a75981791aa17018a460c582de415202e5e436c5 (diff) | |
download | FreeBSD-src-282bbce194b9920c9aec04e1d809fe2101de1d79.zip FreeBSD-src-282bbce194b9920c9aec04e1d809fe2101de1d79.tar.gz |
Hook up the ahd driver.
-rw-r--r-- | sys/amd64/conf/GENERIC | 1 | ||||
-rw-r--r-- | sys/conf/NOTES | 9 | ||||
-rw-r--r-- | sys/conf/files | 9 | ||||
-rw-r--r-- | sys/conf/options | 6 | ||||
-rw-r--r-- | sys/dev/aic7xxx/ahd_pci.c | 20 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx.c | 2 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx.h | 2 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_inline.h | 6 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_osm.c | 2 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_osm.h | 4 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_pci.c | 2 | ||||
-rw-r--r-- | sys/i386/conf/GENERIC | 1 |
12 files changed, 37 insertions, 27 deletions
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 9df1526..e9aa270 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -83,6 +83,7 @@ options ATA_STATIC_ID #Static device numbering # SCSI Controllers device ahb # EISA AHA1742 family device ahc # AHA2940 and onboard AIC7xxx devices +device ahd # AHA39320 and onboard AIC79xx devices device amd # AMD 53C974 (Tekram DC-390(T)) device isp # Qlogic family #device ncr # NCR/Symbios Logic diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 48954f2..deb21d0 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1139,6 +1139,7 @@ options TDFX_LINUX # Enable Linuxulator support # ahb: Adaptec 174x EISA controllers # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx +# ahd: Adaptec 29320/39320 Controllers. # aic: Adaptec 6260/6360, APA-1460 (PC Card), NEC PC9801-100 (C-BUS) # amd: Support for the AMD 53C974 SCSI host adapter chip as found on devices # such as the Tekram DC-390(T). @@ -1176,6 +1177,7 @@ device aic hint.aic.0.at="isa" device ahb device ahc +device ahd device amd device isp hint.isp.0.disable="1" @@ -1223,6 +1225,13 @@ options AHC_DUMP_EEPROM # Bitmap of units to enable targetmode operations. options AHC_TMODE_ENABLE +# Compile in aic79xx debugging code. +options AHD_DEBUG + +# Aic79xx driver debugging options. +# See sys/dev/aic79xx/aic79xx.h +options AHD_DEBUG_OPTS=0xFFFFFFFF + # The adw driver will attempt to use memory mapped I/O for all PCI # controllers that have it configured only if this option is set. options ADW_ALLOW_MEMIO diff --git a/sys/conf/files b/sys/conf/files index fd967df..fd5790b 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -14,6 +14,11 @@ aic7xxx_{seq,reg}.h optional ahc \ no-obj no-implicit-rule before-depend \ clean "aic7xxx_seq.h aic7xxx_reg.h" \ dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" +aic79xx_{seq,reg}.h optional ahd pci \ + compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h $S/dev/aic7xxx/aic79xx.seq" \ + no-obj no-implicit-rule before-depend \ + clean "aic79xx_seq.h aic79xx_reg.h" \ + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" kern/device_if.m standard kern/bus_if.m standard kern/clock_if.m optional genclock @@ -243,6 +248,10 @@ dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci +dev/aic7xxx/ahd_pci.c optional ahd pci +dev/aic7xxx/aic79xx.c optional ahd pci +dev/aic7xxx/aic79xx_osm.c optional ahd pci +dev/aic7xxx/aic79xx_pci.c optional ahd pci dev/amr/amr.c optional amr dev/amr/amr_disk.c optional amr dev/amr/amr_pci.c optional amr diff --git a/sys/conf/options b/sys/conf/options index 87425bd..cc09da6 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -52,6 +52,12 @@ AHC_DUMP_EEPROM opt_aic7xxx.h # Dump the contents of our AHC_DEBUG_SEQUENCER opt_aic7xxx.h # Enable diagnostic sequencer code +# Adaptec aic79xx SCSI controller options +AHD_DEBUG opt_aic79xx.h # Compile in aic79xx debugging code. + +AHD_DEBUG_OPTS opt_aic79xx.h # Aic79xx driver debugging options. + # See sys/dev/aic79xx/aic79xx.h + ADW_ALLOW_MEMIO opt_adw.h # Allow PCI devices to use memory # mapped I/O diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index 834cbe8..07fd5de 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -50,32 +50,12 @@ static device_method_t ahd_pci_device_methods[] = { { 0, 0 } }; -#if __FreeBSD_version >= 500027 - -DEVINTERFACE(ahd_pci_device, ahd_pci_device_methods, device); - -static device_interface_t *ahd_pci_interfaces[] = { - &ahd_pci_device_interface, - - NULL -}; - -static driver_t ahd_pci_driver = { - "ahd", - ahd_pci_interfaces, - sizeof(struct ahd_softc) -}; - -#else /* FreeBSD 4.X */ - static driver_t ahd_pci_driver = { "ahd", ahd_pci_device_methods, sizeof(struct ahd_softc) }; -#endif /* __FreeBSD_version */ - static devclass_t ahd_devclass; DRIVER_MODULE(ahd, pci, ahd_pci_driver, ahd_devclass, 0, 0); diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index fe8881e..99763ab 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#79 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#80 $ * * $FreeBSD$ */ diff --git a/sys/dev/aic7xxx/aic79xx.h b/sys/dev/aic7xxx/aic79xx.h index 06cb11b..e19710c 100644 --- a/sys/dev/aic7xxx/aic79xx.h +++ b/sys/dev/aic7xxx/aic79xx.h @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#46 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#47 $ * * $FreeBSD$ */ diff --git a/sys/dev/aic7xxx/aic79xx_inline.h b/sys/dev/aic7xxx/aic79xx_inline.h index 5d0c79d..880cf88 100644 --- a/sys/dev/aic7xxx/aic79xx_inline.h +++ b/sys/dev/aic7xxx/aic79xx_inline.h @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#27 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#29 $ * * $FreeBSD$ */ @@ -342,8 +342,8 @@ ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb) if ((ahd->flags & AHD_39BIT_ADDRESSING) != 0) { uint64_t high_addr; - high_addr = (ahd_le32toh(sg->len) & 0x7F000000) << 8; - scb->hscb->dataptr |= ahd_htole64(high_addr); + high_addr = ahd_le32toh(sg->len) & 0x7F000000; + scb->hscb->dataptr |= ahd_htole64(high_addr << 8); } scb->hscb->datacnt = sg->len; } diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c index 51071e6..2d6f466 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.c +++ b/sys/dev/aic7xxx/aic79xx_osm.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.c#15 $ * * $FreeBSD$ */ diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h index 4012aa7..83c1706 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.h +++ b/sys/dev/aic7xxx/aic79xx_osm.h @@ -206,7 +206,11 @@ typedef struct callout ahd_timer_t; #include <dev/aic7xxx/aic79xx.h> /***************************** Timer Facilities *******************************/ +#if __FreeBSD_version >= 500000 +#define ahd_timer_init(timer) callout_init(timer, /*mpsafe*/0) +#else #define ahd_timer_init callout_init +#endif #define ahd_timer_stop callout_stop static __inline void diff --git a/sys/dev/aic7xxx/aic79xx_pci.c b/sys/dev/aic7xxx/aic79xx_pci.c index f4fd826..e27d22d 100644 --- a/sys/dev/aic7xxx/aic79xx_pci.c +++ b/sys/dev/aic7xxx/aic79xx_pci.c @@ -38,7 +38,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#32 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#33 $ * * $FreeBSD$ */ diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 9df1526..e9aa270 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -83,6 +83,7 @@ options ATA_STATIC_ID #Static device numbering # SCSI Controllers device ahb # EISA AHA1742 family device ahc # AHA2940 and onboard AIC7xxx devices +device ahd # AHA39320 and onboard AIC79xx devices device amd # AMD 53C974 (Tekram DC-390(T)) device isp # Qlogic family #device ncr # NCR/Symbios Logic |