hpsa: correct decode sense data
authorDon Brace <don.brace@pmcs.com>
Sat, 18 Jul 2015 16:12:28 +0000 (11:12 -0500)
committerJames Bottomley <JBottomley@Odin.com>
Wed, 26 Aug 2015 23:21:39 +0000 (16:21 -0700)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/hpsa.c

index cb11421f9cb83ec598e168620c36fc2a61cf560a..ce9122d37a8b7b3d21ec1135751d39de6f4136a7 100644 (file)
@@ -325,7 +325,7 @@ static int check_for_unit_attention(struct ctlr_info *h,
 
        decode_sense_data(c->err_info->SenseInfo, sense_len,
                                &sense_key, &asc, &ascq);
-       if (sense_key != UNIT_ATTENTION || asc == -1)
+       if (sense_key != UNIT_ATTENTION || asc == 0xff)
                return 0;
 
        switch (asc) {