mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>
This commit is contained in:
parent
a68bbddba4
commit
8bff7c6b0f
2 changed files with 10 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue