- 12 Jun, 2008 40 commits
-
-
Dale Farnsworth authored
Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
-
Lennert Buytenhek authored
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
On some boards, the mv643xx_eth MAC isn't connected to a PHY but directly (via the MII/GMII/RGMII interface) to another MAC-layer device. This patch allows specifying ->phy_addr = -1 to skip all PHY-related initialisation and run-time poking in that case. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
During OOM, instead of stopping RX refill when the rx desc ring is not empty, keep trying to refill the ring as long as it is not full instead. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Some SoCs have the TX bandwidth control registers in a slightly different place. This patch detects that case at run time, and re-directs accesses to those registers to the proper place at run time if needed. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Newer hardware has a 16-bit instead of a 14-bit RX coalescing count field in the SDMA_CONFIG register. This patch adds a run-time check for which of the two we have, and adjusts further writes to the rx coal count field accordingly. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Under some conditions, the TXQ ('TX queue being served') bit can clear before all packets queued for that TX queue have been transmitted. This patch enables TXend interrupts, and uses those to re-kick TX queues that claim to be idle but still have queued descriptors from the interrupt handler. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
As with the multiple RX queue support, allow the platform code to specify that the hardware we are running on supports multiple TX queues. This patch only uses the highest-numbered enabled queue to send packets to for now, this can be extended later to enable QoS and such. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Allow the platform code to specify that we are running on hardware that is capable of supporting multiple RX queues. If this option is used, initialise all of the given RX queues instead of just RX queue zero. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Add an interface for the hardware's per-port and per-subqueue TX rate control. In this stage, this is mainly so that we can disable the bandwidth limits during initialisation of the port. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
General cleanup of the mv643xx_eth driver. Mainly fixes coding style / indentation issues, get rid of some useless 'volatile's, kill some more superfluous comments, and such. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Remove the write-only ->[rt]x_int_coal members from struct mv643xx_eth_private. In the process, tweak the RX/TX interrupt mitigation code so that it is compiled by default, and set the default coalescing delays to 0 usec. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Split all TX queue related state into 'struct tx_queue', in preparation for multiple TX queue support. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Split all RX queue related state into 'struct rx_queue', in preparation for multiple RX queue support. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Replace the 70-line crc8 computation (used for multicast address filtering tables) by a 5-line version. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
The per-port mv643xx_eth_private struct had a private instance of struct net_device_stats that was never ever written to, only read (via the ethtool statistics interface). This patch gets rid of the private instance, and tweaks the ethtool statistics code in mv643xx_eth to use the statistics in struct net_device instead. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Since they are no longer used, kill enum FUNC_RET_STATUS and struct pkt_info (which were a rather roundabout way of communicating RX/TX status within the same driver). Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
rx_return_buff() is also a remnant of the HAL layering that the original mv643xx_eth driver used. Moving it into its caller kills the last reference to FUNC_RET_STATUS/pkt_info. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
The port_receive() function is a remnant of the original mv643xx_eth HAL split. This patch moves port_receive() into its caller, so that the top and the bottom half of RX processing no longer communicate via the HAL FUNC_RET_STATUS/pkt_info mechanism abstraction anymore. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Nuke some Hungarian-esque variable naming conventions: - p_ prefix for pointers - _q suffix for variables dealing with rx/tx queue state Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
The ->rx_resource_err variable doesn't serve a useful purpose -- kill it. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Half of the functions in the mv643xx_eth driver are prefixed by useless and baroque comment blocks on _what_ those functions do (which is obvious from the code itself) rather than why, and there's no point in keeping those comments around. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
A bunch of places in the mv643xx_eth driver use the 'mv643xx_' prefix. Since the mv643xx is a chip that includes more than just ethernet, this patch makes all those places use either no prefix (for some internal-use-only functions), or the full 'mv643xx_eth_' prefix. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
The fact that mv643xx_eth is an ethernet driver is pretty obvious, and having a lot of internal-use-only functions and defines prefixed with ETH_/ethernet_/eth_ prefixes is rather pointless. So, get rid of most of those prefixes. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Remove the unused rx/tx descriptor field defines, and move the ones that are actually used to the actual definitions of the rx/tx descriptor format. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
All except one of the port serial status register bit defines are unused -- kill the unused ones. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
The only user of the ETH_MIB_VERY_LONG_NAME_HERE defines is the eth_update_mib_counters() function. Get rid of the defines by open-coding the register offsets in the latter. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Get rid of RX_BUF_OFFSET (which is synonymous with ETH_HW_IP_ALIGN). Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Replace the nondescriptive names ETH_INT_UNMASK_ALL and ETH_INT_UNMASK_ALL_EXT by names of the actual fields being masked and unmasked in the various writes to the interrupt mask registers. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
None of the port status register bit defines are ever used in the mv643xx_eth driver -- nuke them all. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Over half of the port serial control register bit defines are never used, and the PORT_SERIAL_CONTROL_DEFAULT_VALUE define is never used either. Keep only those defines that are actually used. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Delete the defines for SDMA config register bit values that are never used in the driver, to tidy up the code some more. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
The port config extend register is never changed at run time. Document the meaning of the initial value, and delete the defines for the individual bits in this register. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
The mv643xx_eth driver only ever changes bit 0 of the port config register at run time, the rest of the register bits are fixed (and always zero). Document the meaning of the chosen default value, and get rid of all the defines for each of the individual bits. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Shorten the various oversized register names in mv643xx_eth.c, to increase readability. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Lennert Buytenhek authored
This patch performs a reverse topological sort of all functions in mv643xx_eth.c, so that we can get rid of all forward declarations, and end up with a more understandable driver due to related functions being grouped together. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
-
Adrian Bunk authored
This patch removes CVS keyword that weren't updated for a long time. One of them was printed as part of a printk, which also doesn't make much sense for a 5 year old and no longer updated keyword. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-