File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -600,6 +600,7 @@ static int ide_disk_check(ide_drive_t *drive, const char *s)
600
600
static void ide_disk_setup (ide_drive_t * drive )
601
601
{
602
602
struct ide_disk_obj * idkp = drive -> driver_data ;
603
+ struct request_queue * q = drive -> queue ;
603
604
ide_hwif_t * hwif = drive -> hwif ;
604
605
u16 * id = drive -> id ;
605
606
char * m = (char * )& id [ATA_ID_PROD ];
@@ -626,11 +627,14 @@ static void ide_disk_setup(ide_drive_t *drive)
626
627
if (max_s > hwif -> rqsize )
627
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
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
639
/* calculate drive capacity, and select LBA if possible */
636
640
ide_disk_get_capacity (drive );
You can’t perform that action at this time.
0 commit comments