path: root/drivers/net/ethernet/lantiq_etop.c
AgeCommit message (Collapse)Author
2016-12-08net: ethernet: lantiq_etop: Call SET_NETDEV_DEV()Florian Fainelli
The Lantiq Etop driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function. Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner") Signed-off-by: Florian Fainelli <> Signed-off-by: David S. Miller <>
2016-07-04net: ethernet: lantiq_etop: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes
There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <> Signed-off-by: David S. Miller <>
2016-07-04net: ethernet: lantiq_etop: use phydev from struct net_devicePhilippe Reynes
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <> Signed-off-by: David S. Miller <>
2016-06-17net: lantiq_etop: remove unused variableSudip Mukherjee
The variable i was declared but was never used and we were getting a build warning for that. Signed-off-by: Sudip Mukherjee <> Signed-off-by: David S. Miller <>
2016-05-04treewide: replace dev->trans_start update with helperFlorian Westphal
Replace all trans_start updates with netif_trans_update helper. change was done via spatch: struct net_device *d; @@ - d->trans_start = jiffies + netif_trans_update(d) Compile tested only. Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Signed-off-by: Florian Westphal <> Acked-by: Felipe Balbi <> Acked-by: Mugunthan V N <> Acked-by: Antonio Quartulli <> Signed-off-by: David S. Miller <>
2016-01-10net: lantiq_etop.c: Use helper to find first phyAndrew Lunn
Make use of the helper to find the first phy device. This also fixes the compile breakage. Signed-off-by: Andrew Lunn <> Signed-off-by: David S. Miller <>
2016-01-07mdio: Move allocation of interrupts into coreAndrew Lunn
Have mdio_alloc() create the array of interrupt numbers, and initialize it to POLLING. This is what most MDIO drivers want, so allowing code to be removed from the drivers. Signed-off-by: Andrew Lunn <> Reviewed-by: Florian Fainelli <> Signed-off-by: David S. Miller <>
2016-01-07phy: Centralise print about attached phyAndrew Lunn
Many Ethernet drivers contain the same netdev_info() print statement about the attached phy. Move it into the phy device code. Additionally add a varargs function which can be used to append additional information. Signed-off-by: Andrew Lunn <> Signed-off-by: David S. Miller <>
2016-01-07phy: add phydev_name() wrapperAndrew Lunn
Add a phydev_name() function, to help with moving some structure members from phy_device. Signed-off-by: Andrew Lunn <> Signed-off-by: David S. Miller <>
2014-10-20net: ethernet: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <>
2014-10-03net: ethernet: Remove superfluous ether_setup after alloc_etherdevTobias Klauser
There is no need to call ether_setup after alloc_ethdev since it was already called there. Follow commits c706471b2601 ("net: axienet: remove unnecessary ether_setup after alloc_etherdev") and 3c87dcbfb36c ("net: ll_temac: Remove unnecessary ether_setup after alloc_etherdev") and fix the pattern in all remaining ethernet drivers. Signed-off-by: Tobias Klauser <> Acked-by: Nicolas Ferre <> Signed-off-by: David S. Miller <>
2014-02-17netdevice: add queue selection fallback handler for ndo_select_queueDaniel Borkmann
Add a new argument for ndo_select_queue() callback that passes a fallback handler. This gets invoked through netdev_pick_tx(); fallback handler is currently __netdev_pick_tx() as most drivers invoke this function within their customized implementation in case for skbs that don't need any special handling. This fallback handler can then be replaced on other call-sites with different queue selection methods (e.g. in packet sockets, pktgen etc). This also has the nice side-effect that __netdev_pick_tx() is then only invoked from netdev_pick_tx() and export of that function to modules can be undone. Suggested-by: David S. Miller <> Signed-off-by: Daniel Borkmann <> Signed-off-by: David S. Miller <>
2014-01-14Merge git:// S. Miller
2014-01-10net: core: explicitly select a txq before doing l2 forwardingJason Wang
Currently, the tx queue were selected implicitly in ndo_dfwd_start_xmit(). The will cause several issues: - NETIF_F_LLTX were removed for macvlan, so txq lock were done for macvlan instead of lower device which misses the necessary txq synchronization for lower device such as txq stopping or frozen required by dev watchdog or control path. - dev_hard_start_xmit() was called with NULL txq which bypasses the net device watchdog. - dev_hard_start_xmit() does not check txq everywhere which will lead a crash when tso is disabled for lower device. Fix this by explicitly introducing a new param for .ndo_select_queue() for just selecting queues in the case of l2 forwarding offload. netdev_pick_tx() was also extended to accept this parameter and dev_queue_xmit_accel() was used to do l2 forwarding transmission. With this fixes, NETIF_F_LLTX could be preserved for macvlan and there's no need to check txq against NULL in dev_hard_start_xmit(). Also there's no need to keep a dedicated ndo_dfwd_start_xmit() and we can just reuse the code of dev_queue_xmit() to do the transmission. In the future, it was also required for macvtap l2 forwarding support since it provides a necessary synchronization method. Cc: John Fastabend <> Cc: Neil Horman <> Cc: Signed-off-by: Jason Wang <> Acked-by: Neil Horman <> Acked-by: John Fastabend <> Signed-off-by: David S. Miller <>
2013-12-06ethernet: Fix FSF address in file headersJeff Kirsher
Several files refer to an old address for the Free Software Foundation in the file header comment. Resolve by replacing the address with the URL <> so that we do not have to keep updating the header comments anytime the address changes. CC: Santosh Raspatur <> CC: Dimitris Michailidis <> CC: Michael Chan <> CC: Santiago Leon <> CC: Sebastian Hesselbarth <> CC: Olof Johansson <> CC: Manish Chopra <> CC: Sony Chacko <> CC: Rajesh Borundia <> CC: Nicolas Pitre <> CC: Steve Glendinning <> Signed-off-by: Jeff Kirsher <> Signed-off-by: David S. Miller <>
2013-09-15net: lantiq_etop: remove deprecated IRQF_DISABLEDMichael Opdenacker
This patch proposes to remove the IRQF_DISABLED flag from drivers/net/ethernet/lantiq_etop.c It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <> Signed-off-by: David S. Miller <>
2013-03-21lantiq_etop: use free_netdev(netdev) instead of kfree()Wei Yongjun
Freeing netdev without free_netdev() leads to net, tx leaks. And it may lead to dereferencing freed pointer. Signed-off-by: Wei Yongjun <> Signed-off-by: David S. Miller <>
2013-01-14net: phy: remove flags argument from phy_{attach, connect, connect_direct}Florian Fainelli
The flags argument of the phy_{attach,connect,connect_direct} functions is then used to assign a struct phy_device dev_flags with its value. All callers but the tg3 driver pass the flag 0, which results in the underlying PHY drivers in drivers/net/phy/ not being able to actually use any of the flags they would set in dev_flags. This patch gets rid of the flags argument, and passes phydev->dev_flags to the internal PHY library call phy_attach_direct() such that drivers which actually modify a phy device dev_flags get the value preserved for use by the underlying phy driver. Acked-by: Kosta Zertsekel <> Signed-off-by: Florian Fainelli <> Signed-off-by: David S. Miller <>
2013-01-06ethtool: fix drvinfo strings set in driversJiri Pirko
Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct. Signed-off-by: Jiri Pirko <> Signed-off-by: David S. Miller <>
2013-01-03net: set dev->addr_assign_type correctlyJiri Pirko
Not a bitfield, but a plain value. Signed-off-by: Jiri Pirko <> Signed-off-by: David S. Miller <>
2012-12-03net/ethernet: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <> Signed-off-by: Greg Kroah-Hartman <>
2012-07-16ethernet: Use eth_random_addrJoe Perches
Convert the existing uses of random_ether_addr to the new eth_random_addr. Signed-off-by: Joe Perches <> Signed-off-by: David S. Miller <>
2012-07-10lantiq_etop: remove unnecessary setting of skb->devJon Mason
skb->dev is being unnecessarily set before calling eth_type_trans. eth_type_trans already sets skb->dev to the proper value, thus making this unnecessary. Signed-off-by: Jon Mason <> Signed-off-by: David S. Miller <>
2012-02-19ethernet: Fix typo in lantiq_etop.cMasanari Iida
Correct spelling "platfom" to "platform" in drivers/net/ethernet/lantiq_etop.c Signed-off-by: Masanari Iida <> Signed-off-by: David S. Miller <>
2012-02-17lantiq_etop: set addr_assign_type if random_ether_addr() usedDanny Kukawka
Set addr_assign_type correctly to NET_ADDR_RANDOM in case a random MAC address was generated and assigned to the netdevice. v2: added comment, renamed bool variable to random_mac Signed-off-by: Danny Kukawka <> Signed-off-by: David S. Miller <>
2012-02-06netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A Dalvi
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <> Signed-off-by: David S. Miller <>
2012-01-31drivers/net: Remove alloc_etherdev error messagesJoe Perches
alloc_etherdev has a generic OOM/unable to alloc message. Remove the duplicative messages after alloc_etherdev calls. Signed-off-by: Joe Perches <> Signed-off-by: David S. Miller <>
2012-01-10lantiq_etop: use an unique MDIO bus name.Florian Fainelli
Signed-off-by: Florian Fainelli <> Signed-off-by: David S. Miller <>
2011-11-14NET: MIPS: lantiq: fix etop compile errorJohn Crispin
The Lantiq ETOP ethernet driver fails to build in 3.2-rc1 due to 2 missing header files. Signed-off-by: John Crispin <> Signed-off-by: David S. Miller <>
2011-08-17net: remove use of ndo_set_multicast_list in driversJiri Pirko
replace it by ndo_set_rx_mode Signed-off-by: Jiri Pirko <> Signed-off-by: David S. Miller <>
2011-08-12lantiq: Move the Lantiq SoC driverJeff Kirsher
Move the Lantiq driver into drivers/net/ethernet/ and the necessary Kconfig and Makefile changes. CC: John Crispin <> Signed-off-by: Jeff Kirsher <> Acked-by: John Crispin <>