diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2009-12-16 10:51:29 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2009-12-16 10:51:29 +0000 |
commit | 0420822b9f807947b2dac7f1586dbc560c83c5f4 (patch) | |
tree | 2c7d8e7391f90601f25e5eddd782196f9f9c3b57 /sys/scsi | |
parent | e621a87f4edfefbf2b91893ea4d5e614a1a454e7 (diff) |
nothing needs to see cd_softc except the driver, so move it into cd.c
ok marco@ guenther@
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/cd.c | 26 | ||||
-rw-r--r-- | sys/scsi/cd.h | 29 |
2 files changed, 26 insertions, 29 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 5ec5a33b8f7..5b993c3077c 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.156 2009/12/13 03:29:01 dlg Exp $ */ +/* $OpenBSD: cd.c,v 1.157 2009/12/16 10:51:28 dlg Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -93,6 +93,30 @@ void cdattach(struct device *, struct device *, void *); int cdactivate(struct device *, int); int cddetach(struct device *, int); +struct cd_softc { + struct device sc_dev; + struct disk sc_dk; + + int sc_flags; +#define CDF_LOCKED 0x01 +#define CDF_WANTED 0x02 +#define CDF_WLABEL 0x04 /* label is writable */ +#define CDF_LABELLING 0x08 /* writing label */ +#define CDF_ANCIENT 0x10 /* disk is ancient; for minphys */ +#define CDF_WAITING 0x100 +#define CDF_STARTING 0x200 + struct scsi_link *sc_link; /* contains our targ, lun, etc. */ + struct cd_parms { + u_int32_t blksize; + daddr64_t disksize; /* total number sectors */ + } sc_params; + struct buf sc_buf_queue; + struct mutex sc_queue_mtx; + struct mutex sc_start_mtx; + struct timeout sc_timeout; + void *sc_cdpwrhook; /* our power hook */ +}; + void cdstart(void *); void cd_buf_done(struct scsi_xfer *); void cdminphys(struct buf *); diff --git a/sys/scsi/cd.h b/sys/scsi/cd.h index 7d35aa77acf..b679516fc98 100644 --- a/sys/scsi/cd.h +++ b/sys/scsi/cd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.h,v 1.24 2009/12/13 03:31:13 dlg Exp $ */ +/* $OpenBSD: cd.h,v 1.25 2009/12/16 10:51:28 dlg Exp $ */ /* $NetBSD: scsi_cd.h,v 1.6 1996/03/19 03:06:39 mycroft Exp $ */ /* @@ -270,31 +270,4 @@ struct scsi_read_dvd_structure_data { u_int8_t data[2048]; }; -#ifdef _KERNEL - -struct cd_softc { - struct device sc_dev; - struct disk sc_dk; - - int sc_flags; -#define CDF_LOCKED 0x01 -#define CDF_WANTED 0x02 -#define CDF_WLABEL 0x04 /* label is writable */ -#define CDF_LABELLING 0x08 /* writing label */ -#define CDF_ANCIENT 0x10 /* disk is ancient; for minphys */ -#define CDF_WAITING 0x100 -#define CDF_STARTING 0x200 - struct scsi_link *sc_link; /* contains our targ, lun, etc. */ - struct cd_parms { - u_int32_t blksize; - daddr64_t disksize; /* total number sectors */ - } sc_params; - struct buf sc_buf_queue; - struct mutex sc_queue_mtx; - struct mutex sc_start_mtx; - struct timeout sc_timeout; - void *sc_cdpwrhook; /* our power hook */ -}; - -#endif /* _KERNEL */ #endif |