Date: Fri, 02 Jun 1995 14:24:31 -0700 From: "Justin T. Gibbs" <gibbs@freefall.cdrom.com> To: "Kenneth D. Merry" <ken@rflab1.gtri.gatech.edu> Cc: questions@freebsd.org Subject: Re: 2.0.5A, AHA2842, DAT drive problem Message-ID: <199506022124.OAA15040@freefall.cdrom.com> In-Reply-To: Your message of "Fri, 02 Jun 95 11:11:19 EDT." <199506021511.LAA20575@rflab1.gtri.gatech.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
>
>
> I'm having a bit of trouble with 2.0.5 Alpha, my tape drive, and
>my AHA2842...I was wondering if someone out there might have some idea
>about what I can do to get things working properly.
>Here's the general hardware info:
>
>Adaptec 2842
> - id 0 - Quantum Atlas XP34300 (4.3 gig drive)
> - id 1 - NEC 3xe cdrom drive (external)
> - id 4 - Sony SDT-5000 DDS-2 DAT drive (external)
>
> I'm having trouble restoring files from the DAT drive. When I try
>restoring (using tar) things go very slowly, and then if I use the hard
>drive (sd0) a bit while the tape operation is going, I get timeout errors from
>ahc driver. The strange thing is, the timeout errors say that _sd0_ timed
>out, not the tape drive.
I don't have any ideas on this one yet. I think we have one of these
drives kicking around WC somewhere, so I may be able to debug this problem
next week.
...
> One other minor annoyance is that tagged queueing doesn't work
>with the hard drive. When I tried booting a kernel with tagged queueing
>enabled, I just got a bunch of messages saying "Queue full" and the system
>couldn't mount sd0.
>
Can you try the patch appended to the end of this piece of mail? This allows
tagged queuing to many Seagate and Fujitsu drives, but I haven't tried the
Atlases yet. The main patch is really only two lines, but the rest is support
for the aic7850 controllers and some other code/printf clean up. Let me know
how it does. I've left AHC_DEBUG turned on so hopefully it may tell us
more about your problem #1 above.
>
>Ken
>--
>Kenneth Merry
>ken@rflab1.gtri.gatech.edu
>Disclaimer: I don't speak for GTRI, GT, or Elvis.
--
Justin T. Gibbs
==============================================
TCS Instructional Group - Programmer/Analyst 1
Cory | Po | Danube | Volga | Parker | Torus
==============================================
Index: i386/scsi/aic7xxx.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/scsi/aic7xxx.c,v
retrieving revision 1.28
diff -c -r1.28 aic7xxx.c
*** 1.28 1995/05/30 08:04:52
--- aic7xxx.c 1995/06/02 03:29:42
***************
*** 79,85 ****
#define AHC_SHOWMISC 0x0001
#define AHC_SHOWCMDS 0x0002
#define AHC_SHOWSCBS 0x0004
! /* #define AHC_DEBUG */
int ahc_debug = AHC_SHOWMISC;
/**** bit definitions for SCSIDEF ****/
--- 79,85 ----
#define AHC_SHOWMISC 0x0001
#define AHC_SHOWCMDS 0x0002
#define AHC_SHOWSCBS 0x0004
! #define AHC_DEBUG
int ahc_debug = AHC_SHOWMISC;
/**** bit definitions for SCSIDEF ****/
***************
*** 193,200 ****
#define REQO 0x02
#define ACKO 0x01
! /* XXX document this thing */
#define SCSIRATE 0xc04ul
/*
* SCSI ID (p. 3-18).
--- 193,209 ----
#define REQO 0x02
#define ACKO 0x01
! /*
! * SCSI Rate Control (p. 3-17).
! * Contents of this register determine the Synchronous SCSI data transfer
! * rate and the maximum synchronous Req/Ack offset. An offset of 0 in the
! * SOFS (3:0) bits disables synchronous data transfers. Any offset value
! * greater than 0 enables synchronous transfers.
! */
#define SCSIRATE 0xc04ul
+ #define WIDEXFER 0x80 /* Wide transfer control */
+ #define SXFR 0x70 /* Sync transfer rate */
+ #define SOFS 0x0f /* Sync offset */
/*
* SCSI ID (p. 3-18).
***************
*** 785,826 ****
(inb(SEQADDR1 + iobase) << 8) |
inb(SEQADDR0 + iobase));
}
! if (intstat & SEQINT) {
! unsigned char transfer;
!
switch (intstat & SEQINT_MASK) {
case BAD_PHASE:
! panic("ahc%d: unknown scsi bus phase. "
! "Attempting to continue\n", unit);
! break;
! case SEND_REJECT:
! printf("ahc%d: Warning - "
! "message reject, message type: 0x%x\n", unit,
inb(HA_REJBYTE + iobase));
! break;
! case NO_IDENT:
! panic("ahc%d: No IDENTIFY message from reconnecting "
! "target %d at seqaddr = 0x%lx "
! "SAVED_TCL == 0x%x\n",
! unit, (inb(SELID + iobase) >> 4) & 0xf,
! (inb(SEQADDR1 + iobase) << 8) |
! inb(SEQADDR0 + iobase),
inb(SAVED_TCL + iobase));
break;
case NO_MATCH:
{
u_char active;
int active_port = HA_ACTIVE0 + iobase;
! int tcl = inb(SCBARRAY+1 + iobase);
! int target = (tcl >> 4) & 0x0f;
! printf("ahc%d: no active SCB for reconnecting "
! "target %d, channel %c - issuing ABORT\n",
! unit, target, tcl & 0x08 ? 'B' : 'A');
printf("SAVED_TCL == 0x%x\n",
inb(SAVED_TCL + iobase));
! if( tcl & 0x88 ) {
! /* Second channel stores its info
! * in byte two of HA_ACTIVE
*/
active_port++;
}
--- 794,842 ----
(inb(SEQADDR1 + iobase) << 8) |
inb(SEQADDR0 + iobase));
}
! if (intstat & SEQINT) {
! u_short targ_mask;
! u_char target = (inb(SCSIID + iobase) >> 4) & 0x0f;
! u_char scratch_offset = target;
! char channel =
! inb(SBLKCTL + iobase) & SELBUSB ? 'B': 'A';
!
! if (channel == 'B')
! scratch_offset += 8;
! targ_mask = (0x01 << scratch_offset);
!
switch (intstat & SEQINT_MASK) {
case BAD_PHASE:
! panic("ahc%d:%c:%d: unknown scsi bus phase. "
! "Attempting to continue\n",
! unit, channel, target);
! break;
! case SEND_REJECT:
! printf("ahc%d:%c:%d: Warning - "
! "message reject, message type: 0x%x\n",
! unit, channel, target,
inb(HA_REJBYTE + iobase));
! break;
! case NO_IDENT:
! panic("ahc%d:%c:%d: Target did not send an IDENTIFY "
! "message. SAVED_TCL == 0x%x\n",
! unit, channel, target,
inb(SAVED_TCL + iobase));
break;
case NO_MATCH:
{
u_char active;
int active_port = HA_ACTIVE0 + iobase;
! printf("ahc%d:%c:%d: no active SCB - "
! "issuing ABORT\n", unit, channel,
! target);
printf("SAVED_TCL == 0x%x\n",
inb(SAVED_TCL + iobase));
! if(targ_mask & 0xff00) {
! /*
! * targets on the Second channel or
! * above id 7 store info in byte two
! * of HA_ACTIVE
*/
active_port++;
}
***************
*** 834,869 ****
}
case MSG_SDTR:
{
! u_char scsi_id, offset, rate, targ_scratch;
! u_char maxoffset, mask;
! /*
! * Help the sequencer to translate the
! * negotiated transfer rate. Transfer is
! * 1/4 the period in ns as is returned by
! * the sync negotiation message. So, we must
* multiply by four
*/
! transfer = inb(HA_ARG_1 + iobase) << 2;
! /* The bottom half of SCSIXFER */
offset = inb(ACCUM + iobase);
! scsi_id = inb(SCSIID + iobase) >> 0x4;
! if(inb(SBLKCTL + iobase) & 0x08)
! /* B channel */
! scsi_id += 8;
! mask = (0x01 << scsi_id);
! targ_scratch = inb(HA_TARG_SCRATCH + iobase
! + scsi_id);
! if(targ_scratch & 0x80)
maxoffset = 0x08;
else
maxoffset = 0x0f;
! ahc_scsirate(&rate, transfer,
! MIN(offset,maxoffset), unit, scsi_id);
/* Preserve the WideXfer flag */
! rate |= targ_scratch & 0x80;
! outb(HA_TARG_SCRATCH + iobase + scsi_id, rate);
! outb(SCSIRATE + iobase, rate);
! if( (rate & 0x0f) == 0 )
{
/*
* The requested rate was so low
--- 850,881 ----
}
case MSG_SDTR:
{
! u_char period, offset, rate;
! u_char targ_scratch;
! u_char maxoffset;
! /*
! * Help the sequencer to translate the
! * negotiated transfer rate. Transfer is
! * 1/4 the period in ns as is returned by
! * the sync negotiation message. So, we must
* multiply by four
*/
! period = inb(HA_ARG_1 + iobase) << 2;
offset = inb(ACCUM + iobase);
! targ_scratch = inb(HA_TARG_SCRATCH + iobase
! + scratch_offset);
! if(targ_scratch & WIDEXFER)
maxoffset = 0x08;
else
maxoffset = 0x0f;
! ahc_scsirate(&rate, period,
! MIN(offset,maxoffset), unit, target);
/* Preserve the WideXfer flag */
! targ_scratch = rate | (targ_scratch & WIDEXFER);
! outb(HA_TARG_SCRATCH + iobase + scratch_offset,
! targ_scratch);
! outb(SCSIRATE + iobase, targ_scratch);
! if( (targ_scratch & 0x0f) == 0 )
{
/*
* The requested rate was so low
***************
*** 877,883 ****
outb(HA_RETURN_1 + iobase, SEND_REJ);
}
/* See if we initiated Sync Negotiation */
! else if(ahc->sdtrpending & mask)
{
/*
* Don't send an SDTR back to
--- 889,895 ----
outb(HA_RETURN_1 + iobase, SEND_REJ);
}
/* See if we initiated Sync Negotiation */
! else if(ahc->sdtrpending & targ_mask)
{
/*
* Don't send an SDTR back to
***************
*** 898,922 ****
/*
* Negate the flags
*/
! ahc->needsdtr &= ~mask;
! ahc->sdtrpending &= ~mask;
break;
}
case MSG_WDTR:
{
! u_char scsi_id, scratch, bus_width;
bus_width = inb(ACCUM + iobase);
- scsi_id = inb(SCSIID + iobase) >> 0x4;
! if(inb(SBLKCTL + iobase) & 0x08)
! /* B channel */
! scsi_id += 8;
! scratch = inb(HA_TARG_SCRATCH + iobase
! + scsi_id);
!
! if(ahc->wdtrpending & (0x01 << scsi_id))
{
/*
* Don't send a WDTR back to the
--- 910,929 ----
/*
* Negate the flags
*/
! ahc->needsdtr &= ~targ_mask;
! ahc->sdtrpending &= ~targ_mask;
break;
}
case MSG_WDTR:
{
! u_char scratch, bus_width;
bus_width = inb(ACCUM + iobase);
! scratch = inb(HA_TARG_SCRATCH + iobase
! + scratch_offset);
! if(ahc->wdtrpending & targ_mask)
{
/*
* Don't send a WDTR back to the
***************
*** 932,939 ****
printf("ahc%d: target "
"%d using 16Bit "
"transfers\n",
! unit, scsi_id);
! scratch |= 0x80;
break;
}
}
--- 939,946 ----
printf("ahc%d: target "
"%d using 16Bit "
"transfers\n",
! unit, target);
! scratch |= 0x80;
break;
}
}
***************
*** 954,970 ****
printf("ahc%d: target "
"%d using 16Bit "
"transfers\n",
! unit, scsi_id);
! scratch |= 0x80;
break;
}
outb(HA_RETURN_1 + iobase,
bus_width | SEND_WDTR);
}
! ahc->needwdtr &= ~(0x01 << scsi_id);
! ahc->wdtrpending &= ~(0x01 << scsi_id);
! outb(HA_TARG_SCRATCH + iobase + scsi_id, scratch);
! outb(SCSIRATE + iobase, scratch);
break;
}
case MSG_REJECT:
--- 961,978 ----
printf("ahc%d: target "
"%d using 16Bit "
"transfers\n",
! unit, target);
! scratch |= 0x80;
break;
}
outb(HA_RETURN_1 + iobase,
bus_width | SEND_WDTR);
}
! ahc->needwdtr &= ~targ_mask;
! ahc->wdtrpending &= ~targ_mask;
! outb(HA_TARG_SCRATCH + iobase + scratch_offset,
! scratch);
! outb(SCSIRATE + iobase, scratch);
break;
}
case MSG_REJECT:
***************
*** 977,1012 ****
*/
u_char targ_scratch;
- u_char scsi_id = inb(SCSIID + iobase) >> 0x4;
- u_short mask;
-
- if(inb(SBLKCTL + iobase) & 0x08)
- /* B channel */
- scsi_id += 8;
targ_scratch = inb(HA_TARG_SCRATCH + iobase
! + scsi_id);
! mask = (0x01 << scsi_id);
! if(ahc->wdtrpending & mask){
/* note 8bit xfers and clear flag */
targ_scratch &= 0x7f;
! ahc->needwdtr &= ~mask;
! ahc->wdtrpending &= ~mask;
! printf("ahc%d: target %d refusing "
"WIDE negotiation. Using "
"8bit transfers\n",
! unit, scsi_id);
}
! else if(ahc->sdtrpending & mask){
/* note asynch xfers and clear flag */
targ_scratch &= 0xf0;
! ahc->needsdtr &= ~mask;
! ahc->sdtrpending &= ~mask;
! printf("ahc%d: target %d refusing "
"syncronous negotiation. Using "
"asyncronous transfers\n",
! unit, scsi_id);
}
else {
/*
--- 985,1013 ----
*/
u_char targ_scratch;
targ_scratch = inb(HA_TARG_SCRATCH + iobase
! + scratch_offset);
! if(ahc->wdtrpending & targ_mask){
/* note 8bit xfers and clear flag */
targ_scratch &= 0x7f;
! ahc->needwdtr &= ~targ_mask;
! ahc->wdtrpending &= ~targ_mask;
! printf("ahc%d:%c:%d: refusing "
"WIDE negotiation. Using "
"8bit transfers\n",
! unit, channel, target);
}
! else if(ahc->sdtrpending & targ_mask){
/* note asynch xfers and clear flag */
targ_scratch &= 0xf0;
! ahc->needsdtr &= ~targ_mask;
! ahc->sdtrpending &= ~targ_mask;
! printf("ahc%d:%c:%d: refusing "
"syncronous negotiation. Using "
"asyncronous transfers\n",
! unit, channel, target);
}
else {
/*
***************
*** 1014,1025 ****
*/
#ifdef AHC_DEBUG
if(ahc_debug & AHC_SHOWMISC)
! printf("Message reject -- "
! "ignored\n");
#endif
break;
}
! outb(HA_TARG_SCRATCH + iobase + scsi_id,
targ_scratch);
outb(SCSIRATE + iobase, targ_scratch);
break;
--- 1015,1027 ----
*/
#ifdef AHC_DEBUG
if(ahc_debug & AHC_SHOWMISC)
! printf("ahc%d:%c:%d: Message
! reject -- ignored\n",
! unit, channel, target);
#endif
break;
}
! outb(HA_TARG_SCRATCH + iobase + scratch_offset,
targ_scratch);
outb(SCSIRATE + iobase, targ_scratch);
break;
***************
*** 1046,1054 ****
*/
outb(HA_RETURN_1 + iobase, 0);
if (!scb || !(scb->flags & SCB_ACTIVE)) {
! printf("ahc%d: ahcintr - referenced scb not "
! "valid during seqint 0x%x scb(%d)\n",
! unit, intstat, scb_index);
goto clear;
}
--- 1048,1056 ----
*/
outb(HA_RETURN_1 + iobase, 0);
if (!scb || !(scb->flags & SCB_ACTIVE)) {
! printf("ahc%d:%c:%d: ahcintr - referenced scb "
! "not valid during seqint 0x%x scb(%d)\n",
! unit, channel, target, intstat, scb_index);
goto clear;
}
***************
*** 1068,1079 ****
break;
case SCSI_CHECK:
#ifdef AHC_DEBUG
! printf("ahc%d: target %d, lun %d (%s%d) "
! "requests Check Status\n", unit
! ,xs->sc_link->target
! ,xs->sc_link->lun
! ,xs->sc_link->device->name
! ,xs->sc_link->dev_unit);
#endif
if((xs->error == XS_NOERROR) &&
--- 1070,1077 ----
break;
case SCSI_CHECK:
#ifdef AHC_DEBUG
! sc_print_addr(xs->sc_link);
! printf("requests Check Status\n");
#endif
if((xs->error == XS_NOERROR) &&
***************
*** 1083,1101 ****
u_char tail;
struct ahc_dma_seg *sg = scb->ahc_dma;
struct scsi_sense *sc = &(scb->sense_cmd);
- u_char control = scb->control;
u_char tcl = scb->target_channel_lun;
#ifdef AHC_DEBUG
! printf("ahc%d: target %d, lun %d "
! "(%s%d) Sending Sense\n", unit
! ,xs->sc_link->target
! ,xs->sc_link->lun
! ,xs->sc_link->device->name
! ,xs->sc_link->dev_unit);
#endif
bzero(scb, SCB_DOWN_SIZE);
scb->flags |= SCB_SENSE;
- scb->control = (control & SCB_TE);
sc->op_code = REQUEST_SENSE;
sc->byte2 = xs->sc_link->lun << 5;
sc->length = sizeof(struct scsi_sense_data);
--- 1081,1093 ----
u_char tail;
struct ahc_dma_seg *sg = scb->ahc_dma;
struct scsi_sense *sc = &(scb->sense_cmd);
u_char tcl = scb->target_channel_lun;
#ifdef AHC_DEBUG
! sc_print_addr(xs->sc_link);
! printf("Sending Sense\n");
#endif
bzero(scb, SCB_DOWN_SIZE);
scb->flags |= SCB_SENSE;
sc->op_code = REQUEST_SENSE;
sc->byte2 = xs->sc_link->lun << 5;
sc->length = sizeof(struct scsi_sense_data);
***************
*** 1157,1173 ****
break;
case SCSI_BUSY:
xs->error = XS_BUSY;
! printf("ahc%d: Target Busy\n", unit);
break;
case SCSI_QUEUE_FULL:
/*
* The upper level SCSI code will eventually
* handle this properly.
*/
! printf("ahc%d: Queue Full\n", unit);
xs->error = XS_BUSY;
break;
default:
printf("unexpected targ_status: %x\n",
scb->target_status);
xs->error = XS_DRIVER_STUFFUP;
--- 1149,1168 ----
break;
case SCSI_BUSY:
xs->error = XS_BUSY;
! sc_print_addr(xs->sc_link);
! printf("Target Busy\n");
break;
case SCSI_QUEUE_FULL:
/*
* The upper level SCSI code will eventually
* handle this properly.
*/
! sc_print_addr(xs->sc_link);
! printf("Queue Full\n");
xs->error = XS_BUSY;
break;
default:
+ sc_print_addr(xs->sc_link);
printf("unexpected targ_status: %x\n",
scb->target_status);
xs->error = XS_DRIVER_STUFFUP;
***************
*** 1180,1185 ****
--- 1175,1181 ----
int scb_index;
scb_index = inb(SCBPTR + iobase);
scb = ahc->scbarray[scb_index];
+ xs = scb->xs;
/*
* Don't clobber valid resid info with
* a resid coming from a check sense
***************
*** 1190,1196 ****
(inb(iobase+SCBARRAY+16) << 8) |
inb(iobase+SCBARRAY+15);
#ifdef AHC_DEBUG
! printf("ahc: Handled Residual\n");
#endif
break;
}
--- 1186,1193 ----
(inb(iobase+SCBARRAY+16) << 8) |
inb(iobase+SCBARRAY+15);
#ifdef AHC_DEBUG
! sc_print_addr(xs->sc_link);
! printf("Handled Residual\n");
#endif
break;
}
***************
*** 1199,1214 ****
int scb_index;
scb_index = inb(SCBPTR + iobase);
scb = ahc->scbarray[scb_index];
/*
* We didn't recieve a valid tag back from
* the target on a reconnect.
*/
! printf("ahc%d: invalid tag recieved on channel %c "
! "target %d, lun %d -- sending ABORT_TAG\n",
! unit,
! ((u_long)xs->sc_link->fordriver & 0x08)? 'B':'A',
! xs->sc_link->target,
! xs->sc_link->lun);
scb->xs->error = XS_DRIVER_STUFFUP;
untimeout(ahc_timeout, (caddr_t)scb);
ahc_done(unit, scb);
--- 1196,1208 ----
int scb_index;
scb_index = inb(SCBPTR + iobase);
scb = ahc->scbarray[scb_index];
+ xs = scb->xs;
/*
* We didn't recieve a valid tag back from
* the target on a reconnect.
*/
! sc_print_addr(xs->sc_link);
! printf("invalid tag recieved -- sending ABORT_TAG\n");
scb->xs->error = XS_DRIVER_STUFFUP;
untimeout(ahc_timeout, (caddr_t)scb);
ahc_done(unit, scb);
***************
*** 1311,1325 ****
outb(WAITING_SCBH + iobase, waiting);
RESTART_SEQUENCER(ahc);
! }
!
! else if (status & SCSIPERR) {
! printf("ahc%d: parity error on channel %c "
! "target %d, lun %d\n",
! unit,
! ((u_long)xs->sc_link->fordriver & 0x08)? 'B':'A',
! xs->sc_link->target,
! xs->sc_link->lun);
xs->error = XS_DRIVER_STUFFUP;
outb(CLRSINT1 + iobase, CLRSCSIPERR);
--- 1305,1315 ----
outb(WAITING_SCBH + iobase, waiting);
RESTART_SEQUENCER(ahc);
! }
!
! else if (status & SCSIPERR) {
! sc_print_addr(xs->sc_link);
! printf("parity error\n");
xs->error = XS_DRIVER_STUFFUP;
outb(CLRSINT1 + iobase, CLRSCSIPERR);
***************
*** 1329,1336 ****
scb = NULL;
}
else if (!(status & BUSFREE)) {
! printf("ahc%d: Unknown SCSIINT. Status = 0x%x\n",
! unit, status);
outb(CLRSINT1 + iobase, status);
UNPAUSE_SEQUENCER(ahc);
outb(CLRINT + iobase, CLRSCSIINT);
--- 1319,1326 ----
scb = NULL;
}
else if (!(status & BUSFREE)) {
! sc_print_addr(xs->sc_link);
! printf("Unknown SCSIINT. Status = 0x%x\n", status);
outb(CLRSINT1 + iobase, status);
UNPAUSE_SEQUENCER(ahc);
outb(CLRINT + iobase, CLRSCSIINT);
***************
*** 1477,1489 ****
printf("ahc%d: 284x ", unit);
ahc->maxscbs = 0x4;
break;
case AHC_AIC7870:
case AHC_294:
! if( ahc->type == AHC_AIC7870)
printf("ahc%d: aic7870 ", unit);
else
printf("ahc%d: 294x ", unit);
- ahc->maxscbs = 0x10;
#define DFTHRESH 3
outb(DSPCISTATUS + iobase, DFTHRESH << 6);
/*
--- 1467,1484 ----
printf("ahc%d: 284x ", unit);
ahc->maxscbs = 0x4;
break;
+ case AHC_AIC7850:
case AHC_AIC7870:
case AHC_294:
! ahc->maxscbs = 0x10;
! if(ahc->type == AHC_AIC7850){
! printf("ahc%d: aic7850 ", unit);
! ahc->maxscbs = 0x03;
! }
! else if(ahc->type == AHC_AIC7850)
printf("ahc%d: aic7870 ", unit);
else
printf("ahc%d: 294x ", unit);
#define DFTHRESH 3
outb(DSPCISTATUS + iobase, DFTHRESH << 6);
/*
***************
*** 1530,1536 ****
* Number of SCBs that will be used. Rev E aic7770s and
* aic7870s have 16. The rest have 4.
*/
! if(!(ahc->type & AHC_AIC7870))
{
/*
* See if we have a Rev E or higher
--- 1525,1531 ----
* Number of SCBs that will be used. Rev E aic7770s and
* aic7870s have 16. The rest have 4.
*/
! if(!(ahc->type & AHC_AIC78X0))
{
/*
* See if we have a Rev E or higher
***************
*** 1559,1565 ****
printf("aic7870, ");
printf("%d SCBs\n", ahc->maxscbs);
! if(!(ahc->type & AHC_AIC7870)) {
if(ahc->pause & IRQMS)
printf("ahc%d: Using Level Sensitive Interrupts\n",
unit);
--- 1554,1560 ----
printf("aic7870, ");
printf("%d SCBs\n", ahc->maxscbs);
! if(!(ahc->type & AHC_AIC78X0)) {
if(ahc->pause & IRQMS)
printf("ahc%d: Using Level Sensitive Interrupts\n",
unit);
***************
*** 1567,1573 ****
printf("ahc%d: Using Edge Triggered Interrupts\n",
unit);
}
! if(!(ahc->type & AHC_AIC7870)){
/*
* The 294x cards are PCI, so we get their interrupt from the PCI
* BIOS.
--- 1562,1568 ----
printf("ahc%d: Using Edge Triggered Interrupts\n",
unit);
}
! if(!(ahc->type & AHC_AIC78X0)){
/*
* The 294x cards are PCI, so we get their interrupt from the PCI
* BIOS.
***************
*** 1701,1707 ****
printf("Done\n");
outb(SEQCTL + iobase, FASTMODE);
! if (!(ahc->type & AHC_AIC7870))
outb(BCTL + iobase, ENABLE);
/* Reset the bus */
--- 1696,1702 ----
printf("Done\n");
outb(SEQCTL + iobase, FASTMODE);
! if (!(ahc->type & AHC_AIC78X0))
outb(BCTL + iobase, ENABLE);
/* Reset the bus */
Index: i386/scsi/aic7xxx.h
===================================================================
RCS file: /usr/cvs/src/sys/i386/scsi/aic7xxx.h,v
retrieving revision 1.9
diff -c -r1.9 aic7xxx.h
*** 1.9 1995/05/30 08:04:54
--- aic7xxx.h 1995/06/02 03:40:01
***************
*** 45,58 ****
long len;
};
! typedef u_char ahc_type;
! #define AHC_NONE 0x00
! #define AHC_WIDE 0x02 /* Wide Channel */
! #define AHC_TWIN 0x08 /* Twin Channel */
! #define AHC_274 0x10 /* EISA Based Controller */
! #define AHC_284 0x20 /* VL/ISA Based Controller */
! #define AHC_AIC7870 0x40 /* PCI Based Controller */
! #define AHC_294 0xc0 /* PCI Based Controller */
/*
* The driver keeps up to MAX_SCB scb structures per card in memory. Only the
--- 45,62 ----
long len;
};
! typedef enum {
! AHC_NONE = 0x000,
! AHC_WIDE = 0x002, /* Wide Channel */
! AHC_TWIN = 0x008, /* Twin Channel */
! AHC_AIC7770 = 0x010,
! AHC_AIC7850 = 0x020,
! AHC_AIC7870 = 0x040,
! AHC_AIC78X0 = 0x060, /* PCI Based Controller */
! AHC_274 = 0x110, /* EISA Based Controller */
! AHC_284 = 0x210, /* VL/ISA Based Controller */
! AHC_294 = 0x440 /* PCI Based Controller */
! }ahc_type;
/*
* The driver keeps up to MAX_SCB scb structures per card in memory. Only the
Index: pci/aic7870.c
===================================================================
RCS file: /usr/cvs/src/sys/pci/aic7870.c,v
retrieving revision 1.10
diff -c -r1.10 aic7870.c
*** 1.10 1995/05/30 08:12:59
--- aic7870.c 1995/06/02 03:19:17
***************
*** 37,42 ****
--- 37,43 ----
#define PCI_BASEADR0 PCI_MAP_REG_START
#define PCI_DEVICE_ID_ADAPTEC_2940 0x71789004ul
#define PCI_DEVICE_ID_ADAPTEC_AIC7870 0x70789004ul
+ #define PCI_DEVICE_ID_ADAPTEC_AIC7850 0x70759004ul
static char* aic7870_probe __P((pcici_t tag, pcidi_t type));
void aic7870_attach __P((pcici_t config_id, int unit));
***************
*** 63,68 ****
--- 64,72 ----
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
return ("Adaptec aic7870 SCSI host adapter");
break;
+ case PCI_DEVICE_ID_ADAPTEC_AIC7850:
+ return ("Adaptec aic7850 SCSI host adapter");
+ break;
default:
break;
}
***************
*** 94,99 ****
--- 98,106 ----
break;
case PCI_DEVICE_ID_ADAPTEC_AIC7870:
ahc_t = AHC_AIC7870;
+ break;
+ case PCI_DEVICE_ID_ADAPTEC_AIC7850:
+ ahc_t = AHC_AIC7850;
break;
default:
break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506022124.OAA15040>
