catchup with scsi changes from osymh@gemini.oscs.montana.edu (Michael L. Hitch)
This commit is contained in:
parent
ce22a1a443
commit
396754ce32
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: afsc.c,v 1.4 1994/12/28 09:24:55 chopps Exp $ */
|
||||
/* $NetBSD: afsc.c,v 1.5 1995/01/05 07:22:31 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -59,8 +59,6 @@ struct scsi_adapter afsc_scsiswitch = {
|
|||
siop_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
siop_adinfo,
|
||||
"afsc",
|
||||
};
|
||||
|
||||
struct scsi_device afsc_scsidev = {
|
||||
|
@ -68,8 +66,6 @@ struct scsi_device afsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"afsc",
|
||||
0,
|
||||
};
|
||||
|
||||
|
||||
|
@ -123,9 +119,10 @@ afscattach(pdp, dp, auxp)
|
|||
siopinitialize(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ahsc.c,v 1.6 1994/12/28 09:24:57 chopps Exp $ */
|
||||
/* $NetBSD: ahsc.c,v 1.7 1995/01/05 07:22:32 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
|
@ -65,8 +65,6 @@ struct scsi_adapter ahsc_scsiswitch = {
|
|||
sbic_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
sbic_adinfo,
|
||||
"ahsc",
|
||||
};
|
||||
|
||||
struct scsi_device ahsc_scsidev = {
|
||||
|
@ -74,8 +72,6 @@ struct scsi_device ahsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"ahsc",
|
||||
0,
|
||||
};
|
||||
|
||||
|
||||
|
@ -142,9 +138,10 @@ ahscattach(pdp, dp, auxp)
|
|||
sbicreset(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atzsc.c,v 1.9 1994/12/28 09:24:59 chopps Exp $ */
|
||||
/* $NetBSD: atzsc.c,v 1.10 1995/01/05 07:22:34 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
|
@ -65,8 +65,6 @@ struct scsi_adapter atzsc_scsiswitch = {
|
|||
sbic_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
sbic_adinfo,
|
||||
"atzsc",
|
||||
};
|
||||
|
||||
struct scsi_device atzsc_scsidev = {
|
||||
|
@ -74,8 +72,6 @@ struct scsi_device atzsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"atzsc",
|
||||
0,
|
||||
};
|
||||
|
||||
|
||||
|
@ -164,9 +160,10 @@ atzscattach(pdp, dp, auxp)
|
|||
sbicreset(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gtsc.c,v 1.9 1994/12/28 09:25:21 chopps Exp $ */
|
||||
/* $NetBSD: gtsc.c,v 1.10 1995/01/05 07:22:35 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
|
@ -66,8 +66,6 @@ struct scsi_adapter gtsc_scsiswitch = {
|
|||
sbic_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
sbic_adinfo,
|
||||
"gtsc",
|
||||
};
|
||||
|
||||
struct scsi_device gtsc_scsidev = {
|
||||
|
@ -75,8 +73,6 @@ struct scsi_device gtsc_scsidev = {
|
|||
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 */
|
||||
|
@ -187,9 +183,10 @@ gtscattach(pdp, dp, auxp)
|
|||
sbicreset(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: idesc.c,v 1.9 1994/12/28 09:25:25 chopps Exp $ */
|
||||
/* $NetBSD: idesc.c,v 1.10 1995/01/05 07:22:36 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -231,7 +231,6 @@ struct idec_softc
|
|||
};
|
||||
|
||||
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 *));
|
||||
|
@ -255,8 +254,6 @@ struct scsi_adapter idesc_scsiswitch = {
|
|||
ide_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
ide_adinfo,
|
||||
"idesc",
|
||||
};
|
||||
|
||||
struct scsi_device idesc_scsidev = {
|
||||
|
@ -264,8 +261,6 @@ struct scsi_device idesc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"idesc",
|
||||
0,
|
||||
};
|
||||
|
||||
struct cfdriver idesccd = {
|
||||
|
@ -398,9 +393,10 @@ idescattach(pdp, dp, auxp)
|
|||
printf ("\n");
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
@ -437,18 +433,6 @@ ide_minphys(bp)
|
|||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* must be used
|
||||
*/
|
||||
u_int
|
||||
ide_adinfo()
|
||||
{
|
||||
/*
|
||||
* one request at a time please
|
||||
*/
|
||||
return(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* used by specific ide controller
|
||||
*
|
||||
|
@ -469,7 +453,7 @@ ide_scsicmd(xs)
|
|||
if (flags & SCSI_DATA_UIO)
|
||||
panic("ide: scsi data uio requested");
|
||||
|
||||
if (dev->sc_xs && flags & SCSI_NOMASK)
|
||||
if (dev->sc_xs && flags & SCSI_POLL)
|
||||
panic("ide_scsicmd: busy");
|
||||
|
||||
s = splbio();
|
||||
|
@ -494,7 +478,7 @@ ide_scsicmd(xs)
|
|||
*/
|
||||
ide_donextcmd(dev);
|
||||
|
||||
if (flags & SCSI_NOMASK)
|
||||
if (flags & SCSI_POLL)
|
||||
return(COMPLETE);
|
||||
return(SUCCESSFULLY_QUEUED);
|
||||
}
|
||||
|
@ -523,7 +507,7 @@ ide_donextcmd(dev)
|
|||
ide_scsidone(dev, -1);
|
||||
return;
|
||||
}
|
||||
if (flags & SCSI_NOMASK || ide_no_int)
|
||||
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,7 +537,7 @@ ide_scsidone(dev, stat)
|
|||
*/
|
||||
xs->status = stat;
|
||||
|
||||
if (stat == 0 || xs->flags & SCSI_ERR_OK)
|
||||
if (stat == 0)
|
||||
xs->resid = 0;
|
||||
else {
|
||||
switch(stat) {
|
||||
|
@ -607,7 +591,7 @@ idegetsense(dev, xs)
|
|||
|
||||
slp = xs->sc_link;
|
||||
|
||||
rqs.op_code = REQUEST_SENSE;
|
||||
rqs.opcode = REQUEST_SENSE;
|
||||
rqs.byte2 = slp->lun << 5;
|
||||
#ifdef not_yet
|
||||
rqs.length = xs->req_sense_length ? xs->req_sense_length :
|
||||
|
@ -850,7 +834,7 @@ ideicmd(dev, target, cbuf, clen, buf, len)
|
|||
struct scsi_inquiry_data *inqbuf;
|
||||
struct {
|
||||
struct scsi_mode_header header;
|
||||
struct blk_desc blk_desc;
|
||||
struct scsi_blk_desc blk_desc;
|
||||
union disk_pages pages;
|
||||
} *mdsnbuf;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ivsc.c,v 1.7 1994/12/28 09:25:39 chopps Exp $ */
|
||||
/* $NetBSD: ivsc.c,v 1.8 1995/01/05 07:22:38 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -65,8 +65,6 @@ struct scsi_adapter ivsc_scsiswitch = {
|
|||
sci_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
sci_adinfo,
|
||||
"ivsc",
|
||||
};
|
||||
|
||||
struct scsi_device ivsc_scsidev = {
|
||||
|
@ -74,8 +72,6 @@ struct scsi_device ivsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"ivsc",
|
||||
0,
|
||||
};
|
||||
|
||||
#define QPRINTF
|
||||
|
@ -173,9 +169,10 @@ ivscattach(pdp, dp, auxp)
|
|||
scireset(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mgnsc.c,v 1.8 1994/12/28 09:25:43 chopps Exp $ */
|
||||
/* $NetBSD: mgnsc.c,v 1.9 1995/01/05 07:22:39 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -58,8 +58,6 @@ struct scsi_adapter mgnsc_scsiswitch = {
|
|||
siop_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
siop_adinfo,
|
||||
"mgnsc",
|
||||
};
|
||||
|
||||
struct scsi_device mgnsc_scsidev = {
|
||||
|
@ -67,8 +65,6 @@ struct scsi_device mgnsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"mgnsc",
|
||||
0,
|
||||
};
|
||||
|
||||
|
||||
|
@ -120,9 +116,10 @@ mgnscattach(pdp, dp, auxp)
|
|||
siopinitialize(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mlhsc.c,v 1.6 1994/12/28 09:25:45 chopps Exp $ */
|
||||
/* $NetBSD: mlhsc.c,v 1.7 1995/01/05 07:22:40 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -60,8 +60,6 @@ struct scsi_adapter mlhsc_scsiswitch = {
|
|||
sci_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
sci_adinfo,
|
||||
"mlhsc",
|
||||
};
|
||||
|
||||
struct scsi_device mlhsc_scsidev = {
|
||||
|
@ -69,8 +67,6 @@ struct scsi_device mlhsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"mlhsc",
|
||||
0,
|
||||
};
|
||||
|
||||
#define QPRINTF
|
||||
|
@ -142,9 +138,10 @@ mlhscattach(pdp, dp, auxp)
|
|||
scireset(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: otgsc.c,v 1.6 1994/12/28 09:25:47 chopps Exp $ */
|
||||
/* $NetBSD: otgsc.c,v 1.7 1995/01/05 07:22:41 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -60,8 +60,6 @@ struct scsi_adapter otgsc_scsiswitch = {
|
|||
sci_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
sci_adinfo,
|
||||
"otgsc",
|
||||
};
|
||||
|
||||
struct scsi_device otgsc_scsidev = {
|
||||
|
@ -69,8 +67,6 @@ struct scsi_device otgsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"otgsc",
|
||||
0,
|
||||
};
|
||||
|
||||
#define QPRINTF
|
||||
|
@ -142,9 +138,10 @@ otgscattach(pdp, dp, auxp)
|
|||
scireset(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sbic.c,v 1.7 1994/12/28 09:25:48 chopps Exp $ */
|
||||
/* $NetBSD: sbic.c,v 1.8 1995/01/05 07:22:43 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
|
@ -137,18 +137,6 @@ sbic_minphys(bp)
|
|||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* must be used
|
||||
*/
|
||||
u_int
|
||||
sbic_adinfo()
|
||||
{
|
||||
/*
|
||||
* one request at a time please
|
||||
*/
|
||||
return(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* used by specific sbic controller
|
||||
*
|
||||
|
@ -172,7 +160,7 @@ sbic_scsicmd(xs)
|
|||
if (flags & SCSI_DATA_UIO)
|
||||
panic("sbic: scsi data uio requested");
|
||||
|
||||
if (dev->sc_xs && flags & SCSI_NOMASK)
|
||||
if (dev->sc_xs && flags & SCSI_POLL)
|
||||
panic("sbic_scsicmd: busy");
|
||||
|
||||
s = splbio();
|
||||
|
@ -197,7 +185,7 @@ sbic_scsicmd(xs)
|
|||
*/
|
||||
sbic_donextcmd(dev);
|
||||
|
||||
if (flags & SCSI_NOMASK)
|
||||
if (flags & SCSI_POLL)
|
||||
return(COMPLETE);
|
||||
return(SUCCESSFULLY_QUEUED);
|
||||
}
|
||||
|
@ -229,7 +217,7 @@ sbic_donextcmd(dev)
|
|||
|
||||
dev->sc_stat[0] = -1;
|
||||
xs->cmd->bytes[0] |= slp->lun << 5;
|
||||
if (phase == STATUS_PHASE || flags & SCSI_NOMASK ||
|
||||
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,7 +248,7 @@ sbic_scsidone(dev, stat)
|
|||
*/
|
||||
xs->status = stat;
|
||||
|
||||
if (stat == 0 || xs->flags & SCSI_ERR_OK)
|
||||
if (stat == 0)
|
||||
xs->resid = 0;
|
||||
else {
|
||||
switch(stat) {
|
||||
|
@ -314,7 +302,7 @@ sbicgetsense(dev, xs)
|
|||
|
||||
slp = xs->sc_link;
|
||||
|
||||
rqs.op_code = REQUEST_SENSE;
|
||||
rqs.opcode = REQUEST_SENSE;
|
||||
rqs.byte2 = slp->lun << 5;
|
||||
#ifdef not_yet
|
||||
rqs.length = xs->req_sense_length ? xs->req_sense_length :
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sbicvar.h,v 1.3 1994/10/26 02:04:42 cgd Exp $ */
|
||||
/* $NetBSD: sbicvar.h,v 1.4 1995/01/05 07:22:44 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -159,7 +159,6 @@ struct buf;
|
|||
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_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sci.c,v 1.9 1994/12/28 09:25:50 chopps Exp $ */
|
||||
/* $NetBSD: sci.c,v 1.10 1995/01/05 07:22:46 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -105,18 +105,6 @@ sci_minphys(bp)
|
|||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* must be used
|
||||
*/
|
||||
u_int
|
||||
sci_adinfo()
|
||||
{
|
||||
/*
|
||||
* one request at a time please
|
||||
*/
|
||||
return(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* used by specific sci controller
|
||||
*
|
||||
|
@ -140,7 +128,7 @@ sci_scsicmd(xs)
|
|||
if (flags & SCSI_DATA_UIO)
|
||||
panic("sci: scsi data uio requested");
|
||||
|
||||
if (dev->sc_xs && flags & SCSI_NOMASK)
|
||||
if (dev->sc_xs && flags & SCSI_POLL)
|
||||
panic("sci_scsicmd: busy");
|
||||
|
||||
s = splbio();
|
||||
|
@ -165,7 +153,7 @@ sci_scsicmd(xs)
|
|||
*/
|
||||
sci_donextcmd(dev);
|
||||
|
||||
if (flags & SCSI_NOMASK)
|
||||
if (flags & SCSI_POLL)
|
||||
return(COMPLETE);
|
||||
return(SUCCESSFULLY_QUEUED);
|
||||
}
|
||||
|
@ -197,7 +185,7 @@ sci_donextcmd(dev)
|
|||
|
||||
dev->sc_stat[0] = -1;
|
||||
xs->cmd->bytes[0] |= slp->lun << 5;
|
||||
if (phase == STATUS_PHASE || flags & SCSI_NOMASK)
|
||||
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,7 +215,7 @@ sci_scsidone(dev, stat)
|
|||
*/
|
||||
xs->status = stat;
|
||||
|
||||
if (stat == 0 || xs->flags & SCSI_ERR_OK)
|
||||
if (stat == 0)
|
||||
xs->resid = 0;
|
||||
else {
|
||||
switch(stat) {
|
||||
|
@ -281,7 +269,7 @@ scigetsense(dev, xs)
|
|||
|
||||
slp = xs->sc_link;
|
||||
|
||||
rqs.op_code = REQUEST_SENSE;
|
||||
rqs.opcode = REQUEST_SENSE;
|
||||
rqs.byte2 = slp->lun << 5;
|
||||
#ifdef not_yet
|
||||
rqs.length = xs->req_sense_length ? xs->req_sense_length :
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scivar.h,v 1.4 1994/10/26 02:04:47 cgd Exp $ */
|
||||
/* $NetBSD: scivar.h,v 1.5 1995/01/05 07:22:47 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -139,7 +139,6 @@ struct buf;
|
|||
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_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: siop.c,v 1.18 1994/12/28 09:25:55 chopps Exp $ */
|
||||
/* $NetBSD: siop.c,v 1.19 1995/01/05 07:22:48 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -163,18 +163,6 @@ siop_minphys(bp)
|
|||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* must be used
|
||||
*/
|
||||
u_int
|
||||
siop_adinfo()
|
||||
{
|
||||
/*
|
||||
* one request at a time please
|
||||
*/
|
||||
return(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* used by specific siop controller
|
||||
*
|
||||
|
@ -195,7 +183,7 @@ siop_scsicmd(xs)
|
|||
if (flags & SCSI_DATA_UIO)
|
||||
panic("siop: scsi data uio requested");
|
||||
|
||||
if (dev->sc_xs && flags & SCSI_NOMASK)
|
||||
if (dev->sc_xs && flags & SCSI_POLL)
|
||||
panic("siop_scsicmd: busy");
|
||||
|
||||
s = splbio();
|
||||
|
@ -220,7 +208,7 @@ siop_scsicmd(xs)
|
|||
*/
|
||||
siop_donextcmd(dev);
|
||||
|
||||
if (flags & SCSI_NOMASK)
|
||||
if (flags & SCSI_POLL)
|
||||
return(COMPLETE);
|
||||
return(SUCCESSFULLY_QUEUED);
|
||||
}
|
||||
|
@ -260,7 +248,7 @@ if (dev->sc_active > 1) {
|
|||
printf ("active count %d\n", dev->sc_active);
|
||||
}
|
||||
#endif
|
||||
if (flags & SCSI_NOMASK || siop_no_dma)
|
||||
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,7 +278,7 @@ siop_scsidone(dev, stat)
|
|||
*/
|
||||
xs->status = stat;
|
||||
|
||||
if (stat == 0 || xs->flags & SCSI_ERR_OK)
|
||||
if (stat == 0)
|
||||
xs->resid = 0;
|
||||
else {
|
||||
switch(stat) {
|
||||
|
@ -357,7 +345,7 @@ siopgetsense(dev, xs)
|
|||
|
||||
slp = xs->sc_link;
|
||||
|
||||
rqs.op_code = REQUEST_SENSE;
|
||||
rqs.opcode = REQUEST_SENSE;
|
||||
rqs.byte2 = slp->lun << 5;
|
||||
#ifdef not_yet
|
||||
rqs.length = xs->req_sense_length ? xs->req_sense_length :
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: siopvar.h,v 1.6 1994/12/28 09:26:02 chopps Exp $ */
|
||||
/* $NetBSD: siopvar.h,v 1.7 1995/01/05 07:22:50 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -148,7 +148,6 @@ struct siop_softc {
|
|||
#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 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wesc.c,v 1.6 1994/12/28 09:26:04 chopps Exp $ */
|
||||
/* $NetBSD: wesc.c,v 1.7 1995/01/05 07:22:51 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -58,8 +58,6 @@ struct scsi_adapter wesc_scsiswitch = {
|
|||
siop_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
siop_adinfo,
|
||||
"wesc",
|
||||
};
|
||||
|
||||
struct scsi_device wesc_scsidev = {
|
||||
|
@ -67,8 +65,6 @@ struct scsi_device wesc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"wesc",
|
||||
0,
|
||||
};
|
||||
|
||||
|
||||
|
@ -121,9 +117,10 @@ wescattach(pdp, dp, auxp)
|
|||
siopinitialize(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wstsc.c,v 1.6 1994/12/28 09:26:05 chopps Exp $ */
|
||||
/* $NetBSD: wstsc.c,v 1.7 1995/01/05 07:22:53 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -64,8 +64,6 @@ struct scsi_adapter wstsc_scsiswitch = {
|
|||
sci_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
sci_adinfo,
|
||||
"wstsc",
|
||||
};
|
||||
|
||||
struct scsi_device wstsc_scsidev = {
|
||||
|
@ -73,8 +71,6 @@ struct scsi_device wstsc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"wstsc",
|
||||
0,
|
||||
};
|
||||
|
||||
#define QPRINTF
|
||||
|
@ -159,9 +155,10 @@ wstscattach(pdp, dp, auxp)
|
|||
scireset(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zssc.c,v 1.8 1994/12/28 09:26:10 chopps Exp $ */
|
||||
/* $NetBSD: zssc.c,v 1.9 1995/01/05 07:22:55 chopps Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -59,8 +59,6 @@ struct scsi_adapter zssc_scsiswitch = {
|
|||
siop_minphys,
|
||||
0, /* no lun support */
|
||||
0, /* no lun support */
|
||||
siop_adinfo,
|
||||
"zssc",
|
||||
};
|
||||
|
||||
struct scsi_device zssc_scsidev = {
|
||||
|
@ -68,8 +66,6 @@ struct scsi_device zssc_scsidev = {
|
|||
NULL, /* do not have a start functio */
|
||||
NULL, /* have no async handler */
|
||||
NULL, /* Use default done routine */
|
||||
"zssc",
|
||||
0,
|
||||
};
|
||||
|
||||
|
||||
|
@ -123,9 +119,10 @@ zsscattach(pdp, dp, auxp)
|
|||
siopinitialize(sc);
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_targ = 7;
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue