summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-23 23:22:09 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-23 23:22:09 +0200
commitc77380d4534c65cc9865a6b4efea44be4d039207 (patch)
tree50c95834efb0817da80a1f81a245dd31b9c814d7
parent64c2eae225137a8f5a88b6a416fc182d36e8ae9f (diff)
downloadop-kernel-dev-c77380d4534c65cc9865a6b4efea44be4d039207.zip
op-kernel-dev-c77380d4534c65cc9865a6b4efea44be4d039207.tar.gz
ide-disk: set non-rotational queue flag for SSD and CF devices
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-disk.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 223750c..e5adebe 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -600,6 +600,7 @@ static int ide_disk_check(ide_drive_t *drive, const char *s)
static void ide_disk_setup(ide_drive_t *drive)
{
struct ide_disk_obj *idkp = drive->driver_data;
+ struct request_queue *q = drive->queue;
ide_hwif_t *hwif = drive->hwif;
u16 *id = drive->id;
char *m = (char *)&id[ATA_ID_PROD];
@@ -626,11 +627,14 @@ static void ide_disk_setup(ide_drive_t *drive)
if (max_s > hwif->rqsize)
max_s = hwif->rqsize;
- blk_queue_max_sectors(drive->queue, max_s);
+ blk_queue_max_sectors(q, max_s);
}
printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name,
- drive->queue->max_sectors / 2);
+ q->max_sectors / 2);
+
+ if (ata_id_is_ssd(id) || ata_id_is_cfa(id))
+ queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
/* calculate drive capacity, and select LBA if possible */
ide_disk_get_capacity(drive);
OpenPOWER on IntegriCloud