Module Name: src
Committed By: cegger
Date: Tue May 12 14:37:59 UTC 2009
Modified Files:
src/sys/dev/mscp: mscp.c mscp_disk.c mscp_subr.c mscp_tape.c mscpvar.h
Log Message:
struct device * -> device_t, no functional changes intended.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/mscp/mscp.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/mscp/mscp_disk.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/mscp/mscp_subr.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/mscp/mscp_tape.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/mscp/mscpvar.h
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/mscp/mscp.c
diff -u src/sys/dev/mscp/mscp.c:1.33 src/sys/dev/mscp/mscp.c:1.34
--- src/sys/dev/mscp/mscp.c:1.33 Sat Apr 18 14:58:03 2009
+++ src/sys/dev/mscp/mscp.c Tue May 12 14:37:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp.c,v 1.33 2009/04/18 14:58:03 tsutsui Exp $ */
+/* $NetBSD: mscp.c,v 1.34 2009/05/12 14:37:59 cegger Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.33 2009/04/18 14:58:03 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.34 2009/05/12 14:37:59 cegger Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -165,7 +165,7 @@
void
mscp_dorsp(struct mscp_softc *mi)
{
- struct device *drive;
+ device_t drive;
struct mscp_device *me = mi->mi_me;
struct mscp_ctlr *mc = mi->mi_mc;
struct buf *bp;
@@ -214,7 +214,7 @@
*/
if (mp->mscp_unit >= mi->mi_driveno) { /* Must expand drive table */
int tmpno = (mp->mscp_unit + 32) & ~31;
- struct device **tmp = (struct device **)
+ device_t *tmp = (device_t *)
malloc(tmpno * sizeof(tmp[0]), M_DEVBUF, M_NOWAIT|M_ZERO);
/* XXX tmp should be checked for NULL */
if (mi->mi_driveno) {
Index: src/sys/dev/mscp/mscp_disk.c
diff -u src/sys/dev/mscp/mscp_disk.c:1.69 src/sys/dev/mscp/mscp_disk.c:1.70
--- src/sys/dev/mscp/mscp_disk.c:1.69 Tue May 12 13:16:17 2009
+++ src/sys/dev/mscp/mscp_disk.c Tue May 12 14:37:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_disk.c,v 1.69 2009/05/12 13:16:17 cegger Exp $ */
+/* $NetBSD: mscp_disk.c,v 1.70 2009/05/12 14:37:59 cegger Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.69 2009/05/12 13:16:17 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.70 2009/05/12 14:37:59 cegger Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -126,14 +126,14 @@
#define rx_softc ra_softc
-void rxattach(struct device *, struct device *, void *);
+void rxattach(device_t, device_t, void *);
int rx_putonline(struct rx_softc *);
void rrmakelabel(struct disklabel *, long);
#if NRA
-int ramatch(struct device *, cfdata_t, void *);
-void raattach(struct device *, struct device *, void *);
+int ramatch(device_t, cfdata_t, void *);
+void raattach(device_t, device_t, void *);
int ra_putonline(struct ra_softc *);
CFATTACH_DECL(ra, sizeof(struct ra_softc),
@@ -166,7 +166,7 @@
*/
int
-ramatch(struct device *parent, cfdata_t cf, void *aux)
+ramatch(device_t parent, cfdata_t cf, void *aux)
{
struct drive_attach_args *da = aux;
struct mscp *mp = da->da_mp;
@@ -580,7 +580,7 @@
#if NRX
-int rxmatch(struct device *, cfdata_t, void *);
+int rxmatch(device_t, cfdata_t, void *);
CFATTACH_DECL(rx, sizeof(struct rx_softc),
rxmatch, rxattach, NULL, NULL);
@@ -611,7 +611,7 @@
*/
int
-rxmatch(struct device *parent, cfdata_t cf, void *aux)
+rxmatch(device_t parent, cfdata_t cf, void *aux)
{
struct drive_attach_args *da = aux;
struct mscp *mp = da->da_mp;
@@ -638,7 +638,7 @@
* the first time.
*/
void
-rxattach(struct device *parent, struct device *self, void *aux)
+rxattach(device_t parent, device_t self, void *aux)
{
struct rx_softc *rx = device_private(self);
struct drive_attach_args *da = aux;
@@ -866,14 +866,14 @@
#endif /* NRX */
-void rrdgram(struct device *, struct mscp *, struct mscp_softc *);
-void rriodone(struct device *, struct buf *);
-int rronline(struct device *, struct mscp *);
-int rrgotstatus(struct device *, struct mscp *);
-void rrreplace(struct device *, struct mscp *);
-int rrioerror(struct device *, struct mscp *, struct buf *);
+void rrdgram(device_t, struct mscp *, struct mscp_softc *);
+void rriodone(device_t, struct buf *);
+int rronline(device_t, struct mscp *);
+int rrgotstatus(device_t, struct mscp *);
+void rrreplace(device_t, struct mscp *);
+int rrioerror(device_t, struct mscp *, struct buf *);
void rrfillin(struct buf *, struct mscp *);
-void rrbb(struct device *, struct mscp *, struct buf *);
+void rrbb(device_t, struct mscp *, struct buf *);
struct mscp_device ra_device = {
@@ -892,7 +892,7 @@
* This can come from an unconfigured drive as well.
*/
void
-rrdgram(struct device *usc, struct mscp *mp, struct mscp_softc *mi)
+rrdgram(device_t usc, struct mscp *mp, struct mscp_softc *mi)
{
if (mscp_decodeerror(usc == NULL?"unconf disk" : device_xname(usc), mp, mi))
return;
@@ -908,7 +908,7 @@
}
void
-rriodone(struct device *usc, struct buf *bp)
+rriodone(device_t usc, struct buf *bp)
{
struct ra_softc *ra;
int unit;
@@ -939,7 +939,7 @@
* sleeping on the drive on-line-ness.
*/
int
-rronline(struct device *usc, struct mscp *mp)
+rronline(device_t usc, struct mscp *mp)
{
struct rx_softc *rx = (struct rx_softc *)usc;
struct disklabel *dl;
@@ -1006,7 +1006,7 @@
* We got some (configured) unit's status. Return DONE if it succeeded.
*/
int
-rrgotstatus(struct device *usc, struct mscp *mp)
+rrgotstatus(device_t usc, struct mscp *mp)
{
if ((mp->mscp_status & M_ST_MASK) != M_ST_SUCCESS) {
aprint_error_dev(usc, "attempt to get status failed: ");
@@ -1025,7 +1025,7 @@
*/
/*ARGSUSED*/
void
-rrreplace(struct device *usc, struct mscp *mp)
+rrreplace(device_t usc, struct mscp *mp)
{
panic("udareplace");
@@ -1037,7 +1037,7 @@
*/
/*ARGSUSED*/
int
-rrioerror(struct device *usc, struct mscp *mp, struct buf *bp)
+rrioerror(device_t usc, struct mscp *mp, struct buf *bp)
{
struct ra_softc *ra = (void *)usc;
int code = mp->mscp_event;
@@ -1095,7 +1095,7 @@
*/
/*ARGSUSED*/
void
-rrbb(struct device *usc, struct mscp *mp, struct buf *bp)
+rrbb(device_t usc, struct mscp *mp, struct buf *bp)
{
panic("udabb");
Index: src/sys/dev/mscp/mscp_subr.c
diff -u src/sys/dev/mscp/mscp_subr.c:1.40 src/sys/dev/mscp/mscp_subr.c:1.41
--- src/sys/dev/mscp/mscp_subr.c:1.40 Tue May 12 13:16:17 2009
+++ src/sys/dev/mscp/mscp_subr.c Tue May 12 14:37:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_subr.c,v 1.40 2009/05/12 13:16:17 cegger Exp $ */
+/* $NetBSD: mscp_subr.c,v 1.41 2009/05/12 14:37:59 cegger Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_subr.c,v 1.40 2009/05/12 13:16:17 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_subr.c,v 1.41 2009/05/12 14:37:59 cegger Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -97,8 +97,8 @@
#define b_forw b_hash.le_next
-int mscp_match(struct device *, cfdata_t, void *);
-void mscp_attach(struct device *, struct device *, void *);
+int mscp_match(device_t, cfdata_t, void *);
+void mscp_attach(device_t, device_t, void *);
void mscp_start(struct mscp_softc *);
int mscp_init(struct mscp_softc *);
void mscp_initds(struct mscp_softc *);
@@ -155,7 +155,7 @@
}
int
-mscp_match(struct device *parent, cfdata_t match, void *aux)
+mscp_match(device_t parent, cfdata_t match, void *aux)
{
struct mscp_attach_args *ma = aux;
@@ -171,7 +171,7 @@
};
void
-mscp_attach(struct device *parent, struct device *self, void *aux)
+mscp_attach(device_t parent, device_t self, void *aux)
{
struct mscp_attach_args *ma = aux;
struct mscp_softc *mi = device_private(self);
@@ -541,7 +541,7 @@
* common strategy routine for all types of MSCP devices.
*/
void
-mscp_strategy(struct buf *bp, struct device *usc)
+mscp_strategy(struct buf *bp, device_t usc)
{
struct mscp_softc *mi = (void *)usc;
int s = spluba();
Index: src/sys/dev/mscp/mscp_tape.c
diff -u src/sys/dev/mscp/mscp_tape.c:1.37 src/sys/dev/mscp/mscp_tape.c:1.38
--- src/sys/dev/mscp/mscp_tape.c:1.37 Tue May 12 13:16:17 2009
+++ src/sys/dev/mscp/mscp_tape.c Tue May 12 14:37:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_tape.c,v 1.37 2009/05/12 13:16:17 cegger Exp $ */
+/* $NetBSD: mscp_tape.c,v 1.38 2009/05/12 14:37:59 cegger Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.37 2009/05/12 13:16:17 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.38 2009/05/12 14:37:59 cegger Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -81,16 +81,16 @@
#define MT_OFFLINE 0
#define MT_ONLINE 1
-int mtmatch(struct device *, cfdata_t, void *);
-void mtattach(struct device *, struct device *, void *);
-void mtdgram(struct device *, struct mscp *, struct mscp_softc *);
-void mtiodone(struct device *, struct buf *);
-int mtonline(struct device *, struct mscp *);
-int mtgotstatus(struct device *, struct mscp *);
-int mtioerror(struct device *, struct mscp *, struct buf *);
+int mtmatch(device_t, cfdata_t, void *);
+void mtattach(device_t, device_t, void *);
+void mtdgram(device_t, struct mscp *, struct mscp_softc *);
+void mtiodone(device_t, struct buf *);
+int mtonline(device_t, struct mscp *);
+int mtgotstatus(device_t, struct mscp *);
+int mtioerror(device_t, struct mscp *, struct buf *);
void mtfillin(struct buf *, struct mscp *);
int mtcmd(struct mt_softc *, int, int, int);
-void mtcmddone(struct device *, struct mscp *);
+void mtcmddone(device_t, struct mscp *);
int mt_putonline(struct mt_softc *);
struct mscp_device mt_device = {
@@ -137,7 +137,7 @@
*/
int
-mtmatch(struct device *parent, cfdata_t cf, void *aux)
+mtmatch(device_t parent, cfdata_t cf, void *aux)
{
struct drive_attach_args *da = aux;
struct mscp *mp = da->da_mp;
@@ -154,7 +154,7 @@
* The attach routine only checks and prints drive type.
*/
void
-mtattach(struct device *parent, struct device *self, void *aux)
+mtattach(device_t parent, device_t self, void *aux)
{
struct mt_softc *mt = device_private(self);
struct drive_attach_args *da = aux;
@@ -286,7 +286,7 @@
}
void
-mtiodone(struct device *usc, struct buf *bp)
+mtiodone(device_t usc, struct buf *bp)
{
biodone(bp);
@@ -315,7 +315,7 @@
* Handle an error datagram.
*/
void
-mtdgram(struct device *usc, struct mscp *mp, struct mscp_softc *mi)
+mtdgram(device_t usc, struct mscp *mp, struct mscp_softc *mi)
{
if (mscp_decodeerror(usc == NULL?"unconf mt" : device_xname(usc), mp, mi))
return;
@@ -326,7 +326,7 @@
* trying to use it.
*/
int
-mtonline(struct device *usc, struct mscp *mp)
+mtonline(device_t usc, struct mscp *mp)
{
struct mt_softc *mt = (void *)usc;
@@ -341,7 +341,7 @@
* We got some (configured) unit's status. Return DONE.
*/
int
-mtgotstatus(struct device *usc, struct mscp *mp)
+mtgotstatus(device_t usc, struct mscp *mp)
{
return (MSCP_DONE);
}
@@ -371,7 +371,7 @@
*/
/*ARGSUSED*/
int
-mtioerror(struct device *usc, struct mscp *mp, struct buf *bp)
+mtioerror(device_t usc, struct mscp *mp, struct buf *bp)
{
struct mt_softc *mt = (void *)usc;
int st = mp->mscp_status & M_ST_MASK;
@@ -516,7 +516,7 @@
* Called from bus routines whenever a non-data transfer is finished.
*/
void
-mtcmddone(struct device *usc, struct mscp *mp)
+mtcmddone(device_t usc, struct mscp *mp)
{
struct mt_softc *mt = (void *)usc;
Index: src/sys/dev/mscp/mscpvar.h
diff -u src/sys/dev/mscp/mscpvar.h:1.16 src/sys/dev/mscp/mscpvar.h:1.17
--- src/sys/dev/mscp/mscpvar.h:1.16 Mon Jan 19 19:15:07 2009
+++ src/sys/dev/mscp/mscpvar.h Tue May 12 14:37:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mscpvar.h,v 1.16 2009/01/19 19:15:07 mjf Exp $ */
+/* $NetBSD: mscpvar.h,v 1.17 2009/05/12 14:37:59 cegger Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -113,34 +113,34 @@
struct mscp_ctlr {
void (*mc_ctlrdone) /* controller operation complete */
- (struct device *);
+ (device_t);
void (*mc_go) /* device-specific start routine */
- (struct device *, struct mscp_xi *);
+ (device_t, struct mscp_xi *);
void (*mc_saerror) /* ctlr error handling */
- (struct device *, int);
+ (device_t, int);
};
struct mscp_softc;
struct mscp_device {
void (*me_dgram) /* error datagram */
- (struct device *, struct mscp *, struct mscp_softc *);
+ (device_t, struct mscp *, struct mscp_softc *);
void (*me_iodone) /* normal I/O is done */
- (struct device *, struct buf *);
+ (device_t, struct buf *);
int (*me_online) /* drive on line */
- (struct device *, struct mscp *);
+ (device_t, struct mscp *);
int (*me_gotstatus) /* got unit status */
- (struct device *, struct mscp *);
+ (device_t, struct mscp *);
void (*me_replace) /* replace done */
- (struct device *, struct mscp *);
+ (device_t, struct mscp *);
int (*me_ioerr) /* read or write failed */
- (struct device *, struct mscp *, struct buf *);
+ (device_t, struct mscp *, struct buf *);
void (*me_bb) /* B_BAD io done */
- (struct device *, struct mscp *, struct buf *);
+ (device_t, struct mscp *, struct buf *);
void (*me_fillin) /* Fill in mscp info for this drive */
(struct buf *,struct mscp *);
void (*me_cmddone) /* Non-data transfer operation is done */
- (struct device *, struct mscp *);
+ (device_t, struct mscp *);
};
/*
@@ -286,7 +286,7 @@
int mscp_decodeerror(const char *, struct mscp *, struct mscp_softc *);
int mscp_print(void *, const char *);
void mscp_hexdump(struct mscp *);
-void mscp_strategy(struct buf *, struct device *);
+void mscp_strategy(struct buf *, device_t);
void mscp_printtype(int, int);
int mscp_waitstep(struct mscp_softc *, int, int);
void mscp_dgo(struct mscp_softc *, struct mscp_xi *);