ide-disk: set non-rotational queue flag for SSD and CF devices

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2008-10-23 23:22:09 +02:00
Родитель 64c2eae225
Коммит c77380d453
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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) static void ide_disk_setup(ide_drive_t *drive)
{ {
struct ide_disk_obj *idkp = drive->driver_data; struct ide_disk_obj *idkp = drive->driver_data;
struct request_queue *q = drive->queue;
ide_hwif_t *hwif = drive->hwif; ide_hwif_t *hwif = drive->hwif;
u16 *id = drive->id; u16 *id = drive->id;
char *m = (char *)&id[ATA_ID_PROD]; 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) if (max_s > hwif->rqsize)
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, 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 */ /* calculate drive capacity, and select LBA if possible */
ide_disk_get_capacity(drive); ide_disk_get_capacity(drive);