* [PATCH -next] advansys: use correct srb_tag in adv_isr_callback
@ 2018-09-26 11:41 YueHaibing
2018-10-17 1:34 ` Martin K. Petersen
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2018-09-26 11:41 UTC (permalink / raw)
To: matthew, hare, jejb, martin.petersen; +Cc: linux-kernel, linux-scsi, YueHaibing
'srb_tag' should be used in the scsi_host_find_tag,
rather than 'scsiqp->srb_tag'.
Fixes: 9c17c62aedb0 ("advansys: use shared host tag map for command lookup")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/scsi/advansys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 713f690..23f313c 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -5966,7 +5966,7 @@ static void adv_isr_callback(ADV_DVC_VAR *adv_dvc_varp, ADV_SCSI_REQ_Q *scsiqp)
* completed ADV_SCSI_REQ_Q structure.
*/
srb_tag = le32_to_cpu(scsiqp->srb_tag);
- scp = scsi_host_find_tag(boardp->shost, scsiqp->srb_tag);
+ scp = scsi_host_find_tag(boardp->shost, srb_tag);
ASC_DBG(1, "scp 0x%p\n", scp);
if (scp == NULL) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -next] advansys: use correct srb_tag in adv_isr_callback
2018-09-26 11:41 [PATCH -next] advansys: use correct srb_tag in adv_isr_callback YueHaibing
@ 2018-10-17 1:34 ` Martin K. Petersen
2018-10-17 12:03 ` YueHaibing
0 siblings, 1 reply; 3+ messages in thread
From: Martin K. Petersen @ 2018-10-17 1:34 UTC (permalink / raw)
To: YueHaibing; +Cc: matthew, hare, jejb, martin.petersen, linux-kernel, linux-scsi
Hi Yue Haibing,
> srb_tag = le32_to_cpu(scsiqp->srb_tag);
> - scp = scsi_host_find_tag(boardp->shost, scsiqp->srb_tag);
> + scp = scsi_host_find_tag(boardp->shost, srb_tag);
Maybe I'm missing something, but I don't see where in the code
scsiqp->srb_tag is being converted to le32. srb_tag is beyond the memory
accessed by the controller and thus wouldn't need to be little endian.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] advansys: use correct srb_tag in adv_isr_callback
2018-10-17 1:34 ` Martin K. Petersen
@ 2018-10-17 12:03 ` YueHaibing
0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2018-10-17 12:03 UTC (permalink / raw)
To: Martin K. Petersen; +Cc: matthew, hare, jejb, linux-kernel, linux-scsi
On 2018/10/17 9:34, Martin K. Petersen wrote:
>
> Hi Yue Haibing,
>
>> srb_tag = le32_to_cpu(scsiqp->srb_tag);
>> - scp = scsi_host_find_tag(boardp->shost, scsiqp->srb_tag);
>> + scp = scsi_host_find_tag(boardp->shost, srb_tag);
>
> Maybe I'm missing something, but I don't see where in the code
> scsiqp->srb_tag is being converted to le32. srb_tag is beyond the memory
> accessed by the controller and thus wouldn't need to be little endian.
Thanks for comment this.
So 'srb_tag' can been removed.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-17 12:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-26 11:41 [PATCH -next] advansys: use correct srb_tag in adv_isr_callback YueHaibing
2018-10-17 1:34 ` Martin K. Petersen
2018-10-17 12:03 ` YueHaibing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox