Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys/dev/ic reset ti->width to 0 when wide negotiati...



details:   https://anonhg.NetBSD.org/src/rev/4f5c5128d611
branches:  thorpej_scsipi
changeset: 477494:4f5c5128d611
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Apr 24 07:29:31 2001 +0000

description:
reset ti->width to 0 when wide negotiation didn't succeed. Use this to
report wide status; T_WIDE is only used to tell if wide nego should be
started.
While I'm there fix a bogon in tagged queueing reporting.

diffstat:

 sys/dev/ic/ncr53c9x.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 8b349750bd20 -r 4f5c5128d611 sys/dev/ic/ncr53c9x.c
--- a/sys/dev/ic/ncr53c9x.c     Tue Apr 24 07:14:04 2001 +0000
+++ b/sys/dev/ic/ncr53c9x.c     Tue Apr 24 07:29:31 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ncr53c9x.c,v 1.36.2.16 2001/04/23 09:42:18 bouyer Exp $        */
+/*     $NetBSD: ncr53c9x.c,v 1.36.2.17 2001/04/24 07:29:31 bouyer Exp $        */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -949,10 +949,10 @@
                xm.xm_period = ti->period;
                xm.xm_offset = ti->offset;
        }
-       if (ti->flags & T_WIDE)
+       if (ti->width)
                xm.xm_mode |= PERIPH_CAP_WIDE16;
 
-       if ((ti->flags & (T_RSELECTOFF|T_TAG)) != (T_RSELECTOFF|T_TAG))
+       if ((ti->flags & (T_RSELECTOFF|T_TAG)) == T_TAG)
                xm.xm_mode |= PERIPH_CAP_TQING;
 
        scsipi_async_event(&sc->sc_channel, ASYNC_EVENT_XFER_MODE, &xm);
@@ -1682,6 +1682,7 @@
                                    sc->sc_dev.dv_xname, 
                                    ecb->xs->xs_periph->periph_target);
                                ti->flags &= ~T_WIDE;
+                               ti->width = 0;
                                break;
 
                        case SEND_INIT_DET_ERR:
@@ -1803,7 +1804,8 @@
                                if (sc->sc_imess[3] == 1) {
                                        ti->cfg3 |= NCRFASCFG3_EWIDE;
                                        ncr53c9x_setsync(sc, ti);
-                               }
+                               } else
+                                       ti->width = 0;
                                ti->flags &= ~T_WIDE;
                                break;
                        default:



Home | Main Index | Thread Index | Old Index