Skip to content

nvme: rework __nvme_submit_sync_cmd()

Hannes Reinecke linux-nvme 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesIn review
  2. v13 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nvme: split __nvme_submit_sync_cmd()drivers/nvme/host/auth.c drivers/nvme/host/core.c drivers/nvme/host/fabrics.c +3 more+83 -452 replies
2/3nvme: retry authentication commands if DNR status bit is not setdrivers/nvme/host/auth.c+2 -00 replies
3/3nvme: make 'at_head' parameter for __nvme_submit_sync_cmd() booleandrivers/nvme/host/auth.c drivers/nvme/host/core.c drivers/nvme/host/fabrics.c +1 more+11 -133 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCHv2 0/3] nvme: rework __nvme_submit_sync_cmd()

Hi all,

as Jens and hch complained about the argument list to __nvme_submit_sync_cmd() getting too long, here's now a patchset to clean things up.
The first patch is to split off __nvme_alloc_rq() from __nvme_submit_sync_cmd(), which serves to reduce the number of arguments; it's also a nice cleanup as this function can be utilized to replace some open-coded versions.
The second patch is to introduce a 'retry' argument to __nvme_alloc_rq(), to indicate whether retries for this command should be allowd.
And the third is another cleanup; the 'at_head' argument to __nvme_submit_sync_cmd() really should be a boolean, as it can take only two values, and it's being converted into a boolean within __nvme_submit_sync_cmd() anyway.

As usual, comments and reviews are welcome.

Hannes Reinecke (3):
nvme: split __nvme_submit_sync_cmd()
nvme: retry authentication commands if DNR status bit is not set
nvme: make 'at_head' parameter for __nvme_submit_sync_cmd() boolean

 drivers/nvme/host/auth.c       | 11 +++++--
 drivers/nvme/host/core.c       | 60 ++++++++++++++++++++++------------
 drivers/nvme/host/fabrics.c    | 38 +++++++++++++++------
 drivers/nvme/host/nvme.h       |  8 ++---
 drivers/nvme/host/pci.c        |  8 ++---
 drivers/nvme/target/passthru.c |  3 +-
 6 files changed, 83 insertions(+), 45 deletions(-)
Signature · 1 line
2.35.3