summaryrefslogtreecommitdiff
path: root/usr/src/cmd/format
diff options
context:
space:
mode:
authorAbhinandan Ekande <Abhinandan.Ekande@Sun.COM>2010-01-18 09:26:09 +0530
committerAbhinandan Ekande <Abhinandan.Ekande@Sun.COM>2010-01-18 09:26:09 +0530
commitb63e7ecb92362434281e95205ba88d2fd274fa19 (patch)
tree2b2d88757f0881c5ac5a0aeca6227bab8d35612f /usr/src/cmd/format
parent3f64cd552fee350c8075ec62765e9a6f9caef1a8 (diff)
downloadillumos-joyent-b63e7ecb92362434281e95205ba88d2fd274fa19.tar.gz
6848158 Format to auto-configure EMC array luns to different values
Diffstat (limited to 'usr/src/cmd/format')
-rw-r--r--usr/src/cmd/format/auto_sense.c11
-rw-r--r--usr/src/cmd/format/ctlr_scsi.c10
-rw-r--r--usr/src/cmd/format/ctlr_scsi.h9
3 files changed, 11 insertions, 19 deletions
diff --git a/usr/src/cmd/format/auto_sense.c b/usr/src/cmd/format/auto_sense.c
index ad3e4b9bdf..27fb82520d 100644
--- a/usr/src/cmd/format/auto_sense.c
+++ b/usr/src/cmd/format/auto_sense.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -895,6 +895,10 @@ auto_sense(
err_print("disk name: `%s`\n", disk_name);
}
+ if (scsi_rdwr(DIR_READ, fd, (diskaddr_t)0, 1, (caddr_t)label,
+ F_SILENT, NULL))
+ return ((struct disk_type *)NULL);
+
/*
* Figure out which method we use for auto sense.
* If a particular method fails, we fall back to
@@ -1096,8 +1100,9 @@ generic_disk_sense(
* adjust it to AVG_RPM, 3600.
*/
if (rpm < MIN_RPM || rpm > MAX_RPM) {
- err_print("The current rpm value %d is invalid,"
- " adjusting it to %d\n", rpm, AVG_RPM);
+ if (option_msg && diag_msg)
+ err_print("The current rpm value %d is invalid,"
+ " adjusting it to %d\n", rpm, AVG_RPM);
rpm = AVG_RPM;
}
diff --git a/usr/src/cmd/format/ctlr_scsi.c b/usr/src/cmd/format/ctlr_scsi.c
index c16327832d..c395da3ecb 100644
--- a/usr/src/cmd/format/ctlr_scsi.c
+++ b/usr/src/cmd/format/ctlr_scsi.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -98,10 +98,6 @@ static int scsi_repair(uint64_t, int);
static int scsi_read_defect_data(struct defect_list *, int);
static int scsi_ck_format(void);
-#ifdef i386
-static int scsi_rdwr(int, int, diskaddr_t, int, caddr_t, int, int *);
-#endif /* i386 */
-
#else /* __STDC__ */
static int scsi_format();
@@ -129,10 +125,6 @@ static int scsi_repair();
static int scsi_read_defect_data();
static int scsi_ck_format();
-#ifdef i386
-static int scsi_rdwr(int, int, diskaddr_t, int, caddr_t, int, int *);
-#endif /* i386 */
-
#endif /* __STDC__ */
diff --git a/usr/src/cmd/format/ctlr_scsi.h b/usr/src/cmd/format/ctlr_scsi.h
index e0b473bb02..965f747135 100644
--- a/usr/src/cmd/format/ctlr_scsi.h
+++ b/usr/src/cmd/format/ctlr_scsi.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _CTLR_SCSI_H
#define _CTLR_SCSI_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -134,10 +132,7 @@ struct scsi_ms_header {
/*
* Local prototypes for ANSI C compilers
*/
-#ifdef sparc
int scsi_rdwr(int, int, diskaddr_t, int, caddr_t, int, int *);
-#endif /* sparc */
-
int scsi_ex_man(struct defect_list *);
int scsi_ex_cur(struct defect_list *);
int scsi_ex_grown(struct defect_list *);
@@ -163,9 +158,9 @@ int scsi_ms_page3();
int scsi_ms_page4();
int scsi_read_defect_data();
int scsi_repair();
-int scsi_rdwr();
#endif /* sparc */
+int scsi_rdwr();
int scsi_ck_format();
int scsi_ex_man();
int scsi_ex_cur();