summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net: ethernet: ti: cpsw: use true,false for bool variablesJason Yan2020-09-191-2/+2
| | | | | | | | | | | | | This addresses the following coccinelle warning: drivers/net/ethernet/ti/cpsw.c:1599:2-17: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/ti/cpsw.c:1300:2-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* 8139too: use true,false for bool variablesJason Yan2020-09-191-1/+1
| | | | | | | | | | | This addresses the following coccinelle warning: drivers/net/ethernet/realtek/8139too.c:981:2-8: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: use true,false for bool variablesJason Yan2020-09-191-3/+3
| | | | | | | | | | | | | | | This addresses the following coccinelle warning: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:15415:1-26: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:12393:2-17: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:15497:2-27: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: qed: use true,false for bool variablesJason Yan2020-09-191-4/+4
| | | | | | | | | | | | | | | | | This addresses the following coccinelle warning: drivers/net/ethernet/qlogic/qed/qed_rdma.c:1465:2-13: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/qlogic/qed/qed_rdma.c:1468:2-14: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/qlogic/qed/qed_rdma.c:1471:2-13: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/qlogic/qed/qed_rdma.c:1472:2-14: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: b44: use true,false for bool variablesJason Yan2020-09-191-4/+4
| | | | | | | | | | | | | | | | | This addresses the following coccinelle warning: drivers/net/ethernet/broadcom/b44.c:2213:6-20: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2218:2-16: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2226:3-17: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2230:3-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: micrel: Remove set but not used variableZheng Yongjun2020-09-191-6/+4
| | | | | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/micrel/ksz884x.c: In function rx_proc: drivers/net/ethernet/micrel/ksz884x.c:4981:6: warning: variable ‘rx_status’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/micrel/ksz884x.c: In function netdev_get_ethtool_stats: drivers/net/ethernet/micrel/ksz884x.c:6512:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] these variable is never used, so remove it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: e1000: Remove set but not used variableZheng Yongjun2020-09-191-2/+1
| | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/intel/e1000/e1000_hw.c: In function e1000_phy_init_script: drivers/net/ethernet/intel/e1000/e1000_hw.c:132:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable] `ret_val` is never used, so remove it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: liquidio: Remove set but not used variableZheng Yongjun2020-09-191-5/+4
| | | | | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_readq: drivers/net/ethernet/cavium/liquidio/octeon_device.c:1327:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_writeq: drivers/net/ethernet/cavium/liquidio/octeon_device.c:1358:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable] these variable is never used, so remove it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'mv88e6xxx-Add-devlink-regions-support'David S. Miller2020-09-1812-277/+668
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andrew Lunn says: ==================== mv88e6xxx: Add devlink regions support Make use of devlink regions to allow read access to some of the internal of the switches. Currently access to global1, global2 and the ATU is provided. The switch itself will never trigger a region snapshot, it is assumed it is performed from user space as needed. v2: Remove left of debug print Comment ATU format is generic to mv88e6xxx Combine declaration and the assignment on a single line. v3: Drop support for port regions Improve the devlink API with a priv member and passing the region to the snapshot function Make the helper to convert from devlink to ds an inline function v4: Add missing kerneldoc in ICE driver Fix typo for global2 reading global1 registers Make use of enum to make code more readable ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: Implement devlink info get callbackAndrew Lunn2020-09-183-0/+20
| | | | | | | | | | | | | | | | | | Return the driver name and the asic.id with the switch name. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: wire up devlink info getAndrew Lunn2020-09-182-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | Allow the DSA drivers to implement the devlink call to get info info, e.g. driver name, firmware version, ASIC ID, etc. v2: Combine declaration and the assignment on a single line. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: Add devlink regionsAndrew Lunn2020-09-184-1/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the global registers, and the ATU to be snapshot via devlink regions. It is later planned to add support for the port registers. v2: Remove left over debug prints Comment ATU format is generic for mv88e6xxx, not wider v3: Make use of ops structure passed to snapshot function Remove port regions v4: Make use of enum mv88e6xxx_region_id Fix global2/global1 read typ0 Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: Create helper for FIDs in useAndrew Lunn2020-09-182-4/+18
| | | | | | | | | | | | | | | | | | | | Refactor the code in mv88e6xxx_atu_new() which builds a bitmaps of FIDs in use into a helper function. This will be reused by the devlink code when dumping the ATU. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: mv88e6xxx: Move devlink code into its own fileAndrew Lunn2020-09-184-254/+279
| | | | | | | | | | | | | | | | | | There will soon be more devlink code. Move the existing code into a file of its own, before we start adding this new code. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: Add devlink regions support to DSAAndrew Lunn2020-09-182-0/+22
| | | | | | | | | | | | | | | | Allow DSA drivers to make use of devlink regions, via simple wrappers. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: Add helper to convert from devlink to dsAndrew Lunn2020-09-182-10/+9
| | | | | | | | | | | | | | | | Given a devlink instance, return the dsa switch it is associated to. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: devlink: region: Pass the region ops to the snapshot functionAndrew Lunn2020-09-184-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | Pass the region to be snapshotted to the function performing the snapshot. This allows one function to operate on numerous regions. v4: Add missing kerneldoc for ICE Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: devlink: regions: Add a priv member to the regions ops structAndrew Lunn2020-09-181-0/+2
|/ | | | | | | | | | | The driver may have multiple regions which can be dumped using one function. However, for this to work, additional information is needed. Add a priv member to the ops structure for the driver to use however it likes. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'Felix-DSA-driver-cleanup-build-Seville-separately'David S. Miller2020-09-188-98/+102
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vladimir Oltean says: ==================== Felix DSA driver cleanup: build Seville separately When introducing the Seville switch support to the Felix driver, some technical debt was created. Since both VSC9959 and VSC9953 are embedded switches (one on an arm64 SoC and the other on a powerpc SoC), there is no use case for having the code for both be present in the same module. This was necessary at the time due to the common SERDES PCS code that they were using, but that has been since refactored into drivers/net/pcs/pcs-lynx.c. This makes the Seville driver stop uselessly depending upon PCI and FSL_ENETC_MDIO, which were only dependencies of Felix in fact. Some whitespace/tab conversions are also present in this series as part of the cleanup process. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: seville: build as separate moduleVladimir Oltean2020-09-186-39/+29
| | | | | | | | | | | | | | | | Seville does not need to depend on PCI or on the ENETC MDIO controller. There will also be other compile-time differences in the future. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: felix: move the PTP clock structure to felix_vsc9959.cVladimir Oltean2020-09-183-18/+20
| | | | | | | | | | | | | | | | | | | | | | Not only does Sevile not have a PTP clock, but with separate modules, this structure cannot even live in felix.c, due to the .owner = THIS_MODULE assignment causing this link time error: drivers/net/dsa/ocelot/felix.o:(.data+0x0): undefined reference to `__this_module' Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mscc: ocelot: make ocelot_init_timestamp take a const struct ptp_clock_infoVladimir Oltean2020-09-182-2/+4
| | | | | | | | | | | | | | | | | | | | It is a good measure to ensure correctness if the structures that are meant to remain constant are only processed by functions that thake constant arguments. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: seville: duplicate vsc9959_mdio_bus_freeVladimir Oltean2020-09-183-4/+19
| | | | | | | | | | | | | | | | | | | | | | While we don't plan on making any changes to this function, currently this is the only remaining dependency between felix and seville, after the PCS has been refactored out into pcs-lynx.c. Duplicate this function in seville to break the dependency completely. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: felix: replace tabs with spacesVladimir Oltean2020-09-183-13/+13
| | | | | | | | | | | | | | | | Over the time, some patches have introduced structures aligned with spaces, near structures aligned with tabs. Fix the inconsistencies. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: seville: reindent defines for MDIO controllerVladimir Oltean2020-09-181-6/+6
| | | | | | | | | | | | | | Reindent these definitions to be in line with the rest of the driver. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: seville: remove unused defines for the mdio controllerVladimir Oltean2020-09-181-11/+0
| | | | | | | | | | | | | | | | | | | | Some definitions were likely copied from drivers/net/mdio/mdio-mscc-miim.c. They are not necessary, remove them. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: ocelot: document why reset procedure is different for felix/sevilleVladimir Oltean2020-09-182-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The overall idea (issue soft reset, enable memories, initialize memories, enable core) is the same, so it would make sense that an attempt is made to unify the procedures. It is not immediately obvious that the fields are not part of the same register targets, though. So add a comment. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: seville: first enable memories, then initialize themVladimir Oltean2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | As per documentation, proper startup sequence is: * Enable memories * Initialize memories * Enable core Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: seville: don't write to MEM_ENA twiceVladimir Oltean2020-09-181-1/+0
| | | | | | | | | | | | | | There is another one of these right above the readx_poll_status. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: felix: use ocelot_field_{read,write} helpers consistentlyVladimir Oltean2020-09-181-3/+3
|/ | | | | | | Since these helpers for regmap fields are available, use them. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ptp_qoriq-support-FIPER3'David S. Miller2020-09-183-1/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yangbo Lu says: ==================== ptp_qoriq: support FIPER3 The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch-set is to support it in ptp_qoriq driver and dt-binding. Changes for v2: - Some improvement in code. - Added ACK from Vladimir. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * ptp_qoriq: support FIPER3Yangbo Lu2020-09-182-1/+22
| | | | | | | | | | | | | | | | | | | | The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch is to support it in ptp_qoriq driver. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * dt-binding: ptp_qoriq: support fsl,tmr-fiper3 propertyYangbo Lu2020-09-181-0/+2
|/ | | | | | | | Add fsl,tmr-fiper3 property definition which is supported only on DPAA2 and ENETC network controller hardware. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'net-ipa-wake-up-system-on-RX-available'David S. Miller2020-09-186-66/+74
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alex Elder says: ==================== net: ipa: wake up system on RX available This series arranges for the IPA driver to wake up a suspended system if the IPA hardware has a packet to deliver to the AP. Version 2 replaced the first patch from version 1 with three patches, in response to David Miller's feedback. And based on Bjorn Andersson's feedback on version 2, this version reworks the tracking of IPA clock references. As a result, we no longer need a flag to determine whether a "don't' suspend" clock reference is held (though an bit in a bitmask is still used for a different purpose). In summary: - A refcount_t is used to track IPA clock references where an atomic_t was previously used. (This may go away soon as well, with upcoming work to implement runtime PM.) - We no longer track whether a special reference has been taken to avoid suspending IPA. - A bit in a bitmask is used to ensure we only trigger a system resume once per system suspend. And from the original series: - Suspending endpoints only occurs when suspending the driver, not when dropping the last clock reference. Resuming endpoints is also disconnected from starting the clock. - The IPA SUSPEND interrupt is now a wakeup interrupt. If it fires, it schedules a system resume operation. - The GSI interrupt is no longer a wakeup interrupt. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipa: do not enable GSI interrupt for wakeupAlex Elder2020-09-182-14/+4
| | | | | | | | | | | | | | | | | | We now trigger a system resume when we receive an IPA SUSPEND interrupt. We should *not* wake up on GSI interrupts. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipa: enable wakeup on IPA interruptAlex Elder2020-09-181-0/+14
| | | | | | | | | | | | | | | | | | Now that we handle wakeup interrupts properly, arrange for the IPA interrupt to be treated as a wakeup interrupt. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipa: repurpose CLOCK_HELD flagAlex Elder2020-09-182-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous patch causes a system resume to be triggered when a packet is available for receipt on a suspended RX endpoint. The CLOCK_HELD flag was previously used to indicate that an extra clock reference was held, preventing suspend. But we no longer need such a flag: - We take an initial reference in ipa_config(). - That reference is held until ipa_suspend() releases it. - A subsequent system resume leads to a reference getting re-acquired in ipa_resume(). - This can repeat until ultimately the module is removed, where ipa_remove() releases the reference. We no longer need a special flag to determine whether this extra reference is held--it is, provided probe has completed successfully and the driver is not suspended (or removed). On the other hand, once suspended, it's possible for more than one endpoint to trip the IPA SUSPEND interrupt, and we only want to trigger the system resume once. So repurpose the Boolean CLOCK_HELD flag to record whether the IPA SUSPEND handler should initiate a system resume. The flag will be be cleared each time ipa_suspend() is called, *before* any endpoints are suspended. And it will be set inside the IPA SUSPEND interrupt handler exactly once per suspend. Rename the flag IPA_FLAG_RESUMED to reflect its new purpose. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipa: use device_init_wakeup()Alex Elder2020-09-182-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to wakeup_source_register() in ipa_probe() does not do what it was intended to do. Call device_init_wakeup() in ipa_setup() instead, to set the IPA device as wakeup-capable and to initially enable wakeup capability. When we receive a SUSPEND interrupt, call pm_wakeup_dev_event() with a zero processing time, to simply call for a resume without any other processing. The ipa_resume() call will take care of waking things up again, and will handle receiving the packet. Note that this gets rid of a clock reference counting bug that occurred when handling an IPA SUSPEND interrupt. Specifically, ipa_suspend_handler() took an IPA clock reference *in addition* to the one taken by ipa_resume(). There is no need to back-port this fix however, because it only affects code that was not previously working (this patch is part of fixing that). Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipa: manage endpoints separate from clockAlex Elder2020-09-182-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when (before) the last IPA clock reference is dropped, all endpoints are suspended. And whenever the first IPA clock reference is taken, all endpoints are resumed (or started). In most cases there's no need to start endpoints when the clock starts. So move the calls to ipa_endpoint_suspend() and ipa_endpoint_resume() out of ipa_clock_put() and ipa_clock_get(), respectiely. Instead, only suspend endpoints when handling a system suspend, and only resume endpoints when handling a system resume. Signed-off-by: Alex Elder <elder@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipa: replace ipa->suspend_ref with a flag bitAlex Elder2020-09-182-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We take a clock reference in ipa_config() in order to prevent the the IPA clock from being shutdown until a power management suspend request arrives. An atomic field in the IPA structure records whether that extra reference had been taken. Rather than using an atomic to represent a Boolean value, define a new flags bitmap, and define a "clock held" flag to represent whether the extra clock reference has been taken. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ipa: use refcount_t for IPA clock reference countAlex Elder2020-09-181-7/+7
|/ | | | | | | | | | | | Take advantage of the checking provided by refcount_t, rather than using a plain atomic to represent the IPA clock reference count. Note that we need to *set* the value to 1 in ipa_clock_get() rather than incrementing it from 0 (because doing that is considered an error for a refcount_t). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: phy: bcm7xxx: request and manage GPHY clockFlorian Fainelli2020-09-181-1/+29
| | | | | | | | | | | | | | The internal Gigabit PHY on Broadcom STB chips has a digital clock which drives its MDIO interface among other things, the driver now requests and manage that clock during .probe() and .remove() accordingly. Because the PHY driver can be probed with the clocks turned off we need to apply the dummy BMSR workaround during the driver probe function to ensure subsequent MDIO read or write towards the PHY will succeed. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: tipc: Supply missing udp_media.h include fileWang Hai2020-09-181-0/+1
| | | | | | | | | | | | | | | If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): net/tipc/udp_media.c:446:5: warning: no previous prototype for ‘tipc_udp_nl_dump_remoteip’ [-Wmissing-prototypes] net/tipc/udp_media.c:532:5: warning: no previous prototype for ‘tipc_udp_nl_add_bearer_data’ [-Wmissing-prototypes] net/tipc/udp_media.c:614:5: warning: no previous prototype for ‘tipc_udp_nl_bearer_add’ [-Wmissing-prototypes] Signed-off-by: Wang Hai <wanghai38@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: Remove unused macro CF_SERVERYueHaibing2020-09-181-1/+0
| | | | | | | It is no used any more, so can remove it. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: hns3: Supply missing hclge_dcb.h include fileWang Hai2020-09-181-0/+1
| | | | | | | | | | | | | | If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c:453:6: warning: no previous prototype for ‘hclge_dcb_ops_set’ [-Wmissing-prototypes] Signed-off-by: Wang Hai <wanghai38@huawei.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/appletalk: Supply missing net/Space.h include fileWang Hai2020-09-182-0/+4
| | | | | | | | | | | | | | If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/net/appletalk/cops.c:213:28: warning: no previous prototype for ‘cops_probe’ [-Wmissing-prototypes] drivers/net/appletalk/ltpc.c:1014:28: warning: no previous prototype for ‘ltpc_probe’ [-Wmissing-prototypes] Signed-off-by: Wang Hai <wanghai38@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* liquidio: Fix -Wmissing-prototypes warnings for liquidioWang Hai2020-09-182-0/+2
| | | | | | | | | | | | | | | | | | | If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/cavium/liquidio/cn68xx_device.c:124:5: warning: no previous prototype for ‘lio_setup_cn68xx_octeon_device’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:159:1: warning: no previous prototype for ‘octeon_pci_read_core_mem’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:168:1: warning: no previous prototype for ‘octeon_pci_write_core_mem’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:176:5: warning: no previous prototype for ‘octeon_read_device_mem64’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:185:5: warning: no previous prototype for ‘octeon_read_device_mem32’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:194:6: warning: no previous prototype for ‘octeon_write_device_mem32’ [-Wmissing-prototypes] Signed-off-by: Wang Hai <wanghai38@huawei.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* l2tp: fix up inconsistent rx/tx statisticsTom Parkin2020-09-181-3/+8
| | | | | | | | | | | | | Historically L2TP core statistics count the L2TP header in the per-session and per-tunnel byte counts tracked for transmission and receipt. Now that l2tp_xmit_skb updates tx stats, it is necessary for l2tp_xmit_core to pass out the length of the transmitted packet so that the statistics can be updated correctly. Signed-off-by: Tom Parkin <tparkin@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hinic: modify irq nameLuo bin2020-09-184-9/+13
| | | | | | | | Make a distinction between different irqs by netdev name or pci name. Signed-off-by: Luo bin <luobin9@huawei.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: cortina: Remove set but not used variableZheng Yongjun2020-09-181-4/+2
| | | | | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/cortina/gemini.c: In function gmac_get_ringparam: drivers/net/ethernet/cortina/gemini.c:2125:21: warning: variable ‘config0’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/cortina/gemini.c: In function gmac_init: drivers/net/ethernet/cortina/gemini.c:512:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] these variable is never used, so remove it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>