OSDN Git Service

scsi: scsi_error: Handle power-on reset unit attention
authorHannes Reinecke <hare@suse.de>
Tue, 17 Oct 2017 07:11:24 +0000 (09:11 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 19 Oct 2017 00:55:40 +0000 (20:55 -0400)
commitcf3431bba1df3b4f25b04900cb804d7e6e5eb6a9
treeba9389d8a63f3aa496825e1c0c0dd56aa5f0b9fe
parenta8bbb2ab4e4fac8ebd2a402d5d81500cbeaaebaf
scsi: scsi_error: Handle power-on reset unit attention

As per SAM there is a status precedence, with any sense code 29/XX
taking second place just after an ACA ACTIVE status.  Additionally, each
target might prefer to not queue any unit attention conditions, but just
report one.  Due to the above, this will be that one with the highest
precedence.  This results in the sense code 29/XX effectively
overwriting any other unit attention.  Hence we should report the
power-on reset to userland so that it can take appropriate action.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
include/scsi/scsi_device.h