Thread (4 messages) 4 messages, 2 authors, 2021-08-20

Re: [PATCH] scsi: ufs: Fix ufshcd_request_sense_async() for Samsung KLUFG8RHDA-B2D1

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-08-19 18:14:56

On 8/19/21 2:35 AM, Adrian Hunter wrote:
  	 * From SPC-6: the REQUEST SENSE command with any allocation length
-	 * clears the sense data.
+	 * clears the sense data, but not all UFS devices behave that way.
  	 */
How about removing the comment entirely? Comprehending the above comment 
is not possible without reviewing the git history so I think it's better 
to remove it.
-	static const u8 cmd[6] = {REQUEST_SENSE, 0, 0, 0, 0, 0};
+	static const u8 cmd[6] = {REQUEST_SENSE, 0, 0, 0, UFS_SENSE_SIZE, 0};
  	struct scsi_request *rq;
  	struct request *req;
+	char *buffer;
+	int ret;
+
+	buffer = kzalloc(UFS_SENSE_SIZE, GFP_KERNEL);
+	if (!buffer)
+		return -ENOMEM;
  
-	req = blk_get_request(sdev->request_queue, REQ_OP_DRV_IN, /*flags=*/0);
+	req = blk_get_request(sdev->request_queue, REQ_OP_DRV_IN,
+			      /*flags=*/BLK_MQ_REQ_PM);
Why has the flags argument been changed from 0 into BLK_MQ_REQ_PM? MODE 
SENSE is not a power management command.

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help