Message ID | 20180301194024.25532-7-damien.lemoal@wdc.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
On 03/01/2018 08:40 PM, Damien Le Moal wrote: > 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. > > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > --- > drivers/ata/libata-core.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c > index 3c09122bf038..258afc2e8efd 100644 > --- a/drivers/ata/libata-core.c > +++ b/drivers/ata/libata-core.c > @@ -3573,9 +3573,10 @@ 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)) > + ata_dev_info(dev, "configured for %s%s\n", > + ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), > + dev_err_whine); > > return 0; > > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
Hello, On Fri, Mar 02, 2018 at 04:40:24AM +0900, Damien Le Moal wrote: > 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. > > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > --- > drivers/ata/libata-core.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c > index 3c09122bf038..258afc2e8efd 100644 > --- a/drivers/ata/libata-core.c > +++ b/drivers/ata/libata-core.c > @@ -3573,9 +3573,10 @@ 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)) > + ata_dev_info(dev, "configured for %s%s\n", > + ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), > + dev_err_whine); EHI_QUIET is used during proble to print out the more releveant messages, so doing the above may surprise some users. Can we keep the above message for initial probing? Thanks.
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3c09122bf038..258afc2e8efd 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3573,9 +3573,10 @@ 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)) + ata_dev_info(dev, "configured for %s%s\n", + ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode)), + dev_err_whine); return 0;
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. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> --- drivers/ata/libata-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)