summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-07-02 15:39:56 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-07-02 15:39:56 +0000
commitb844116fd310c83b3295f94c2277be405793ff96 (patch)
tree257406d46292ea665fe85f2d21f1160f06ae6ace /sys/scsi
parent2b9bc19f0032362cd4ad45f276fb2e870b975452 (diff)
Remove unused cd_softc.name field. Use the saved INQUIRY data in
scsi_link to determine device type, rather than keeping a copy in sd_softc.type. Remove unused sd_softc.type field.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/cd.h3
-rw-r--r--sys/scsi/sd.c7
-rw-r--r--sys/scsi/sdvar.h3
3 files changed, 5 insertions, 8 deletions
diff --git a/sys/scsi/cd.h b/sys/scsi/cd.h
index 392bfc26f8c..b3ff7050a68 100644
--- a/sys/scsi/cd.h
+++ b/sys/scsi/cd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.h,v 1.7 2005/06/27 18:17:57 krw Exp $ */
+/* $OpenBSD: cd.h,v 1.8 2005/07/02 15:39:55 krw Exp $ */
/* $NetBSD: scsi_cd.h,v 1.6 1996/03/19 03:06:39 mycroft Exp $ */
/*
@@ -235,7 +235,6 @@ struct cd_softc {
struct cd_parms orig_params; /* filled in when CD-DA mode starts */
#endif
struct buf buf_queue;
- char name[16]; /* product name, for default disklabel */
#if NRND > 0
rndsource_element_t rnd_source;
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index f8ba3126c74..f959f1f94b0 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.79 2005/07/02 14:32:17 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.80 2005/07/02 15:39:55 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -180,7 +180,6 @@ sdattach(parent, self, aux)
* Store information needed to contact our base driver
*/
sd->sc_link = sc_link;
- sd->type = (sa->sa_inqbuf->device & SID_TYPE);
sc_link->device = &sd_switch;
sc_link->device_softc = sd;
@@ -989,7 +988,7 @@ sdgetdisklabel(dev, sd, lp, clp, spoofonly)
}
lp->d_type = DTYPE_SCSI;
- if (sd->type == T_OPTICAL)
+ if ((sd->sc_link->inqdata.device & SID_TYPE) == T_OPTICAL)
strncpy(lp->d_typename, "SCSI optical",
sizeof(lp->d_typename));
else
@@ -1341,7 +1340,7 @@ sd_get_parms(sd, dp, flags)
dp->disksize = scsi_size(sd->sc_link, flags, &blksize);
- switch (sd->type) {
+ switch (sd->sc_link->inqdata.device & SID_TYPE) {
case T_OPTICAL:
/* No more information needed or available. */
break;
diff --git a/sys/scsi/sdvar.h b/sys/scsi/sdvar.h
index 2fd44cb3528..75983ac2e86 100644
--- a/sys/scsi/sdvar.h
+++ b/sys/scsi/sdvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdvar.h,v 1.6 2005/07/02 14:32:17 krw Exp $ */
+/* $OpenBSD: sdvar.h,v 1.7 2005/07/02 15:39:55 krw Exp $ */
/* $NetBSD: sdvar.h,v 1.7 1998/08/17 00:49:03 mycroft Exp $ */
/*-
@@ -78,7 +78,6 @@ struct sd_softc {
u_long rot_rate; /* rotational rate, in RPM */
} params;
struct buf buf_queue;
- u_int8_t type;
struct disk_name {
char vendor[9]; /* disk vendor/manufacturer */
char product[17]; /* disk product model */