diff options
author | ambrisko <ambrisko@FreeBSD.org> | 2006-01-26 22:39:12 +0000 |
---|---|---|
committer | ambrisko <ambrisko@FreeBSD.org> | 2006-01-26 22:39:12 +0000 |
commit | c9e74adc5ee67d7f9d4d179d15dcda8abec5455c (patch) | |
tree | 685936d1c8cc49e308dd163a8bda49cb2cbd9471 /sys/dev/amr | |
parent | a256f935eb597aca746dfb71d24156bf714930d7 (diff) | |
download | FreeBSD-src-c9e74adc5ee67d7f9d4d179d15dcda8abec5455c.zip FreeBSD-src-c9e74adc5ee67d7f9d4d179d15dcda8abec5455c.tar.gz |
When the RAID firmware returns a failure, don't hard error the result.
This is important with MegaLib, when issuing a GET_REBUILD_PROG since
it returns an error if the drive is not in rebuild state.
This will be MFC'ed shortly.
Submitted by: ps
Reviewed by: scottl
Found by: ambrisko
Diffstat (limited to 'sys/dev/amr')
-rw-r--r-- | sys/dev/amr/amr.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index b93135c..1e16d12 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -2220,7 +2220,7 @@ amr_quartz_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave) { int worked, i; u_int32_t outd; - u_int8_t nstatus ,status; + u_int8_t nstatus; u_int8_t completed[46]; debug_called(3); @@ -2244,16 +2244,11 @@ amr_quartz_get_work(struct amr_softc *sc, struct amr_mailbox *mbsave) sc->amr_mailbox->mb_completed[i] = 0xff; } - /* this should never happen, someone screwed up the completion status */ - if ((status = sc->amr_mailbox->mb_status) == 0xff) { - device_printf(sc->amr_dev, "status 0xff from the firmware\n"); - return (worked); - } - sc->amr_mailbox->mb_status = 0xff; - /* Save information for later processing */ mbsave->mb_nstatus = nstatus; - mbsave->mb_status = status; + mbsave->mb_status = sc->amr_mailbox->mb_status; + sc->amr_mailbox->mb_status = 0xff; + for (i = 0; i < nstatus; i++) mbsave->mb_completed[i] = completed[i]; |