Loading drivers/net/bonding/bond_main.c +11 −21 Original line number Diff line number Diff line Loading @@ -1604,35 +1604,27 @@ static int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_ (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) /* * Compute the features available to the bonding device by * intersection of all of the slave devices' BOND_INTERSECT_FEATURES. * Call this after attaching or detaching a slave to update the * bond's features. * Compute the common dev->feature set available to all slaves. Some * feature bits are managed elsewhere, so preserve feature bits set on * master device that are not part of the examined set. */ static int bond_compute_features(struct bonding *bond) { int i; unsigned long features = BOND_INTERSECT_FEATURES; struct slave *slave; struct net_device *bond_dev = bond->dev; int features = bond->bond_features; int i; bond_for_each_slave(bond, slave, i) { struct net_device * slave_dev = slave->dev; if (i == 0) { features |= BOND_INTERSECT_FEATURES; } features &= ~(~slave_dev->features & BOND_INTERSECT_FEATURES); } bond_for_each_slave(bond, slave, i) features &= (slave->dev->features & BOND_INTERSECT_FEATURES); /* turn off NETIF_F_SG if we need a csum and h/w can't do it */ if ((features & NETIF_F_SG) && !(features & (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM))) { NETIF_F_HW_CSUM))) features &= ~NETIF_F_SG; } features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES); bond_dev->features = features; return 0; Loading Loading @@ -4561,8 +4553,6 @@ static int __init bond_init(struct net_device *bond_dev, struct bond_params *par NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER); bond->bond_features = bond_dev->features; #ifdef CONFIG_PROC_FS bond_create_proc_entry(bond); #endif Loading drivers/net/bonding/bonding.h +2 −5 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ #include "bond_3ad.h" #include "bond_alb.h" #define DRV_VERSION "2.6.4" #define DRV_RELDATE "September 26, 2005" #define DRV_VERSION "2.6.5" #define DRV_RELDATE "November 4, 2005" #define DRV_NAME "bonding" #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" Loading Loading @@ -211,9 +211,6 @@ struct bonding { struct bond_params params; struct list_head vlan_list; struct vlan_group *vlgrp; /* the features the bonding device supports, independently * of any slaves */ int bond_features; }; /** Loading drivers/net/e100.c +3 −3 Original line number Diff line number Diff line Loading @@ -1478,7 +1478,7 @@ static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) if(pci_dma_mapping_error(rx->dma_addr)) { dev_kfree_skb_any(rx->skb); rx->skb = 0; rx->skb = NULL; rx->dma_addr = 0; return -ENOMEM; } Loading Loading @@ -1764,7 +1764,7 @@ static int e100_up(struct nic *nic) if((err = e100_hw_init(nic))) goto err_clean_cbs; e100_set_multicast_list(nic->netdev); e100_start_receiver(nic, 0); e100_start_receiver(nic, NULL); mod_timer(&nic->watchdog, jiffies); if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, nic->netdev->name, nic->netdev))) Loading Loading @@ -1844,7 +1844,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, BMCR_LOOPBACK); e100_start_receiver(nic, 0); e100_start_receiver(nic, NULL); if(!(skb = dev_alloc_skb(ETH_DATA_LEN))) { err = -ENOMEM; Loading drivers/net/ns83820.c +2 −11 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ #include <linux/init.h> #include <linux/ip.h> /* for iph */ #include <linux/in.h> /* for IPPROTO_... */ #include <linux/eeprom.h> #include <linux/compiler.h> #include <linux/prefetch.h> #include <linux/ethtool.h> Loading Loading @@ -445,7 +444,6 @@ struct ns83820 { u32 MEAR_cache; u32 IMR_cache; struct eeprom ee; unsigned linkstate; Loading Loading @@ -1558,15 +1556,13 @@ static void ns83820_getmac(struct ns83820 *dev, u8 *mac) unsigned i; for (i=0; i<3; i++) { u32 data; #if 0 /* I've left this in as an example of how to use eeprom.h */ data = eeprom_readw(&dev->ee, 0xa + 2 - i); #else /* Read from the perfect match memory: this is loaded by * the chip from the EEPROM via the EELOAD self test. */ writel(i*2, dev->base + RFCR); data = readl(dev->base + RFDR); #endif *mac++ = data; *mac++ = data >> 8; } Loading Loading @@ -1851,8 +1847,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ spin_lock_init(&dev->misc_lock); dev->pci_dev = pci_dev; dev->ee.cache = &dev->MEAR_cache; dev->ee.lock = &dev->misc_lock; SET_MODULE_OWNER(ndev); SET_NETDEV_DEV(ndev, &pci_dev->dev); Loading Loading @@ -1887,9 +1881,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ dev->IMR_cache = 0; setup_ee_mem_bitbanger(&dev->ee, dev->base + MEAR, 3, 2, 1, 0, 0); err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, DRV_NAME, ndev); if (err) { Loading drivers/net/s2io.c +23 −20 Original line number Diff line number Diff line Loading @@ -1532,7 +1532,7 @@ static int init_nic(struct s2io_nic *nic) #define LINK_UP_DOWN_INTERRUPT 1 #define MAC_RMAC_ERR_TIMER 2 int s2io_link_fault_indication(nic_t *nic) static int s2io_link_fault_indication(nic_t *nic) { if (nic->intr_type != INTA) return MAC_RMAC_ERR_TIMER; Loading Loading @@ -1864,7 +1864,7 @@ static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag) * */ void fix_mac_address(nic_t * sp) static void fix_mac_address(nic_t * sp) { XENA_dev_config_t __iomem *bar0 = sp->bar0; u64 val64; Loading Loading @@ -2160,7 +2160,7 @@ int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb) * SUCCESS on success or an appropriate -ve value on failure. */ int fill_rx_buffers(struct s2io_nic *nic, int ring_no) static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) { struct net_device *dev = nic->dev; struct sk_buff *skb; Loading Loading @@ -2831,7 +2831,7 @@ static void alarm_intr_handler(struct s2io_nic *nic) * SUCCESS on success and FAILURE on failure. */ int wait_for_cmd_complete(nic_t * sp) static int wait_for_cmd_complete(nic_t * sp) { XENA_dev_config_t __iomem *bar0 = sp->bar0; int ret = FAILURE, cnt = 0; Loading Loading @@ -3077,7 +3077,7 @@ int s2io_set_swapper(nic_t * sp) return SUCCESS; } int wait_for_msix_trans(nic_t *nic, int i) static int wait_for_msix_trans(nic_t *nic, int i) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; u64 val64; Loading Loading @@ -3116,7 +3116,7 @@ void restore_xmsi_data(nic_t *nic) } } void store_xmsi_data(nic_t *nic) static void store_xmsi_data(nic_t *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; u64 val64, addr, data; Loading Loading @@ -3288,7 +3288,7 @@ int s2io_enable_msi_x(nic_t *nic) * file on failure. */ int s2io_open(struct net_device *dev) static int s2io_open(struct net_device *dev) { nic_t *sp = dev->priv; int err = 0; Loading Loading @@ -3418,7 +3418,7 @@ failed\n", dev->name, i); * file on failure. */ int s2io_close(struct net_device *dev) static int s2io_close(struct net_device *dev) { nic_t *sp = dev->priv; int i; Loading Loading @@ -3467,7 +3467,7 @@ int s2io_close(struct net_device *dev) * 0 on success & 1 on failure. */ int s2io_xmit(struct sk_buff *skb, struct net_device *dev) static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp = dev->priv; u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off; Loading Loading @@ -3913,7 +3913,7 @@ static void s2io_updt_stats(nic_t *sp) * pointer to the updated net_device_stats structure. */ struct net_device_stats *s2io_get_stats(struct net_device *dev) static struct net_device_stats *s2io_get_stats(struct net_device *dev) { nic_t *sp = dev->priv; mac_info_t *mac_control; Loading Loading @@ -5106,19 +5106,20 @@ static void s2io_get_ethtool_stats(struct net_device *dev, tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs; } int s2io_ethtool_get_regs_len(struct net_device *dev) static int s2io_ethtool_get_regs_len(struct net_device *dev) { return (XENA_REG_SPACE); } u32 s2io_ethtool_get_rx_csum(struct net_device * dev) static u32 s2io_ethtool_get_rx_csum(struct net_device * dev) { nic_t *sp = dev->priv; return (sp->rx_csum); } int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) static int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) { nic_t *sp = dev->priv; Loading @@ -5129,16 +5130,18 @@ int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) return 0; } int s2io_get_eeprom_len(struct net_device *dev) static int s2io_get_eeprom_len(struct net_device *dev) { return (XENA_EEPROM_SPACE); } int s2io_ethtool_self_test_count(struct net_device *dev) static int s2io_ethtool_self_test_count(struct net_device *dev) { return (S2IO_TEST_LEN); } void s2io_ethtool_get_strings(struct net_device *dev, static void s2io_ethtool_get_strings(struct net_device *dev, u32 stringset, u8 * data) { switch (stringset) { Loading @@ -5155,7 +5158,7 @@ static int s2io_ethtool_get_stats_count(struct net_device *dev) return (S2IO_STAT_LEN); } int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) { if (data) dev->features |= NETIF_F_IP_CSUM; Loading Loading @@ -5208,7 +5211,7 @@ static struct ethtool_ops netdev_ethtool_ops = { * function always return EOPNOTSUPPORTED */ int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) static int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { return -EOPNOTSUPP; } Loading @@ -5224,7 +5227,7 @@ int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) * file on failure. */ int s2io_change_mtu(struct net_device *dev, int new_mtu) static int s2io_change_mtu(struct net_device *dev, int new_mtu) { nic_t *sp = dev->priv; Loading Loading
drivers/net/bonding/bond_main.c +11 −21 Original line number Diff line number Diff line Loading @@ -1604,35 +1604,27 @@ static int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_ (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) /* * Compute the features available to the bonding device by * intersection of all of the slave devices' BOND_INTERSECT_FEATURES. * Call this after attaching or detaching a slave to update the * bond's features. * Compute the common dev->feature set available to all slaves. Some * feature bits are managed elsewhere, so preserve feature bits set on * master device that are not part of the examined set. */ static int bond_compute_features(struct bonding *bond) { int i; unsigned long features = BOND_INTERSECT_FEATURES; struct slave *slave; struct net_device *bond_dev = bond->dev; int features = bond->bond_features; int i; bond_for_each_slave(bond, slave, i) { struct net_device * slave_dev = slave->dev; if (i == 0) { features |= BOND_INTERSECT_FEATURES; } features &= ~(~slave_dev->features & BOND_INTERSECT_FEATURES); } bond_for_each_slave(bond, slave, i) features &= (slave->dev->features & BOND_INTERSECT_FEATURES); /* turn off NETIF_F_SG if we need a csum and h/w can't do it */ if ((features & NETIF_F_SG) && !(features & (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM))) { NETIF_F_HW_CSUM))) features &= ~NETIF_F_SG; } features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES); bond_dev->features = features; return 0; Loading Loading @@ -4561,8 +4553,6 @@ static int __init bond_init(struct net_device *bond_dev, struct bond_params *par NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER); bond->bond_features = bond_dev->features; #ifdef CONFIG_PROC_FS bond_create_proc_entry(bond); #endif Loading
drivers/net/bonding/bonding.h +2 −5 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ #include "bond_3ad.h" #include "bond_alb.h" #define DRV_VERSION "2.6.4" #define DRV_RELDATE "September 26, 2005" #define DRV_VERSION "2.6.5" #define DRV_RELDATE "November 4, 2005" #define DRV_NAME "bonding" #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" Loading Loading @@ -211,9 +211,6 @@ struct bonding { struct bond_params params; struct list_head vlan_list; struct vlan_group *vlgrp; /* the features the bonding device supports, independently * of any slaves */ int bond_features; }; /** Loading
drivers/net/e100.c +3 −3 Original line number Diff line number Diff line Loading @@ -1478,7 +1478,7 @@ static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) if(pci_dma_mapping_error(rx->dma_addr)) { dev_kfree_skb_any(rx->skb); rx->skb = 0; rx->skb = NULL; rx->dma_addr = 0; return -ENOMEM; } Loading Loading @@ -1764,7 +1764,7 @@ static int e100_up(struct nic *nic) if((err = e100_hw_init(nic))) goto err_clean_cbs; e100_set_multicast_list(nic->netdev); e100_start_receiver(nic, 0); e100_start_receiver(nic, NULL); mod_timer(&nic->watchdog, jiffies); if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, nic->netdev->name, nic->netdev))) Loading Loading @@ -1844,7 +1844,7 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, BMCR_LOOPBACK); e100_start_receiver(nic, 0); e100_start_receiver(nic, NULL); if(!(skb = dev_alloc_skb(ETH_DATA_LEN))) { err = -ENOMEM; Loading
drivers/net/ns83820.c +2 −11 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ #include <linux/init.h> #include <linux/ip.h> /* for iph */ #include <linux/in.h> /* for IPPROTO_... */ #include <linux/eeprom.h> #include <linux/compiler.h> #include <linux/prefetch.h> #include <linux/ethtool.h> Loading Loading @@ -445,7 +444,6 @@ struct ns83820 { u32 MEAR_cache; u32 IMR_cache; struct eeprom ee; unsigned linkstate; Loading Loading @@ -1558,15 +1556,13 @@ static void ns83820_getmac(struct ns83820 *dev, u8 *mac) unsigned i; for (i=0; i<3; i++) { u32 data; #if 0 /* I've left this in as an example of how to use eeprom.h */ data = eeprom_readw(&dev->ee, 0xa + 2 - i); #else /* Read from the perfect match memory: this is loaded by * the chip from the EEPROM via the EELOAD self test. */ writel(i*2, dev->base + RFCR); data = readl(dev->base + RFDR); #endif *mac++ = data; *mac++ = data >> 8; } Loading Loading @@ -1851,8 +1847,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ spin_lock_init(&dev->misc_lock); dev->pci_dev = pci_dev; dev->ee.cache = &dev->MEAR_cache; dev->ee.lock = &dev->misc_lock; SET_MODULE_OWNER(ndev); SET_NETDEV_DEV(ndev, &pci_dev->dev); Loading Loading @@ -1887,9 +1881,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ dev->IMR_cache = 0; setup_ee_mem_bitbanger(&dev->ee, dev->base + MEAR, 3, 2, 1, 0, 0); err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, DRV_NAME, ndev); if (err) { Loading
drivers/net/s2io.c +23 −20 Original line number Diff line number Diff line Loading @@ -1532,7 +1532,7 @@ static int init_nic(struct s2io_nic *nic) #define LINK_UP_DOWN_INTERRUPT 1 #define MAC_RMAC_ERR_TIMER 2 int s2io_link_fault_indication(nic_t *nic) static int s2io_link_fault_indication(nic_t *nic) { if (nic->intr_type != INTA) return MAC_RMAC_ERR_TIMER; Loading Loading @@ -1864,7 +1864,7 @@ static int verify_xena_quiescence(nic_t *sp, u64 val64, int flag) * */ void fix_mac_address(nic_t * sp) static void fix_mac_address(nic_t * sp) { XENA_dev_config_t __iomem *bar0 = sp->bar0; u64 val64; Loading Loading @@ -2160,7 +2160,7 @@ int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb) * SUCCESS on success or an appropriate -ve value on failure. */ int fill_rx_buffers(struct s2io_nic *nic, int ring_no) static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) { struct net_device *dev = nic->dev; struct sk_buff *skb; Loading Loading @@ -2831,7 +2831,7 @@ static void alarm_intr_handler(struct s2io_nic *nic) * SUCCESS on success and FAILURE on failure. */ int wait_for_cmd_complete(nic_t * sp) static int wait_for_cmd_complete(nic_t * sp) { XENA_dev_config_t __iomem *bar0 = sp->bar0; int ret = FAILURE, cnt = 0; Loading Loading @@ -3077,7 +3077,7 @@ int s2io_set_swapper(nic_t * sp) return SUCCESS; } int wait_for_msix_trans(nic_t *nic, int i) static int wait_for_msix_trans(nic_t *nic, int i) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; u64 val64; Loading Loading @@ -3116,7 +3116,7 @@ void restore_xmsi_data(nic_t *nic) } } void store_xmsi_data(nic_t *nic) static void store_xmsi_data(nic_t *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; u64 val64, addr, data; Loading Loading @@ -3288,7 +3288,7 @@ int s2io_enable_msi_x(nic_t *nic) * file on failure. */ int s2io_open(struct net_device *dev) static int s2io_open(struct net_device *dev) { nic_t *sp = dev->priv; int err = 0; Loading Loading @@ -3418,7 +3418,7 @@ failed\n", dev->name, i); * file on failure. */ int s2io_close(struct net_device *dev) static int s2io_close(struct net_device *dev) { nic_t *sp = dev->priv; int i; Loading Loading @@ -3467,7 +3467,7 @@ int s2io_close(struct net_device *dev) * 0 on success & 1 on failure. */ int s2io_xmit(struct sk_buff *skb, struct net_device *dev) static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp = dev->priv; u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off; Loading Loading @@ -3913,7 +3913,7 @@ static void s2io_updt_stats(nic_t *sp) * pointer to the updated net_device_stats structure. */ struct net_device_stats *s2io_get_stats(struct net_device *dev) static struct net_device_stats *s2io_get_stats(struct net_device *dev) { nic_t *sp = dev->priv; mac_info_t *mac_control; Loading Loading @@ -5106,19 +5106,20 @@ static void s2io_get_ethtool_stats(struct net_device *dev, tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs; } int s2io_ethtool_get_regs_len(struct net_device *dev) static int s2io_ethtool_get_regs_len(struct net_device *dev) { return (XENA_REG_SPACE); } u32 s2io_ethtool_get_rx_csum(struct net_device * dev) static u32 s2io_ethtool_get_rx_csum(struct net_device * dev) { nic_t *sp = dev->priv; return (sp->rx_csum); } int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) static int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) { nic_t *sp = dev->priv; Loading @@ -5129,16 +5130,18 @@ int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data) return 0; } int s2io_get_eeprom_len(struct net_device *dev) static int s2io_get_eeprom_len(struct net_device *dev) { return (XENA_EEPROM_SPACE); } int s2io_ethtool_self_test_count(struct net_device *dev) static int s2io_ethtool_self_test_count(struct net_device *dev) { return (S2IO_TEST_LEN); } void s2io_ethtool_get_strings(struct net_device *dev, static void s2io_ethtool_get_strings(struct net_device *dev, u32 stringset, u8 * data) { switch (stringset) { Loading @@ -5155,7 +5158,7 @@ static int s2io_ethtool_get_stats_count(struct net_device *dev) return (S2IO_STAT_LEN); } int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) { if (data) dev->features |= NETIF_F_IP_CSUM; Loading Loading @@ -5208,7 +5211,7 @@ static struct ethtool_ops netdev_ethtool_ops = { * function always return EOPNOTSUPPORTED */ int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) static int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { return -EOPNOTSUPP; } Loading @@ -5224,7 +5227,7 @@ int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) * file on failure. */ int s2io_change_mtu(struct net_device *dev, int new_mtu) static int s2io_change_mtu(struct net_device *dev, int new_mtu) { nic_t *sp = dev->priv; Loading