aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-01netdevsim: fix fall-through annotationGustavo A. R. Silva1-1/+1
Replace "pass through" with a proper "fall through" annotation in order to fix the following warning: drivers/net/netdevsim/bus.c: In function ‘new_device_store’: drivers/net/netdevsim/bus.c:170:14: warning: this statement may fall through [-Wimplicit-fallthrough=] port_count = 1; ~~~~~~~~~~~^~~ drivers/net/netdevsim/bus.c:172:2: note: here case 2: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This fix is part of the ongoing efforts to enable -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01sfc: mcdi_port: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/sfc/mcdi_port.c: In function ‘efx_mcdi_phy_decode_link’: ./include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=] # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/asm-generic/bug.h:125:2: note: in expansion of macro ‘unlikely’ unlikely(__ret_warn_on); \ ^~~~~~~~ drivers/net/ethernet/sfc/mcdi_port.c:344:3: note: in expansion of macro ‘WARN_ON’ WARN_ON(1); ^~~~~~~ drivers/net/ethernet/sfc/mcdi_port.c:345:2: note: here case MC_CMD_FCNTL_OFF: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: remove outdated device idsNikita Danilov3-12/+0
Some device ids were never released and does not exist. Cleanup these. Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: fixups on 64bit dma countersDmitry Bogdanov6-64/+36
DMA counters are 64 bit and we can fetch that to reduce counter overflow, espesially on byte counters. Tested-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: get total counters from DMA blockDmitry Bogdanov1-4/+5
aq_nic_update_ndev_stats pushes statistics to ndev->stats from system interface. This is not always good because it counts packets/bytes before any of rx filters (including mac filter). Its better to report the packet/bytes statistics from DMA counters which gives actual values of data transferred over pci. System level stats is still available via ethtool. Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: fetch up to date statistics on ethtool requestDmitry Bogdanov1-1/+8
This improves ethtool -S usage, where stats are now actual on each request. Before that stats only were updated at service timer period. Tested-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: extract timer cb into work jobIgor Russkikh2-6/+20
Service timer callback fetches statistics from FW and that may cause a long delay in error cases. We also now need to use fw mutex to prevent concurrent access to FW, thus - extract that logic from timer callback into the job in the separate work queue. Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: introduce fwreq mutexNikita Danilov4-10/+42
Some of FW operations could be invoked simultaneously, from f.e. ethtool context and from service service activity work. Here we introduce a fw mutex to secure and serialize access to FW logic. Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: user correct MSI irq typeIgor Russkikh1-1/+1
Typo in msi code. No much impact though. Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: use macros for better visibilityIgor Russkikh2-8/+8
Improve for better readability Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: improve ifup link detectionIgor Russkikh1-2/+1
Original code detected link only after 1 sec is passed after up. Here we replace this with direct service callback which updates link status immediately Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: link status irq handlingIgor Russkikh4-19/+50
Here we define and request an extra interrupt line, assign it on link isr handler and restructure abit aq_pci code to better support that. We also remove logic for using different timer intervals depending on link state, since thats now useless. Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: create global service workqueueNikita Danilov4-1/+56
We need this to schedule link interrupt handling and various service tasks. Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: link interrupt handling functionIgor Russkikh1-0/+14
Define link interrupt handler Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: add link interrupt fieldsIgor Russkikh2-1/+4
Declare macroes and nic fields to support link interrupt handling Signed-off-by: Nikita Danilov <ndanilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: implement hwmon api for chip temperatureYana Esina4-0/+144
Added support for hwmon api to fetch out chip temperature Signed-off-by: Yana Esina <yana.esina@aquantia.com> Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-01net: aquantia: add infrastructure to readout chip temperatureYana Esina3-0/+39
Ability to read the chip temperature from memory via hwmon interface Signed-off-by: Yana Esina <yana.esina@aquantia.com> Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30r8169: remove manual autoneg restart workaroundHeiner Kallweit1-8/+0
According to Neil who reported the issue leading to this workaround, the workaround is no longer needed since version 5.0. So let's remove it. This was the bug report leading to the workaround: https://bugzilla.kernel.org/show_bug.cgi?id=201081 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Neil MacLeod <neil@nmacleod.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30r8169: add rtl_reset_packet_filterHeiner Kallweit1-13/+12
Fortunately in one place there's a comment explaining what toggling this bit does. So let's create a helper for it. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30r8169: add helpers rtl_eri_set/clear_bitsHeiner Kallweit1-36/+40
Add helpers rtl_eri_set_bits and rtl_eri_clear_bits to improve readability of the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30r8169: make ERIAR_EXGMAC the default in eri functionsHeiner Kallweit1-114/+108
In basically all eri function calls the type argument is ERIAR_EXGMAC. Therefore make it the default. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30net: dsa: mv88e6060: Remove support for legacy probingAndrew Lunn2-40/+2
Now that the driver can be probed as an mdio device, remove the legacy DSA platform device probing. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30net: dsa: mv88e6060: Support probing as an mdio deviceAndrew Lunn1-1/+58
Probing DSA devices as platform devices has been superseded by using normal bus drivers. Add support for probing the mv88e6060 device as an mdio device. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30net: dsa: b53: Use vlan_filtering property from dsa_switchVladimir Oltean2-4/+2
While possible (and safe) to use the newly introduced dsa_port_is_vlan_filtering helper, fabricating a dsa_port pointer is a bit awkward, so simply retrieve this from the dsa_switch structure. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30net: dsa: b53: Let DSA call .port_vlan_filtering only when necessaryVladimir Oltean1-2/+2
Since DSA has recently learned to treat better with drivers that set vlan_filtering_is_global, doing this is no longer required. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30net: dsa: mt7530: Use the DSA vlan_filtering helper functionVladimir Oltean2-12/+5
This was recently introduced, so keeping state inside the driver is no longer necessary. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Suggested-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30net: dsa: mt7530: Let DSA handle the unsetting of vlan_filteringVladimir Oltean1-2/+2
The driver, recognizing that the .port_vlan_filtering callback was never coming after the port left its parent bridge, decided to take that duty in its own hands. DSA now takes care of this condition, so fix that. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-30net: dsa: b53: Let DSA handle mismatched VLAN filtering settingsVladimir Oltean1-18/+7
The DSA core is now able to do this check prior to calling the .port_vlan_filtering callback, so tell it that VLAN filtering is global for this particular hardware. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Suggested-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-29net: phy: micrel: make sure the factory test bit is clearedAntoine Tenart1-1/+14
The KSZ8081 PHY has a factory test mode which is set at the de-assertion of the reset line based on the RXER (KSZ8081RNA/RND) or TXC (KSZ8081MNX/RNB) pin. If a pull-down is missing, or if the pin has a pull-up, the factory test mode should be cleared by manually writing a 0 (according to the datasheet). This patch makes sure this factory test bit is cleared in config_init(). Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-28net: phy: avoid unneeded MDIO reads in genphy_read_statusHeiner Kallweit1-1/+5
Considering that in polling mode each link drop will be latched, settings can't have changed if link was up and is up. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-nextDavid S. Miller15-14/+31
Daniel Borkmann says: ==================== pull-request: bpf-next 2019-04-28 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Introduce BPF socket local storage map so that BPF programs can store private data they associate with a socket (instead of e.g. separate hash table), from Martin. 2) Add support for bpftool to dump BTF types. This is done through a new `bpftool btf dump` sub-command, from Andrii. 3) Enable BPF-based flow dissector for skb-less eth_get_headlen() calls which was currently not supported since skb was used to lookup netns, from Stanislav. 4) Add an opt-in interface for tracepoints to expose a writable context for attached BPF programs, used here for NBD sockets, from Matt. 5) BPF xadd related arm64 JIT fixes and scalability improvements, from Daniel. 6) Change the skb->protocol for bpf_skb_adjust_room() helper in order to support tunnels such as sit. Add selftests as well, from Willem. 7) Various smaller misc fixes. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27cxgb4: Delete all hash and TCAM filters before resource cleanupVishal Kulkarni2-11/+33
During driver unload, hash/TCAM filter deletion doesn't wait for completion.This patch deletes all the filters with completion before clearing the resources. Signed-off-by: Vishal Kulkarni <vishal@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: dsa: mv88e6xxx: Remove legacy probe supportAndrew Lunn1-70/+1
Remove the legacy method of probing the mv88e6xxx driver, now that all the mainline boards have been converted to use mdio based probing for a number of cycles. 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>
2019-04-27net: dsa: mv88e6060: Replace REG_READ macroAndrew Lunn1-13/+7
The REG_READ macro contains a return statement, making it not very safe. Remove it by inlining the code. 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>
2019-04-27net: dsa: mv88e6060: Replace REG_WRITE macroAndrew Lunn1-32/+41
The REG_WRITE macro contains a return statement, making it not very safe. Remove it by inlining the code. 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>
2019-04-27net: dsa: mv88e6060: Replace ds with privAndrew Lunn2-21/+23
Pass around priv, not ds. This will help with changing to an mdio driver, and makes this driver more like mv88e6xxx. 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>
2019-04-27net: dsa: mv88e6060: Add SPDX headerAndrew Lunn1-5/+1
Add an SPDX header, and remove the license text. 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>
2019-04-27ibmvnic: Add device identification to requested IRQsMurilo Fossa Vicentini2-4/+11
The ibmvnic driver currently uses the same fixed name when using request_irq, this makes it hard to parse when multiple VNIC devices are available at the same time. This patch adds the unit_address as the device identification along with an id for each queue. The original idea was to use the interface name as an identifier, but it is not feasible given these requests happen at adapter probe, and at this point netdev is not yet registered so it doesn't have the proper name assigned to it. Signed-off-by: Murilo Fossa Vicentini <muvic@linux.ibm.com> Reviewed-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com> Reviewed-by: Thomas Falcon <tlfalcon@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27cpsw: Put back cpsw_ndo_poll_controller()David S. Miller1-0/+12
To fix the build. Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: cpsw: move ethtool func in separate fileGrygorii Strashko4-725/+769
As a preparatory patch to add support for a switchdev based cpsw driver, move common ethtool functions to separate cpsw-ethtool.c file so that they can be used across both drivers. It will simplify CPSW driver code maintenance also. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: cpsw: switch to use mac sl apiGrygorii Strashko4-42/+34
Switch CPSW driver to use the new MAC SL API. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: cpsw: introduce mac sl module apiGrygorii Strashko2-0/+401
The MAC SL submodule has a lot of common functions between many of TI SoCs AM335x/AM437x/DRA7(AM57xx), Keystone 2 66AK2HK/E/L/G and K3 AM654, but there are also differences especially in registers offsets and sets of supported functions. This patch introduces the MAC SL submodule API which is intended to provide a common way to access the MAC SL submodule and hide HW integrations details. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: cpsw: move common hw init code in separate funcGrygorii Strashko4-102/+139
move common hw init code in separate function as preparation for adding new switchdev driver. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: davinci_cpdma: use dma_addr_t for desc_mem_phys and desc_hw_addrGrygorii Strashko1-2/+2
Use dma_addr_t for desc_mem_phys and desc_hw_addr to avoid types conversions. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: cpsw: move cpsw definitions in priv headerGrygorii Strashko2-426/+438
As a preparatory patch to add a switchdev based cpsw driver move the common header definitions to cpsw_priv.h. The plan is to develop a new driver on switchdev driver model and obsolete the current cpsw driver after all required functions are added to the new driver. This patch allows the same header file to be re-used on both drivers during the transition period. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: cpsw: refactor probe to group common hw initializationGrygorii Strashko1-116/+97
Rework probe to group common hw initialization: - group resources request at the beginning of the probe - move net device initialization and registration at the end of the probe - drop cpsw_slave_init as preparation of refactoring of common hw initialization code to separate function. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: davinci_mdio: use devm_ioremap()Grygorii Strashko1-1/+1
The Davinci MDIO in most of the case implemented as module inside of TI CPSW subsystem and fully depends on CPSW to be enabled, but historically it's implemented as separate Platform device/driver and defined in DT files in two ways: - as standalone node - as child node of CPSW subsystem. In later case it's required to split CPSW subsystem "reg" property to exclude MDIO I/O range which is not useful. Hence, replace devm_ioremap_resource() with devm_ioremap() to allow define full I/O range in parent CPSW subsystem without spliting. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: ale: do not auto delete mcast super entriesGrygorii Strashko1-0/+3
Do not delete multicast supervisory packet's (SUPER) entries while flushing multicast addresses from ALE table cpsw_ale_flush_multicast(). Those entries have to be added/removed only explicitly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: cpsw: fix allmulti cfg in dual_mac modeGrygorii Strashko3-14/+20
Now CPSW ALE will set/clean Host port bit in Unregistered Multicast Flood Mask (UNREG_MCAST_FLOOD_MASK) for every VLAN without checking if this port belongs to VLAN or not when ALLMULTI mode flag is set for nedev. This is working in non dual_mac mode, but in dual_mac - it causes enabling/disabling ALLMULTI flag for both ports. Hence fix it by adding additional parameter to cpsw_ale_set_allmulti() to specify ALE port number for which ALLMULTI has to be enabled and check if port belongs to VLAN before modifying UNREG_MCAST_FLOOD_MASK. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27net: ethernet: ti: ale: use define for host port in cpsw_ale_set_allmulti()Grygorii Strashko1-2/+2
Use ALE_PORT_HOST define for host port in cpsw_ale_set_allmulti() instead of constants. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>