diff options
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index b2da8a00ec33..5464d467e23e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2951,9 +2951,6 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp) | |||
2951 | if (rot == 1) { | 2951 | if (rot == 1) { |
2952 | blk_queue_flag_set(QUEUE_FLAG_NONROT, q); | 2952 | blk_queue_flag_set(QUEUE_FLAG_NONROT, q); |
2953 | blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); | 2953 | blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); |
2954 | } else { | ||
2955 | blk_queue_flag_clear(QUEUE_FLAG_NONROT, q); | ||
2956 | blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q); | ||
2957 | } | 2954 | } |
2958 | 2955 | ||
2959 | if (sdkp->device->type == TYPE_ZBC) { | 2956 | if (sdkp->device->type == TYPE_ZBC) { |
@@ -3090,6 +3087,15 @@ static int sd_revalidate_disk(struct gendisk *disk) | |||
3090 | if (sdkp->media_present) { | 3087 | if (sdkp->media_present) { |
3091 | sd_read_capacity(sdkp, buffer); | 3088 | sd_read_capacity(sdkp, buffer); |
3092 | 3089 | ||
3090 | /* | ||
3091 | * set the default to rotational. All non-rotational devices | ||
3092 | * support the block characteristics VPD page, which will | ||
3093 | * cause this to be updated correctly and any device which | ||
3094 | * doesn't support it should be treated as rotational. | ||
3095 | */ | ||
3096 | blk_queue_flag_clear(QUEUE_FLAG_NONROT, q); | ||
3097 | blk_queue_flag_set(QUEUE_FLAG_ADD_RANDOM, q); | ||
3098 | |||
3093 | if (scsi_device_supports_vpd(sdp)) { | 3099 | if (scsi_device_supports_vpd(sdp)) { |
3094 | sd_read_block_provisioning(sdkp); | 3100 | sd_read_block_provisioning(sdkp); |
3095 | sd_read_block_limits(sdkp); | 3101 | sd_read_block_limits(sdkp); |