Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
This commit is contained in:
parent
46ed8f7d77
commit
2af68666da
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.30 2007/07/29 12:15:35 ad Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.31 2007/10/08 16:41:05 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -89,7 +89,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.30 2007/07/29 12:15:35 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.31 2007/10/08 16:41:05 ad Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -519,8 +519,7 @@ fdattach(parent, self, aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dev.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dev.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
/* Needed to power off if the motor is on when we halt. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.73 2007/08/20 19:23:46 is Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.74 2007/10/08 16:41:06 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.73 2007/08/20 19:23:46 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.74 2007/10/08 16:41:06 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -417,8 +417,7 @@ fdattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
sc->dkdev.dk_name = sc->sc_dv.dv_xname;
|
||||
sc->dkdev.dk_driver = &fddkdriver;
|
||||
disk_init(&sc->dkdev, sc->sc_dv.dv_xname, &fddkdriver);
|
||||
disk_attach(&sc->dkdev);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.32 2007/07/30 14:32:40 he Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.33 2007/10/08 16:41:06 ad Exp $ */
|
||||
/* $OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $ */
|
||||
/* NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp */
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.32 2007/07/30 14:32:40 he Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.33 2007/10/08 16:41:06 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -355,8 +355,7 @@ fdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dev.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dev.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
/* Establish a mountroot hook. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.58 2007/07/29 12:15:36 ad Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.59 2007/10/08 16:41:06 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
@ -49,7 +49,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.58 2007/07/29 12:15:36 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.59 2007/10/08 16:41:06 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -406,8 +406,7 @@ void *auxp;
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
sc->dkdev.dk_name = sc->sc_dv.dv_xname;
|
||||
sc->dkdev.dk_driver = &fddkdriver;
|
||||
disk_init(&sc->dkdev, fd->sc_dv.dv_xname, &fddkdriver);
|
||||
disk_attach(&sc->dkdev);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hdfd.c,v 1.57 2007/07/29 12:15:36 ad Exp $ */
|
||||
/* $NetBSD: hdfd.c,v 1.58 2007/10/08 16:41:06 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 Leo Weppelman
|
||||
@ -91,7 +91,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.57 2007/07/29 12:15:36 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.58 2007/10/08 16:41:06 ad Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -545,8 +545,7 @@ fdattach(parent, self, aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dev.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dev.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
/* Needed to power off if the motor is on when we halt. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gdrom.c,v 1.22 2007/07/29 12:15:36 ad Exp $ */
|
||||
/* $NetBSD: gdrom.c,v 1.23 2007/10/08 16:41:07 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Marcus Comstedt
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: gdrom.c,v 1.22 2007/07/29 12:15:36 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gdrom.c,v 1.23 2007/10/08 16:41:07 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -385,8 +385,7 @@ gdromattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
sc->dkdev.dk_name = sc->sc_dv.dv_xname;
|
||||
sc->dkdev.dk_driver = &gdromdkdriver;
|
||||
disk_init(&sc->dkdev, sc->sc_dv.dv_xname, &gdromdkdriver);
|
||||
disk_attach(&sc->dkdev);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mmemcard.c,v 1.12 2007/07/29 13:31:08 ad Exp $ */
|
||||
/* $NetBSD: mmemcard.c,v 1.13 2007/10/08 16:41:07 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mmemcard.c,v 1.12 2007/07/29 13:31:08 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mmemcard.c,v 1.13 2007/10/08 16:41:07 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
@ -350,8 +350,10 @@ mmemdetach(struct device *self, int flags)
|
||||
* detach disks
|
||||
*/
|
||||
for (i = 0; i < sc->sc_npt; i++) {
|
||||
if (sc->sc_pt[i].pt_flags & MMEM_PT_OK)
|
||||
if (sc->sc_pt[i].pt_flags & MMEM_PT_OK) {
|
||||
disk_detach(&sc->sc_pt[i].pt_dk);
|
||||
disk_destroy(&sc->sc_pt[i].pt_dk);
|
||||
}
|
||||
}
|
||||
free(sc->sc_pt, M_DEVBUF);
|
||||
}
|
||||
@ -424,8 +426,7 @@ mmem_intr(void *dev, struct maple_response *response, int sz, int flags)
|
||||
pt->pt_info.icon,
|
||||
pt->pt_info.datasz);
|
||||
|
||||
pt->pt_dk.dk_driver = &mmemdkdriver;
|
||||
pt->pt_dk.dk_name = pt->pt_name;
|
||||
disk_init(&pt->pt_dk, pt->pt_name, &mmemdkdriver);
|
||||
disk_attach(&pt->pt_dk);
|
||||
|
||||
mmem_defaultlabel(sc, pt, pt->pt_dk.dk_label);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rd.c,v 1.82 2007/07/29 12:15:37 ad Exp $ */
|
||||
/* $NetBSD: rd.c,v 1.83 2007/10/08 16:41:07 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
@ -117,7 +117,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.82 2007/07/29 12:15:37 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.83 2007/10/08 16:41:07 ad Exp $");
|
||||
|
||||
#include "opt_useleds.h"
|
||||
#include "rnd.h"
|
||||
@ -382,7 +382,7 @@ rdattach(struct device *parent, struct device *self, void *aux)
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
memset(&sc->sc_dkdev, 0, sizeof(sc->sc_dkdev));
|
||||
sc->sc_dkdev.dk_name = sc->sc_dev.dv_xname;
|
||||
disk_init(&sc->sc_dkdev, sc->sc_dev.dv_xname, NULL);
|
||||
disk_attach(&sc->sc_dkdev);
|
||||
|
||||
sc->sc_slave = ha->ha_slave;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iwm_fd.c,v 1.38 2007/07/29 12:15:38 ad Exp $ */
|
||||
/* $NetBSD: iwm_fd.c,v 1.39 2007/10/08 16:41:07 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998 Hauke Fath. All rights reserved.
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.38 2007/07/29 12:15:38 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.39 2007/10/08 16:41:07 ad Exp $");
|
||||
|
||||
#ifdef _LKM
|
||||
#define IWMCF_DRIVE 0
|
||||
@ -488,8 +488,7 @@ fd_attach(struct device *parent, struct device *self, void *auxp)
|
||||
}
|
||||
splx(spl);
|
||||
}
|
||||
fd->diskInfo.dk_name = fd->devInfo.dv_xname;
|
||||
fd->diskInfo.dk_driver = &fd_dkDriver;
|
||||
disk_init(&fd->diskInfo, fd->devInfo.dv_xname, &fd_dkDriver);
|
||||
disk_attach(&fd->diskInfo);
|
||||
}
|
||||
|
||||
@ -560,6 +559,7 @@ fd_mod_free(void)
|
||||
*/
|
||||
callout_stop(&iwm->fd[unit]->motor_ch);
|
||||
disk_detach(&iwm->fd[unit]->diskInfo);
|
||||
disk_destroy(&iwm->fd[unit]->diskInfo);
|
||||
free(iwm->fd[unit], M_DEVBUF);
|
||||
iwm->fd[unit] = NULL;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.135 2007/07/29 12:15:39 ad Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.136 2007/10/08 16:41:08 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -108,7 +108,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.135 2007/07/29 12:15:39 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.136 2007/10/08 16:41:08 ad Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_md.h"
|
||||
@ -788,8 +788,7 @@ fdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dv.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dv.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fdc.c,v 1.14 2007/07/29 12:15:39 ad Exp $ */
|
||||
/* $NetBSD: fdc.c,v 1.15 2007/10/08 16:41:08 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -108,7 +108,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fdc.c,v 1.14 2007/07/29 12:15:39 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fdc.c,v 1.15 2007/10/08 16:41:08 ad Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_md.h"
|
||||
@ -967,8 +967,7 @@ fdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dv.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dv.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.57 2007/07/29 12:15:39 ad Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.58 2007/10/08 16:41:08 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.57 2007/07/29 12:15:39 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.58 2007/10/08 16:41:08 ad Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -561,8 +561,7 @@ fdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dv.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dv.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
#ifdef sparc
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xd.c,v 1.58 2007/07/29 12:15:40 ad Exp $ */
|
||||
/* $NetBSD: xd.c,v 1.59 2007/10/08 16:41:08 ad Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -52,7 +52,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.58 2007/07/29 12:15:40 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.59 2007/10/08 16:41:08 ad Exp $");
|
||||
|
||||
#undef XDC_DEBUG /* full debug */
|
||||
#define XDC_DIAG /* extra sanity checks */
|
||||
@ -553,8 +553,7 @@ xdattach(struct device *parent, struct device *self, void *aux)
|
||||
* to start with a clean slate.
|
||||
*/
|
||||
memset(&xd->sc_dk, 0, sizeof(xd->sc_dk));
|
||||
xd->sc_dk.dk_driver = &xddkdriver;
|
||||
xd->sc_dk.dk_name = xd->sc_dev.dv_xname;
|
||||
disk_init(&xd->sc_dk, xd->sc_dev.dv_xname, &xddkdriver);
|
||||
|
||||
xd->state = XD_DRIVE_UNKNOWN; /* to start */
|
||||
xd->flags = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xy.c,v 1.61 2007/07/29 12:15:40 ad Exp $ */
|
||||
/* $NetBSD: xy.c,v 1.62 2007/10/08 16:41:08 ad Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -52,7 +52,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.61 2007/07/29 12:15:40 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.62 2007/10/08 16:41:08 ad Exp $");
|
||||
|
||||
#undef XYC_DEBUG /* full debug */
|
||||
#undef XYC_DIAG /* extra sanity checks */
|
||||
@ -497,8 +497,7 @@ xyattach(struct device *parent, struct device *self, void *aux)
|
||||
* to start with a clean slate.
|
||||
*/
|
||||
memset(&xy->sc_dk, 0, sizeof(xy->sc_dk));
|
||||
xy->sc_dk.dk_driver = &xydkdriver;
|
||||
xy->sc_dk.dk_name = xy->sc_dev.dv_xname;
|
||||
disk_init(&xy->sc_dk, xy->sc_dev.dv_xname, &xydkdriver);
|
||||
|
||||
xy->state = XY_DRIVE_UNKNOWN; /* to start */
|
||||
xy->flags = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hp.c,v 1.43 2007/03/04 06:00:57 christos Exp $ */
|
||||
/* $NetBSD: hp.c,v 1.44 2007/10/08 16:41:09 ad Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hp.c,v 1.43 2007/03/04 06:00:57 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hp.c,v 1.44 2007/10/08 16:41:09 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -162,7 +162,7 @@ hpattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Init and attach the disk structure.
|
||||
*/
|
||||
sc->sc_disk.dk_name = sc->sc_dev.dv_xname;
|
||||
disk_init(&sc->sc_disk, sc->sc_dev.dv_xname, NULL);
|
||||
disk_attach(&sc->sc_disk);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hdc9224.c,v 1.40 2007/07/29 12:15:42 ad Exp $ */
|
||||
/* $NetBSD: hdc9224.c,v 1.41 2007/10/08 16:41:09 ad Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
@ -51,7 +51,7 @@
|
||||
#undef RDDEBUG
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdc9224.c,v 1.40 2007/07/29 12:15:42 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdc9224.c,v 1.41 2007/10/08 16:41:09 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -353,7 +353,7 @@ rdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
rd->sc_disk.dk_name = rd->sc_dev.dv_xname;
|
||||
disk_init(&rd->sc_disk, rd->sc_dev.dv_xname, NULL);
|
||||
disk_attach(&rd->sc_disk);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bmd.c,v 1.9 2007/07/29 12:15:42 ad Exp $ */
|
||||
/* $NetBSD: bmd.c,v 1.10 2007/10/08 16:41:09 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Tetsuya Isaki. All rights reserved.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bmd.c,v 1.9 2007/07/29 12:15:42 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bmd.c,v 1.10 2007/10/08 16:41:09 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -195,8 +195,7 @@ bmd_attach(struct device *parent, struct device *self, void *aux)
|
||||
printf("%d MB, 0x%x(64KB) x %d pages\n",
|
||||
(sc->sc_maxpage / 16), sc->sc_window, sc->sc_maxpage);
|
||||
|
||||
sc->sc_dkdev.dk_driver = &bmddkdriver;
|
||||
sc->sc_dkdev.dk_name = sc->sc_dev.dv_xname;
|
||||
disk_init(&sc->sc_dkdev, sc->sc_dev.dv_xname, &bmddkdriver);
|
||||
disk_attach(&sc->sc_dkdev);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.77 2007/07/29 12:15:42 ad Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.78 2007/10/08 16:41:09 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -71,7 +71,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.77 2007/07/29 12:15:42 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.78 2007/10/08 16:41:09 ad Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -597,8 +597,7 @@ fdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dev.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dev.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xbd.c,v 1.38 2007/07/22 08:50:27 ad Exp $ */
|
||||
/* $NetBSD: xbd.c,v 1.39 2007/10/08 16:41:09 ad Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xbd.c,v 1.38 2007/07/22 08:50:27 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xbd.c,v 1.39 2007/10/08 16:41:09 ad Exp $");
|
||||
|
||||
#include "xbd_hypervisor.h"
|
||||
#include "rnd.h"
|
||||
@ -1148,7 +1148,7 @@ xbd_attach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
simple_lock_init(&xs->sc_slock);
|
||||
dk_sc_init(&xs->sc_dksc, xs, xs->sc_dev.dv_xname);
|
||||
xs->sc_dksc.sc_dkdev.dk_driver = &xbddkdriver;
|
||||
disk_init(&xs->sc_dksc.sc_dkdev, xs->sc_dev.dv_xname, &xbddkdriver);
|
||||
xbdinit(xs, xbda->xa_xd, xbda->xa_dkintf);
|
||||
|
||||
#if NRND > 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xbd_xenbus.c,v 1.20 2007/07/29 12:15:42 ad Exp $ */
|
||||
/* $NetBSD: xbd_xenbus.c,v 1.21 2007/10/08 16:41:09 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Manuel Bouyer.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.20 2007/07/29 12:15:42 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.21 2007/10/08 16:41:09 ad Exp $");
|
||||
|
||||
#include "opt_xen.h"
|
||||
#include "rnd.h"
|
||||
@ -227,7 +227,7 @@ xbd_xenbus_attach(struct device *parent, struct device *self, void *aux)
|
||||
sc->sc_xbusd->xbusd_otherend_changed = xbd_backend_changed;
|
||||
|
||||
dk_sc_init(&sc->sc_dksc, sc, sc->sc_dev.dv_xname);
|
||||
sc->sc_dksc.sc_dkdev.dk_driver = &xbddkdriver;
|
||||
disk_init(&sc->sc_dksc.sc_dkdev, sc->sc_dev.dv_xname, &xbddkdriver);
|
||||
sc->sc_di = &dkintf_esdi;
|
||||
/* initialize free requests list */
|
||||
SLIST_INIT(&sc->sc_xbdreq_head);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wd.c,v 1.345 2007/09/16 18:41:47 bouyer Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.346 2007/10/08 16:41:11 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.345 2007/09/16 18:41:47 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.346 2007/10/08 16:41:11 ad Exp $");
|
||||
|
||||
#include "opt_ata.h"
|
||||
|
||||
@ -408,9 +408,8 @@ wdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
wd->sc_dk.dk_driver = &wddkdriver;
|
||||
wd->sc_dk.dk_name = wd->sc_dev.dv_xname;
|
||||
/* we fill in dk_info later */
|
||||
disk_init(&wd->sc_dk, wd->sc_dev.dv_xname, &wddkdriver);
|
||||
disk_attach(&wd->sc_dk);
|
||||
wd->sc_wdc_bio.lp = wd->sc_dk.dk_label;
|
||||
wd->sc_sdhook = shutdownhook_establish(wd_shutdown, wd);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ccd.c,v 1.122 2007/07/29 12:50:17 ad Exp $ */
|
||||
/* $NetBSD: ccd.c,v 1.123 2007/10/08 16:41:10 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2007 The NetBSD Foundation, Inc.
|
||||
@ -125,7 +125,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.122 2007/07/29 12:50:17 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.123 2007/10/08 16:41:10 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -261,9 +261,8 @@ ccdattach(int num)
|
||||
for (i = 0; i < num; i++) {
|
||||
cs = &ccd_softc[i];
|
||||
snprintf(cs->sc_xname, sizeof(cs->sc_xname), "ccd%d", i);
|
||||
cs->sc_dkdev.dk_name = cs->sc_xname; /* XXX */
|
||||
mutex_init(&cs->sc_lock, MUTEX_DRIVER, IPL_NONE);
|
||||
pseudo_disk_init(&cs->sc_dkdev);
|
||||
disk_init(&cs->sc_dkdev, cs->sc_xname, NULL); /* XXX */
|
||||
}
|
||||
}
|
||||
|
||||
@ -1135,7 +1134,7 @@ ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
||||
bufq_alloc(&cs->sc_bufq, "fcfs", 0);
|
||||
|
||||
/* Attach the disk. */
|
||||
pseudo_disk_attach(&cs->sc_dkdev);
|
||||
disk_attach(&cs->sc_dkdev);
|
||||
|
||||
/* Try and read the disklabel. */
|
||||
ccdgetdisklabel(dev);
|
||||
@ -1194,7 +1193,7 @@ ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
||||
cs->sc_flags &= ~(CCDF_INITED|CCDF_VLABEL);
|
||||
|
||||
/* Detatch the disk. */
|
||||
pseudo_disk_detach(&cs->sc_dkdev);
|
||||
disk_detach(&cs->sc_dkdev);
|
||||
break;
|
||||
|
||||
case DIOCGDINFO:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cgd.c,v 1.46 2007/07/29 12:50:18 ad Exp $ */
|
||||
/* $NetBSD: cgd.c,v 1.47 2007/10/08 16:41:10 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.46 2007/07/29 12:50:18 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.47 2007/10/08 16:41:10 ad Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -177,8 +177,7 @@ cgdsoftc_init(struct cgd_softc *cs, int num)
|
||||
snprintf(sbuf, DK_XNAME_SIZE, "cgd%d", num);
|
||||
simple_lock_init(&cs->sc_slock);
|
||||
dk_sc_init(&cs->sc_dksc, cs, sbuf);
|
||||
cs->sc_dksc.sc_dkdev.dk_driver = &cgddkdriver;
|
||||
pseudo_disk_init(&cs->sc_dksc.sc_dkdev);
|
||||
disk_init(&cs->sc_dksc.sc_dkdev, cs->sc_dksc.sc_xname, &cgddkdriver);
|
||||
}
|
||||
|
||||
void
|
||||
@ -560,7 +559,7 @@ cgd_ioctl_set(struct cgd_softc *cs, void *data, struct lwp *l)
|
||||
cs->sc_dksc.sc_flags |= DKF_INITED;
|
||||
|
||||
/* Attach the disk. */
|
||||
pseudo_disk_attach(&cs->sc_dksc.sc_dkdev);
|
||||
disk_attach(&cs->sc_dksc.sc_dkdev);
|
||||
|
||||
/* Try and read the disklabel. */
|
||||
dk_getdisklabel(di, &cs->sc_dksc, 0 /* XXX ? */);
|
||||
@ -597,7 +596,7 @@ cgd_ioctl_clr(struct cgd_softc *cs, void *data, struct lwp *l)
|
||||
free(cs->sc_data, M_DEVBUF);
|
||||
cs->sc_data_used = 0;
|
||||
cs->sc_dksc.sc_flags &= ~DKF_INITED;
|
||||
pseudo_disk_detach(&cs->sc_dksc.sc_dkdev);
|
||||
disk_detach(&cs->sc_dksc.sc_dkdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dk.c,v 1.28 2007/07/29 12:50:20 ad Exp $ */
|
||||
/* $NetBSD: dk.c,v 1.29 2007/10/08 16:41:11 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.28 2007/07/29 12:50:20 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.29 2007/10/08 16:41:11 ad Exp $");
|
||||
|
||||
#include "opt_dkwedge.h"
|
||||
|
||||
@ -400,7 +400,6 @@ dkwedge_add(struct dkwedge_info *dkw)
|
||||
free(sc, M_DKWEDGE);
|
||||
return (ENOMEM);
|
||||
}
|
||||
sc->sc_dk.dk_name = sc->sc_dev->dv_xname;
|
||||
|
||||
/* Return the devname to the caller. */
|
||||
strcpy(dkw->dkw_devname, sc->sc_dev->dv_xname);
|
||||
@ -410,6 +409,7 @@ dkwedge_add(struct dkwedge_info *dkw)
|
||||
* of state to RUNNING atomic.
|
||||
*/
|
||||
|
||||
disk_init(&sc->sc_dk, sc->sc_dev->dv_xname, NULL);
|
||||
disk_attach(&sc->sc_dk);
|
||||
|
||||
/* Disk wedge is ready for use! */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rd.c,v 1.17 2007/07/29 12:15:43 ad Exp $ */
|
||||
/* $NetBSD: rd.c,v 1.18 2007/10/08 16:41:11 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
|
||||
@ -118,7 +118,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.17 2007/07/29 12:15:43 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.18 2007/10/08 16:41:11 ad Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
|
||||
@ -448,7 +448,7 @@ rdattach(parent, self, aux)
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
memset(&sc->sc_dk, 0, sizeof(sc->sc_dk));
|
||||
sc->sc_dk.dk_name = sc->sc_dev.dv_xname;
|
||||
disk_init(&sc->sc_dk, sc->sc_dev.dv_xname, NULL);
|
||||
disk_attach(&sc->sc_dk);
|
||||
|
||||
callout_init(&sc->sc_restart_ch, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.75 2007/07/29 12:50:21 ad Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.76 2007/10/08 16:41:11 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
@ -88,7 +88,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.75 2007/07/29 12:50:21 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.76 2007/10/08 16:41:11 ad Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -500,8 +500,7 @@ fdattach(parent, self, aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
fd->sc_dk.dk_name = fd->sc_dev.dv_xname;
|
||||
fd->sc_dk.dk_driver = &fddkdriver;
|
||||
disk_init(&fd->sc_dk, fd->sc_dev.dv_xname, &fddkdriver);
|
||||
disk_attach(&fd->sc_dk);
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcd.c,v 1.100 2007/07/29 12:50:21 ad Exp $ */
|
||||
/* $NetBSD: mcd.c,v 1.101 2007/10/08 16:41:11 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -56,7 +56,7 @@
|
||||
/*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.100 2007/07/29 12:50:21 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.101 2007/10/08 16:41:11 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -268,8 +268,7 @@ mcdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
sc->sc_dk.dk_driver = &mcddkdriver;
|
||||
sc->sc_dk.dk_name = sc->sc_dev.dv_xname;
|
||||
disk_init(&sc->sc_dk, sc->sc_dev.dv_xname, &mcddkdriver);
|
||||
disk_attach(&sc->sc_dk);
|
||||
|
||||
printf(": model %s\n", sc->type != 0 ? sc->type : "unknown");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ld.c,v 1.49 2007/07/29 12:50:18 ad Exp $ */
|
||||
/* $NetBSD: ld.c,v 1.50 2007/10/08 16:41:10 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.49 2007/07/29 12:50:18 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.50 2007/10/08 16:41:10 ad Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
|
||||
@ -116,8 +116,7 @@ ldattach(struct ld_softc *sc)
|
||||
}
|
||||
|
||||
/* Initialise and attach the disk structure. */
|
||||
sc->sc_dk.dk_driver = &lddkdriver;
|
||||
sc->sc_dk.dk_name = sc->sc_dv.dv_xname;
|
||||
disk_init(&sc->sc_dk, sc->sc_dv.dv_xname, &lddkdriver);
|
||||
disk_attach(&sc->sc_dk);
|
||||
|
||||
if (sc->sc_maxxfer > MAXPHYS)
|
||||
@ -243,6 +242,7 @@ ldenddetach(struct ld_softc *sc)
|
||||
|
||||
/* Detach from the disk list. */
|
||||
disk_detach(&sc->sc_dk);
|
||||
disk_destroy(&sc->sc_dk);
|
||||
|
||||
#if NRND > 0
|
||||
/* Unhook the entropy source. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ed_mca.c,v 1.37 2007/07/29 12:50:21 ad Exp $ */
|
||||
/* $NetBSD: ed_mca.c,v 1.38 2007/10/08 16:41:12 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.37 2007/07/29 12:50:21 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.38 2007/10/08 16:41:12 ad Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
|
||||
@ -180,8 +180,7 @@ ed_mca_attach(parent, self, aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
ed->sc_dk.dk_driver = &eddkdriver;
|
||||
ed->sc_dk.dk_name = ed->sc_dev.dv_xname;
|
||||
disk_init(&ed->sc_dk, ed->sc_dev.dv_xname, &eddkdriver);
|
||||
disk_attach(&ed->sc_dk);
|
||||
#if NRND > 0
|
||||
rnd_attach_source(&ed->rnd_source, ed->sc_dev.dv_xname,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: md.c,v 1.50 2007/07/29 12:50:18 ad Exp $ */
|
||||
/* $NetBSD: md.c,v 1.51 2007/10/08 16:41:10 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
|
||||
@ -46,7 +46,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.50 2007/07/29 12:50:18 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.51 2007/10/08 16:41:10 ad Exp $");
|
||||
|
||||
#include "opt_md.h"
|
||||
|
||||
@ -179,8 +179,7 @@ md_attach(struct device *parent, struct device *self,
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
sc->sc_dkdev.dk_driver = &mddkdriver;
|
||||
sc->sc_dkdev.dk_name = sc->sc_dev.dv_xname;
|
||||
disk_init(&sc->sc_dkdev, sc->sc_dev.dv_xname, &mddkdriver);
|
||||
disk_attach(&sc->sc_dkdev);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mscp_disk.c,v 1.56 2007/07/29 12:15:43 ad Exp $ */
|
||||
/* $NetBSD: mscp_disk.c,v 1.57 2007/10/08 16:41:12 ad 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.56 2007/07/29 12:15:43 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.57 2007/10/08 16:41:12 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
@ -684,14 +684,15 @@ rxattach(parent, self, aux)
|
||||
rx->ra_hwunit = mp->mscp_unit;
|
||||
mi->mi_dp[mp->mscp_unit] = self;
|
||||
|
||||
rx->ra_disk.dk_name = rx->ra_dev.dv_xname;
|
||||
#if NRX
|
||||
if (MSCP_MID_ECH(1, mp->mscp_guse.guse_mediaid) == 'X' - '@')
|
||||
rx->ra_disk.dk_driver = &rxdkdriver;
|
||||
disk_init((struct disk *)&rx->ra_disk, rx->ra_dev.dv_xname,
|
||||
&rxdkdriver);
|
||||
#endif
|
||||
#if NRA
|
||||
if (MSCP_MID_ECH(1, mp->mscp_guse.guse_mediaid) != 'X' - '@')
|
||||
rx->ra_disk.dk_driver = &radkdriver;
|
||||
disk_init((struct disk *)&rx->ra_disk, rx->ra_dev.dv_xname,
|
||||
&radkdriver);
|
||||
#endif
|
||||
disk_attach((struct disk *)&rx->ra_disk);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ofdisk.c,v 1.37 2007/07/29 12:15:43 ad Exp $ */
|
||||
/* $NetBSD: ofdisk.c,v 1.38 2007/10/08 16:41:12 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.37 2007/07/29 12:15:43 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.38 2007/10/08 16:41:12 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
@ -134,8 +134,7 @@ ofdisk_attach(struct device *parent, struct device *self, void *aux)
|
||||
of->sc_phandle = oba->oba_phandle;
|
||||
of->sc_unit = oba->oba_unit;
|
||||
of->sc_ihandle = 0;
|
||||
of->sc_dk.dk_driver = &ofdisk_dkdriver;
|
||||
of->sc_dk.dk_name = of->sc_dev.dv_xname;
|
||||
disk_init(&of->sc_dk, &ofdisk_dkdriver, of->sc_dev.dv_xname);
|
||||
disk_attach(&of->sc_dk);
|
||||
printf("\n");
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rf.c,v 1.15 2007/07/29 12:15:44 ad Exp $ */
|
||||
/* $NetBSD: rf.c,v 1.16 2007/10/08 16:41:12 ad Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2002 Jochen Kunz.
|
||||
* All rights reserved.
|
||||
@ -36,7 +36,7 @@ TODO:
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.15 2007/07/29 12:15:44 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.16 2007/10/08 16:41:12 ad Exp $");
|
||||
|
||||
/* autoconfig stuff */
|
||||
#include <sys/param.h>
|
||||
@ -452,8 +452,7 @@ rf_attach(struct device *parent, struct device *self, void *aux)
|
||||
rfc_sc = (struct rfc_softc *)device_parent(&rf_sc->sc_dev);
|
||||
rf_sc->sc_dnum = rfc_aa->dnum;
|
||||
rf_sc->sc_state = 0;
|
||||
rf_sc->sc_disk.dk_name = rf_sc->sc_dev.dv_xname;
|
||||
rf_sc->sc_disk.dk_driver = &rfdkdriver;
|
||||
disk_init(&rf_sc->sc_disk, rf_sc->sc_dev.dv_xname, &rfdkdriver);
|
||||
disk_attach(&rf_sc->sc_disk);
|
||||
dl = rf_sc->sc_disk.dk_label;
|
||||
dl->d_type = DTYPE_FLOPPY; /* drive type */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rl.c,v 1.35 2007/07/29 12:15:44 ad Exp $ */
|
||||
/* $NetBSD: rl.c,v 1.36 2007/10/08 16:41:12 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
@ -43,7 +43,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.35 2007/07/29 12:15:44 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.36 2007/10/08 16:41:12 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
@ -253,8 +253,7 @@ rlattach(struct device *parent, struct device *self, void *aux)
|
||||
struct disklabel *dl;
|
||||
|
||||
rc->rc_hwid = ra->hwid;
|
||||
rc->rc_disk.dk_name = rc->rc_dev.dv_xname;
|
||||
rc->rc_disk.dk_driver = &rldkdriver;
|
||||
disk_init(&rc->rc_disk, rc->rc_dev.dv_xname, &rldkdriver);
|
||||
disk_attach(&rc->rc_disk);
|
||||
dl = rc->rc_disk.dk_label;
|
||||
dl->d_npartitions = 3;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rf_netbsdkintf.c,v 1.231 2007/10/05 01:40:04 oster Exp $ */
|
||||
/* $NetBSD: rf_netbsdkintf.c,v 1.232 2007/10/08 16:41:12 ad Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -146,7 +146,7 @@
|
||||
***********************************************************/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.231 2007/10/05 01:40:04 oster Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.232 2007/10/08 16:41:12 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/errno.h>
|
||||
@ -856,7 +856,8 @@ raidclose(dev_t dev, int flags, int fmt, struct lwp *l)
|
||||
free(cf, M_RAIDFRAME);
|
||||
|
||||
/* Detach the disk. */
|
||||
pseudo_disk_detach(&rs->sc_dkdev);
|
||||
disk_detach(&rs->sc_dkdev);
|
||||
disk_destroy(&rs->sc_dkdev);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1200,7 +1201,8 @@ raidioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
||||
free(cf, M_RAIDFRAME);
|
||||
|
||||
/* Detach the disk. */
|
||||
pseudo_disk_detach(&rs->sc_dkdev);
|
||||
disk_detach(&rs->sc_dkdev);
|
||||
disk_destroy(&rs->sc_dkdev);
|
||||
|
||||
raidunlock(rs);
|
||||
|
||||
@ -1850,8 +1852,6 @@ raidinit(RF_Raid_t *raidPtr)
|
||||
/* XXX doesn't check bounds. */
|
||||
snprintf(rs->sc_xname, sizeof(rs->sc_xname), "raid%d", unit);
|
||||
|
||||
rs->sc_dkdev.dk_name = rs->sc_xname;
|
||||
|
||||
/* attach the pseudo device */
|
||||
cf = malloc(sizeof(*cf), M_RAIDFRAME, M_WAITOK);
|
||||
cf->cf_name = raid_cd.cd_name;
|
||||
@ -1870,6 +1870,7 @@ raidinit(RF_Raid_t *raidPtr)
|
||||
* other things, so it's critical to call this *BEFORE* we try putzing
|
||||
* with disklabels. */
|
||||
|
||||
disk_init(&rs->sc_dkdev, rs->sc_xname, NULL);
|
||||
disk_attach(&rs->sc_dkdev);
|
||||
|
||||
/* XXX There may be a weird interaction here between this, and
|
||||
@ -2650,9 +2651,6 @@ rf_update_component_labels(RF_Raid_t *raidPtr, int final)
|
||||
void
|
||||
rf_close_component(RF_Raid_t *raidPtr, struct vnode *vp, int auto_configured)
|
||||
{
|
||||
struct lwp *l;
|
||||
|
||||
l = curlwp;
|
||||
|
||||
if (vp != NULL) {
|
||||
if (auto_configured == 1) {
|
||||
@ -2661,7 +2659,7 @@ rf_close_component(RF_Raid_t *raidPtr, struct vnode *vp, int auto_configured)
|
||||
vput(vp);
|
||||
|
||||
} else {
|
||||
(void) vn_close(vp, FREAD | FWRITE, l->l_cred, l);
|
||||
(void) vn_close(vp, FREAD | FWRITE, curlwp->l_cred, curlwp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd.c,v 1.268 2007/08/04 02:58:59 rumble Exp $ */
|
||||
/* $NetBSD: cd.c,v 1.269 2007/10/08 16:41:14 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001, 2003, 2004, 2005 The NetBSD Foundation, Inc.
|
||||
@ -57,7 +57,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.268 2007/08/04 02:58:59 rumble Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.269 2007/10/08 16:41:14 ad Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
|
||||
@ -280,8 +280,7 @@ cdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
cd->sc_dk.dk_driver = &cddkdriver;
|
||||
cd->sc_dk.dk_name = cd->sc_dev.dv_xname;
|
||||
disk_init(&cd->sc_dk, cd->sc_dev.dv_xname, &cddkdriver);
|
||||
disk_attach(&cd->sc_dk);
|
||||
|
||||
printf("\n");
|
||||
@ -346,6 +345,7 @@ cddetach(struct device *self, int flags)
|
||||
|
||||
/* Detach from the disk list. */
|
||||
disk_detach(&cd->sc_dk);
|
||||
disk_destroy(&cd->sc_dk);
|
||||
|
||||
#if 0
|
||||
/* Get rid of the shutdown hook. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sd.c,v 1.266 2007/10/01 18:16:05 bouyer Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.267 2007/10/08 16:41:14 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
|
||||
@ -54,7 +54,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.266 2007/10/01 18:16:05 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.267 2007/10/08 16:41:14 ad Exp $");
|
||||
|
||||
#include "opt_scsi.h"
|
||||
#include "rnd.h"
|
||||
@ -262,8 +262,7 @@ sdattach(struct device *parent, struct device *self, void *aux)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
sd->sc_dk.dk_driver = &sddkdriver;
|
||||
sd->sc_dk.dk_name = sd->sc_dev.dv_xname;
|
||||
disk_init(&sd->sc_dk, sd->sc_dev.dv_xname, &sddkdriver);
|
||||
disk_attach(&sd->sc_dk);
|
||||
|
||||
/*
|
||||
@ -390,6 +389,7 @@ sddetach(struct device *self, int flags)
|
||||
|
||||
/* Detach from the disk list. */
|
||||
disk_detach(&sd->sc_dk);
|
||||
disk_destroy(&sd->sc_dk);
|
||||
|
||||
/* Get rid of the shutdown hook. */
|
||||
shutdownhook_disestablish(sd->sc_sdhook);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xd.c,v 1.69 2007/07/29 12:15:44 ad Exp $ */
|
||||
/* $NetBSD: xd.c,v 1.70 2007/10/08 16:41:15 ad Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -51,7 +51,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.69 2007/07/29 12:15:44 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.70 2007/10/08 16:41:15 ad Exp $");
|
||||
|
||||
#undef XDC_DEBUG /* full debug */
|
||||
#define XDC_DIAG /* extra sanity checks */
|
||||
@ -744,8 +744,6 @@ xdattach(parent, self, aux)
|
||||
* to start with a clean slate.
|
||||
*/
|
||||
bzero(&xd->sc_dk, sizeof(xd->sc_dk));
|
||||
xd->sc_dk.dk_driver = &xddkdriver;
|
||||
xd->sc_dk.dk_name = xd->sc_dev.dv_xname;
|
||||
|
||||
/* if booting, init the xd_softc */
|
||||
|
||||
@ -856,6 +854,7 @@ xdattach(parent, self, aux)
|
||||
|
||||
xd->hw_spt = spt;
|
||||
/* Attach the disk: must be before getdisklabel to malloc label */
|
||||
disk_init(&xd->sc_dk, xd->sc_dev.dv_xname, &xddkdriver);
|
||||
disk_attach(&xd->sc_dk);
|
||||
|
||||
if (xdgetdisklabel(xd, buf) != XD_ERR_AOK)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xy.c,v 1.72 2007/07/29 12:15:44 ad Exp $ */
|
||||
/* $NetBSD: xy.c,v 1.73 2007/10/08 16:41:15 ad Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -51,7 +51,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.72 2007/07/29 12:15:44 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.73 2007/10/08 16:41:15 ad Exp $");
|
||||
|
||||
#undef XYC_DEBUG /* full debug */
|
||||
#undef XYC_DIAG /* extra sanity checks */
|
||||
@ -641,8 +641,6 @@ xyattach(parent, self, aux)
|
||||
* to start with a clean slate.
|
||||
*/
|
||||
bzero(&xy->sc_dk, sizeof(xy->sc_dk));
|
||||
xy->sc_dk.dk_driver = &xydkdriver;
|
||||
xy->sc_dk.dk_name = xy->sc_dev.dv_xname;
|
||||
|
||||
/* if booting, init the xy_softc */
|
||||
|
||||
@ -738,6 +736,7 @@ xyattach(parent, self, aux)
|
||||
|
||||
xy->hw_spt = spt = 0; /* XXX needed ? */
|
||||
/* Attach the disk: must be before getdisklabel to malloc label */
|
||||
disk_init(&xy->sc_dk, xy->sc_dev.dv_xname, &xydkdriver);
|
||||
disk_attach(&xy->sc_dk);
|
||||
|
||||
if (xygetdisklabel(xy, buf) != XY_ERR_AOK)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vnd.c,v 1.169 2007/07/29 12:50:18 ad Exp $ */
|
||||
/* $NetBSD: vnd.c,v 1.170 2007/10/08 16:41:11 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -137,7 +137,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.169 2007/07/29 12:50:18 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.170 2007/10/08 16:41:11 ad Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "fs_nfs.h"
|
||||
@ -285,7 +285,7 @@ vnd_attach(struct device *parent, struct device *self,
|
||||
sc->sc_comp_buff = NULL;
|
||||
sc->sc_comp_decombuf = NULL;
|
||||
bufq_alloc(&sc->sc_tab, "disksort", BUFQ_SORT_RAWBLOCK);
|
||||
pseudo_disk_init(&sc->sc_dkdev);
|
||||
disk_init(&sc->sc_dkdev, self->dv_xname, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -296,6 +296,7 @@ vnd_detach(struct device *self, int flags)
|
||||
return EBUSY;
|
||||
|
||||
bufq_free(sc->sc_tab);
|
||||
disk_destroy(&sc->sc_dkdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1187,8 +1188,7 @@ vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
||||
#endif
|
||||
|
||||
/* Attach the disk. */
|
||||
vnd->sc_dkdev.dk_name = vnd->sc_dev.dv_xname;
|
||||
pseudo_disk_attach(&vnd->sc_dkdev);
|
||||
disk_attach(&vnd->sc_dkdev);
|
||||
|
||||
/* Initialize the xfer and buffer pools. */
|
||||
pool_init(&vnd->sc_vxpool, sizeof(struct vndxfer), 0,
|
||||
@ -1256,7 +1256,7 @@ unlock_and_exit:
|
||||
pool_destroy(&vnd->sc_vxpool);
|
||||
|
||||
/* Detatch the disk. */
|
||||
pseudo_disk_detach(&vnd->sc_dkdev);
|
||||
disk_detach(&vnd->sc_dkdev);
|
||||
break;
|
||||
|
||||
#ifdef COMPAT_30
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: subr_disk.c,v 1.88 2007/07/29 12:15:45 ad Exp $ */
|
||||
/* $NetBSD: subr_disk.c,v 1.89 2007/10/08 16:41:15 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -74,7 +74,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.88 2007/07/29 12:15:45 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.89 2007/10/08 16:41:15 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -184,8 +184,8 @@ disk_find(const char *name)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
disk_init0(struct disk *diskp)
|
||||
void
|
||||
disk_init(struct disk *diskp, char *name, struct dkdriver *driver)
|
||||
{
|
||||
|
||||
/*
|
||||
@ -197,10 +197,15 @@ disk_init0(struct disk *diskp)
|
||||
diskp->dk_nwedges = 0;
|
||||
diskp->dk_labelsector = LABELSECTOR;
|
||||
disk_blocksize(diskp, DEV_BSIZE);
|
||||
diskp->dk_name = name;
|
||||
diskp->dk_driver = driver;
|
||||
}
|
||||
|
||||
static void
|
||||
disk_attach0(struct disk *diskp)
|
||||
/*
|
||||
* Attach a disk.
|
||||
*/
|
||||
void
|
||||
disk_attach(struct disk *diskp)
|
||||
{
|
||||
|
||||
/*
|
||||
@ -223,8 +228,11 @@ disk_attach0(struct disk *diskp)
|
||||
diskp->dk_stats = iostat_alloc(IOSTAT_DISK, diskp, diskp->dk_name);
|
||||
}
|
||||
|
||||
static void
|
||||
disk_detach0(struct disk *diskp)
|
||||
/*
|
||||
* Detach a disk.
|
||||
*/
|
||||
void
|
||||
disk_detach(struct disk *diskp)
|
||||
{
|
||||
|
||||
/*
|
||||
@ -247,57 +255,12 @@ disk_detach0(struct disk *diskp)
|
||||
free(diskp->dk_cpulabel, M_DEVBUF);
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach a disk.
|
||||
*/
|
||||
void
|
||||
disk_attach(struct disk *diskp)
|
||||
{
|
||||
|
||||
disk_init0(diskp);
|
||||
disk_attach0(diskp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Detach a disk.
|
||||
*/
|
||||
void
|
||||
disk_detach(struct disk *diskp)
|
||||
disk_destroy(struct disk *diskp)
|
||||
{
|
||||
|
||||
mutex_destroy(&diskp->dk_openlock);
|
||||
mutex_destroy(&diskp->dk_rawlock);
|
||||
disk_detach0(diskp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize a pseudo disk.
|
||||
*/
|
||||
void
|
||||
pseudo_disk_init(struct disk *diskp)
|
||||
{
|
||||
|
||||
disk_init0(diskp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach a pseudo disk.
|
||||
*/
|
||||
void
|
||||
pseudo_disk_attach(struct disk *diskp)
|
||||
{
|
||||
|
||||
disk_attach0(diskp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Detach a pseudo disk.
|
||||
*/
|
||||
void
|
||||
pseudo_disk_detach(struct disk *diskp)
|
||||
{
|
||||
|
||||
disk_detach0(diskp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disk.h,v 1.45 2007/07/21 19:51:49 ad Exp $ */
|
||||
/* $NetBSD: disk.h,v 1.46 2007/10/08 16:41:15 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
|
||||
@ -502,9 +502,8 @@ struct proc;
|
||||
|
||||
void disk_attach(struct disk *);
|
||||
void disk_detach(struct disk *);
|
||||
void pseudo_disk_init(struct disk *);
|
||||
void pseudo_disk_attach(struct disk *);
|
||||
void pseudo_disk_detach(struct disk *);
|
||||
void disk_init(struct disk *, char *, struct dkdriver *);
|
||||
void disk_destroy(struct disk *);
|
||||
void disk_busy(struct disk *);
|
||||
void disk_unbusy(struct disk *, long, int);
|
||||
void disk_blocksize(struct disk *, int);
|
||||
|
Loading…
Reference in New Issue
Block a user