Skip to contentSkip to conversation

s390/pci: Log new handle in clp_disable_fh()

PATCH Applied Petr Tesarik 4 participants 5 messages May 22, 2020 – Jun 2, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/pci: Log new handle in clp_disable_fh()

After disabling a function, the original handle is logged instead of the disabled handle.

Fixes 17cdec960cf77 (s390/pci: Recover handle in clp_set_pci_fn())
---
 arch/s390/pci/pci_clp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390/pci/pci_clp.c +1 -2
index ea794ae755ae..179bcecefdee 100644
@@ -309,14 +309,13 @@ int clp_enable_fh(struct zpci_dev *zdev, u8 nr_dma_as)
 
 int clp_disable_fh(struct zpci_dev *zdev)
 {
-	u32 fh = zdev->fh;
 	int rc;
 
 	if (!zdev_enabled(zdev))
 		return 0;
 
 	rc = clp_set_pci_fn(zdev, 0, CLP_SET_DISABLE_PCI_FN);
-	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, fh, rc);
+	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, zdev->fh, rc);
 	return rc;
 }
 
Signature · 1 line
2.26.1
#1 lore raw

Hi all,

just a gentle ping.

If the current behaviour (logging the original handle) was intended, then it was worth mentioning in the commit message for 17cdec960cf77, which made the change, but since that's no longer an option, I'd be happy with an explanation in email.

Petr T

Quoted 29 lines · On Fri, 22 May 2020 20:39:22 +0200 Petr Tesarik <[email protected]> wrote:

After disabling a function, the original handle is logged instead of the disabled handle.

Fixes 17cdec960cf77 (s390/pci: Recover handle in clp_set_pci_fn())
---
 arch/s390/pci/pci_clp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390/pci/pci_clp.c +1 -2
index ea794ae755ae..179bcecefdee 100644
@@ -309,14 +309,13 @@ int clp_enable_fh(struct zpci_dev *zdev, u8 nr_dma_as)
 
 int clp_disable_fh(struct zpci_dev *zdev)
 {
-	u32 fh = zdev->fh;
 	int rc;
 
 	if (!zdev_enabled(zdev))
 		return 0;
 
 	rc = clp_set_pci_fn(zdev, 0, CLP_SET_DISABLE_PCI_FN);
-	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, fh, rc);
+	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, zdev->fh, rc);
 	return rc;
 }
 
Reviewed-by
#2 lore raw
Quoted 9 lines · Petr Tesarik

Hi all,

just a gentle ping.

If the current behaviour (logging the original handle) was intended, then it was worth mentioning in the commit message for 17cdec960cf77, which made the change, but since that's no longer an option, I'd be happy with an explanation in email.

Quoted 7 lines

Petr T

Quoted 2 lines · On Fri, 22 May 2020 20:39:22 +0200 Petr Tesarik <[email protected]> wrote:

After disabling a function, the original handle is logged instead of the disabled handle.

Hi Petr,

Sorry for the delay, no doubt, you are right, the fh in zpci_dbg is the old one and we should use the one in the zdev struct.

Thanks,
Pierre

Quoted 28 lines
Quoted 27 lines
Fixes 17cdec960cf77 (s390/pci: Recover handle in clp_set_pci_fn())
---
  arch/s390/pci/pci_clp.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390/pci/pci_clp.c +1 -2
index ea794ae755ae..179bcecefdee 100644
@@ -309,14 +309,13 @@ int clp_enable_fh(struct zpci_dev *zdev, u8 nr_dma_as)
 
  int clp_disable_fh(struct zpci_dev *zdev)
  {
-	u32 fh = zdev->fh;
  	int rc;
 
  	if (!zdev_enabled(zdev))
  		return 0;
 
  	rc = clp_set_pci_fn(zdev, 0, CLP_SET_DISABLE_PCI_FN);
-	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, fh, rc);
+	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, zdev->fh, rc);
  	return rc;
  }
 
Signature · 2 lines
Pierre Morel
IBM Lab Boeblingen
maintainer Applied
#3 lore raw
Quoted 21 lines · Pierre Morel
Quoted 9 lines · Petr Tesarik

Hi all,

just a gentle ping.

If the current behaviour (logging the original handle) was intended, then it was worth mentioning in the commit message for 17cdec960cf77, which made the change, but since that's no longer an option, I'd be happy with an explanation in email.

Quoted 7 lines

Petr T

Quoted 2 lines · On Fri, 22 May 2020 20:39:22 +0200 Petr Tesarik <[email protected]> wrote:

After disabling a function, the original handle is logged instead of the disabled handle.

Hi Petr,

Quoted 7 lines

Sorry for the delay, no doubt, you are right, the fh in zpci_dbg is the old one and we should use the one in the zdev struct.

Thanks,
Pierre

Applied, thanks

maintainer
#4 lore raw
In reply to Petr Tesarik

Hi Petr,

sorry for not reacting sooner, I was on holiday, saw your message but figured it wasn't super critical. Thanks for finding this issue and thank you Pierre and Vasily for stepping in.

Best,
Niklas Schnelle

Quoted 44 lines · Petr Tesarik

Hi all,

just a gentle ping.

If the current behaviour (logging the original handle) was intended, then it was worth mentioning in the commit message for 17cdec960cf77, which made the change, but since that's no longer an option, I'd be happy with an explanation in email.

Petr T

Quoted 29 lines · On Fri, 22 May 2020 20:39:22 +0200 Petr Tesarik <[email protected]> wrote:

After disabling a function, the original handle is logged instead of the disabled handle.

Fixes 17cdec960cf77 (s390/pci: Recover handle in clp_set_pci_fn())
---
 arch/s390/pci/pci_clp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390/pci/pci_clp.c +1 -2
index ea794ae755ae..179bcecefdee 100644
@@ -309,14 +309,13 @@ int clp_enable_fh(struct zpci_dev *zdev, u8 nr_dma_as)
 
 int clp_disable_fh(struct zpci_dev *zdev)
 {
-	u32 fh = zdev->fh;
 	int rc;
 
 	if (!zdev_enabled(zdev))
 		return 0;
 
 	rc = clp_set_pci_fn(zdev, 0, CLP_SET_DISABLE_PCI_FN);
-	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, fh, rc);
+	zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, zdev->fh, rc);
 	return rc;
 }