Skip to content

Re-use device management code fragments

Avri Altman linux-scsi lkml 3 versions – Applied

Status from this message: Applied to 6.10/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 6 repliesApplied
  2. v24 patches 10 repliesSuperseded
  3. v14 patches 8 repliesSuperseded

Changes in v3 from the cover letter

- 2/4 - Clarify commit log (Bean)
- 4/4 - pass cmd_type to ufshcd_prepare_req_desc_hdr (Bean)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4scsi: ufs: Re-use device management locking codedrivers/ufs/core/ufshcd.c+32 -370 replies
2/4scsi: ufs: Re-use exec_dev_cmddrivers/ufs/core/ufshcd.c+24 -292 replies
3/4scsi: ufs: Re-use compose_dev_cmddrivers/ufs/core/ufshcd.c+13 -200 replies
4/4scsi: ufs: Re-use compose_devman_upiudrivers/ufs/core/ufshcd.c include/ufs/ufshci.h+18 -332 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchBean HuoBart Van Assche
1/4R-b R-b
2/4R-b R-b
3/4R-b R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/4] Re-use device management code fragments

v2->v3:
- 2/4 - Clarify commit log (Bean)
- 4/4 - pass cmd_type to ufshcd_prepare_req_desc_hdr (Bean)

v1->v2:
- Attend Bart's comments

Device management commands are constructed for query commands that are being issued by the driver, but also for raw device management commands originated by the bsg module, and recently, by the advanced rpmb handler. Thus, the same code fragments, e.g. locking, composing the command, composing the upiu etc., appear over and over. Remove those duplications. Theoretically, there should be no functional change.

Avri Altman (4):
scsi: ufs: Re-use device management locking code
scsi: ufs: Re-use exec_dev_cmd
scsi: ufs: Re-use compose_dev_cmd
scsi: ufs: Re-use compose_devman_upiu

 drivers/ufs/core/ufshcd.c | 204 ++++++++++++++++----------------------
 include/ufs/ufshci.h      |   2 +-
 2 files changed, 87 insertions(+), 119 deletions(-)
Signature · 1 line
2.42.0