Skip to content

Commit

Permalink
libata: Make ata_dev_set_mode() less verbose
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Damien Le Moal authored and Tejun Heo committed May 10, 2018
1 parent 54fb131 commit 07b9b6d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 07b9b6d

Please sign in to comment.