From 50c427201f2890c31ee7e168ca49ebfd3ea711b3 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Fri, 3 Jun 2005 15:50:11 +0000 Subject: Tweak scsi_do_mode_sense(). NetBSD was right and I was wrong. Sigh. Add 'big' parameter to report which mode sense header type is being returned. Eliminate icky pointer arithmetic, since it won't work if only block descriptors are returned by the device. No functional change. --- sys/scsi/sd_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/scsi/sd_scsi.c') diff --git a/sys/scsi/sd_scsi.c b/sys/scsi/sd_scsi.c index c1ffd2b4510..b1713a2b8d8 100644 --- a/sys/scsi/sd_scsi.c +++ b/sys/scsi/sd_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd_scsi.c,v 1.13 2005/05/28 06:16:33 krw Exp $ */ +/* $OpenBSD: sd_scsi.c,v 1.14 2005/06/03 15:50:10 krw Exp $ */ /* $NetBSD: sd_scsi.c,v 1.8 1998/10/08 20:21:13 thorpej Exp $ */ /*- @@ -155,7 +155,7 @@ sd_scsibus_get_parms(sd, dp, flags) error = scsi_do_mode_sense(sd->sc_link, page = 4, &buf, (void **)&sense_pages, NULL, NULL, &blksize, - sizeof(sense_pages->rigid_geometry), flags | SCSI_SILENT); + sizeof(sense_pages->rigid_geometry), flags | SCSI_SILENT, NULL); if (error == 0) { if (sense_pages) { SC_DEBUG(sd->sc_link, SDEV_DB3, @@ -194,7 +194,7 @@ sd_scsibus_get_parms(sd, dp, flags) error = scsi_do_mode_sense(sd->sc_link, page = 5, &buf, (void **)&sense_pages, NULL, NULL, &blksize, - sizeof(sense_pages->flex_geometry), flags | SCSI_SILENT); + sizeof(sense_pages->flex_geometry), flags | SCSI_SILENT, NULL); if (error == 0) { if (sense_pages) { dp->heads = sense_pages->flex_geometry.nheads; @@ -226,7 +226,7 @@ sd_scsibus_get_parms(sd, dp, flags) error = scsi_do_mode_sense(sd->sc_link, page = 6, &buf, (void **)&sense_pages, NULL, NULL, &blksize, - sizeof(sense_pages->reduced_geometry), flags | SCSI_SILENT); + sizeof(sense_pages->reduced_geometry), flags | SCSI_SILENT, NULL); if (error == 0) { dp->heads = 64; dp->sectors = 32; -- cgit v1.2.3