* [PATCH v2 0/2] Clean UFS HPB 2.0
@ 2021-10-29 19:49 Bean Huo
2021-10-29 19:49 ` [PATCH v2 1/2] scsi: core: Ignore the UFSHPB preparation result Bean Huo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bean Huo @ 2021-10-29 19:49 UTC (permalink / raw)
To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
stanley.chu, beanhuo, bvanassche, tomas.winkler, cang,
daejun7.park
Cc: linux-scsi, linux-kernel
From: Bean Huo <beanhuo@micron.com>
Hi Martin and Bart,
These patches are based on Avri's patch "scsi: ufs: ufshpb: Remove HPB2.0 flows",
which has been applied to 5.15/scsi-fixes.
v1-v2:
fix typoes in the commit message
Bean Huo (2):
scsi: core: Ignore the UFSHPB preparation result
scsi: ufshpb: Delete ufshpb_set_write_buf_cmd()
drivers/scsi/ufs/ufshcd.c | 11 +++++------
drivers/scsi/ufs/ufshpb.c | 14 --------------
2 files changed, 5 insertions(+), 20 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] scsi: core: Ignore the UFSHPB preparation result
2021-10-29 19:49 [PATCH v2 0/2] Clean UFS HPB 2.0 Bean Huo
@ 2021-10-29 19:49 ` Bean Huo
2021-10-29 19:49 ` [PATCH v2 2/2] scsi: ufshpb: Delete ufshpb_set_write_buf_cmd() Bean Huo
2021-10-30 7:18 ` [PATCH v2 0/2] Clean UFS HPB 2.0 Bean Huo
2 siblings, 0 replies; 4+ messages in thread
From: Bean Huo @ 2021-10-29 19:49 UTC (permalink / raw)
To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
stanley.chu, beanhuo, bvanassche, tomas.winkler, cang,
daejun7.park
Cc: linux-scsi, linux-kernel
From: Bean Huo <beanhuo@micron.com>
Ignore the UFSHPB preparation result and continue the original request if the
preparation fails
Signed-off-by: Bean Huo <beanhuo@micron.com>
---
drivers/scsi/ufs/ufshcd.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index d91a405fd181..a11248d89a7e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -2740,12 +2740,11 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
lrbp->req_abort_skip = false;
- err = ufshpb_prep(hba, lrbp);
- if (err == -EAGAIN) {
- lrbp->cmd = NULL;
- ufshcd_release(hba);
- goto out;
- }
+ /*
+ * Ignore the UHPPB preparation result and continue with the original
+ * request if preperation fails.
+ */
+ ufshpb_prep(hba, lrbp);
ufshcd_comp_scsi_upiu(hba, lrbp);
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] scsi: ufshpb: Delete ufshpb_set_write_buf_cmd()
2021-10-29 19:49 [PATCH v2 0/2] Clean UFS HPB 2.0 Bean Huo
2021-10-29 19:49 ` [PATCH v2 1/2] scsi: core: Ignore the UFSHPB preparation result Bean Huo
@ 2021-10-29 19:49 ` Bean Huo
2021-10-30 7:18 ` [PATCH v2 0/2] Clean UFS HPB 2.0 Bean Huo
2 siblings, 0 replies; 4+ messages in thread
From: Bean Huo @ 2021-10-29 19:49 UTC (permalink / raw)
To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
stanley.chu, beanhuo, bvanassche, tomas.winkler, cang,
daejun7.park
Cc: linux-scsi, linux-kernel
From: Bean Huo <beanhuo@micron.com>
Since commit "facdc632bb5f ('scsi: ufs: ufshpb: Remove HPB2.0 flows')",
no body uses it, so delete it.
Signed-off-by: Bean Huo <beanhuo@micron.com>
---
drivers/scsi/ufs/ufshpb.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
index 95ce20ff2194..106d8e0e50c7 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -342,20 +342,6 @@ ufshpb_set_hpb_read_to_upiu(struct ufs_hba *hba, struct ufshpb_lu *hpb,
lrbp->cmd->cmd_len = UFS_CDB_SIZE;
}
-static inline void ufshpb_set_write_buf_cmd(unsigned char *cdb,
- unsigned long lpn, unsigned int len,
- int read_id)
-{
- cdb[0] = UFSHPB_WRITE_BUFFER;
- cdb[1] = UFSHPB_WRITE_BUFFER_PREFETCH_ID;
-
- put_unaligned_be32(lpn, &cdb[2]);
- cdb[6] = read_id;
- put_unaligned_be16(len * HPB_ENTRY_SIZE, &cdb[7]);
-
- cdb[9] = 0x00; /* Control = 0x00 */
-}
-
static inline int ufshpb_get_read_id(struct ufshpb_lu *hpb)
{
if (++hpb->cur_read_id >= MAX_HPB_READ_ID)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] Clean UFS HPB 2.0
2021-10-29 19:49 [PATCH v2 0/2] Clean UFS HPB 2.0 Bean Huo
2021-10-29 19:49 ` [PATCH v2 1/2] scsi: core: Ignore the UFSHPB preparation result Bean Huo
2021-10-29 19:49 ` [PATCH v2 2/2] scsi: ufshpb: Delete ufshpb_set_write_buf_cmd() Bean Huo
@ 2021-10-30 7:18 ` Bean Huo
2 siblings, 0 replies; 4+ messages in thread
From: Bean Huo @ 2021-10-30 7:18 UTC (permalink / raw)
To: alim.akhtar, avri.altman, asutoshd, jejb, martin.petersen,
stanley.chu, beanhuo, bvanassche, tomas.winkler, cang,
daejun7.park
Cc: linux-scsi, linux-kernel
Ignore this series of patches, because Avri's latest V3 already
contains these changes.
On Fri, 2021-10-29 at 21:49 +0200, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
>
> Hi Martin and Bart,
>
> These patches are based on Avri's patch "scsi: ufs: ufshpb: Remove
> HPB2.0 flows",
> which has been applied to 5.15/scsi-fixes.
>
> v1-v2:
> fix typoes in the commit message
>
> Bean Huo (2):
> scsi: core: Ignore the UFSHPB preparation result
> scsi: ufshpb: Delete ufshpb_set_write_buf_cmd()
>
> drivers/scsi/ufs/ufshcd.c | 11 +++++------
> drivers/scsi/ufs/ufshpb.c | 14 --------------
> 2 files changed, 5 insertions(+), 20 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-30 7:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 19:49 [PATCH v2 0/2] Clean UFS HPB 2.0 Bean Huo
2021-10-29 19:49 ` [PATCH v2 1/2] scsi: core: Ignore the UFSHPB preparation result Bean Huo
2021-10-29 19:49 ` [PATCH v2 2/2] scsi: ufshpb: Delete ufshpb_set_write_buf_cmd() Bean Huo
2021-10-30 7:18 ` [PATCH v2 0/2] Clean UFS HPB 2.0 Bean Huo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®