Don't pass a buffer to physio(), let it be allocated dynamically.
This leaves only scsipi and atapi doing the same.
This commit is contained in:
parent
69408179ba
commit
610bc1e5aa
@ -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 @@ struct mt_softc {
|
||||
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 @@ mtread(dev_t dev, struct uio *uio, int flags)
|
||||
{
|
||||
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 @@ mtwrite(dev_t dev, struct uio *uio, int flags)
|
||||
{
|
||||
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
|
||||
|
@ -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 @@ mtread(dev_t dev, struct uio *uio, int flags)
|
||||
|
||||
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 @@ mtwrite(dev_t dev, struct uio *uio, int flags)
|
||||
|
||||
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
|
||||
|
@ -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 @@ int Qbus_unmap[NQD]; /* Qbus mapper release code */
|
||||
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 @@ qdwrite(dev_t dev, struct uio *uio, int flag)
|
||||
/*
|
||||
* 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 @@ qdread(dev_t dev, struct uio *uio, int flag)
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user