* [PATCH 1/2] pm80xx: Use phy specific sas address when sending PHY_START command
@ 2023-09-11 17:03 Michal Grzedzicki
2023-09-11 17:03 ` [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command Michal Grzedzicki
2023-09-13 13:41 ` [PATCH " Jinpu Wang
0 siblings, 2 replies; 7+ messages in thread
From: Michal Grzedzicki @ 2023-09-11 17:03 UTC (permalink / raw)
To: Michal Grzedzicki
Cc: jinpu.wang, jejb, martin.petersen, linux-scsi, linux-kernel
Some cards have more than one sas addresses. Using incorrect
address causes communication issues with some devices like expanders.
Signed-off-by: Michal Grzedzicki <mge@meta.com>
---
drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 33053db5a713..90069c7b1642 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -4180,7 +4180,7 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
payload.sas_identify.dev_type = SAS_END_DEVICE;
payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
memcpy(payload.sas_identify.sas_addr,
- pm8001_ha->sas_addr, SAS_ADDR_SIZE);
+ &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
payload.sas_identify.phy_id = phy_id;
return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index f6857632dc7c..1b2c40b1381c 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -4671,7 +4671,7 @@ pm80xx_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
payload.sas_identify.dev_type = SAS_END_DEVICE;
payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
memcpy(payload.sas_identify.sas_addr,
- &pm8001_ha->sas_addr, SAS_ADDR_SIZE);
+ &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
payload.sas_identify.phy_id = phy_id;
return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command
2023-09-11 17:03 [PATCH 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Michal Grzedzicki
@ 2023-09-11 17:03 ` Michal Grzedzicki
2023-09-13 13:42 ` Jinpu Wang
2023-09-13 13:41 ` [PATCH " Jinpu Wang
1 sibling, 1 reply; 7+ messages in thread
From: Michal Grzedzicki @ 2023-09-11 17:03 UTC (permalink / raw)
To: Michal Grzedzicki
Cc: jinpu.wang, jejb, martin.petersen, linux-scsi, linux-kernel
Tags allocated for OPC_INB_SET_CONTROLLER_CONFIG command need to be freed
when we receive the response.
Signed-off-by: Michal Grzedzicki <mge@meta.com>
---
drivers/scsi/pm8001/pm80xx_hwi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 1b2c40b1381c..3afd9443c425 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -3671,10 +3671,12 @@ static int mpi_set_controller_config_resp(struct pm8001_hba_info *pm8001_ha,
(struct set_ctrl_cfg_resp *)(piomb + 4);
u32 status = le32_to_cpu(pPayload->status);
u32 err_qlfr_pgcd = le32_to_cpu(pPayload->err_qlfr_pgcd);
+ u32 tag = le32_to_cpu(pPayload->tag);
pm8001_dbg(pm8001_ha, MSG,
"SET CONTROLLER RESP: status 0x%x qlfr_pgcd 0x%x\n",
status, err_qlfr_pgcd);
+ pm8001_tag_free(pm8001_ha, tag);
return 0;
}
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] pm80xx: Use phy specific sas address when sending PHY_START command
2023-09-11 17:03 [PATCH 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Michal Grzedzicki
2023-09-11 17:03 ` [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command Michal Grzedzicki
@ 2023-09-13 13:41 ` Jinpu Wang
1 sibling, 0 replies; 7+ messages in thread
From: Jinpu Wang @ 2023-09-13 13:41 UTC (permalink / raw)
To: Michal Grzedzicki
Cc: jinpu.wang, jejb, martin.petersen, linux-scsi, linux-kernel
On Mon, Sep 11, 2023 at 7:03 PM Michal Grzedzicki <mge@meta.com> wrote:
>
> Some cards have more than one sas addresses. Using incorrect
> address causes communication issues with some devices like expanders.
>
> Signed-off-by: Michal Grzedzicki <mge@meta.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
> drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
> index 33053db5a713..90069c7b1642 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -4180,7 +4180,7 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
> payload.sas_identify.dev_type = SAS_END_DEVICE;
> payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
> memcpy(payload.sas_identify.sas_addr,
> - pm8001_ha->sas_addr, SAS_ADDR_SIZE);
> + &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
> payload.sas_identify.phy_id = phy_id;
>
> return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index f6857632dc7c..1b2c40b1381c 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -4671,7 +4671,7 @@ pm80xx_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
> payload.sas_identify.dev_type = SAS_END_DEVICE;
> payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
> memcpy(payload.sas_identify.sas_addr,
> - &pm8001_ha->sas_addr, SAS_ADDR_SIZE);
> + &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
> payload.sas_identify.phy_id = phy_id;
>
> return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command
2023-09-11 17:03 ` [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command Michal Grzedzicki
@ 2023-09-13 13:42 ` Jinpu Wang
2023-09-13 15:56 ` [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Michal Grzedzicki
0 siblings, 1 reply; 7+ messages in thread
From: Jinpu Wang @ 2023-09-13 13:42 UTC (permalink / raw)
To: Michal Grzedzicki
Cc: jinpu.wang, jejb, martin.petersen, linux-scsi, linux-kernel
On Mon, Sep 11, 2023 at 7:03 PM Michal Grzedzicki <mge@meta.com> wrote:
>
> Tags allocated for OPC_INB_SET_CONTROLLER_CONFIG command need to be freed
> when we receive the response.
>
> Signed-off-by: Michal Grzedzicki <mge@meta.com>
can you please add the fixes tag, so stable can pick it accordingly?
Acked-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/scsi/pm8001/pm80xx_hwi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index 1b2c40b1381c..3afd9443c425 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -3671,10 +3671,12 @@ static int mpi_set_controller_config_resp(struct pm8001_hba_info *pm8001_ha,
> (struct set_ctrl_cfg_resp *)(piomb + 4);
> u32 status = le32_to_cpu(pPayload->status);
> u32 err_qlfr_pgcd = le32_to_cpu(pPayload->err_qlfr_pgcd);
> + u32 tag = le32_to_cpu(pPayload->tag);
>
> pm8001_dbg(pm8001_ha, MSG,
> "SET CONTROLLER RESP: status 0x%x qlfr_pgcd 0x%x\n",
> status, err_qlfr_pgcd);
> + pm8001_tag_free(pm8001_ha, tag);
>
> return 0;
> }
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command
2023-09-13 13:42 ` Jinpu Wang
@ 2023-09-13 15:56 ` Michal Grzedzicki
2023-09-13 15:56 ` [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command Michal Grzedzicki
2023-09-14 1:40 ` [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Martin K. Petersen
0 siblings, 2 replies; 7+ messages in thread
From: Michal Grzedzicki @ 2023-09-13 15:56 UTC (permalink / raw)
To: Michal Grzedzicki
Cc: jinpu.wang, jejb, martin.petersen, linux-scsi, linux-kernel, Jack Wang
Some cards have more than one sas addresses. Using incorrect
address causes communication issues with some devices like expanders.
Closes: https://lore.kernel.org/linux-kernel/A57AEA84-5CA0-403E-8053-106033C73C70@fb.com/
Signed-off-by: Michal Grzedzicki <mge@meta.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
---
Changes in v2: add Closes tag
drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 33053db5a713..90069c7b1642 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -4180,7 +4180,7 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
payload.sas_identify.dev_type = SAS_END_DEVICE;
payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
memcpy(payload.sas_identify.sas_addr,
- pm8001_ha->sas_addr, SAS_ADDR_SIZE);
+ &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
payload.sas_identify.phy_id = phy_id;
return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index f6857632dc7c..1b2c40b1381c 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -4671,7 +4671,7 @@ pm80xx_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
payload.sas_identify.dev_type = SAS_END_DEVICE;
payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
memcpy(payload.sas_identify.sas_addr,
- &pm8001_ha->sas_addr, SAS_ADDR_SIZE);
+ &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
payload.sas_identify.phy_id = phy_id;
return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command
2023-09-13 15:56 ` [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Michal Grzedzicki
@ 2023-09-13 15:56 ` Michal Grzedzicki
2023-09-14 1:40 ` [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Martin K. Petersen
1 sibling, 0 replies; 7+ messages in thread
From: Michal Grzedzicki @ 2023-09-13 15:56 UTC (permalink / raw)
To: Michal Grzedzicki
Cc: jinpu.wang, jejb, martin.petersen, linux-scsi, linux-kernel, Jack Wang
Tags allocated for OPC_INB_SET_CONTROLLER_CONFIG command need to be freed
when we receive the response.
Fixes: f5860992db55 ("[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files")
Fixes: a6cb3d012b98 ("[SCSI] pm80xx: thermal, sas controller config and error handling update")
Signed-off-by: Michal Grzedzicki <mge@meta.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/scsi/pm8001/pm80xx_hwi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 1b2c40b1381c..3afd9443c425 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -3671,10 +3671,12 @@ static int mpi_set_controller_config_resp(struct pm8001_hba_info *pm8001_ha,
(struct set_ctrl_cfg_resp *)(piomb + 4);
u32 status = le32_to_cpu(pPayload->status);
u32 err_qlfr_pgcd = le32_to_cpu(pPayload->err_qlfr_pgcd);
+ u32 tag = le32_to_cpu(pPayload->tag);
pm8001_dbg(pm8001_ha, MSG,
"SET CONTROLLER RESP: status 0x%x qlfr_pgcd 0x%x\n",
status, err_qlfr_pgcd);
+ pm8001_tag_free(pm8001_ha, tag);
return 0;
}
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command
2023-09-13 15:56 ` [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Michal Grzedzicki
2023-09-13 15:56 ` [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command Michal Grzedzicki
@ 2023-09-14 1:40 ` Martin K. Petersen
1 sibling, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2023-09-14 1:40 UTC (permalink / raw)
To: Michal Grzedzicki
Cc: Martin K . Petersen, jinpu.wang, jejb, linux-scsi, linux-kernel,
Jack Wang
On Wed, 13 Sep 2023 08:56:10 -0700, Michal Grzedzicki wrote:
> Some cards have more than one sas addresses. Using incorrect
> address causes communication issues with some devices like expanders.
>
>
Applied to 6.6/scsi-fixes, thanks!
[1/2] pm80xx: Use phy specific sas address when sending PHY_START command
https://git.kernel.org/mkp/scsi/c/71996bb835ae
[2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command
https://git.kernel.org/mkp/scsi/c/c13e73317458
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-09-14 1:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 17:03 [PATCH 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Michal Grzedzicki
2023-09-11 17:03 ` [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command Michal Grzedzicki
2023-09-13 13:42 ` Jinpu Wang
2023-09-13 15:56 ` [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Michal Grzedzicki
2023-09-13 15:56 ` [PATCH 2/2] pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command Michal Grzedzicki
2023-09-14 1:40 ` [PATCH v2 1/2] pm80xx: Use phy specific sas address when sending PHY_START command Martin K. Petersen
2023-09-13 13:41 ` [PATCH " Jinpu Wang
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®