Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/acorn32/podulebus Rather than forcing on XS_POLL in...
details: https://anonhg.NetBSD.org/src/rev/1b3e6867d058
branches: trunk
changeset: 534890:1b3e6867d058
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Mon Aug 05 23:30:04 2002 +0000
description:
Rather than forcing on XS_POLL in SCSI transfers ourselves, set
SCSIPI_ADAPT_POLL_ONLY to tell the MI scsipi layer to do it for us. This,
plus G/Cing some debugging code, removes the card-specific scsi_request
wrappers.
diffstat:
sys/arch/acorn32/podulebus/asc.c | 39 ++++++---------------------------------
sys/arch/acorn32/podulebus/cosc.c | 38 +++++---------------------------------
sys/arch/acorn32/podulebus/csc.c | 27 +++------------------------
sys/arch/acorn32/podulebus/ptsc.c | 30 +++---------------------------
4 files changed, 17 insertions(+), 117 deletions(-)
diffs (274 lines):
diff -r 88849f8fca76 -r 1b3e6867d058 sys/arch/acorn32/podulebus/asc.c
--- a/sys/arch/acorn32/podulebus/asc.c Mon Aug 05 23:29:27 2002 +0000
+++ b/sys/arch/acorn32/podulebus/asc.c Mon Aug 05 23:30:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asc.c,v 1.6 2002/05/22 22:43:18 bjh21 Exp $ */
+/* $NetBSD: asc.c,v 1.7 2002/08/05 23:30:04 bjh21 Exp $ */
/*
* Copyright (c) 2001 Richard Earnshaw
@@ -74,7 +74,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: asc.c,v 1.6 2002/05/22 22:43:18 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asc.c,v 1.7 2002/08/05 23:30:04 bjh21 Exp $");
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -113,8 +113,6 @@
void asc_dmastop (void *, bus_dma_tag_t, struct sbic_acb *);
void asc_dmafinish (void *, bus_dma_tag_t, struct sbic_acb *);
-void asc_scsi_request (struct scsipi_channel *,
- scsipi_adapter_req_t, void *);
int asc_intr (void *);
void asc_minphys (struct buf *);
@@ -201,7 +199,7 @@
sbic->sc_adapter.adapt_max_periph = 1;
sbic->sc_adapter.adapt_ioctl = NULL;
sbic->sc_adapter.adapt_minphys = asc_minphys;
- sbic->sc_adapter.adapt_request = asc_scsi_request;
+ sbic->sc_adapter.adapt_request = sbic_scsi_request;
sbic->sc_channel.chan_adapter = &sbic->sc_adapter;
sbic->sc_channel.chan_bustype = &scsi_bustype;
@@ -221,8 +219,10 @@
get_bootconf_option(boot_args, "ascpoll", BOOTOPT_TYPE_BOOLEAN,
&asc_poll);
- if (asc_poll)
+ if (asc_poll) {
+ sbic->sc_adapter.adapt_flags |= SCSIPI_ADAPT_POLL_ONLY;
printf(" polling");
+ }
#endif
printf("\n");
@@ -320,33 +320,6 @@
sbic_dump(asc_cd.cd_devs[i]);
}
-void
-asc_scsi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
- void *arg)
-{
- struct scsipi_xfer *xs;
-
- switch (req) {
- case ADAPTER_REQ_RUN_XFER:
- xs = arg;
-
-#if ASC_POLL > 0
- /* ensure command is polling for the moment */
-
- if (asc_poll)
- xs->xs_control |= XS_CTL_POLL;
-#endif
-
-/* printf("id=%d lun=%dcmdlen=%d datalen=%d opcode=%02x flags=%08x status=%02x blk=%02x %02x\n",
- xs->xs_periph->periph_target, xs->xs_periph->periph_lun, xs->cmdlen, xs->datalen, xs->cmd->opcode,
- xs->xs_control, xs->status, xs->cmd->bytes[0], xs->cmd->bytes[1]);*/
-
- default:
- }
- sbic_scsi_request(chan, req, arg);
-}
-
-
int
asc_intr(void *arg)
{
diff -r 88849f8fca76 -r 1b3e6867d058 sys/arch/acorn32/podulebus/cosc.c
--- a/sys/arch/acorn32/podulebus/cosc.c Mon Aug 05 23:29:27 2002 +0000
+++ b/sys/arch/acorn32/podulebus/cosc.c Mon Aug 05 23:30:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cosc.c,v 1.4 2002/05/22 22:43:18 bjh21 Exp $ */
+/* $NetBSD: cosc.c,v 1.5 2002/08/05 23:30:05 bjh21 Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe
@@ -61,8 +61,6 @@
void coscattach __P((struct device *, struct device *, void *));
int coscmatch __P((struct device *, struct cfdata *, void *));
-void cosc_scsi_request __P((struct scsipi_channel *,
- scsipi_adapter_req_t, void *));
struct cfattach cosc_ca = {
sizeof(struct cosc_softc), coscmatch, coscattach
@@ -229,8 +227,10 @@
get_bootconf_option(boot_args, "coscpoll",
BOOTOPT_TYPE_BOOLEAN, &cosc_poll);
- if (cosc_poll)
+ if (cosc_poll) {
printf(" polling");
+ sc->sc_softc.sc_adapter.adapt_flags |= SCSIPI_ADAPT_POLL_ONLY;
+ }
#endif
sc->sc_softc.sc_bump_sz = NBPG;
@@ -244,7 +244,7 @@
sc->sc_softc.sc_adapter.adapt_max_periph = 1;
sc->sc_softc.sc_adapter.adapt_ioctl = NULL;
sc->sc_softc.sc_adapter.adapt_minphys = esc_minphys;
- sc->sc_softc.sc_adapter.adapt_request = cosc_scsi_request;
+ sc->sc_softc.sc_adapter.adapt_request = esc_scsi_request;
sc->sc_softc.sc_channel.chan_adapter = &sc->sc_softc.sc_adapter;
sc->sc_softc.sc_channel.chan_bustype = &scsi_bustype;
@@ -430,31 +430,3 @@
printf("cosc_build_dma_chain()\n");
return(0);
}
-
-
-void
-cosc_scsi_request(chan, req, arg)
- struct scsipi_channel *chan;
- scsipi_adapter_req_t req;
- void *arg;
-{
- struct scsipi_xfer *xs;
-
- switch (req) {
- case ADAPTER_REQ_RUN_XFER:
- xs = arg;
-
-#if COSC_POLL > 0
- if (cosc_poll)
- xs->xs_control |= XS_CTL_POLL;
-#endif
-#if 0
- if (periph->periph_lun == 0)
- printf("id=%d lun=%d cmdlen=%d datalen=%d opcode=%02x flags=%08x status=%02x blk=%02x %02x\n",
- xs->xs_periph->periph_target, xs->xs_periph->periph_lun, xs->cmdlen, xs->datalen, xs->cmd->opcode,
- xs->xs_control, xs->status, xs->cmd->bytes[0], xs->cmd->bytes[1]);
-#endif
- default:
- }
- esc_scsi_request(chan, req, arg);
-}
diff -r 88849f8fca76 -r 1b3e6867d058 sys/arch/acorn32/podulebus/csc.c
--- a/sys/arch/acorn32/podulebus/csc.c Mon Aug 05 23:29:27 2002 +0000
+++ b/sys/arch/acorn32/podulebus/csc.c Mon Aug 05 23:30:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: csc.c,v 1.3 2002/05/22 22:43:18 bjh21 Exp $ */
+/* $NetBSD: csc.c,v 1.4 2002/08/05 23:30:05 bjh21 Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -62,8 +62,6 @@
void cscattach __P((struct device *, struct device *, void *));
int cscmatch __P((struct device *, struct cfdata *, void *));
-void csc_scsi_request __P((struct scsipi_channel *,
- scsipi_adapter_req_t, void *));
struct cfattach csc_ca = {
sizeof(struct csc_softc), cscmatch, cscattach
@@ -169,7 +167,7 @@
sc->sc_softc.sc_adapter.adapt_max_periph = 1;
sc->sc_softc.sc_adapter.adapt_ioctl = NULL;
sc->sc_softc.sc_adapter.adapt_minphys = sfas_minphys;
- sc->sc_softc.sc_adapter.adapt_request = csc_scsi_request;
+ sc->sc_softc.sc_adapter.adapt_request = sfas_scsi_request;
sc->sc_softc.sc_channel.chan_adapter = &sc->sc_softc.sc_adapter;
sc->sc_softc.sc_channel.chan_bustype = &scsi_bustype;
@@ -201,6 +199,7 @@
panic("%s: Cannot install IRQ handler\n", dp->dv_xname);
#else
printf(" polling");
+ sc->sc_softc.sc_adapter.adapt_flags |= SCSIPI_ADAPT_POLL_ONLY;
#endif
printf("\n");
@@ -326,23 +325,3 @@
sc->sc_led_status--;
}
}
-
-void
-csc_scsi_request(chan, req, arg)
- struct scsipi_channel *chan;
- scsipi_adapter_req_t req;
- void *arg;
-{
- struct scsipi_xfer *xs;
-
- switch (req) {
- case ADAPTER_REQ_RUN_XFER:
- xs = arg;
- /* ensure command is polling for the moment */
-#if CSC_POLL > 0
- xs->xs_control |= XS_CTL_POLL;
-#endif
- default:
- }
- sfas_scsi_request(chan, req, arg);
-}
diff -r 88849f8fca76 -r 1b3e6867d058 sys/arch/acorn32/podulebus/ptsc.c
--- a/sys/arch/acorn32/podulebus/ptsc.c Mon Aug 05 23:29:27 2002 +0000
+++ b/sys/arch/acorn32/podulebus/ptsc.c Mon Aug 05 23:30:04 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ptsc.c,v 1.2 2001/11/27 00:53:12 thorpej Exp $ */
+/* $NetBSD: ptsc.c,v 1.3 2002/08/05 23:30:05 bjh21 Exp $ */
/*
* Copyright (c) 1995 Scott Stevens
@@ -67,8 +67,6 @@
void ptscattach __P((struct device *, struct device *, void *));
int ptscmatch __P((struct device *, struct cfdata *, void *));
-void ptsc_scsi_request __P((struct scsipi_channel *,
- scsipi_adapter_req_t, void *));
struct cfattach ptsc_ca = {
sizeof(struct ptsc_softc), ptscmatch, ptscattach
@@ -177,7 +175,7 @@
sc->sc_softc.sc_adapter.adapt_max_periph = 1;
sc->sc_softc.sc_adapter.adapt_ioctl = NULL;
sc->sc_softc.sc_adapter.adapt_minphys = sfas_minphys;
- sc->sc_softc.sc_adapter.adapt_request = ptsc_scsi_request;
+ sc->sc_softc.sc_adapter.adapt_request = sfas_scsi_request;
sc->sc_softc.sc_channel.chan_adapter = &sc->sc_softc.sc_adapter;
sc->sc_softc.sc_channel.chan_bustype = &scsi_bustype;
@@ -206,6 +204,7 @@
panic("%s: Cannot install IRQ handler\n", dp->dv_xname);
#else
printf(" polling");
+ sc->sc_softc.sc_adapter.adapt_flags = SCSIPI_ADAPT_POLL_ONLY;
#endif
printf("\n");
@@ -466,26 +465,3 @@
}
*rp->led = (sc->sc_led_status?1:0);
}
-
-void
-ptsc_scsi_request(chan, req, arg)
- struct scsipi_channel *chan;
- scsipi_adapter_req_t req;
- void *arg;
-{
- struct scsipi_xfer *xs;
-
- switch (req) {
- case ADAPTER_REQ_RUN_XFER:
- xs = arg;
- /* ensure command is polling for the moment */
-#if PTSC_POLL > 0
- xs->xs_control |= XS_CTL_POLL;
-#endif
-#if 0
- printf("Opcode %d\n", (int)(xs->cmd->opcode));
-#endif
- default:
- }
- sfas_scsi_request(chan, req, arg);
-}
Home |
Main Index |
Thread Index |
Old Index