Module Name:    src
Committed By:   jakllsch
Date:           Sun Jun 21 14:06:49 UTC 2009

Modified Files:
        src/sys/dev/scsipi: sd.c

Log Message:
Move call of sd_set_properties() to end of sd_get_parms(), rather than
sdattach().  This allows DIOCGDISKINFO to do the right thing even when
the media has changed.  Note that drvctl -p will only DTRT if disk has
been opened since the most recent media chenged.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 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.287 src/sys/dev/scsipi/sd.c:1.288
--- src/sys/dev/scsipi/sd.c:1.287	Fri Jun  5 21:52:32 2009
+++ src/sys/dev/scsipi/sd.c	Sun Jun 21 14:06:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: sd.c,v 1.287 2009/06/05 21:52:32 haad Exp $	*/
+/*	$NetBSD: sd.c,v 1.288 2009/06/21 14:06:49 jakllsch 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.287 2009/06/05 21:52:32 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.288 2009/06/21 14:06:49 jakllsch Exp $");
 
 #include "opt_scsi.h"
 #include "rnd.h"
@@ -322,8 +322,6 @@
 
 	/* Discover wedges on this disk. */
 	dkwedge_discover(&sd->sc_dk);
-
-	sd_set_properties(sd);
 }
 
 static int
@@ -2107,6 +2105,9 @@
 		dp->cyls = dp->disksize / (64 * 32);
 	}
 	dp->rot_rate = 3600;
+
+	sd_set_properties(sd);
+
 	return (SDGP_RESULT_OK);
 }
 

Reply via email to