libata: set queue SSD flag for SSD devices
SSD devices should give an RPM setting of 1 in word 217 of the ID page. If we see such a device, tell the block layer about it. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
@@ -977,6 +977,10 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
|
||||
|
||||
blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
|
||||
} else {
|
||||
if (ata_id_is_ssd(dev->id))
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_NONROT,
|
||||
sdev->request_queue);
|
||||
|
||||
/* ATA devices must be sector aligned */
|
||||
blk_queue_update_dma_alignment(sdev->request_queue,
|
||||
ATA_SECT_SIZE - 1);
|
||||
|
Reference in New Issue
Block a user