Module Name: src
Committed By: jnemeth
Date: Mon Aug 3 09:40:46 UTC 2009
Modified Files:
src/sys/dev/scsipi: sd.c
Log Message:
Fix previous where the call of sd_set_properties was moved from
the end of sdattach() to the end of sd_get_parms(). The code at
the bottom of sd_get_parms() was only used for optical drives or
in the case where the drive geometry couldn't be retrived for some
reason, to create a fake geometry. The case for setting up the
real geometry was handled above that code.
To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/dev/scsipi/sd.c
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/scsipi/sd.c
diff -u src/sys/dev/scsipi/sd.c:1.288 src/sys/dev/scsipi/sd.c:1.289
--- src/sys/dev/scsipi/sd.c:1.288 Sun Jun 21 14:06:49 2009
+++ src/sys/dev/scsipi/sd.c Mon Aug 3 09:40:45 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.288 2009/06/21 14:06:49 jakllsch Exp $ */
+/* $NetBSD: sd.c,v 1.289 2009/08/03 09:40:45 jnemeth Exp $ */
/*-
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.288 2009/06/21 14:06:49 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.289 2009/08/03 09:40:45 jnemeth Exp $");
#include "opt_scsi.h"
#include "rnd.h"
@@ -2082,11 +2082,11 @@
if (sd->sc_periph->periph_flags & PERIPH_REMOVABLE) {
if (!sd_get_parms_page5(sd, dp, flags) ||
!sd_get_parms_page4(sd, dp, flags))
- return (SDGP_RESULT_OK);
+ goto setprops;
} else {
if (!sd_get_parms_page4(sd, dp, flags) ||
!sd_get_parms_page5(sd, dp, flags))
- return (SDGP_RESULT_OK);
+ goto setprops;
}
page0:
@@ -2106,6 +2106,7 @@
}
dp->rot_rate = 3600;
+setprops:
sd_set_properties(sd);
return (SDGP_RESULT_OK);