summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium
diff options
context:
space:
mode:
authorFelix Manlunas2017-10-26 03:04:56 +0200
committerDavid S. Miller2017-10-27 15:13:19 +0200
commit392209fa833287a1c5532ffbb098bba584a69dbc (patch)
tree5dc13ca8d9c2585ad0a4ede701c0421cfa0183c1 /drivers/net/ethernet/cavium
parentnet: systemport: Check DSA notifier master against ourself (diff)
downloadkernel-qcow2-linux-392209fa833287a1c5532ffbb098bba584a69dbc.tar.gz
kernel-qcow2-linux-392209fa833287a1c5532ffbb098bba584a69dbc.tar.xz
kernel-qcow2-linux-392209fa833287a1c5532ffbb098bba584a69dbc.zip
liquidio: deprecate 1-bit flag indicating watchdog kernel thread is running
Deprecate the 1-bit flag (bit 2 in the SLI_SCRATCH_1 Octeon register) that indicates that the liquidio watchdog kernel thread is running for this NIC. Reason is: it is incompatible with the firmware's use for SLI_SCRATCH_1. In lieu of checking that now-deprecated flag, check the value of oct_dev->adapter_refcount to determine whether or not to create the watchdog kernel thread. Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_main.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index b4f753c56308..accd038f3f34 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1196,19 +1196,13 @@ liquidio_probe(struct pci_dev *pdev,
}
if (OCTEON_CN23XX_PF(oct_dev)) {
- u64 scratch1;
u8 bus, device, function;
- scratch1 = octeon_read_csr64(oct_dev, CN23XX_SLI_SCRATCH1);
- if (!(scratch1 & 4ULL)) {
- /* Bit 2 of SLI_SCRATCH_1 is a flag that indicates that
- * the lio watchdog kernel thread is running for this
- * NIC. Each NIC gets one watchdog kernel thread.
+ if (atomic_read(oct_dev->adapter_refcount) == 1) {
+ /* Each NIC gets one watchdog kernel thread. The first
+ * PF (of each NIC) that gets pci_driver->probe()'d
+ * creates that thread.
*/
- scratch1 |= 4ULL;
- octeon_write_csr64(oct_dev, CN23XX_SLI_SCRATCH1,
- scratch1);
-
bus = pdev->bus->number;
device = PCI_SLOT(pdev->devfn);
function = PCI_FUNC(pdev->devfn);