diff options
author | Damien Le Moal | 2018-05-09 09:28:10 +0900 |
---|---|---|
committer | Tejun Heo | 2018-05-10 11:43:20 -0700 |
commit | 07b9b6d6e1bb823e278d1afb255ad057cf53960b (patch) | |
tree | f0d007b26fc8443385f833f82f5f96a7407e4d65 /drivers/ata | |
parent | 54fb131b325c663b368b2be150f6875124df1d76 (diff) |
libata: Make ata_dev_set_mode() less verbose
For a successful setting of the device transfer speed mode in
ata_dev_set_mode(), do not print the message
"ataX.XX: configured for xxx" if the EH context has the quiet flag set,
unless the device port is being reset.
This preserves the output of the message during device scan but removes
it in the case of a simple device revalidation such as trigerred by
enabling the NCQ I/O priority feature of the device
e.g. echo 1 > /sys/block/sdxx/device/ncq_iprio_enable
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')
-rw-r--r-- | drivers/ata/libata-core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8bc71ca61e7f..40caad1d8b43 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3573,9 +3573,11 @@ static int ata_dev_set_mode(struct ata_device *dev) DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", dev->xfer_shift, (int)dev->xfer_mode); - ata_dev_info(dev, "configured for %s%s\n", - ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), - dev_err_whine); + if (!(ehc->i.flags & ATA_EHI_QUIET) || + ehc->i.flags & ATA_EHI_DID_HARDRESET) + ata_dev_info(dev, "configured for %s%s\n", + ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), + dev_err_whine); return 0; |