summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bonding: Rework / fix multiple gratuitous ARP supportJay Vosburgh2008-06-183-22/+35
| | | | | | | | | | | | | | | | | | | | | Support for sending multiple gratuitous ARPs during failovers was added by commit: commit 7893b2491a2d5f716540ac5643d78d37a7f6628b Author: Moni Shoua <monis@voltaire.com> Date: Sat May 17 21:10:12 2008 -0700 bonding: Send more than one gratuitous ARP when slave takes over This change modifies that support to remove duplicated code, add support for ARP monitor (the original only supported miimon), clear the grat ARP counter in bond_close (lest a later "ifconfig up" immediately start spewing ARPs), and add documentation for the module parameter. Also updated driver version to 3.3.0. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* bonding: deliver netdev event for fail-over under the active-backup modeOr Gerlitz2008-06-171-0/+8
| | | | | | | | | | | | | | | | | | | | under active-backup mode and when there's actual new_active slave, have bond_change_active_slave() call the networking core to deliver NETDEV_BONDING_FAILOVER event such that the fail-over can be notable by code outside of the bonding driver such as the RDMA stack and monitoring tools. As the correct context of locking appropriate for notifier calls is RTNL and nothing else, bond->curr_slave_lock and bond->lock are unlocked and later locked again. This is ensured by the rest of the code to be safe under backup-mode AND when new_active is not NULL. Jay Vosburgh modified the original patch for formatting and fixed a compiler error. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* bonding: bond_change_active_slave() cleanup under active-backupOr Gerlitz2008-06-171-10/+8
| | | | | | | | | | | | | | simplified the code of bond_change_active_slave() such that under active-backup mode there's one "if (new_active)" test and the rest of the code only does extra checks on top of it. This removed an unneeded "if (bond->send_grat_arp > 0)" check and avoid calling bond_send_gratuitous_arp when there's no active slave. Jay Vosburgh made minor coding style changes to the orignal patch. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* net/core: add NETDEV_BONDING_FAILOVER eventOr Gerlitz2008-06-173-0/+8
| | | | | | | | | | | | | | Add NETDEV_BONDING_FAILOVER event to be used in a successive patch by bonding to announce fail-over for the active-backup mode through the netdev events notifier chain mechanism. Such an event can be of use for the RDMA CM (communication manager) to let native RDMA ULPs (eg NFS-RDMA, iSER) always be aligned with the IP stack, in the sense that they use the same ports/links as the stack does. More usages can be done to allow monitoring tools based on netlink events being aware to bonding fail-over. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: version 1.22Stephen Hemminger2008-06-171-1/+1
| | | | | | | New version to reflect new hardware support Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: 88E8057 chip supportStephen Hemminger2008-06-172-5/+16
| | | | | | | | Add support for Yukon 2 Ultra 2 chip set (88E8057) based on code in latest version of vendor driver (sk98lin 10.60.2.3). Untested on real hardware. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: use DEFINE_PCI_DEVICE_TABLEStephen Hemminger2008-06-171-1/+1
| | | | | | | PCI device table can be marked as devinitconst by using macro. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: chip version printoutStephen Hemminger2008-06-171-15/+25
| | | | | | | | Change how chip version is printed so that if an unknown version is detected nothing breaks. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* sky2: phy setup changesStephen Hemminger2008-06-171-3/+3
| | | | | | | | Change the setup of the PHY registers on some chip ids. These changes make the latest sky2 driver follow the vendor driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ibm_emac: Remove the ibm_emac driverJosh Boyer2008-06-1720-5289/+0
| | | | | | | | | | The arch/ppc sub-tree has been removed in the powerpc git tree. The old ibm_emac driver is no longer used by anything as a result of this. This removes it, leaving the ibm_newemac driver as the proper driver to use for PowerPC boards with the EMAC hardware. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Merge branch 'for-2.6.27' of git://git.marvell.com/mv643xx_eth into ↵Jeff Garzik2008-06-173-2695/+1935
|\ | | | | | | upstream-next
| * mv643xx_eth: new maintainerDale Farnsworth2008-06-121-5/+3
| | | | | | | | | | Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
| * mv643xx_eth: update driver version and author fieldsLennert Buytenhek2008-06-121-3/+3
| | | | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
| * mv643xx_eth: add PHY-less modeLennert Buytenhek2008-06-121-13/+74
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: be more agressive about RX refillLennert Buytenhek2008-06-121-1/+1
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: detect alternate TX BW control register locationLennert Buytenhek2008-06-121-5/+32
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: detect extended rx coal register fieldLennert Buytenhek2008-06-121-7/+31
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: work around TX hang hardware issueLennert Buytenhek2008-06-121-5/+30
| | | | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: allow multiple TX queuesLennert Buytenhek2008-06-122-44/+105
| | | | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: allow multiple RX queuesLennert Buytenhek2008-06-122-25/+79
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: add tx rate controlLennert Buytenhek2008-06-121-1/+103
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: general cleanupLennert Buytenhek2008-06-122-529/+479
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: remove write-only interrupt coalescing variablesLennert Buytenhek2008-06-121-25/+4
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: split out tx queue stateLennert Buytenhek2008-06-121-256/+254
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: split out rx queue stateLennert Buytenhek2008-06-121-216/+225
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: massively simplify multicast address crc8 computationLennert Buytenhek2008-06-121-74/+21
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: kill private unused instance of struct net_device_statsLennert Buytenhek2008-06-121-54/+66
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: kill FUNC_RET_STATUS/pkt_infoLennert Buytenhek2008-06-121-21/+0
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: move rx_return_buff() into its only callerLennert Buytenhek2008-06-121-52/+28
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: move port_receive() into its only callerLennert Buytenhek2008-06-121-59/+32
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: get rid of hungarian variable namingLennert Buytenhek2008-06-121-78/+78
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: kill ->rx_resource_errLennert Buytenhek2008-06-121-15/+0
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: kill superfluous commentsLennert Buytenhek2008-06-121-552/+0
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: use 'mv643xx_eth_' prefix consistentlyLennert Buytenhek2008-06-121-205/+206
| | | | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: get rid of ETH_/ethernet_/eth_ prefixesLennert Buytenhek2008-06-121-204/+195
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: clean up rx/tx descriptor field definesLennert Buytenhek2008-06-121-54/+28
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: remove port serial status register bit definesLennert Buytenhek2008-06-121-13/+2
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: move MIB offset defines into their only userLennert Buytenhek2008-06-121-58/+34
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: get rid of RX_BUF_OFFSETLennert Buytenhek2008-06-121-5/+2
| | | | | | | | | | | | | | 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>
| * mv643xx_eth: move PHY wait defines into callersLennert Buytenhek2008-06-121-12/+9
| | | | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
| * mv643xx_eth: clarify irq masking and unmaskingLennert Buytenhek2008-06-121-37/+24
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: remove unused DESC_SIZE defineLennert Buytenhek2008-06-121-2/+0
| | | | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
| * mv643xx_eth: nuke port status register bit definesLennert Buytenhek2008-06-121-14/+0
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: delete unused port serial control register bit definesLennert Buytenhek2008-06-121-63/+15
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: delete unused SDMA config register bit definesLennert Buytenhek2008-06-121-17/+4
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: get rid of individual port config extend register bit definesLennert Buytenhek2008-06-121-12/+4
| | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: get rid of individual port config register bit definesLennert Buytenhek2008-06-121-37/+8
| | | | | | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: shorten reg namesLennert Buytenhek2008-06-121-108/+96
| | | | | | | | | | | | | | | | 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>
| * mv643xx_eth: trim unnecessary includesLennert Buytenhek2008-06-121-9/+1
| | | | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Dale Farnsworth <dale@farnsworth.org>
| * mv643xx_eth: reverse topological sort of functionsLennert Buytenhek2008-06-121-1792/+1646
| | | | | | | | | | | | | | | | | | | | 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>