All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags
@ 2022-12-15  4:09 Jason Yan
  2022-12-15  7:05 ` chenxiang (M)
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jason Yan @ 2022-12-15  4:09 UTC (permalink / raw)
  To: martin.petersen, jejb
  Cc: linux-scsi, hare, hch, bvanassche, jinpu.wang, damien.lemoal,
	john.g.garry, Jason Yan, Xiang Chen

John put the reserverd tags in lower region of tagset in commit f7d190a94e35
("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However
he only change the allocate function and forgot to change the tags free
function. This made my board failed to boot.

[   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
[   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
[   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
[   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
[   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
[   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
[   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
[   35.989643] ata10.00: revalidation failed (errno=-5)

Fixes: f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
Cc: John Garry <john.g.garry@oracle.com>
Cc: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---

 v1->v2: replace HISI_SAS_UNRESERVED_IPTT with HISI_SAS_RESERVED_IPTT

 drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 41ba22f6c7f0..e9c2d306ed87 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -162,7 +162,7 @@ static void hisi_sas_slot_index_clear(struct hisi_hba *hisi_hba, int slot_idx)
 static void hisi_sas_slot_index_free(struct hisi_hba *hisi_hba, int slot_idx)
 {
 	if (hisi_hba->hw->slot_index_alloc ||
-	    slot_idx >= HISI_SAS_UNRESERVED_IPTT) {
+	    slot_idx < HISI_SAS_RESERVED_IPTT) {
 		spin_lock(&hisi_hba->lock);
 		hisi_sas_slot_index_clear(hisi_hba, slot_idx);
 		spin_unlock(&hisi_hba->lock);
-- 
2.31.1


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

* Re: [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags
  2022-12-15  4:09 [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags Jason Yan
@ 2022-12-15  7:05 ` chenxiang (M)
  2022-12-15  9:26 ` John Garry
  2023-01-03  1:24 ` chenxiang (M)
  2 siblings, 0 replies; 6+ messages in thread
From: chenxiang (M) @ 2022-12-15  7:05 UTC (permalink / raw)
  To: Jason Yan, martin.petersen, jejb
  Cc: linux-scsi, hare, hch, bvanassche, jinpu.wang, damien.lemoal,
	john.g.garry



在 2022/12/15 12:09, Jason Yan 写道:
> John put the reserverd tags in lower region of tagset in commit f7d190a94e35
> ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However
> he only change the allocate function and forgot to change the tags free
> function. This made my board failed to boot.
>
> [   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
> [   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
> [   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
> [   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
> [   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
> [   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
> [   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
> [   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
> [   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
> [   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
> [   35.989643] ata10.00: revalidation failed (errno=-5)
>
> Fixes: f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
> Cc: John Garry <john.g.garry@oracle.com>
> Cc: Xiang Chen <chenxiang66@hisilicon.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Thanks
Acked-by: Xiang Chen <chenxiang66@hisilicon.com>

> ---
>
>   v1->v2: replace HISI_SAS_UNRESERVED_IPTT with HISI_SAS_RESERVED_IPTT
>
>   drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index 41ba22f6c7f0..e9c2d306ed87 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -162,7 +162,7 @@ static void hisi_sas_slot_index_clear(struct hisi_hba *hisi_hba, int slot_idx)
>   static void hisi_sas_slot_index_free(struct hisi_hba *hisi_hba, int slot_idx)
>   {
>   	if (hisi_hba->hw->slot_index_alloc ||
> -	    slot_idx >= HISI_SAS_UNRESERVED_IPTT) {
> +	    slot_idx < HISI_SAS_RESERVED_IPTT) {
>   		spin_lock(&hisi_hba->lock);
>   		hisi_sas_slot_index_clear(hisi_hba, slot_idx);
>   		spin_unlock(&hisi_hba->lock);


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

* Re: [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags
  2022-12-15  4:09 [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags Jason Yan
  2022-12-15  7:05 ` chenxiang (M)
@ 2022-12-15  9:26 ` John Garry
  2023-01-03  1:24 ` chenxiang (M)
  2 siblings, 0 replies; 6+ messages in thread
From: John Garry @ 2022-12-15  9:26 UTC (permalink / raw)
  To: Jason Yan, martin.petersen, jejb
  Cc: linux-scsi, hare, hch, bvanassche, jinpu.wang, damien.lemoal,
	Xiang Chen

On 15/12/2022 04:09, Jason Yan wrote:
> John put the reserverd tags in lower region of tagset in commit f7d190a94e35
> ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However
> he only change the allocate function and forgot to change the tags free
> function. This made my board failed to boot.
> 
> [   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
> [   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
> [   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
> [   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
> [   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
> [   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
> [   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
> [   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
> [   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
> [   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
> [   35.989643] ata10.00: revalidation failed (errno=-5)
> 
> Fixes: f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
> Cc: John Garry<john.g.garry@oracle.com>
> Cc: Xiang Chen<chenxiang66@hisilicon.com>
> Signed-off-by: Jason Yan<yanaijie@huawei.com>
> ---

Reviewed-by: John Garry <john.g.garry@oracle.com>

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

* Re: [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags
  2022-12-15  4:09 [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags Jason Yan
  2022-12-15  7:05 ` chenxiang (M)
  2022-12-15  9:26 ` John Garry
@ 2023-01-03  1:24 ` chenxiang (M)
  2023-01-05  2:03   ` Martin K. Petersen
  2 siblings, 1 reply; 6+ messages in thread
From: chenxiang (M) @ 2023-01-03  1:24 UTC (permalink / raw)
  To: martin.petersen
  Cc: Jason Yan, jejb, linux-scsi, hare, hch, bvanassche, jinpu.wang,
	damien.lemoal, john.g.garry

Hi martin,

I notice that this patch is not merged till now, which affect the boot 
of this driver.
Could you consider to merge it as soon as possible?

Thanks,
Xiang Chen

在 2022/12/15 12:09, Jason Yan 写道:
> John put the reserverd tags in lower region of tagset in commit f7d190a94e35
> ("scsi: hisi_sas: Put reserved tags in lower region of tagset"). However
> he only change the allocate function and forgot to change the tags free
> function. This made my board failed to boot.
>
> [   33.467345] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
> [   33.473413] sas: Executing internal abort failed 5000000000000603 (-132)
> [   33.480088] hisi_sas_v3_hw 0000:b4:02.0: I_T nexus reset: internal abort (-132)
> [   33.657336] hisi_sas_v3_hw 0000:b4:02.0: task exec: failed[-132]!
> [   33.663403] ata7.00: failed to IDENTIFY (I/O error, err_mask=0x40)
> [   35.787344] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
> [   35.793411] sas: Executing internal abort failed 5000000000000703 (-132)
> [   35.800084] hisi_sas_v3_hw 0000:b4:04.0: I_T nexus reset: internal abort (-132)
> [   35.977335] hisi_sas_v3_hw 0000:b4:04.0: task exec: failed[-132]!
> [   35.983403] ata10.00: failed to IDENTIFY (I/O error, err_mask=0x40)
> [   35.989643] ata10.00: revalidation failed (errno=-5)
>
> Fixes: f7d190a94e35 ("scsi: hisi_sas: Put reserved tags in lower region of tagset")
> Cc: John Garry <john.g.garry@oracle.com>
> Cc: Xiang Chen <chenxiang66@hisilicon.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>
>   v1->v2: replace HISI_SAS_UNRESERVED_IPTT with HISI_SAS_RESERVED_IPTT
>
>   drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index 41ba22f6c7f0..e9c2d306ed87 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -162,7 +162,7 @@ static void hisi_sas_slot_index_clear(struct hisi_hba *hisi_hba, int slot_idx)
>   static void hisi_sas_slot_index_free(struct hisi_hba *hisi_hba, int slot_idx)
>   {
>   	if (hisi_hba->hw->slot_index_alloc ||
> -	    slot_idx >= HISI_SAS_UNRESERVED_IPTT) {
> +	    slot_idx < HISI_SAS_RESERVED_IPTT) {
>   		spin_lock(&hisi_hba->lock);
>   		hisi_sas_slot_index_clear(hisi_hba, slot_idx);
>   		spin_unlock(&hisi_hba->lock);


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

* Re: [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags
  2023-01-03  1:24 ` chenxiang (M)
@ 2023-01-05  2:03   ` Martin K. Petersen
  2023-01-05  2:17     ` chenxiang (M)
  0 siblings, 1 reply; 6+ messages in thread
From: Martin K. Petersen @ 2023-01-05  2:03 UTC (permalink / raw)
  To: chenxiang (M)
  Cc: martin.petersen, Jason Yan, jejb, linux-scsi, hare, hch,
	bvanassche, jinpu.wang, damien.lemoal, john.g.garry


> I notice that this patch is not merged till now, which affect the boot
> of this driver.  Could you consider to merge it as soon as possible?

It's already in 6.2/scsi-fixes.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags
  2023-01-05  2:03   ` Martin K. Petersen
@ 2023-01-05  2:17     ` chenxiang (M)
  0 siblings, 0 replies; 6+ messages in thread
From: chenxiang (M) @ 2023-01-05  2:17 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Jason Yan, jejb, linux-scsi, hare, hch, bvanassche, jinpu.wang,
	damien.lemoal, john.g.garry



在 2023/1/5 10:03, Martin K. Petersen 写道:
>> I notice that this patch is not merged till now, which affect the boot
>> of this driver.  Could you consider to merge it as soon as possible?
> It's already in 6.2/scsi-fixes.

Ok, thanks!



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

end of thread, other threads:[~2023-01-05  2:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15  4:09 [PATCH v2] scsi: hisi_sas: fix tags freeing for the reserverd tags Jason Yan
2022-12-15  7:05 ` chenxiang (M)
2022-12-15  9:26 ` John Garry
2023-01-03  1:24 ` chenxiang (M)
2023-01-05  2:03   ` Martin K. Petersen
2023-01-05  2:17     ` chenxiang (M)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.