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.
This commit is contained in:
parent
0e35dff596
commit
1af929341b
@ -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 @@ sd_get_parms(struct sd_softc *sd, struct disk_parms *dp, int flags)
|
||||
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 @@ page0:
|
||||
}
|
||||
dp->rot_rate = 3600;
|
||||
|
||||
setprops:
|
||||
sd_set_properties(sd);
|
||||
|
||||
return (SDGP_RESULT_OK);
|
||||
|
Loading…
Reference in New Issue
Block a user