Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/cardbus Make the Adaptec 1480 cardbus Slim SCSI card...



details:   https://anonhg.NetBSD.org/src/rev/aa27ae7af9bf
branches:  trunk
changeset: 580863:aa27ae7af9bf
user:      augustss <augustss%NetBSD.org@localhost>
date:      Thu May 12 06:21:01 2005 +0000

description:
Make the Adaptec 1480 cardbus Slim SCSI card work.
>From a person wishing to remain anonymous.

diffstat:

 sys/dev/cardbus/ahc_cardbus.c |  24 ++++++++++++++++--------
 sys/dev/cardbus/files.cardbus |   3 ++-
 2 files changed, 18 insertions(+), 9 deletions(-)

diffs (73 lines):

diff -r 9de6e9d77eae -r aa27ae7af9bf sys/dev/cardbus/ahc_cardbus.c
--- a/sys/dev/cardbus/ahc_cardbus.c     Thu May 12 02:56:59 2005 +0000
+++ b/sys/dev/cardbus/ahc_cardbus.c     Thu May 12 06:21:01 2005 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: ahc_cardbus.c,v 1.16 2005/02/27 00:26:59 perry Exp $   */
+/*     $NetBSD: ahc_cardbus.c,v 1.17 2005/05/12 06:21:01 augustss Exp $        */
 
 /*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * Copyright (c) 2000, 2005 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -45,7 +45,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahc_cardbus.c,v 1.16 2005/02/27 00:26:59 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahc_cardbus.c,v 1.17 2005/05/12 06:21:01 augustss Exp $");
+
+#include "opt_ahc_cardbus.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -70,6 +72,10 @@
 #include <dev/ic/aic7xxx_inline.h>
 
 
+#ifndef        AHC_CARDBUS_DEFAULT_SCSI_ID
+#define        AHC_CARDBUS_DEFAULT_SCSI_ID     0x7
+#endif
+
 #define        AHC_CARDBUS_IOBA        0x10
 #define        AHC_CARDBUS_MMBA        0x14
 
@@ -233,13 +239,15 @@
        ahc_outb(ahc, DSPCISTATUS, DFTHRSH_100);
 
        if (ahc->flags & AHC_USEDEFAULTS) {
+               int our_id;
                /*
-                * We can't "use defaults", as we have no way
-                * of knowing what default settings hould be.
+                * Assume only one connector and always turn
+                * on termination.
                 */
-               printf("%s: CardBus device requires an SEEPROM\n",
-                   ahc_name(ahc));
-               return;
+               our_id = AHC_CARDBUS_DEFAULT_SCSI_ID;
+               sxfrctl1 = STPWEN;
+               ahc_outb(ahc, SCSICONF, our_id | ENSPCHK | RESET_SCSI);
+               ahc->our_id = our_id;
        }
 
        printf("%s: aic7860", ahc_name(ahc));
diff -r 9de6e9d77eae -r aa27ae7af9bf sys/dev/cardbus/files.cardbus
--- a/sys/dev/cardbus/files.cardbus     Thu May 12 02:56:59 2005 +0000
+++ b/sys/dev/cardbus/files.cardbus     Thu May 12 06:21:01 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.cardbus,v 1.27 2005/01/29 22:05:26 jonathan Exp $
+#      $NetBSD: files.cardbus,v 1.28 2005/05/12 06:21:01 augustss Exp $
 #
 # files.cardbus
 #
@@ -75,6 +75,7 @@
 #
 attach ahc at cardbus with ahc_cardbus: ahc_seeprom, smc93cx6
 file   dev/cardbus/ahc_cardbus.c       ahc_cardbus
+defparam opt_ahc_cardbus.h             AHC_CARDBUS_DEFAULT_SCSI_ID
 
 #
 # PCI bridge



Home | Main Index | Thread Index | Old Index