nvme/quirks: don't use SGL for Huawei SSDs
We see reports that Huawei SSDs can't handle hardware SGL properly, it requires additional alignment, so add a quirk here to force Huawei SSDs use PRP instead. Fix #2489. Change-Id: I20a57e754bc6ff8666d681191994818f2192decc Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12405 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: GangCao <gang.cao@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
657da2b647
commit
4e241cba01
@ -54,6 +54,7 @@ extern "C" {
|
|||||||
#define SPDK_PCI_VID_VMWARE 0x15ad
|
#define SPDK_PCI_VID_VMWARE 0x15ad
|
||||||
#define SPDK_PCI_VID_REDHAT 0x1b36
|
#define SPDK_PCI_VID_REDHAT 0x1b36
|
||||||
#define SPDK_PCI_VID_NUTANIX 0x4e58
|
#define SPDK_PCI_VID_NUTANIX 0x4e58
|
||||||
|
#define SPDK_PCI_VID_HUAWEI 0x19e5
|
||||||
|
|
||||||
#define SPDK_PCI_CLASS_ANY_ID 0xffffff
|
#define SPDK_PCI_CLASS_ANY_ID 0xffffff
|
||||||
/**
|
/**
|
||||||
|
@ -1939,7 +1939,7 @@ nvme_ctrlr_identify_done(void *arg, const struct spdk_nvme_cpl *cpl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctrlr->cdata.sgls.supported) {
|
if (ctrlr->cdata.sgls.supported && !(ctrlr->quirks & NVME_QUIRK_NOT_USE_SGL)) {
|
||||||
assert(ctrlr->cdata.sgls.supported != 0x3);
|
assert(ctrlr->cdata.sgls.supported != 0x3);
|
||||||
ctrlr->flags |= SPDK_NVME_CTRLR_SGL_SUPPORTED;
|
ctrlr->flags |= SPDK_NVME_CTRLR_SGL_SUPPORTED;
|
||||||
if (ctrlr->cdata.sgls.supported == 0x2) {
|
if (ctrlr->cdata.sgls.supported == 0x2) {
|
||||||
|
@ -163,6 +163,12 @@ extern pid_t g_spdk_nvme_pid;
|
|||||||
*/
|
*/
|
||||||
#define NVME_QUIRK_MDTS_EXCLUDE_MD 0x8000
|
#define NVME_QUIRK_MDTS_EXCLUDE_MD 0x8000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force not to use SGL even the controller report that it can
|
||||||
|
* support it.
|
||||||
|
*/
|
||||||
|
#define NVME_QUIRK_NOT_USE_SGL 0x10000
|
||||||
|
|
||||||
#define NVME_MAX_ASYNC_EVENTS (8)
|
#define NVME_MAX_ASYNC_EVENTS (8)
|
||||||
|
|
||||||
#define NVME_MAX_ADMIN_TIMEOUT_IN_SECS (30)
|
#define NVME_MAX_ADMIN_TIMEOUT_IN_SECS (30)
|
||||||
|
@ -109,6 +109,9 @@ static const struct nvme_quirk nvme_quirks[] = {
|
|||||||
{ {SPDK_PCI_CLASS_NVME, SPDK_PCI_VID_INTEL, 0x4140, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
{ {SPDK_PCI_CLASS_NVME, SPDK_PCI_VID_INTEL, 0x4140, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
||||||
NVME_QUIRK_MDTS_EXCLUDE_MD
|
NVME_QUIRK_MDTS_EXCLUDE_MD
|
||||||
},
|
},
|
||||||
|
{ {SPDK_PCI_CLASS_NVME, SPDK_PCI_VID_HUAWEI, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
||||||
|
NVME_QUIRK_NOT_USE_SGL
|
||||||
|
},
|
||||||
{ {0x000000, 0x0000, 0x0000, 0x0000, 0x0000}, 0}
|
{ {0x000000, 0x0000, 0x0000, 0x0000, 0x0000}, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user