diff options
| author | Sean Bruno <sbruno@FreeBSD.org> | 2015-09-03 17:46:57 +0000 |
|---|---|---|
| committer | Sean Bruno <sbruno@FreeBSD.org> | 2015-09-03 17:46:57 +0000 |
| commit | e6aa141248fc20d9e139b7ce91df6d0a15238936 (patch) | |
| tree | bfefde6ae823f5ad1bbcdc47fd7101171a8d39a7 /sys/dev/ciss | |
| parent | 880c41ba36ca36dc6bd932f6a263eb589ee1fd28 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ciss')
| -rw-r--r-- | sys/dev/ciss/ciss.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 1b62b5fc2cd5..974bf50281db 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -4016,8 +4016,7 @@ static void ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn) { struct ciss_ldrive *ld; - int bus, target; - int rescan_ld; + int ostatus, bus, target; debug_called(2); @@ -4040,6 +4039,7 @@ ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn) /* * Update our idea of the drive's status. */ + ostatus = ciss_decode_ldrive_status(cn->data.logical_status.previous_state); ld->cl_status = ciss_decode_ldrive_status(cn->data.logical_status.new_state); if (ld->cl_lstatus != NULL) ld->cl_lstatus->status = cn->data.logical_status.new_state; @@ -4047,9 +4047,7 @@ ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn) /* * Have CAM rescan the drive if its status has changed. */ - rescan_ld = (cn->data.logical_status.previous_state != - cn->data.logical_status.new_state) ? 1 : 0; - if (rescan_ld) { + if (ostatus != ld->cl_status) { ld->cl_update = 1; ciss_notify_rescan_logical(sc); } |
