aboutsummaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss/ciss.c
diff options
context:
space:
mode:
authorPaul Saab <ps@FreeBSD.org>2003-07-30 06:36:13 +0000
committerPaul Saab <ps@FreeBSD.org>2003-07-30 06:36:13 +0000
commita92f6b32049623f9d333cd2f2e420d02567f8e4e (patch)
tree2895c46e0724709703fe52eb53417961affc991d /sys/dev/ciss/ciss.c
parente481404be97ac2825f8c5833af027a2054d82b01 (diff)
downloadsrc-a92f6b32049623f9d333cd2f2e420d02567f8e4e.tar.gz
src-a92f6b32049623f9d333cd2f2e420d02567f8e4e.zip
MFC: rev 1.25-1.26
Quiet down ciss unless bootverbose is set. Check the status of the user command and return the proper error to the user.
Notes
Notes: svn path=/stable/4/; revision=118191
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r--sys/dev/ciss/ciss.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 795c05e6a447..4b17f5097a81 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -726,7 +726,7 @@ ciss_init_requests(struct ciss_softc *sc)
*/
sc->ciss_max_requests = min(CISS_MAX_REQUESTS, sc->ciss_cfg->max_outstanding_commands);
- if (1/*bootverbose*/)
+ if (bootverbose)
ciss_printf(sc, "using %d of %d available commands\n",
sc->ciss_max_requests, sc->ciss_cfg->max_outstanding_commands);
@@ -842,7 +842,7 @@ ciss_identify_adapter(struct ciss_softc *sc)
sc->ciss_flags |= CISS_FLAG_BMIC_ABORT;
/* print information */
- if (1/*bootverbose*/) {
+ if (bootverbose) {
ciss_printf(sc, " %d logical drive%s configured\n",
sc->ciss_id->configured_logical_drives,
(sc->ciss_id->configured_logical_drives == 1) ? "" : "s");
@@ -978,7 +978,7 @@ ciss_init_logical(struct ciss_softc *sc)
/*
* Save logical drive information.
*/
- if (1/*bootverbose*/)
+ if (bootverbose)
ciss_printf(sc, "%d logical drive%s\n", ndrives, (ndrives > 1) ? "s" : "");
if (ndrives != sc->ciss_id->configured_logical_drives)
ciss_printf(sc, "logical drive map claims %d drives, but adapter claims %d\n",
@@ -1142,7 +1142,7 @@ ciss_identify_logical(struct ciss_softc *sc, struct ciss_ldrive *ld)
/*
* Print the drive's basic characteristics.
*/
- if (1/*bootverbose*/) {
+ if (bootverbose) {
ciss_printf(sc, "logical drive %d: %s, %dMB ",
cbc->log_drive, ciss_name_ldrive_org(ld->cl_ldrive->fault_tolerance),
((ld->cl_ldrive->blocks_available / (1024 * 1024)) *
@@ -1910,7 +1910,7 @@ ciss_user_command(struct ciss_softc *sc, IOCTL_Command_struct *ioc)
struct ciss_request *cr;
struct ciss_command *cc;
struct ciss_error_info *ce;
- int error;
+ int error = 0;
debug_called(1);
@@ -1955,9 +1955,17 @@ ciss_user_command(struct ciss_softc *sc, IOCTL_Command_struct *ioc)
}
/*
- * Copy the results back to the user.
+ * Check to see if the command succeeded.
*/
ce = (struct ciss_error_info *)&(cc->sg[0]);
+ if (ciss_report_request(cr, NULL, NULL) == 0)
+ bzero(ce, sizeof(*ce));
+ else
+ error = EIO;
+
+ /*
+ * Copy the results back to the user.
+ */
bcopy(ce, &ioc->error_info, sizeof(*ce));
if ((ioc->buf_size > 0) &&
(error = copyout(cr->cr_data, ioc->buf, ioc->buf_size))) {