nvme: add NO_SGL_FOR_DSM quirk for Intel P55XX SSDs
Intel P55XX SSDs can support SGL feature but can't use Dataset Management command with SGL format, so add a quirk here for now, if the limitation was fixed in future, we can remvoe this. Also SPDK doesn't privoide scatter buffer API for DSM, so using PRP with DSM is totally fine. Change-Id: Ibe92f4deb5b8bc2077115f5b7244bc17be4f3b23 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5858 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
2d3f8b7cb2
commit
da5c9de277
@ -150,6 +150,12 @@ extern pid_t g_spdk_nvme_pid;
|
||||
*/
|
||||
#define NVME_QUIRK_OACS_SECURITY 0x2000
|
||||
|
||||
/**
|
||||
* Intel P55XX SSDs can't support Dataset Management command with SGL format,
|
||||
* so use PRP with DSM command.
|
||||
*/
|
||||
#define NVME_QUIRK_NO_SGL_FOR_DSM 0x4000
|
||||
|
||||
#define NVME_MAX_ASYNC_EVENTS (8)
|
||||
|
||||
#define NVME_MAX_ADMIN_TIMEOUT_IN_SECS (30)
|
||||
|
@ -1663,6 +1663,14 @@ nvme_pcie_qpair_submit_request(struct spdk_nvme_qpair *qpair, struct nvme_reques
|
||||
sgl_supported = (ctrlr->flags & SPDK_NVME_CTRLR_SGL_SUPPORTED) != 0 &&
|
||||
!nvme_qpair_is_admin_queue(qpair);
|
||||
|
||||
if (sgl_supported) {
|
||||
/* Don't use SGL for DSM command */
|
||||
if (spdk_unlikely((ctrlr->quirks & NVME_QUIRK_NO_SGL_FOR_DSM) &&
|
||||
(req->cmd.opc == SPDK_NVME_OPC_DATASET_MANAGEMENT))) {
|
||||
sgl_supported = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (sgl_supported && !(ctrlr->flags & SPDK_NVME_CTRLR_SGL_REQUIRES_DWORD_ALIGNMENT)) {
|
||||
dword_aligned = false;
|
||||
}
|
||||
|
@ -74,7 +74,8 @@ static const struct nvme_quirk nvme_quirks[] = {
|
||||
NVME_INTEL_QUIRK_WRITE_LATENCY |
|
||||
NVME_INTEL_QUIRK_STRIPING |
|
||||
NVME_QUIRK_READ_ZERO_AFTER_DEALLOCATE |
|
||||
NVME_QUIRK_MINIMUM_IO_QUEUE_SIZE
|
||||
NVME_QUIRK_MINIMUM_IO_QUEUE_SIZE |
|
||||
NVME_QUIRK_NO_SGL_FOR_DSM
|
||||
},
|
||||
{ {SPDK_PCI_CLASS_NVME, SPDK_PCI_VID_MEMBLAZE, 0x0540, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID},
|
||||
NVME_QUIRK_DELAY_BEFORE_CHK_RDY
|
||||
|
Loading…
Reference in New Issue
Block a user