- Jun 22, 2016
-
-
Philippe Reynes authored
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 <tremyfr@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Philippe Reynes authored
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by:
Philippe Reynes <tremyfr@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jun 10, 2016
-
-
Florian Fainelli authored
Add a few netdev statistics to report transmitted and received bytes and packets and a few obvious errors. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
Read the statistics from the BGMAC's builtin MAC and return them to user-space using the standard ethtool helpers. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Florian Fainelli authored
In preparation for allowing different helpers to be utilized against network devices created by the bgmac driver, make sure that we bind the net_device with core->dev. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 28, 2016
-
-
Masanari Iida authored
This patch fix spelling typos in printk from various part of the codes. Signed-off-by:
Masanari Iida <standby24x7@gmail.com> Acked-by:
Randy Dunlap <rdunlap@infradead.org> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Apr 14, 2016
-
-
Rafał Miłecki authored
This fixes Ethernet on D-Link DIR-885L with BCM47094 SoC. Felix reported similar fix was needed for his BCM4709 device (Buffalo WXR-1900DHP?). I tested this for regressions on BCM4706, BCM4708A0 and BCM47081A0. Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 24, 2016
-
-
Rafał Miłecki authored
It needs very similar workarounds to the one on BCM4707. It was tested on D-Link DIR-885L home router. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 06, 2016
-
-
Rafał Miłecki authored
Chipsets with BCM4707 / BCM53018 ID require special handling at a few places in the code. It's likely there will be more IDs to check in the future. To simplify it add this trivial helper. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 15, 2016
-
-
David S. Miller authored
Fixes: f1640c3d ("bgmac: fix a missing check for build_skb") Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 13, 2016
-
-
wangweidong authored
when build_skb failed, it may occure a NULL pointer. So add a 'NULL check' for it. Signed-off-by:
Weidong Wang <wangweidong1@huawei.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 07, 2016
-
-
Andrew Lunn authored
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 <andrew@lunn.ch> Reviewed-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 02, 2015
-
-
Fabio Estevam authored
Commit a5597008 ("phy: fixed_phy: Add gpio to determine link up/down.") added a new argument to fixed_phy_register(), but missed to update bgmac driver, causing the following build failure: drivers/net/ethernet/broadcom/bgmac.c:1450:2: error: too few arguments to function 'fixed_phy_register' Add the missing argument. Reported-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 27, 2015
-
-
Rafał Miłecki authored
Broadcom buses may have more than 1 Ethernet device. This is used e.g. to have few interfaces connected to different switch ports. So far we saw chipsets with only 2 devices (e.g. BCM4706) but recent ones have up to 3 (e.g. Netgear R8000 uses 3rd interface for most of switch traffic, lower interfaces are for some kind of offloading). Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 24, 2015
-
-
Rafał Miłecki authored
After d75b1ade ("net: less interrupt masking in NAPI") polling function has to return whole budget when it wants NAPI to call it again. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Cc: Felix Fietkau <nbd@openwrt.org> Fixes: eb64e292 ("bgmac: leave interrupts disabled as long as there is work to do") Acked-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
Eric Dumazet <edumazet@google.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 14, 2015
-
-
Felix Fietkau authored
The ring size is always known at compile time, so make the code a bit more efficient Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
The driver needs to inform the hardware about the first invalid (not yet filled) rx slot, by writing its DMA descriptor pointer offset to the BGMAC_DMA_RX_INDEX register. This register was set to a value exceeding the rx ring size, effectively allowing the hardware constant access to the full ring, regardless of which slots are initialized. To fix this issue, always mark the last filled rx slot as invalid. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
Instead of allocating buffers at device init time and initializing descriptors at device open, do both at the same time (during open). Free all buffers when closing the device. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
In very rare cases, the MAC can catch an internal buffer that is bigger than it's supposed to be. Instead of crashing the kernel, simply pass the buffer back to the hardware Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
Allocate a new buffer before processing the completed one. If allocation fails, reuse the old buffer. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
A packet buffer offset of 30 bytes is inefficient, because the first 2 bytes end up in a different cacheline. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
Always poll rx and tx during NAPI poll instead of relying on the status of the first interrupt. This prevents bgmac_poll from leaving unfinished work around until the next IRQ. In my tests this makes bridging/routing throughput under heavy load more stable and ensures that no new IRQs arrive as long as bgmac_poll uses up the entire budget. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
Keep incrementing ring->start and ring->end instead of pointing it to the actual ring slot entry. This simplifies the calculation of the number of free slots. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 01, 2015
-
-
Rafał Miłecki authored
There are two reasons for having this header in the common place: 1) Simplifying drivers that read NVRAM entries. We will be able to safely call bcm47xx_nvram_* functions without #ifdef-s. 2) Getting NVRAM driver out of MIPS arch code. This is needed to support BCM5301X arch which also requires this NVRAM driver. Patch for that will follow once we get is reviewed. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Acked-by:
Hauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Cc: Arnd Bergmann <arnd@arndb.de> Cc: Paul Walmsley <paul@pwsan.com> Cc: linux-soc@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8619/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Mar 23, 2015
-
-
Felix Fietkau authored
Always use software checksumming, since the hardware does not have any checksum offload support. This significantly improves local TCP tx performance. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Felix Fietkau authored
This improves performance for routing and local rx Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 21, 2015
-
-
Rafał Miłecki authored
On ARM SoCs with bgmac Ethernet hardware we don't have any normal PHY. There is always a switch attached but it's not even controlled over MDIO like in case of MIPS devices. We need a fixed PHY to be able to send/receive packets from the switch. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 09, 2015
-
-
Peter Senna Tschudin authored
On my test environment the throughput of a file transfer drops from 4.4MBps to 116KBps due the number of repeated warning messages. This patch removes the warning messages as DMA works correctly with addresses using 0xC0000000 bits. Signed-off-by:
Peter Senna Tschudin <peter.senna@gmail.com> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 12, 2015
-
-
Rafał Miłecki authored
On Northstar (Broadcom's ARM architecture) we need to manually enable all cores. Code for that is already in place, but the condition for it was wrong. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 11, 2015
-
-
Joe Perches authored
Use the normal {} instead of a macro to terminate an array. Remove the macro too. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 19, 2015
-
-
Hauke Mehrtens authored
IRQs should only get activated when there is nothing to poll in the queue any more and to after every poll. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Hauke Mehrtens authored
napi should get registered before the netdev and not after. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- May 13, 2014
-
-
Wilfried Klaebe authored
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by:
Dave Miller <davem@davemloft.net> Signed-off-by:
Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 15, 2014
-
-
Florian Fainelli authored
bgmac_mii_register() and register_netdev() both return appropriate error codes for the failures they would encounter, propagate this error code instead of overriding the value with -ENOTSUPP which is not the correct error code to return. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 07, 2014
-
-
Hauke Mehrtens authored
This fixes some typos found by Sergei. Reported-by:
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jan 05, 2014
-
-
Hauke Mehrtens authored
This adds support for the Northstar SoC. This SoC does not have a PMU in bcma and no register on it should be called. In addition it support 2.5 GBit/s Ethernet to the PHY. This GMAC core is not fully working there are still problems with the DMA controller. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Hauke Mehrtens authored
On the Northstar SoC (BCM4707 and BCM53018) we have to enable all GMAC cores when we just want to use on. We iterate over all the cores and activate them. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Hauke Mehrtens authored
The BGMAC_CMDCFG_SR register is at a different position on core rev >= 4 We do not know where this register is on a rev 5 or higher core, I have newer seen such a core. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Hauke Mehrtens authored
The DMA controller used in the device supported by GMAC with core rev >= 4 has some new options which are now set to the default values used in the Broadcom SDK. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Acked-by:
Rafał Miłecki <zajec5@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Dec 27, 2013
-
-
Hauke Mehrtens authored
This works pretty much the same way, so avoid duplicating the code. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by:
Rafał Miłecki <zajec5@gmail.com> Acked-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-