* [PATCH v2 net-next] liquidio: fix bug in soft reset failure detection
@ 2017-07-05 18:59 Felix Manlunas
2017-07-06 7:21 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Felix Manlunas @ 2017-07-05 18:59 UTC (permalink / raw)
To: davem; +Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla
From: Derek Chickles <derek.chickles@cavium.com>
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.
Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
Fixes: c0eab5b3580a ("liquidio: CN23XX firmware download")
Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
---
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(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
index 6081c31..4b0ca9f 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
@@ -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;
diff --git a/drivers/net/ethernet/cavium/liquidio/cn66xx_device.c b/drivers/net/ethernet/cavium/liquidio/cn66xx_device.c
index b28253c..2df7440 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn66xx_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/cn66xx_device.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 net-next] liquidio: fix bug in soft reset failure detection
2017-07-05 18:59 [PATCH v2 net-next] liquidio: fix bug in soft reset failure detection Felix Manlunas
@ 2017-07-06 7:21 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2017-07-06 7:21 UTC (permalink / raw)
To: Felix Manlunas
Cc: davem, netdev, raghu.vatsavayi, derek.chickles, satananda.burla
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
On Wed, Jul 05, 2017 at 11:59:27AM -0700, Felix Manlunas wrote:
> From: Derek Chickles <derek.chickles@cavium.com>
>
> 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.
>
> Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
> Fixes: c0eab5b3580a ("liquidio: CN23XX firmware download")
> Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
> ---
> 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(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-06 7:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-05 18:59 [PATCH v2 net-next] liquidio: fix bug in soft reset failure detection Felix Manlunas
2017-07-06 7:21 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).