liquidio: fix bug in soft reset failure detection
Subsystems (3)
PATCH v2 1/1 liquidio: fix bug in soft reset failure detection
From: Derek Chickles <[email protected]>
The code that detects a failed soft reset of Octeon is comparing the wrong value against the reset value of the Octeon SLI_SCRATCH_1 register, resulting in an inability to detect a soft reset failure. Fix it by using the correct value in the comparison, which is any non-zero value.
---
Patch Changelog:
v2: Revise patch comment, remove unnecessary "!= 0x0ULL" in if statements,
and add "Fixes:" tags
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 2 +- drivers/net/ethernet/cavium/liquidio/cn66xx_device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c +1 -1
@@ -221,7 +221,7 @@ static int cn23xx_pf_soft_reset(struct octeon_device *oct)/* Wait for 100ms as Octeon resets. */ mdelay (100 ); -if (octeon_read_csr64 (oct,CN23XX_SLI_SCRATCH1 ) ==0x1234ULL ) { +if (octeon_read_csr64 (oct,CN23XX_SLI_SCRATCH1 )) {dev_err (&oct->pci_dev->dev,"OCTEON[%d]: Soft reset failed\n" , oct->octeon_id);return 1 ;
drivers/net/ethernet/cavium/liquidio/cn66xx_device.c +1 -1
@@ -44,7 +44,7 @@ int lio_cn6xxx_soft_reset(struct octeon_device *oct)/* Wait for 10ms as Octeon resets. */ mdelay (100 ); -if (octeon_read_csr64 (oct,CN6XXX_SLI_SCRATCH1 ) ==0x1234ULL ) { +if (octeon_read_csr64 (oct,CN6XXX_SLI_SCRATCH1 )) {dev_err (&oct->pci_dev->dev,"Soft reset failed\n" );return 1 ; }
Quoted 13 lines · Felix Manlunas
From: Derek Chickles <[email protected]>
The code that detects a failed soft reset of Octeon is comparing the wrong value against the reset value of the Octeon
SLI_SCRATCH_1register, resulting in an inability to detect a soft reset failure. Fix it by using the correct value in the comparison, which is any non-zero value.Fixes f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")Fixes c0eab5b3580a ("liquidio: CN23XX firmware download")Signed-off-by Derek Chickles <[email protected]>Signed-off-by Satanand Burla <[email protected]>Signed-off-by Raghu Vatsavayi <[email protected]>Signed-off-by Felix Manlunas <[email protected]>
Quoted 9 lines
---
Patch Changelog:
v2: Revise patch comment, remove unnecessary "!=0x0ULL" in if statements,
and add "Fixes:" tagsdrivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c | 2 +- drivers/net/ethernet/cavium/liquidio/cn66xx_device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Thanks,