Source-Changes-HG archive

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

[src/jdolecek-ncqfixes]: src/sys/dev/ata stop assuming c_slot is immutable, u...



details:   https://anonhg.NetBSD.org/src/rev/420bcd43b7d4
branches:  jdolecek-ncqfixes
changeset: 850573:420bcd43b7d4
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Sep 01 09:48:32 2018 +0000

description:
stop assuming c_slot is immutable, use the xfer pointer rather than c_slot
in printfs()

diffstat:

 sys/dev/ata/ata.c |  10 ++++------
 sys/dev/ata/wd.c  |  12 ++++++------
 2 files changed, 10 insertions(+), 12 deletions(-)

diffs (85 lines):

diff -r f700cae5021e -r 420bcd43b7d4 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Fri Aug 31 19:23:54 2018 +0000
+++ b/sys/dev/ata/ata.c Sat Sep 01 09:48:32 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ata.c,v 1.141.6.1 2018/08/31 19:08:03 jdolecek Exp $   */
+/*     $NetBSD: ata.c,v 1.141.6.2 2018/09/01 09:48:32 jdolecek Exp $   */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.141.6.1 2018/08/31 19:08:03 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.141.6.2 2018/09/01 09:48:32 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -1370,8 +1370,7 @@
                        ata_channel_unlock(chp);
 
                        aprint_normal_dev(drvp->drv_softc,
-                           "xfer %d freed while invoking timeout\n",
-                           xfer->c_slot); 
+                           "xfer %p freed while invoking timeout\n", xfer); 
 
                        ata_free_xfer(chp, xfer);
                        return true;
@@ -1381,8 +1380,7 @@
                ata_channel_unlock(chp);
 
                aprint_normal_dev(drvp->drv_softc,
-                   "xfer %d deactivated while invoking timeout\n",
-                   xfer->c_slot); 
+                   "xfer %p deactivated while invoking timeout\n", xfer); 
                return true;
        }
 
diff -r f700cae5021e -r 420bcd43b7d4 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Fri Aug 31 19:23:54 2018 +0000
+++ b/sys/dev/ata/wd.c  Sat Sep 01 09:48:32 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wd.c,v 1.441.2.1 2018/08/31 19:08:03 jdolecek Exp $ */
+/*     $NetBSD: wd.c,v 1.441.2.2 2018/09/01 09:48:32 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.441.2.1 2018/08/31 19:08:03 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.441.2.2 2018/09/01 09:48:32 jdolecek Exp $");
 
 #include "opt_ata.h"
 #include "opt_wd.h"
@@ -660,8 +660,8 @@
         */
        if (BUF_ISREAD(bp) && xfer->c_retries == 0 && wd->drv_chaos_freq > 0 &&
            (++wd->drv_chaos_cnt % wd->drv_chaos_freq) == 0) {
-               aprint_normal_dev(dksc->sc_dev, "%s: chaos xfer %d\n",
-                   __func__, xfer->c_slot);
+               aprint_normal_dev(dksc->sc_dev, "%s: chaos xfer %p\n",
+                   __func__, xfer);
                xfer->c_bio.blkno = 7777777 + wd->sc_capacity;
                xfer->c_flags |= C_CHAOS;
        }
@@ -852,7 +852,7 @@
                diskerr(bp, "wd", errmsg, LOG_PRINTF,
                    xfer->c_bio.blkdone, dksc->sc_dkdev.dk_label);
                if (xfer->c_retries < WDIORETRIES)
-                       printf(", slot %d, retry %d", xfer->c_slot,
+                       printf(", xfer %p, retry %d", xfer,
                            xfer->c_retries + 1);
                printf("\n");
                if (do_perror)
@@ -916,7 +916,7 @@
        case NOERROR:
 noerror:       if ((xfer->c_bio.flags & ATA_CORR) || xfer->c_retries > 0)
                        aprint_error_dev(dksc->sc_dev,
-                           "soft error (corrected) slot %d\n", xfer->c_slot);
+                           "soft error (corrected) xfer %p\n", xfer);
 #ifdef WD_CHAOS_MONKEY
                KASSERT((xfer->c_flags & C_CHAOS) == 0);
 #endif



Home | Main Index | Thread Index | Old Index