Message ID | 20230605013212.573489-3-dlemoal@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Cleanups and improvements | expand |
On 6/5/23 03:32, Damien Le Moal wrote: > Instead of hardconfign the device flag tests to detect if NCQ is > supported and enabled in ata_eh_speed_down(), use ata_ncq_enabled(). > > Signed-off-by: Damien Le Moal <dlemoal@kernel.org> > --- > drivers/ata/libata-eh.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes
On 6/5/23 4:32 AM, Damien Le Moal wrote: > Instead of hardconfign the device flag tests to detect if NCQ is Hardcoding? > supported and enabled in ata_eh_speed_down(), use ata_ncq_enabled(). > > Signed-off-by: Damien Le Moal <dlemoal@kernel.org> [...] MBR, Sergey
On 6/5/23 18:45, Sergei Shtylyov wrote: > On 6/5/23 4:32 AM, Damien Le Moal wrote: > >> Instead of hardconfign the device flag tests to detect if NCQ is > > Hardcoding? Yes. Will fix. Thanks. > >> supported and enabled in ata_eh_speed_down(), use ata_ncq_enabled(). >> >> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> > [...] > > MBR, Sergey
On 05/06/2023 02:32, Damien Le Moal wrote: > Instead of hardconfign the device flag tests to detect if NCQ is > supported and enabled in ata_eh_speed_down(), use ata_ncq_enabled(). > > Signed-off-by: Damien Le Moal<dlemoal@kernel.org> Reviewed-by: John Garry <john.g.garry@oracle.com>
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index a6c901811802..c0993d755e8d 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1817,9 +1817,7 @@ static unsigned int ata_eh_speed_down(struct ata_device *dev, verdict = ata_eh_speed_down_verdict(dev); /* turn off NCQ? */ - if ((verdict & ATA_EH_SPDN_NCQ_OFF) && - (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ | - ATA_DFLAG_NCQ_OFF)) == ATA_DFLAG_NCQ) { + if ((verdict & ATA_EH_SPDN_NCQ_OFF) && ata_ncq_enabled(dev)) { dev->flags |= ATA_DFLAG_NCQ_OFF; ata_dev_warn(dev, "NCQ disabled due to excessive errors\n"); goto done;
Instead of hardconfign the device flag tests to detect if NCQ is supported and enabled in ata_eh_speed_down(), use ata_ncq_enabled(). Signed-off-by: Damien Le Moal <dlemoal@kernel.org> --- drivers/ata/libata-eh.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)