Module Name:    src
Committed By:   ad
Date:           Mon May 18 20:41:58 UTC 2009

Modified Files:
        src/sys/arch/hp300/dev: mt.c
        src/sys/dev/gpib: mt.c
        src/sys/dev/qbus: qd.c

Log Message:
Don't pass a buffer to physio(), let it be allocated dynamically.

This leaves only scsipi and atapi doing the same.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/hp300/dev/mt.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/gpib/mt.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/qbus/qd.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/arch/hp300/dev/mt.c
diff -u src/sys/arch/hp300/dev/mt.c:1.46 src/sys/arch/hp300/dev/mt.c:1.47
--- src/sys/arch/hp300/dev/mt.c:1.46	Tue Jan 13 13:35:51 2009
+++ src/sys/arch/hp300/dev/mt.c	Mon May 18 20:41:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mt.c,v 1.46 2009/01/13 13:35:51 yamt Exp $	*/
+/*	$NetBSD: mt.c,v 1.47 2009/05/18 20:41:57 ad Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.46 2009/01/13 13:35:51 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.47 2009/05/18 20:41:57 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -114,7 +114,6 @@
 	tpr_t	sc_ttyp;
 	struct bufq_state *sc_tab;/* buf queue */
 	int	sc_active;
-	struct buf sc_bufstore;	/* XXX buffer storage */
 };
 
 #ifdef DEBUG
@@ -922,8 +921,7 @@
 {
 	struct mt_softc *sc = device_lookup_private(&mt_cd,UNIT(dev));
 
-	return physio(mtstrategy, &sc->sc_bufstore,
-	    dev, B_READ, minphys, uio);
+	return physio(mtstrategy, NULL, dev, B_READ, minphys, uio);
 }
 
 static int
@@ -931,8 +929,7 @@
 {
 	struct mt_softc *sc = device_lookup_private(&mt_cd,UNIT(dev));
 
-	return physio(mtstrategy, &sc->sc_bufstore,
-	    dev, B_WRITE, minphys, uio);
+	return physio(mtstrategy, NULL, dev, B_WRITE, minphys, uio);
 }
 
 static int

Index: src/sys/dev/gpib/mt.c
diff -u src/sys/dev/gpib/mt.c:1.20 src/sys/dev/gpib/mt.c:1.21
--- src/sys/dev/gpib/mt.c:1.20	Tue May 12 14:21:58 2009
+++ src/sys/dev/gpib/mt.c	Mon May 18 20:41:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mt.c,v 1.20 2009/05/12 14:21:58 cegger Exp $ */
+/*	$NetBSD: mt.c,v 1.21 2009/05/18 20:41:57 ad Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -114,7 +114,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.20 2009/05/12 14:21:58 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.21 2009/05/18 20:41:57 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -989,8 +989,7 @@
 
 	sc = device_lookup_private(&mt_cd, MTUNIT(dev));
 
-	return (physio(mtstrategy, &sc->sc_bufstore,
-	    dev, B_READ, minphys, uio));
+	return (physio(mtstrategy, NULL, dev, B_READ, minphys, uio));
 }
 
 int
@@ -1000,8 +999,7 @@
 
 	sc = device_lookup_private(&mt_cd, MTUNIT(dev));
 
-	return (physio(mtstrategy, &sc->sc_bufstore,
-	    dev, B_WRITE, minphys, uio));
+	return (physio(mtstrategy, NULL, dev, B_WRITE, minphys, uio));
 }
 
 int

Index: src/sys/dev/qbus/qd.c
diff -u src/sys/dev/qbus/qd.c:1.49 src/sys/dev/qbus/qd.c:1.50
--- src/sys/dev/qbus/qd.c:1.49	Sat Apr 18 14:58:03 2009
+++ src/sys/dev/qbus/qd.c	Mon May 18 20:41:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: qd.c,v 1.49 2009/04/18 14:58:03 tsutsui Exp $	*/
+/*	$NetBSD: qd.c,v 1.50 2009/05/18 20:41:57 ad Exp $	*/
 
 /*-
  * Copyright (c) 1988 Regents of the University of California.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.49 2009/04/18 14:58:03 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.50 2009/05/18 20:41:57 ad Exp $");
 
 #include "opt_ddb.h"
 
@@ -167,7 +167,6 @@
 struct qdmap qdmap[NQD];	/* QDSS register map structure */
 struct qdflags qdflags[NQD];	/* QDSS register map structure */
 void *qdbase[NQD];		/* base address of each QDSS unit */
-struct buf qdbuf[NQD];		/* buf structs used by strategy */
 short qdopened[NQD];		/* graphics device is open exclusive use */
 
 /*
@@ -1640,8 +1639,7 @@
 		/*
 		* this is a DMA xfer from user space
 		*/
-		return (physio(qd_strategy, &qdbuf[unit],
-		dev, B_WRITE, minphys, uio));
+		return (physio(qd_strategy, NULL, dev, B_WRITE, minphys, uio));
 	}
 	return (ENXIO);
 }
@@ -1667,8 +1665,7 @@
 		/*
 		* this is a bitmap-to-processor xfer
 		*/
-		return (physio(qd_strategy, &qdbuf[unit],
-		dev, B_READ, minphys, uio));
+		return (physio(qd_strategy, NULL, dev, B_READ, minphys, uio));
 	}
 	return (ENXIO);
 }

Reply via email to