diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2018-05-09 09:28:11 +0900 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-05-10 11:43:20 -0700 |
commit | 7eb49509dd6b2a4ed0c18a0f8c187afbacf98b42 (patch) | |
tree | d50a4054575aa1b7734541b6c722f53c862d52de /drivers/ata/libata-scsi.c | |
parent | 07b9b6d6e1bb823e278d1afb255ad057cf53960b (diff) | |
download | linux-stable-7eb49509dd6b2a4ed0c18a0f8c187afbacf98b42.tar.gz linux-stable-7eb49509dd6b2a4ed0c18a0f8c187afbacf98b42.tar.bz2 linux-stable-7eb49509dd6b2a4ed0c18a0f8c187afbacf98b42.zip |
libata: Honor RQF_QUIET flag
Currently, libata ignores requests RQF_QUIET flag and print error
messages for failed commands, regardless if this flag is set in the
command request. Fix this by introducing the ata_eh_quiet() function and
using this function in ata_eh_link_autopsy() to determine if the EH
context should be quiet. This works by counting the number of failed
commands and the number of commands with the quiet flag set. If both
numbers are equal, the the EH context can be set to quiet and all error
messages suppressed. Otherwise, only the error messages for the failed
commands are suppressed and the link Emask and irq_stat messages printed.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 89a9d4a2efc8..8d76de9189e4 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -872,6 +872,9 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev, qc->sg = scsi_sglist(cmd); qc->n_elem = scsi_sg_count(cmd); + + if (cmd->request->rq_flags & RQF_QUIET) + qc->flags |= ATA_QCFLAG_QUIET; } else { cmd->result = (DID_OK << 16) | (QUEUE_FULL << 1); cmd->scsi_done(cmd); |