Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (6 weeks ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/drivers/nvme/host/core.c

    r31826 r31859  
    12051205                blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
    12061206        }
    1207         if (ctrl->stripe_size)
    1208                 blk_queue_chunk_sectors(q, ctrl->stripe_size >> 9);
     1207        if (ctrl->quirks & NVME_QUIRK_STRIPE_SIZE)
     1208                blk_queue_chunk_sectors(q, ctrl->max_hw_sectors);
    12091209        blk_queue_virt_boundary(q, ctrl->page_size - 1);
    12101210        if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
     
    12611261        ctrl->max_hw_sectors =
    12621262                min_not_zero(ctrl->max_hw_sectors, max_hw_sectors);
    1263 
    1264         if ((ctrl->quirks & NVME_QUIRK_STRIPE_SIZE) && id->vs[3]) {
    1265                 unsigned int max_hw_sectors;
    1266 
    1267                 ctrl->stripe_size = 1 << (id->vs[3] + page_shift);
    1268                 max_hw_sectors = ctrl->stripe_size >> (page_shift - 9);
    1269                 if (ctrl->max_hw_sectors) {
    1270                         ctrl->max_hw_sectors = min(max_hw_sectors,
    1271                                                         ctrl->max_hw_sectors);
    1272                 } else {
    1273                         ctrl->max_hw_sectors = max_hw_sectors;
    1274                 }
    1275         }
    12761263
    12771264        nvme_set_queue_limits(ctrl, ctrl->admin_q);
Note: See TracChangeset for help on using the changeset viewer.