aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2020-09-21ice: simplify the return expression of ice_finalize_update()Qinglang Miao1-6/+1
Simplify the return expression. Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-21mlxsw: spectrum_router: simplify the return expression of ↵Qinglang Miao1-5/+1
__mlxsw_sp_router_init() Simplify the return expression. Signed-off-by: Qinglang Miao <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-21net: hns3: simplify the return expression of hclgevf_client_start()Qinglang Miao1-7/+1
Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-21net: qlcnic: simplify the return expression of qlcnic_83xx_shutdownQinglang Miao1-6/+1
Simplify the return expression. Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-21can: mcp25xxfd: add listen-only modeKurt Van Dijck1-6/+10
This commit enables listen-only mode, which works internally like CANFD mode. Signed-off-by: Kurt Van Dijck <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-21can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CANMarc Kleine-Budde2-0/+2908
This patch adds support for the Microchip MCP25xxFD SPI CAN controller family. Tested-by: Kurt Van Dijck <[email protected]> Tested-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-21can: mcp25xxfd: add regmap infrastructureMarc Kleine-Budde7-0/+1507
This patch adds the regmap infrastructure for the Microchip MCP25xxFD SPI CAN controller family. The actual driver is added in the next commit. Tested-by: Kurt Van Dijck <[email protected]> Tested-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-09-21can: rx-offload: can_rx_offload_add_manual(): add new initialization functionMarc Kleine-Budde1-0/+11
This patch adds a new initialization function: can_rx_offload_add_manual() It should be used to add support rx-offload to a driver, if the callback mechanism should not be used. Use e.g. can_rx_offload_queue_sorted() to queue skbs into rx-offload. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mscan: simplify clock enable/disableZhang Changzhong1-18/+10
All the NULL checks are pointless, clk_*() routines already deal with NULL just fine. Signed-off-by: Zhang Changzhong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mscan: mpc5xxx_can: update contact emailWolfram Sang1-1/+1
The 'pengutronix' address is defunct for years. Use the proper contact address. Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mcp251x: add support for half duplex controllersTim Harvey1-7/+27
Some SPI host controllers do not support full-duplex SPI and are marked as such via the SPI_CONTROLLER_HALF_DUPLEX controller flag. For such controllers use half duplex transactions but retain full duplex transactions for the controllers that can handle those. Signed-off-by: Tim Harvey <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mcp251x: Use readx_poll_timeout() helperAndy Shevchenko1-31/+33
We may use special helper macro to poll IO till condition or timeout occurs. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mcp251x: add GPIO supportTimo Schlüßler1-0/+243
The mcp251x variants feature 3 general purpose digital inputs and 2 outputs. With this patch they are accessible through the gpio framework. Signed-off-by: Timo Schlüßler <[email protected]> Tested-by: Timo Schlüßler <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mcp251x: sort include files alphabeticallyMarc Kleine-Budde1-2/+2
This patch sorts the include files alphabetically. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: spi: Kconfig: remove unneeded dependencies form Kconfig symbolsMarc Kleine-Budde1-2/+0
Since commits 653ee35ce6d5 ("can: hi311x: remove custom DMA mapped buffer") Fixes: df58525df395 ("can: mcp251x: remove custom DMA mapped buffer") both the hi3111x and the mcp251x driver don't make use of the DMA API any more. So we can safely remove the HAS_DMA dependency. While we're here, remove the unneeded CAN_DEV and SPI dependencies from the CAN_HI311X symbol, as the parent menus already have these dependencies. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: pcan_usb: add support of rxerr/txerr countersStephane Grosjean1-16/+117
This patch adds the support of the rx/tx errors CAN counters to the driver of the PCAN-USB PC-CAN interface from PEAK-System GmbH. The PCAN-USB is capable of giving back the values of the rx/tx errors counters, to provide more details and statistics to the linux-can layer. Getting these values allows the driver to better tune CAN_ERR_CRTL_TX_xxx and CAN_ERR_CRTL_RX_xxx bits in case of the interface enters any CAN_STATE_ERROR_xxx state. Signed-off-by: Stephane Grosjean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: pcan_usb: Document the commands sent to the deviceStephane Grosjean1-7/+26
This patch documents the functions and numbers of the commands sent by the driver to the PCAN-USB CAN device from PEAK-System GmbH. Signed-off-by: Stephane Grosjean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: pch_can: use generic power managementVaibhav Gupta1-42/+21
Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: peak_canfd: Remove unused macrosWang Hai1-2/+0
CANFD_CLK_SEL_DIV_MASK and CANFD_OPTIONS_SET are never used after they were introduced. Remove them. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wang Hai <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mkl: keep CANFD_CLK_SEL_DIV_MASK for documentation purpose] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: peak_usb: convert to use le32_add_cpu()Liu Shixin1-1/+1
Convert cpu_to_le32(le32_to_cpu(E1) + E2) to use le32_add_cpu(). Signed-off-by: Liu Shixin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: ti_hecc: convert to devm_platform_ioremap_resource_byname()Dejin Zheng1-22/+5
Use the function devm_platform_ioremap_resource_byname() to simplify source code which calls the functions platform_get_resource_byname() and devm_ioremap_resource(). Remove also a few error messages which became unnecessary with this software refactoring. Signed-off-by: Dejin Zheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mscan: mark expected switch fall-throughMarc Kleine-Budde1-0/+1
As -Wimplicit-fallthrough is now enabled the mscan driver shows this warning, which is fixed by this patch: drivers/net/can/mscan/mscan.c: In function ‘mscan_start_xmit’: drivers/net/can/mscan/mscan.c:211:3: warning: this statement may fall through [-Wimplicit-fallthrough=] 211 | netif_stop_queue(dev); | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/can/mscan/mscan.c:212:2: note: here 212 | case 2: | ^~~~ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: mcba_usb: remove redundant initialization of variable errColin Ian King1-1/+1
The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: c_can: Remove unused inline functionYueHaibing1-9/+0
commit 524369e2391f ("can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option") left behind this, remove it. Signed-off-by: YueHaibing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: dev: can_bus_off(): print scheduling of restart if activatedMarc Kleine-Budde1-1/+5
If a CAN device goes into bus-off and has automatic restart enabled, inform user that a automatic restart is scheduled after the configured delay. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: dev: can_change_state(): print human readable state change messagesMarc Kleine-Budde1-1/+25
In order to ease debugging let can_change_state() print the human readable state change messages. Also print the old and new state. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: dev: can_put_echo_skb(): propagate error in case of errorsMarc Kleine-Budde1-4/+7
The function can_put_echo_skb() can fail for several reasons. It may fail due to OOM, but when it fails it's usually due to locking problems in the driver. In order to help developing and debugging of new drivers propagate error value in case of errors. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: dev: can_put_echo_skb(): print number of echo_skb that is occupiedMarc Kleine-Budde1-1/+1
This patch prints the number of the occupied echo_skb, to ease implementing and debugging of new drivers. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: softing: update dead linkDiego Elio Pettenò1-1/+1
BerliOS has not been operating for more than five years. linux-can moved to GitHub. Signed-off-by: Diego Elio Pettenò <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mkl: split into two patches - handle softing part here] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: slcan: update dead linkDiego Elio Pettenò1-2/+2
BerliOS has not been operating for more than five years. linux-can moved to GitHub. Signed-off-by: Diego Elio Pettenò <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mkl: split into two patches - handle slcan part here] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: drivers: fix spelling mistakesMarc Kleine-Budde21-36/+36
This patch fixes spelling erros found by "codespell" in the drivers/net/can subtree. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: flexcan: fix spelling mistake "reserverd" -> "reserved"Alexandre Belloni1-1/+1
Fix a mistake in a register layout description. Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-21can: grcan: fix spelling mistake "buss" -> "bus"Colin Ian King1-1/+1
There is a spelling mistake in a netdev_err error message. Fix it. Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
2020-09-20dpaa2-eth: drop double zeroingJulia Lawall1-1/+1
sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(struct scatterlist),flags) ... sg_init_table(x,n) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20bnxt_en: Fix wrong flag value passed to HWRM_PORT_QSTATS_EXT fw call.Michael Chan1-1/+1
The wrong flag value caused the firmware call to return actual port counters instead of the counter masks. This messed up the counter overflow logic and caused erratic extended port counters to be displayed under ethtool -S. Fixes: 531d1d269c1d ("bnxt_en: Retrieve hardware masks for port counters.") Reviewed-by: Edwin Peer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20bnxt_en: Fix HWRM_FUNC_QSTATS_EXT firmware call.Michael Chan1-0/+1
Fix it to set the required fid input parameter. The firmware call fails without this patch. Fixes: d752d0536c97 ("bnxt_en: Retrieve hardware counter masks from firmware if available.") Reviewed-by: Edwin Peer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20bnxt_en: Return -EOPNOTSUPP for ETHTOOL_GREGS on VFs.Vasundhara Volam1-0/+3
Debug firmware commands are not supported on VFs to read registers. This patch avoids logging unnecessary access_denied error on VFs when user calls ETHTOOL_GREGS. By returning error in get_regs_len() method on the VF, the get_regs() method will not be called. Fixes: b5d600b027eb ("bnxt_en: Add support for 'ethtool -d'") Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20bnxt_en: Protect bnxt_set_eee() and bnxt_set_pauseparam() with mutex.Michael Chan1-11/+20
All changes related to bp->link_info require the protection of the link_lock mutex. It's not sufficient to rely just on RTNL. Fixes: 163e9ef63641 ("bnxt_en: Fix race when modifying pause settings.") Reviewed-by: Edwin Peer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20bnxt_en: return proper error codes in bnxt_show_tempEdwin Peer1-6/+13
Returning "unknown" as a temperature value violates the hwmon interface rules. Appropriate error codes should be returned via device_attribute show instead. These will ultimately be propagated to the user via the file system interface. In addition to the corrected error handling, it is an even better idea to not present the sensor in sysfs at all if it is known that the read will definitely fail. Given that temp1_input is currently the only sensor reported, ensure no hwmon registration if TEMP_MONITOR_QUERY is not supported or if it will fail due to access permissions. Something smarter may be needed if and when other sensors are added. Fixes: 12cce90b934b ("bnxt_en: fix HWRM error when querying VF temperature") Signed-off-by: Edwin Peer <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20bnxt_en: Use memcpy to copy VPD field info.Vasundhara Volam1-3/+5
Using strlcpy() to copy from VPD is not correct because VPD strings are not necessarily NULL terminated. Use memcpy() to copy the VPD length up to the destination buffer size - 1. The destination is zeroed memory so it will always be NULL terminated. Fixes: a0d0fd70fed5 ("bnxt_en: Read partno and serialno of the board from VPD") Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20net: dsa: tag_8021q: add VLANs to the master interface tooVladimir Oltean1-1/+6
The whole purpose of tag_8021q is to send VLAN-tagged traffic to the CPU, from which the driver can decode the source port and switch id. Currently this only works if the VLAN filtering on the master is disabled. Change that by explicitly adding code to tag_8021q.c to add the VLANs corresponding to the tags to the filter of the master interface. Because we now need to call vlan_vid_add, then we also need to hold the RTNL mutex. Propagate that requirement to the callers of dsa_8021q_setup and modify the existing call sites as appropriate. Note that one call path, sja1105_best_effort_vlan_filtering_set -> sja1105_vlan_filtering -> sja1105_setup_8021q_tagging, was already holding this lock. Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20net: mventa: remove unused variable 'dummy' in mvneta_mib_counters_clear()Zhang Changzhong1-4/+3
Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/marvell/mvneta.c:754:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] 754 | u32 dummy; | ^~~~~ This variable is not used in function mvneta_mib_counters_clear(), so remove it to avoid build warning. Signed-off-by: Zhang Changzhong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20net: mvneta: avoid copying shared_info frags in mvneta_swbm_build_skbLorenzo Bianconi1-7/+4
Avoid copying skb_shared_info frags array in mvneta_swbm_build_skb() since __build_skb_around() does not overwrite it Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20net: mvneta: recycle the page in case of out-of-orderLorenzo Bianconi1-1/+5
Recycle the received page into the page_pool cache if the dma descriptors arrived in a wrong order Fixes: ca0e014609f05 ("net: mvneta: move skb build after descriptors processing") Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-20net: dsa: rtl8366: Skip PVID setting if not requestedLinus Walleij1-0/+3
We go to lengths to determine whether the PVID should be set for this port or not, and then fail to take it into account. Fix this oversight. Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-19net: phy: dp83822: Update the fiber advertisement for speedDan Murphy1-3/+10
Update the fiber advertisement for speed and duplex modes with the 100base-FX full and half linkmode entries. Signed-off-by: Dan Murphy <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-19net: dp83869: Add ability to advertise Fiber connectionDan Murphy1-0/+73
Add the ability to advertise the Fiber connection if the strap or the op-mode is configured for 100Base-FX. Auto negotiation is not supported on this PHY when in fiber mode. Signed-off-by: Dan Murphy <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-19ethtool: Add 100base-FX link mode entriesDan Murphy1-1/+3
Add entries for the 100base-FX full and half duplex supported modes. $ ethtool eth0 Supported ports: [ FIBRE ] Supported link modes: 100baseFX/Half 100baseFX/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: 100baseFX/Half 100baseFX/Full Advertised pause frame use: No Advertised auto-negotiation: No Advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Auto-negotiation: off Port: MII PHYAD: 1 Transceiver: external Supports Wake-on: gs Wake-on: d SecureOn password: 00:00:00:00:00:00 Current message level: 0x00000000 (0) Link detected: yes Signed-off-by: Dan Murphy <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-19net: ethernet: ti: cpsw: use true,false for bool variablesJason Yan1-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 <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-09-198139too: use true,false for bool variablesJason Yan1-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 <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: David S. Miller <[email protected]>