linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: show lba and length for unmap commands
@ 2020-11-12 16:59 Jaegeuk Kim
  2020-11-13  1:10 ` Stanley Chu
  2020-11-17  3:40 ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2020-11-12 16:59 UTC (permalink / raw)
  To: linux-kernel, linux-scsi, kernel-team; +Cc: Leo Liou

From: Leo Liou <leoliou@google.com>

We have lba and length for unmap commands.

Signed-off-by: Leo Liou <leoliou@google.com>
---
 drivers/scsi/ufs/ufshcd.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 86c8dee01ca9..dba3ee307307 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -376,6 +376,11 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba,
 				lrbp->ucd_req_ptr->sc.exp_data_transfer_len);
 			if (opcode == WRITE_10)
 				group_id = lrbp->cmd->cmnd[6];
+		} else if (opcode == UNMAP) {
+			if (cmd->request) {
+				lba = scsi_get_lba(cmd);
+				transfer_len = blk_rq_bytes(cmd->request);
+			}
 		}
 	}
 
-- 
2.29.2.299.gdc1121823c-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: ufs: show lba and length for unmap commands
  2020-11-12 16:59 [PATCH] scsi: ufs: show lba and length for unmap commands Jaegeuk Kim
@ 2020-11-13  1:10 ` Stanley Chu
  2020-11-17  3:40 ` Martin K. Petersen
  1 sibling, 0 replies; 4+ messages in thread
From: Stanley Chu @ 2020-11-13  1:10 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, linux-scsi, kernel-team, Leo Liou

Hi,

On Thu, 2020-11-12 at 08:59 -0800, Jaegeuk Kim wrote:
> From: Leo Liou <leoliou@google.com>
> 
> We have lba and length for unmap commands.
> 
> Signed-off-by: Leo Liou <leoliou@google.com>
> ---
>  drivers/scsi/ufs/ufshcd.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 86c8dee01ca9..dba3ee307307 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -376,6 +376,11 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba,
>  				lrbp->ucd_req_ptr->sc.exp_data_transfer_len);
>  			if (opcode == WRITE_10)
>  				group_id = lrbp->cmd->cmnd[6];
> +		} else if (opcode == UNMAP) {
> +			if (cmd->request) {
> +				lba = scsi_get_lba(cmd);
> +				transfer_len = blk_rq_bytes(cmd->request);
> +			}

Nitpicking: Perhaps we could unify the method of obtaining both lba and
transfer_len for all READ/WRITE/UNMAP commands?

Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>

>  		}
>  	}
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: ufs: show lba and length for unmap commands
  2020-11-12 16:59 [PATCH] scsi: ufs: show lba and length for unmap commands Jaegeuk Kim
  2020-11-13  1:10 ` Stanley Chu
@ 2020-11-17  3:40 ` Martin K. Petersen
  2020-11-17 17:04   ` Jaegeuk Kim
  1 sibling, 1 reply; 4+ messages in thread
From: Martin K. Petersen @ 2020-11-17  3:40 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, linux-scsi, kernel-team, Leo Liou


Hi Jaegeuk!

> From: Leo Liou <leoliou@google.com>
>
> We have lba and length for unmap commands.
>
> Signed-off-by: Leo Liou <leoliou@google.com>

Doesn't apply to 5.11/scsi-queue.

Also needs a Signed-off-by: tag from you.

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: ufs: show lba and length for unmap commands
  2020-11-17  3:40 ` Martin K. Petersen
@ 2020-11-17 17:04   ` Jaegeuk Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2020-11-17 17:04 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: linux-kernel, linux-scsi, kernel-team, Leo Liou

On 11/16, Martin K. Petersen wrote:
> 
> Hi Jaegeuk!
> 
> > From: Leo Liou <leoliou@google.com>
> >
> > We have lba and length for unmap commands.
> >
> > Signed-off-by: Leo Liou <leoliou@google.com>
> 
> Doesn't apply to 5.11/scsi-queue.
> 
> Also needs a Signed-off-by: tag from you.

Hi Martin,

Could you please consider this patch series?

https://lore.kernel.org/linux-scsi/20201117165839.1643377-1-jaegeuk@kernel.org/

Thanks,

> 
> Thanks!
> 
> -- 
> Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-17 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 16:59 [PATCH] scsi: ufs: show lba and length for unmap commands Jaegeuk Kim
2020-11-13  1:10 ` Stanley Chu
2020-11-17  3:40 ` Martin K. Petersen
2020-11-17 17:04   ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).