]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nvme: check hw sectors before setting chunk sectors
authorKeith Busch <keith.busch@intel.com>
Thu, 14 Dec 2017 18:20:14 +0000 (11:20 -0700)
committerChristoph Hellwig <hch@lst.de>
Fri, 15 Dec 2017 14:18:07 +0000 (15:18 +0100)
commit249159c5f15812140fa216f9997d799ac0023a1f
tree014045698c78a35ce64e92edb00e0368126386ae
parentbd9f5d65769b9fe5e72110d4cbc9097b53b01613
nvme: check hw sectors before setting chunk sectors

Some devices with IDs matching the "stripe" quirk don't actually have
this quirk, and don't have an MDTS value. When MDTS is not set, the
driver sets the max sectors to UINT_MAX, which is not a power of 2,
hitting a BUG_ON from blk_queue_chunk_sectors. This patch skips setting
chunk sectors for such devices.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c