Commit 4133231a authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents b43bda88 5dce2120
This diff is collapsed.
...@@ -11,6 +11,7 @@ endif ...@@ -11,6 +11,7 @@ endif
obj-$(CONFIG_E100) += e100/ obj-$(CONFIG_E100) += e100/
obj-$(CONFIG_E1000) += e1000/ obj-$(CONFIG_E1000) += e1000/
obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_IXGB) += ixgb/
obj-$(CONFIG_BONDING) += bonding/
# #
# link order important here # link order important here
...@@ -108,7 +109,6 @@ ifeq ($(CONFIG_SLIP_COMPRESSED),y) ...@@ -108,7 +109,6 @@ ifeq ($(CONFIG_SLIP_COMPRESSED),y)
endif endif
obj-$(CONFIG_DUMMY) += dummy.o obj-$(CONFIG_DUMMY) += dummy.o
obj-$(CONFIG_BONDING) += bonding.o
obj-$(CONFIG_DE600) += de600.o obj-$(CONFIG_DE600) += de600.o
obj-$(CONFIG_DE620) += de620.o obj-$(CONFIG_DE620) += de620.o
obj-$(CONFIG_AT1500) += lance.o obj-$(CONFIG_AT1500) += lance.o
......
...@@ -675,37 +675,24 @@ au1000_probe1(struct net_device *dev, long ioaddr, int irq, int port_num) ...@@ -675,37 +675,24 @@ au1000_probe1(struct net_device *dev, long ioaddr, int irq, int port_num)
char *pmac, *argptr; char *pmac, *argptr;
char ethaddr[6]; char ethaddr[6];
if (!request_region(ioaddr, MAC_IOSIZE, "Au1000 ENET")) { if (!request_region(ioaddr, MAC_IOSIZE, "Au1000 ENET"))
return -ENODEV; return -ENODEV;
}
if (version_printed++ == 0) printk(version); if (version_printed++ == 0) printk(version);
if (!dev) { if (!dev)
dev = init_etherdev(0, sizeof(struct au1000_private)); dev = init_etherdev(NULL, sizeof(struct au1000_private));
}
if (!dev) { if (!dev) {
printk (KERN_ERR "au1000 eth: init_etherdev failed\n"); printk (KERN_ERR "au1000 eth: init_etherdev failed\n");
release_region(ioaddr, MAC_IOSIZE);
return -ENODEV; return -ENODEV;
} }
printk("%s: Au1xxx ethernet found at 0x%lx, irq %d\n", printk("%s: Au1xxx ethernet found at 0x%lx, irq %d\n",
dev->name, ioaddr, irq); dev->name, ioaddr, irq);
/* Initialize our private structure */
if (dev->priv == NULL) {
aup = (struct au1000_private *)
kmalloc(sizeof(*aup), GFP_KERNEL);
if (aup == NULL) {
retval = -ENOMEM;
goto free_region;
}
dev->priv = aup;
}
aup = dev->priv; aup = dev->priv;
memset(aup, 0, sizeof(*aup));
/* Allocate the data buffers */ /* Allocate the data buffers */
aup->vaddr = (u32)dma_alloc(MAX_BUF_SIZE * aup->vaddr = (u32)dma_alloc(MAX_BUF_SIZE *
...@@ -834,8 +821,6 @@ au1000_probe1(struct net_device *dev, long ioaddr, int irq, int port_num) ...@@ -834,8 +821,6 @@ au1000_probe1(struct net_device *dev, long ioaddr, int irq, int port_num)
if (aup->vaddr) if (aup->vaddr)
dma_free((void *)aup->vaddr, dma_free((void *)aup->vaddr,
MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS)); MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS));
if (dev->priv != NULL)
kfree(dev->priv);
printk(KERN_ERR "%s: au1000_probe1 failed. Returns %d\n", printk(KERN_ERR "%s: au1000_probe1 failed. Returns %d\n",
dev->name, retval); dev->name, retval);
kfree(dev); kfree(dev);
...@@ -1003,15 +988,15 @@ static int au1000_close(struct net_device *dev) ...@@ -1003,15 +988,15 @@ static int au1000_close(struct net_device *dev)
spin_lock_irqsave(&aup->lock, flags); spin_lock_irqsave(&aup->lock, flags);
/* stop the device */ /* stop the device */
if (netif_device_present(dev)) { if (netif_device_present(dev))
netif_stop_queue(dev); netif_stop_queue(dev);
}
/* disable the interrupt */ /* disable the interrupt */
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
spin_unlock_irqrestore(&aup->lock, flags); spin_unlock_irqrestore(&aup->lock, flags);
reset_mac(dev); reset_mac(dev);
kfree(dev);
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
return 0; return 0;
} }
......
...@@ -1407,7 +1407,6 @@ static void __init bmac_probe1(struct device_node *bmac, int is_bmac_plus) ...@@ -1407,7 +1407,6 @@ static void __init bmac_probe1(struct device_node *bmac, int is_bmac_plus)
skb_queue_head_init(bp->queue); skb_queue_head_init(bp->queue);
init_timer(&bp->tx_timeout); init_timer(&bp->tx_timeout);
/* bp->timeout_active = 0; */
ret = request_irq(dev->irq, bmac_misc_intr, 0, "BMAC-misc", dev); ret = request_irq(dev->irq, bmac_misc_intr, 0, "BMAC-misc", dev);
if (ret) { if (ret) {
......
#
# Makefile for the Ethernet Bonding driver
#
obj-$(CONFIG_BONDING) += bonding.o
bonding-objs := bond_main.o bond_3ad.o bond_alb.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution in the
* file called LICENSE.
*/
#ifndef __BOND_ALB_H__
#define __BOND_ALB_H__
#include <linux/if_ether.h>
struct bonding;
struct slave;
#define BOND_ALB_INFO(bond) ((bond)->alb_info)
#define SLAVE_TLB_INFO(slave) ((slave)->tlb_info)
struct tlb_client_info {
struct slave *tx_slave; /* A pointer to slave used for transmiting
* packets to a Client that the Hash function
* gave this entry index.
*/
u32 tx_bytes; /* Each Client acumulates the BytesTx that
* were tranmitted to it, and after each
* CallBack the LoadHistory is devided
* by the balance interval
*/
u32 load_history; /* This field contains the amount of Bytes
* that were transmitted to this client by
* the server on the previous balance
* interval in Bps.
*/
u32 next; /* The next Hash table entry index, assigned
* to use the same adapter for transmit.
*/
u32 prev; /* The previous Hash table entry index,
* assigned to use the same
*/
};
/* -------------------------------------------------------------------------
* struct rlb_client_info contains all info related to a specific rx client
* connection. This is the Clients Hash Table entry struct
* -------------------------------------------------------------------------
*/
struct rlb_client_info {
u32 ip_src; /* the server IP address */
u32 ip_dst; /* the client IP address */
u8 mac_dst[ETH_ALEN]; /* the client MAC address */
u32 next; /* The next Hash table entry index */
u32 prev; /* The previous Hash table entry index */
u8 assigned; /* checking whether this entry is assigned */
u8 ntt; /* flag - need to transmit client info */
struct slave *slave; /* the slave assigned to this client */
};
struct tlb_slave_info {
u32 head; /* Index to the head of the bi-directional clients
* hash table entries list. The entries in the list
* are the entries that were assigned to use this
* slave for transmit.
*/
u32 load; /* Each slave sums the loadHistory of all clients
* assigned to it
*/
};
struct alb_bond_info {
struct timer_list alb_timer;
struct tlb_client_info *tx_hashtbl; /* Dynamically allocated */
spinlock_t tx_hashtbl_lock;
u32 unbalanced_load;
int tx_rebalance_counter;
int lp_counter;
/* -------- rlb parameters -------- */
int rlb_enabled;
struct packet_type rlb_pkt_type;
struct rlb_client_info *rx_hashtbl; /* Receive hash table */
spinlock_t rx_hashtbl_lock;
u32 rx_hashtbl_head;
u8 rx_ntt; /* flag - need to transmit
* to all rx clients
*/
struct slave *next_rx_slave;/* next slave to be assigned
* to a new rx client for
*/
u32 rlb_interval_counter;
u8 primary_is_promisc; /* boolean */
u32 rlb_promisc_timeout_counter;/* counts primary
* promiscuity time
*/
u32 rlb_update_delay_counter;
u32 rlb_update_retry_counter;/* counter of retries
* of client update
*/
u8 rlb_rebalance; /* flag - indicates that the
* rx traffic should be
* rebalanced
*/
};
int bond_alb_initialize(struct bonding *bond, int rlb_enabled);
void bond_alb_deinitialize(struct bonding *bond);
int bond_alb_init_slave(struct bonding *bond, struct slave *slave);
void bond_alb_deinit_slave(struct bonding *bond, struct slave *slave);
void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char link);
void bond_alb_assign_current_slave(struct bonding *bond, struct slave *new_slave);
int bond_alb_xmit(struct sk_buff *skb, struct net_device *dev);
void bond_alb_monitor(struct bonding *bond);
#endif /* __BOND_ALB_H__ */
This diff is collapsed.
...@@ -385,11 +385,11 @@ ...@@ -385,11 +385,11 @@
#define A_CNF_10B_T 0x0001 #define A_CNF_10B_T 0x0001
#define A_CNF_AUI 0x0002 #define A_CNF_AUI 0x0002
#define A_CNF_10B_2 0x0004 #define A_CNF_10B_2 0x0004
#define A_CNF_MEDIA_TYPE 0x0060 #define A_CNF_MEDIA_TYPE 0x0070
#define A_CNF_MEDIA_AUTO 0x0000 #define A_CNF_MEDIA_AUTO 0x0070
#define A_CNF_MEDIA_10B_T 0x0020 #define A_CNF_MEDIA_10B_T 0x0020
#define A_CNF_MEDIA_AUI 0x0040 #define A_CNF_MEDIA_AUI 0x0040
#define A_CNF_MEDIA_10B_2 0x0060 #define A_CNF_MEDIA_10B_2 0x0010
#define A_CNF_DC_DC_POLARITY 0x0080 #define A_CNF_DC_DC_POLARITY 0x0080
#define A_CNF_NO_AUTO_POLARITY 0x2000 #define A_CNF_NO_AUTO_POLARITY 0x2000
#define A_CNF_LOW_RX_SQUELCH 0x4000 #define A_CNF_LOW_RX_SQUELCH 0x4000
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment