Subject: Re: WTF?! New SCSI in current sup broke all Amiga drivers?
To: Rob Healey <rhealey@aca.com>
From: Michael L. Hitch <osymh@gemini.oscs.montana.edu>
List: amiga-dev
Date: 01/02/1995 21:27:56
On Dec 31, 8:33pm, Rob Healey wrote:
> Has anybody been able to compile and get the low level Amiga SCSI
> drivers to work with the new high level -current SCSI interface code?
I'm running a kernel right now compiled from the January 1 sources.
(No, not from unmodified sources :-).)
> I changed the define's in sbic.c and dropped out some now gone
> fields in structures in ahsc.c so they compile fine but when you
> try to boot the kernel it can't find a suitable root and it doesn't
> appear to even be trying to use the SCSI driver?!
>
> Michel H., do you know what's up here?
Since the adapter_info field was removed, each driver has to explicitly
set the "openings" entry when the scsi_link is set up. Since that value
was set to 0, the upper level drivers never called the low level driver.
> Also, some of the flag #define changes in sbic.c looked dubious,
> SCSI_NOMASK to SCSI_POLL and SCSI_ERR_OK to SCSI_IGNORE_MEDIA_CHANGE.
> The second one looks REAL dubious but it is the same hex value in
> the same flags field...
SCSI_IGNORE_MEDIA_CHANGE isn't the same as SCSI_ERR_OK. I just removed
the test for SCSI_ERR_OK for now until I figure out if I need to do something
different. [Chris Hopps did all the original work on getting the 33c93
driver (sbic.c) interfaced to the higher level SCSI drivers. I haven't
looked real hard at it - just enough to copy it for the other SCSI low
level drivers.]
Here are the Amiga SCSI driver changes that I currently have. The only
one actually testing is the zssc.c/siop.c changes, but the rest should all
be equivalent.
diff -cr /usr/src/sys/arch/amiga/dev/afsc.c sys/arch/amiga/dev/afsc.c
*** /usr/src/sys/arch/amiga/dev/afsc.c Wed Dec 28 04:21:14 1994
--- sys/arch/amiga/dev/afsc.c Mon Jan 2 20:40:14 1995
***************
*** 59,66 ****
siop_minphys,
0, /* no lun support */
0, /* no lun support */
- siop_adinfo,
- "afsc",
};
struct scsi_device afsc_scsidev = {
--- 59,64 ----
***************
*** 68,75 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "afsc",
- 0,
};
--- 66,71 ----
***************
*** 123,131 ****
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &afsc_scsiswitch;
sc->sc_link.device = &afsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 119,128 ----
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &afsc_scsiswitch;
sc->sc_link.device = &afsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
diff -cr /usr/src/sys/arch/amiga/dev/ahsc.c sys/arch/amiga/dev/ahsc.c
*** /usr/src/sys/arch/amiga/dev/ahsc.c Wed Dec 28 04:21:14 1994
--- sys/arch/amiga/dev/ahsc.c Mon Jan 2 20:40:14 1995
***************
*** 65,72 ****
sbic_minphys,
0, /* no lun support */
0, /* no lun support */
- sbic_adinfo,
- "ahsc",
};
struct scsi_device ahsc_scsidev = {
--- 65,70 ----
***************
*** 74,81 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "ahsc",
- 0,
};
--- 72,77 ----
***************
*** 142,150 ****
sbicreset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &ahsc_scsiswitch;
sc->sc_link.device = &ahsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 138,147 ----
sbicreset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &ahsc_scsiswitch;
sc->sc_link.device = &ahsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
diff -cr /usr/src/sys/arch/amiga/dev/atzsc.c sys/arch/amiga/dev/atzsc.c
*** /usr/src/sys/arch/amiga/dev/atzsc.c Wed Dec 28 04:21:14 1994
--- sys/arch/amiga/dev/atzsc.c Mon Jan 2 20:40:14 1995
***************
*** 65,72 ****
sbic_minphys,
0, /* no lun support */
0, /* no lun support */
- sbic_adinfo,
- "atzsc",
};
struct scsi_device atzsc_scsidev = {
--- 65,70 ----
***************
*** 74,81 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "atzsc",
- 0,
};
--- 72,77 ----
***************
*** 164,172 ****
sbicreset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &atzsc_scsiswitch;
sc->sc_link.device = &atzsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 160,169 ----
sbicreset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &atzsc_scsiswitch;
sc->sc_link.device = &atzsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
diff -cr /usr/src/sys/arch/amiga/dev/gtsc.c sys/arch/amiga/dev/gtsc.c
*** /usr/src/sys/arch/amiga/dev/gtsc.c Wed Dec 28 04:21:20 1994
--- sys/arch/amiga/dev/gtsc.c Mon Jan 2 20:40:14 1995
***************
*** 66,73 ****
sbic_minphys,
0, /* no lun support */
0, /* no lun support */
- sbic_adinfo,
- "gtsc",
};
struct scsi_device gtsc_scsidev = {
--- 66,71 ----
***************
*** 75,82 ****
NULL, /* have a queue served by this ??? */
NULL, /* have no async handler ??? */
NULL, /* Use default done routine */
- "gtsc",
- 0,
};
int gtsc_maxdma = 0; /* Maximum size per DMA transfer */
--- 73,78 ----
***************
*** 187,195 ****
sbicreset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = >sc_scsiswitch;
sc->sc_link.device = >sc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 183,192 ----
sbicreset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = >sc_scsiswitch;
sc->sc_link.device = >sc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
diff -cr /usr/src/sys/arch/amiga/dev/idesc.c sys/arch/amiga/dev/idesc.c
*** /usr/src/sys/arch/amiga/dev/idesc.c Wed Dec 28 04:21:23 1994
--- sys/arch/amiga/dev/idesc.c Mon Jan 2 20:41:55 1995
***************
*** 231,237 ****
};
void ide_minphys __P((struct buf *bp));
- u_int ide_adinfo __P((void));
int ide_scsicmd __P((struct scsi_xfer *));
int idescprint __P((void *auxp, char *));
--- 231,236 ----
***************
*** 255,262 ****
ide_minphys,
0, /* no lun support */
0, /* no lun support */
- ide_adinfo,
- "idesc",
};
struct scsi_device idesc_scsidev = {
--- 254,259 ----
***************
*** 264,271 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "idesc",
- 0,
};
struct cfdriver idesccd = {
--- 261,266 ----
***************
*** 398,406 ****
printf ("\n");
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &idesc_scsiswitch;
sc->sc_link.device = &idesc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 393,402 ----
printf ("\n");
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &idesc_scsiswitch;
sc->sc_link.device = &idesc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
***************
*** 438,455 ****
}
/*
- * must be used
- */
- u_int
- ide_adinfo()
- {
- /*
- * one request at a time please
- */
- return(1);
- }
-
- /*
* used by specific ide controller
*
*/
--- 434,439 ----
***************
*** 469,475 ****
if (flags & SCSI_DATA_UIO)
panic("ide: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_NOMASK)
panic("ide_scsicmd: busy");
s = splbio();
--- 453,459 ----
if (flags & SCSI_DATA_UIO)
panic("ide: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_POLL)
panic("ide_scsicmd: busy");
s = splbio();
***************
*** 494,500 ****
*/
ide_donextcmd(dev);
! if (flags & SCSI_NOMASK)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
--- 478,484 ----
*/
ide_donextcmd(dev);
! if (flags & SCSI_POLL)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
***************
*** 523,529 ****
ide_scsidone(dev, -1);
return;
}
! if (flags & SCSI_NOMASK || ide_no_int)
stat = ideicmd(dev, slp->target, xs->cmd, xs->cmdlen,
xs->data, xs->datalen/*, phase*/);
else if (idego(dev, xs) == 0)
--- 507,513 ----
ide_scsidone(dev, -1);
return;
}
! if (flags & SCSI_POLL || ide_no_int)
stat = ideicmd(dev, slp->target, xs->cmd, xs->cmdlen,
xs->data, xs->datalen/*, phase*/);
else if (idego(dev, xs) == 0)
***************
*** 553,559 ****
*/
xs->status = stat;
! if (stat == 0 || xs->flags & SCSI_ERR_OK)
xs->resid = 0;
else {
switch(stat) {
--- 537,543 ----
*/
xs->status = stat;
! if (stat == 0)
xs->resid = 0;
else {
switch(stat) {
***************
*** 607,613 ****
slp = xs->sc_link;
! rqs.op_code = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
--- 591,597 ----
slp = xs->sc_link;
! rqs.opcode = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
***************
*** 850,856 ****
struct scsi_inquiry_data *inqbuf;
struct {
struct scsi_mode_header header;
! struct blk_desc blk_desc;
union disk_pages pages;
} *mdsnbuf;
--- 834,840 ----
struct scsi_inquiry_data *inqbuf;
struct {
struct scsi_mode_header header;
! struct scsi_blk_desc blk_desc;
union disk_pages pages;
} *mdsnbuf;
diff -cr /usr/src/sys/arch/amiga/dev/ivsc.c sys/arch/amiga/dev/ivsc.c
*** /usr/src/sys/arch/amiga/dev/ivsc.c Wed Dec 28 04:21:25 1994
--- sys/arch/amiga/dev/ivsc.c Mon Jan 2 20:40:15 1995
***************
*** 65,72 ****
sci_minphys,
0, /* no lun support */
0, /* no lun support */
- sci_adinfo,
- "ivsc",
};
struct scsi_device ivsc_scsidev = {
--- 65,70 ----
***************
*** 74,81 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "ivsc",
- 0,
};
#define QPRINTF
--- 72,77 ----
***************
*** 173,181 ****
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &ivsc_scsiswitch;
sc->sc_link.device = &ivsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 169,178 ----
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &ivsc_scsiswitch;
sc->sc_link.device = &ivsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
diff -cr /usr/src/sys/arch/amiga/dev/mgnsc.c sys/arch/amiga/dev/mgnsc.c
*** /usr/src/sys/arch/amiga/dev/mgnsc.c Wed Dec 28 04:21:26 1994
--- sys/arch/amiga/dev/mgnsc.c Mon Jan 2 20:40:15 1995
***************
*** 58,65 ****
siop_minphys,
0, /* no lun support */
0, /* no lun support */
- siop_adinfo,
- "mgnsc",
};
struct scsi_device mgnsc_scsidev = {
--- 58,63 ----
***************
*** 67,74 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "mgnsc",
- 0,
};
--- 65,70 ----
***************
*** 120,128 ****
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &mgnsc_scsiswitch;
sc->sc_link.device = &mgnsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 116,125 ----
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &mgnsc_scsiswitch;
sc->sc_link.device = &mgnsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
diff -cr /usr/src/sys/arch/amiga/dev/mlhsc.c sys/arch/amiga/dev/mlhsc.c
*** /usr/src/sys/arch/amiga/dev/mlhsc.c Wed Dec 28 04:21:27 1994
--- sys/arch/amiga/dev/mlhsc.c Mon Jan 2 20:40:15 1995
***************
*** 60,67 ****
sci_minphys,
0, /* no lun support */
0, /* no lun support */
- sci_adinfo,
- "mlhsc",
};
struct scsi_device mlhsc_scsidev = {
--- 60,65 ----
***************
*** 69,76 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "mlhsc",
- 0,
};
#define QPRINTF
--- 67,72 ----
***************
*** 142,150 ****
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &mlhsc_scsiswitch;
sc->sc_link.device = &mlhsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
/*
--- 138,147 ----
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &mlhsc_scsiswitch;
sc->sc_link.device = &mlhsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
/*
diff -cr /usr/src/sys/arch/amiga/dev/otgsc.c sys/arch/amiga/dev/otgsc.c
*** /usr/src/sys/arch/amiga/dev/otgsc.c Wed Dec 28 04:21:27 1994
--- sys/arch/amiga/dev/otgsc.c Mon Jan 2 20:40:15 1995
***************
*** 60,67 ****
sci_minphys,
0, /* no lun support */
0, /* no lun support */
- sci_adinfo,
- "otgsc",
};
struct scsi_device otgsc_scsidev = {
--- 60,65 ----
***************
*** 69,76 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "otgsc",
- 0,
};
#define QPRINTF
--- 67,72 ----
***************
*** 142,150 ****
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &otgsc_scsiswitch;
sc->sc_link.device = &otgsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
/*
--- 138,147 ----
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &otgsc_scsiswitch;
sc->sc_link.device = &otgsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
/*
diff -cr /usr/src/sys/arch/amiga/dev/sbic.c sys/arch/amiga/dev/sbic.c
*** /usr/src/sys/arch/amiga/dev/sbic.c Wed Dec 28 04:21:28 1994
--- sys/arch/amiga/dev/sbic.c Mon Jan 2 20:41:56 1995
***************
*** 138,155 ****
}
/*
- * must be used
- */
- u_int
- sbic_adinfo()
- {
- /*
- * one request at a time please
- */
- return(1);
- }
-
- /*
* used by specific sbic controller
*
* it appears that the higher level code does nothing with LUN's
--- 138,143 ----
***************
*** 172,178 ****
if (flags & SCSI_DATA_UIO)
panic("sbic: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_NOMASK)
panic("sbic_scsicmd: busy");
s = splbio();
--- 160,166 ----
if (flags & SCSI_DATA_UIO)
panic("sbic: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_POLL)
panic("sbic_scsicmd: busy");
s = splbio();
***************
*** 197,203 ****
*/
sbic_donextcmd(dev);
! if (flags & SCSI_NOMASK)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
--- 185,191 ----
*/
sbic_donextcmd(dev);
! if (flags & SCSI_POLL)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
***************
*** 229,235 ****
dev->sc_stat[0] = -1;
xs->cmd->bytes[0] |= slp->lun << 5;
! if (phase == STATUS_PHASE || flags & SCSI_NOMASK ||
sbicdmaok(dev, xs) == 0)
stat = sbicicmd(dev, slp->target, slp->lun, xs->cmd,
xs->cmdlen, xs->data, xs->datalen, phase);
--- 217,223 ----
dev->sc_stat[0] = -1;
xs->cmd->bytes[0] |= slp->lun << 5;
! if (phase == STATUS_PHASE || flags & SCSI_POLL ||
sbicdmaok(dev, xs) == 0)
stat = sbicicmd(dev, slp->target, slp->lun, xs->cmd,
xs->cmdlen, xs->data, xs->datalen, phase);
***************
*** 260,266 ****
*/
xs->status = stat;
! if (stat == 0 || xs->flags & SCSI_ERR_OK)
xs->resid = 0;
else {
switch(stat) {
--- 248,254 ----
*/
xs->status = stat;
! if (stat == 0)
xs->resid = 0;
else {
switch(stat) {
***************
*** 314,320 ****
slp = xs->sc_link;
! rqs.op_code = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
--- 302,308 ----
slp = xs->sc_link;
! rqs.opcode = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
diff -cr /usr/src/sys/arch/amiga/dev/sbicvar.h sys/arch/amiga/dev/sbicvar.h
*** /usr/src/sys/arch/amiga/dev/sbicvar.h Mon Nov 21 14:54:41 1994
--- sys/arch/amiga/dev/sbicvar.h Mon Jan 2 20:42:33 1995
***************
*** 159,165 ****
struct scsi_xfer;
void sbic_minphys __P((struct buf *bp));
- u_int sbic_adinfo __P((void));
int sbic_scsicmd __P((struct scsi_xfer *));
#endif /* _SBICVAR_H_ */
--- 159,164 ----
diff -cr /usr/src/sys/arch/amiga/dev/sci.c sys/arch/amiga/dev/sci.c
*** /usr/src/sys/arch/amiga/dev/sci.c Wed Dec 28 04:21:28 1994
--- sys/arch/amiga/dev/sci.c Mon Jan 2 20:41:56 1995
***************
*** 106,123 ****
}
/*
- * must be used
- */
- u_int
- sci_adinfo()
- {
- /*
- * one request at a time please
- */
- return(1);
- }
-
- /*
* used by specific sci controller
*
* it appears that the higher level code does nothing with LUN's
--- 106,111 ----
***************
*** 140,146 ****
if (flags & SCSI_DATA_UIO)
panic("sci: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_NOMASK)
panic("sci_scsicmd: busy");
s = splbio();
--- 128,134 ----
if (flags & SCSI_DATA_UIO)
panic("sci: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_POLL)
panic("sci_scsicmd: busy");
s = splbio();
***************
*** 165,171 ****
*/
sci_donextcmd(dev);
! if (flags & SCSI_NOMASK)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
--- 153,159 ----
*/
sci_donextcmd(dev);
! if (flags & SCSI_POLL)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
***************
*** 197,203 ****
dev->sc_stat[0] = -1;
xs->cmd->bytes[0] |= slp->lun << 5;
! if (phase == STATUS_PHASE || flags & SCSI_NOMASK)
stat = sciicmd(dev, slp->target, xs->cmd, xs->cmdlen,
xs->data, xs->datalen, phase);
else if (scigo(dev, xs) == 0)
--- 185,191 ----
dev->sc_stat[0] = -1;
xs->cmd->bytes[0] |= slp->lun << 5;
! if (phase == STATUS_PHASE || flags & SCSI_POLL)
stat = sciicmd(dev, slp->target, xs->cmd, xs->cmdlen,
xs->data, xs->datalen, phase);
else if (scigo(dev, xs) == 0)
***************
*** 227,233 ****
*/
xs->status = stat;
! if (stat == 0 || xs->flags & SCSI_ERR_OK)
xs->resid = 0;
else {
switch(stat) {
--- 215,221 ----
*/
xs->status = stat;
! if (stat == 0)
xs->resid = 0;
else {
switch(stat) {
***************
*** 281,287 ****
slp = xs->sc_link;
! rqs.op_code = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
--- 269,275 ----
slp = xs->sc_link;
! rqs.opcode = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
diff -cr /usr/src/sys/arch/amiga/dev/scivar.h sys/arch/amiga/dev/scivar.h
*** /usr/src/sys/arch/amiga/dev/scivar.h Mon Nov 21 14:54:42 1994
--- sys/arch/amiga/dev/scivar.h Mon Jan 2 20:42:33 1995
***************
*** 139,145 ****
struct scsi_xfer;
void sci_minphys __P((struct buf *bp));
- u_int sci_adinfo __P((void));
int sci_scsicmd __P((struct scsi_xfer *));
#endif /* _SCIVAR_H_ */
--- 139,144 ----
diff -cr /usr/src/sys/arch/amiga/dev/siop.c sys/arch/amiga/dev/siop.c
*** /usr/src/sys/arch/amiga/dev/siop.c Wed Dec 28 04:21:30 1994
--- sys/arch/amiga/dev/siop.c Mon Jan 2 20:41:56 1995
***************
*** 164,181 ****
}
/*
- * must be used
- */
- u_int
- siop_adinfo()
- {
- /*
- * one request at a time please
- */
- return(1);
- }
-
- /*
* used by specific siop controller
*
*/
--- 164,169 ----
***************
*** 195,201 ****
if (flags & SCSI_DATA_UIO)
panic("siop: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_NOMASK)
panic("siop_scsicmd: busy");
s = splbio();
--- 183,189 ----
if (flags & SCSI_DATA_UIO)
panic("siop: scsi data uio requested");
! if (dev->sc_xs && flags & SCSI_POLL)
panic("siop_scsicmd: busy");
s = splbio();
***************
*** 220,226 ****
*/
siop_donextcmd(dev);
! if (flags & SCSI_NOMASK)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
--- 208,214 ----
*/
siop_donextcmd(dev);
! if (flags & SCSI_POLL)
return(COMPLETE);
return(SUCCESSFULLY_QUEUED);
}
***************
*** 260,266 ****
printf ("active count %d\n", dev->sc_active);
}
#endif
! if (flags & SCSI_NOMASK || siop_no_dma)
stat = siopicmd(dev, slp->target, slp->lun, xs->cmd,
xs->cmdlen, xs->data, xs->datalen);
else if (siopgo(dev, xs) == 0)
--- 248,254 ----
printf ("active count %d\n", dev->sc_active);
}
#endif
! if (flags & SCSI_POLL || siop_no_dma)
stat = siopicmd(dev, slp->target, slp->lun, xs->cmd,
xs->cmdlen, xs->data, xs->datalen);
else if (siopgo(dev, xs) == 0)
***************
*** 290,296 ****
*/
xs->status = stat;
! if (stat == 0 || xs->flags & SCSI_ERR_OK)
xs->resid = 0;
else {
switch(stat) {
--- 278,284 ----
*/
xs->status = stat;
! if (stat == 0)
xs->resid = 0;
else {
switch(stat) {
***************
*** 357,363 ****
slp = xs->sc_link;
! rqs.op_code = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
--- 345,351 ----
slp = xs->sc_link;
! rqs.opcode = REQUEST_SENSE;
rqs.byte2 = slp->lun << 5;
#ifdef not_yet
rqs.length = xs->req_sense_length ? xs->req_sense_length :
diff -cr /usr/src/sys/arch/amiga/dev/siopvar.h sys/arch/amiga/dev/siopvar.h
*** /usr/src/sys/arch/amiga/dev/siopvar.h Wed Dec 28 04:21:31 1994
--- sys/arch/amiga/dev/siopvar.h Mon Jan 2 20:42:33 1995
***************
*** 148,154 ****
#define STS_EXT 0x80 /* Extended status valid */
void siop_minphys __P((struct buf *bp));
- u_int siop_adinfo __P((void));
int siop_scsicmd __P((struct scsi_xfer *));
#endif /* _SIOPVAR_H */
--- 148,153 ----
diff -cr /usr/src/sys/arch/amiga/dev/wesc.c sys/arch/amiga/dev/wesc.c
*** /usr/src/sys/arch/amiga/dev/wesc.c Wed Dec 28 04:21:32 1994
--- sys/arch/amiga/dev/wesc.c Mon Jan 2 20:40:15 1995
***************
*** 58,65 ****
siop_minphys,
0, /* no lun support */
0, /* no lun support */
- siop_adinfo,
- "wesc",
};
struct scsi_device wesc_scsidev = {
--- 58,63 ----
***************
*** 67,74 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "wesc",
- 0,
};
--- 65,70 ----
***************
*** 121,129 ****
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &wesc_scsiswitch;
sc->sc_link.device = &wesc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
--- 117,126 ----
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &wesc_scsiswitch;
sc->sc_link.device = &wesc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
custom.intreq = INTF_PORTS;
diff -cr /usr/src/sys/arch/amiga/dev/wstsc.c sys/arch/amiga/dev/wstsc.c
*** /usr/src/sys/arch/amiga/dev/wstsc.c Wed Dec 28 04:21:33 1994
--- sys/arch/amiga/dev/wstsc.c Mon Jan 2 20:40:15 1995
***************
*** 64,71 ****
sci_minphys,
0, /* no lun support */
0, /* no lun support */
- sci_adinfo,
- "wstsc",
};
struct scsi_device wstsc_scsidev = {
--- 64,69 ----
***************
*** 73,80 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "wstsc",
- 0,
};
#define QPRINTF
--- 71,76 ----
***************
*** 159,167 ****
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &wstsc_scsiswitch;
sc->sc_link.device = &wstsc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
/*
--- 155,164 ----
scireset(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &wstsc_scsiswitch;
sc->sc_link.device = &wstsc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
/*
diff -cr /usr/src/sys/arch/amiga/dev/zssc.c sys/arch/amiga/dev/zssc.c
*** /usr/src/sys/arch/amiga/dev/zssc.c Wed Dec 28 04:21:35 1994
--- sys/arch/amiga/dev/zssc.c Mon Jan 2 20:35:50 1995
***************
*** 59,66 ****
siop_minphys,
0, /* no lun support */
0, /* no lun support */
- siop_adinfo,
- "zssc",
};
struct scsi_device zssc_scsidev = {
--- 59,64 ----
***************
*** 68,75 ****
NULL, /* do not have a start functio */
NULL, /* have no async handler */
NULL, /* Use default done routine */
- "zssc",
- 0,
};
--- 66,71 ----
***************
*** 123,131 ****
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_targ = 7;
sc->sc_link.adapter = &zssc_scsiswitch;
sc->sc_link.device = &zssc_scsidev;
TAILQ_INIT(&sc->sc_xslist);
#if 1
--- 119,128 ----
siopinitialize(sc);
sc->sc_link.adapter_softc = sc;
! sc->sc_link.adapter_target = 7;
sc->sc_link.adapter = &zssc_scsiswitch;
sc->sc_link.device = &zssc_scsidev;
+ sc->sc_link.openings = 1;
TAILQ_INIT(&sc->sc_xslist);
#if 1
Michael
--
Michael L. Hitch INTERNET: osymh@montana.edu
Computer Consultant
Office of Systems and Computing Services
Montana State University Bozeman, MT USA