diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-09-24 13:05:10 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 08:56:19 +0200 |
commit | 8bff7c6b0f63c7ee9c5e3a076338d74125b8debb (patch) | |
tree | 0863c7e0d09592ee9f4d568625348ef12e4a30df /drivers/ata/libata-scsi.c | |
parent | a68bbddba486020c9c74825ce90c4c1ec463e0e8 (diff) | |
download | blackbird-op-linux-8bff7c6b0f63c7ee9c5e3a076338d74125b8debb.tar.gz blackbird-op-linux-8bff7c6b0f63c7ee9c5e3a076338d74125b8debb.zip |
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>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index b9d3ba423cb2..054370700abf 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -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); |