aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-23 17:22:09 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-23 17:22:09 -0400
commitc77380d4534c65cc9865a6b4efea44be4d039207 (patch)
tree50c95834efb0817da80a1f81a245dd31b9c814d7 /drivers
parent64c2eae225137a8f5a88b6a416fc182d36e8ae9f (diff)
ide-disk: set non-rotational queue flag for SSD and CF devices
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-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 223750c1b5a6..e5adebe8ac2c 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)
600static void ide_disk_setup(ide_drive_t *drive) 600static void ide_disk_setup(ide_drive_t *drive)
601{ 601{
602 struct ide_disk_obj *idkp = drive->driver_data; 602 struct ide_disk_obj *idkp = drive->driver_data;
603 struct request_queue *q = drive->queue;
603 ide_hwif_t *hwif = drive->hwif; 604 ide_hwif_t *hwif = drive->hwif;
604 u16 *id = drive->id; 605 u16 *id = drive->id;
605 char *m = (char *)&id[ATA_ID_PROD]; 606 char *m = (char *)&id[ATA_ID_PROD];
@@ -626,11 +627,14 @@ static void ide_disk_setup(ide_drive_t *drive)
626 if (max_s > hwif->rqsize) 627 if (max_s > hwif->rqsize)
627 max_s = hwif->rqsize; 628 max_s = hwif->rqsize;
628 629
629 blk_queue_max_sectors(drive->queue, max_s); 630 blk_queue_max_sectors(q, max_s);
630 } 631 }
631 632
632 printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name, 633 printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name,
633 drive->queue->max_sectors / 2); 634 q->max_sectors / 2);
635
636 if (ata_id_is_ssd(id) || ata_id_is_cfa(id))
637 queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
634 638
635 /* calculate drive capacity, and select LBA if possible */ 639 /* calculate drive capacity, and select LBA if possible */
636 ide_disk_get_capacity(drive); 640 ide_disk_get_capacity(drive);