Skip to content

Commit 43cff7d

Browse files
committed
ata: libata-scsi: Use ata_ncq_supported in ata_scsi_dev_config()
In ata_scsi_dev_config(), instead of hard-coding the test to check if an ATA device supports NCQ by looking at the ATA_DFLAG_NCQ flag, use ata_ncq_supported(). Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
1 parent 12980c1 commit 43cff7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ata/libata-scsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ int ata_scsi_dev_config(struct scsi_device *sdev, struct ata_device *dev)
11221122
if (dev->flags & ATA_DFLAG_AN)
11231123
set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
11241124

1125-
if (dev->flags & ATA_DFLAG_NCQ)
1125+
if (ata_ncq_supported(dev))
11261126
depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id));
11271127
depth = min(ATA_MAX_QUEUE, depth);
11281128
scsi_change_queue_depth(sdev, depth);

0 commit comments

Comments
 (0)