Module Name:    src
Committed By:   jdolecek
Date:           Sat Sep  1 09:48:32 UTC 2018

Modified Files:
        src/sys/dev/ata [jdolecek-ncqfixes]: ata.c wd.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.141.6.1 -r1.141.6.2 src/sys/dev/ata/ata.c
cvs rdiff -u -r1.441.2.1 -r1.441.2.2 src/sys/dev/ata/wd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ata/ata.c
diff -u src/sys/dev/ata/ata.c:1.141.6.1 src/sys/dev/ata/ata.c:1.141.6.2
--- src/sys/dev/ata/ata.c:1.141.6.1	Fri Aug 31 19:08:03 2018
+++ src/sys/dev/ata/ata.c	Sat Sep  1 09:48:32 2018
@@ -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_timo_xfer_check(struct ata_xfer *xfe
 			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_timo_xfer_check(struct ata_xfer *xfe
 		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;
 	}
 

Index: src/sys/dev/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.441.2.1 src/sys/dev/ata/wd.c:1.441.2.2
--- src/sys/dev/ata/wd.c:1.441.2.1	Fri Aug 31 19:08:03 2018
+++ src/sys/dev/ata/wd.c	Sat Sep  1 09:48:32 2018
@@ -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 @@ wdstart1(struct wd_softc *wd, struct buf
 	 */
 	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 @@ retry2:
 		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 @@ out:
 	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

Reply via email to