Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys/arch/arm32/podulebus Make these pass compile te...



details:   https://anonhg.NetBSD.org/src/rev/0d3bcd942e02
branches:  thorpej_scsipi
changeset: 477431:0d3bcd942e02
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Mar 29 09:39:51 2001 +0000

description:
Make these pass compile test on i386, at last.

diffstat:

 sys/arch/arm32/podulebus/asc.c     |  10 ++++++----
 sys/arch/arm32/podulebus/cosc.c    |   9 +++++----
 sys/arch/arm32/podulebus/csa.c     |   4 ++--
 sys/arch/arm32/podulebus/csc.c     |   5 +++--
 sys/arch/arm32/podulebus/esc.c     |  12 +++++-------
 sys/arch/arm32/podulebus/oak.c     |   4 ++--
 sys/arch/arm32/podulebus/ptsc.c    |   5 +++--
 sys/arch/arm32/podulebus/sbic.c    |  10 +++++-----
 sys/arch/arm32/podulebus/sbicvar.h |   5 +++--
 sys/arch/arm32/podulebus/sfas.c    |  10 ++++------
 sys/arch/arm32/podulebus/sfasvar.h |   5 +++--
 11 files changed, 41 insertions(+), 38 deletions(-)

diffs (truncated from 333 to 300 lines):

diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/asc.c
--- a/sys/arch/arm32/podulebus/asc.c    Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/asc.c    Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asc.c,v 1.26.2.3 2001/03/29 09:02:58 bouyer Exp $      */
+/*     $NetBSD: asc.c,v 1.26.2.4 2001/03/29 09:39:51 bouyer Exp $      */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -78,9 +78,10 @@
 int asc_dmanext __P((struct sbic_softc *));
 int asc_dmaintr __P((struct sbic_softc *));
 int asc_dmago  __P((struct sbic_softc *, char *, int, int));
-void asc_scsipi_request __P((struct scsipi_channel *,
+void asc_scsi_request __P((struct scsipi_channel *,
                                 scsipi_adapter_req_t, void *));
 int asc_intr   __P((void *arg));
+void asc_minphys __P((struct buf *bp));
 
 #ifdef DEBUG
 int    asc_dmadebug = 0;
@@ -154,7 +155,7 @@
        sbic->sc_sbicp = (sbic_regmap_p) (sc->sc_podule->mod_base + ASC_SBIC);
        sbic->sc_clkfreq = sbic_clock_override ? sbic_clock_override : 143;
 
-       sbic->sc_adapter.adapt_dev = &sc->sc_dev;
+       sbic->sc_adapter.adapt_dev = &sbic->sc_dev;
        sbic->sc_adapter.adapt_nchannels = 1;
        sbic->sc_adapter.adapt_openings = 7; 
        sbic->sc_adapter.adapt_max_periph = 1;
@@ -162,7 +163,7 @@
        sbic->sc_adapter.adapt_minphys = asc_minphys;
        sbic->sc_adapter.adapt_request = asc_scsi_request;
 
-       sbic->sc_channel.chan_adapter = &sc->sc_adapter;
+       sbic->sc_channel.chan_adapter = &sbic->sc_adapter;
        sbic->sc_channel.chan_bustype = &scsi_bustype;
        sbic->sc_channel.chan_channel = 0;
        sbic->sc_channel.chan_ntargets = 8;
@@ -439,6 +440,7 @@
                    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);
 }
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/cosc.c
--- a/sys/arch/arm32/podulebus/cosc.c   Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/cosc.c   Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cosc.c,v 1.11.2.2 2001/03/29 09:02:58 bouyer Exp $     */
+/*     $NetBSD: cosc.c,v 1.11.2.3 2001/03/29 09:39:52 bouyer Exp $     */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -61,7 +61,7 @@
 
 void coscattach        __P((struct device *, struct device *, void *));
 int coscmatch  __P((struct device *, struct cfdata *, void *));
-void cosc_scsicmd      __P((struct scsipi_channel *,
+void cosc_scsi_request __P((struct scsipi_channel *,
                                scsipi_adapter_req_t, void *));
 
 struct cfattach cosc_ca = {
@@ -245,7 +245,7 @@
 
        escinitialize((struct esc_softc *)sc);
 
-       sc->sc_softc.sc_adapter.adapt_dev = &sc->sc_dev;
+       sc->sc_softc.sc_adapter.adapt_dev = &sc->sc_softc.sc_dev;
        sc->sc_softc.sc_adapter.adapt_nchannels = 1;
        sc->sc_softc.sc_adapter.adapt_openings = 7;
        sc->sc_softc.sc_adapter.adapt_max_periph = 1;
@@ -253,7 +253,7 @@
        sc->sc_softc.sc_adapter.adapt_minphys = esc_minphys;
        sc->sc_softc.sc_adapter.adapt_request = cosc_scsi_request;
 
-       sc->sc_softc.sc_channel.chan_adapter = &sc->sc_adapter;
+       sc->sc_softc.sc_channel.chan_adapter = &sc->sc_softc.sc_adapter;
        sc->sc_softc.sc_channel.chan_bustype = &scsi_bustype;
        sc->sc_softc.sc_channel.chan_channel = 0;
        sc->sc_softc.sc_channel.chan_ntargets = 8;
@@ -461,6 +461,7 @@
                    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 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/csa.c
--- a/sys/arch/arm32/podulebus/csa.c    Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/csa.c    Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: csa.c,v 1.4.10.3 2001/03/29 09:02:58 bouyer Exp $      */
+/*     $NetBSD: csa.c,v 1.4.10.4 2001/03/29 09:39:52 bouyer Exp $      */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -185,7 +185,7 @@
        sprintf(hi_option, "%s.hostid", sc->sc_ncr5380.sc_dev.dv_xname);
        (void)get_bootconf_option(boot_args, hi_option,
            BOOTOPT_TYPE_INT, &sc->sc_ncr5380.sc_channel.chan_id);
-       sc->sc_ncr5380.sc_adapter.adapter_minphys = minphys;
+       sc->sc_ncr5380.sc_adapter.adapt_minphys = minphys;
 
        printf(": host=%d, using 8 bit PIO",
            sc->sc_ncr5380.sc_channel.chan_id);
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/csc.c
--- a/sys/arch/arm32/podulebus/csc.c    Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/csc.c    Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: csc.c,v 1.6.2.3 2001/03/29 09:02:58 bouyer Exp $       */
+/*     $NetBSD: csc.c,v 1.6.2.4 2001/03/29 09:39:52 bouyer Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -164,7 +164,7 @@
        sc->sc_softc.sc_adapter.adapt_minphys = sfas_minphys;
        sc->sc_softc.sc_adapter.adapt_request = csc_scsi_request;
 
-       sc->sc_softc.sc_channel.chan_adapter = &sc->sc_adapter;
+       sc->sc_softc.sc_channel.chan_adapter = &sc->sc_softc.sc_adapter;
        sc->sc_softc.sc_channel.chan_bustype = &scsi_bustype;
        sc->sc_softc.sc_channel.chan_channel = 0;
        sc->sc_softc.sc_channel.chan_ntargets = 8;
@@ -335,6 +335,7 @@
 #if CSC_POLL > 0
                xs->xs_control |= XS_CTL_POLL;
 #endif
+       default:
        }
        sfas_scsi_request(chan, req, arg);
 }
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/esc.c
--- a/sys/arch/arm32/podulebus/esc.c    Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/esc.c    Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: esc.c,v 1.8.2.2 2001/03/29 09:02:58 bouyer Exp $       */
+/*     $NetBSD: esc.c,v 1.8.2.3 2001/03/29 09:39:52 bouyer Exp $       */
 
 /*
  * Copyright (c) 1995 Scott Stevens
@@ -217,7 +217,7 @@
 /*
  * used by specific esc controller
  */
-int
+void
 esc_scsi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
                                                                void *arg)
 {
@@ -1166,8 +1166,7 @@
 
                esc_restore_pointers(dev);
 
-               if (!(nexus->flags & ESC_NF_SENSING))
-                       nexus->status   = 0xFF;
+               nexus->status   = 0xFF;
                dev->sc_msg_in[0] = 0xFF;
                dev->sc_msg_in_len= 0;
 
@@ -1239,9 +1238,8 @@
                status = *rp->esc_fifo;
                msg = *rp->esc_fifo;
 
-               if (!(nexus->flags & ESC_NF_SENSING))
-                       nexus->status = status;
-               else if (status != 0)
+               nexus->status = status;
+               if (status != 0)
                        nexus->status = -1;
 
                /*
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/oak.c
--- a/sys/arch/arm32/podulebus/oak.c    Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/oak.c    Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: oak.c,v 1.16.10.3 2001/03/29 09:02:58 bouyer Exp $     */
+/*     $NetBSD: oak.c,v 1.16.10.4 2001/03/29 09:39:52 bouyer Exp $     */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -157,7 +157,7 @@
        sprintf(hi_option, "%s.hostid", sc->sc_ncr5380.sc_dev.dv_xname);
        (void)get_bootconf_option(boot_args, hi_option,
            BOOTOPT_TYPE_INT, &sc->sc_ncr5380.sc_channel.chan_id);
-       sc->sc_ncr5380.sc_adapter.adapter_minphys = minphys;
+       sc->sc_ncr5380.sc_adapter.adapt_minphys = minphys;
 
        printf(": host=%d, using 8 bit PIO\n",
            sc->sc_ncr5380.sc_channel.chan_id);
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/ptsc.c
--- a/sys/arch/arm32/podulebus/ptsc.c   Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/ptsc.c   Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptsc.c,v 1.23.2.3 2001/03/29 09:02:58 bouyer Exp $     */
+/*     $NetBSD: ptsc.c,v 1.23.2.4 2001/03/29 09:39:52 bouyer Exp $     */
 
 /*
  * Copyright (c) 1995 Scott Stevens
@@ -171,7 +171,7 @@
        sc->sc_softc.sc_adapter.adapt_minphys = sfas_minphys;
        sc->sc_softc.sc_adapter.adapt_request = ptsc_scsi_request;
 
-       sc->sc_softc.sc_channel.chan_adapter = &sc->sc_adapter;
+       sc->sc_softc.sc_channel.chan_adapter = &sc->sc_softc.sc_adapter;
        sc->sc_softc.sc_channel.chan_bustype = &scsi_bustype;
        sc->sc_softc.sc_channel.chan_channel = 0; 
        sc->sc_softc.sc_channel.chan_ntargets = 8;
@@ -477,6 +477,7 @@
 #if 0
                printf("Opcode %d\n", (int)(xs->cmd->opcode));
 #endif
+       default:
        }
        sfas_scsi_request(chan, req, arg);
 }
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/sbic.c
--- a/sys/arch/arm32/podulebus/sbic.c   Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/sbic.c   Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbic.c,v 1.13.2.3 2001/03/29 09:02:59 bouyer Exp $ */
+/* $NetBSD: sbic.c,v 1.13.2.4 2001/03/29 09:39:52 bouyer Exp $ */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -371,7 +371,7 @@
  * so I will too.  I could plug it in, however so could they
  * in scsi_scsi_cmd().
  */
-int
+void
 sbic_scsi_request(chan, req, arg)
        struct scsipi_channel *chan;
        scsipi_adapter_req_t req;
@@ -443,7 +443,7 @@
                                dev->target = periph->periph_target;
                                dev->lun = periph->periph_lun;
                                stat = sbicicmd(dev,
-                                   periph->periph.target, periph->periph_lun,
+                                   periph->periph_target, periph->periph_lun,
                                    &acb->cmd, acb->clen,
                                    acb->sc_kv.dc_addr, acb->sc_kv.dc_count);
                        } while (dev->sc_nexus != acb);
@@ -557,7 +557,7 @@
 
        xs = acb->xs;
        periph = xs->xs_periph;
-       dev = (void *)periph->periph_chan->chan_adapter->adapt_dev;
+       dev = (void *)periph->periph_channel->chan_adapter->adapt_dev;
        SBIC_TRACE(dev);
 #ifdef DIAGNOSTIC
        if (acb == NULL || xs == NULL) {
@@ -575,7 +575,7 @@
                printf("scsidone: (%d,%d)->(%d,%d)%02x\n",
                       periph->periph_target, periph->periph_lun,
                       dev->target,  dev->lun,  stat);
-       if( xs->xs_periph->periph_target == dev->sc_channel->chan_id )
+       if( xs->xs_periph->periph_target == dev->sc_channel.chan_id )
                panic("target == hostid");
 #endif
 
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/sbicvar.h
--- a/sys/arch/arm32/podulebus/sbicvar.h        Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/sbicvar.h        Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbicvar.h,v 1.4.10.2 2001/03/29 09:02:59 bouyer Exp $ */
+/* $NetBSD: sbicvar.h,v 1.4.10.3 2001/03/29 09:39:52 bouyer Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -226,7 +226,8 @@
 struct scsipi_xfer;
 
 void sbic_minphys      __P((struct buf *bp));
-int sbic_scsicmd       __P((struct scsipi_xfer *));
+void sbic_scsi_request __P((struct scsipi_channel *,
+                               scsipi_adapter_req_t, void *));
 void sbicinit          __P((struct sbic_softc *dev));
 int  sbicintr          __P((struct sbic_softc *));
 void   sbic_dump       __P((struct sbic_softc *dev));
diff -r 542507cb2270 -r 0d3bcd942e02 sys/arch/arm32/podulebus/sfas.c
--- a/sys/arch/arm32/podulebus/sfas.c   Thu Mar 29 09:06:04 2001 +0000
+++ b/sys/arch/arm32/podulebus/sfas.c   Thu Mar 29 09:39:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sfas.c,v 1.15.2.2 2001/03/29 09:02:59 bouyer Exp $     */
+/*     $NetBSD: sfas.c,v 1.15.2.3 2001/03/29 09:39:52 bouyer Exp $     */
 
 /*
  * Copyright (c) 1995 Scott Stevens
@@ -1091,8 +1091,7 @@
 
                sfas_restore_pointers(dev);
 
-               if (!(nexus->flags & SFAS_NF_SENSING))
-                       nexus->status   = 0xFF;
+               nexus->status   = 0xFF;
                dev->sc_msg_in[0] = 0xFF;



Home | Main Index | Thread Index | Old Index