提交 c1a13ff5 编写于 作者: L Linus Torvalds

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  NET: add MAINTAINERS entry for ucc_geth driver
  myri10ge: report link up/down in standard ethtool way
  NetXen: Removal of extra free_irq call
  Update tulip maintainer email address
  smc91x: sh solution engine fixes.
  e1000: disable polling before registering netdevice
  network drivers: eliminate unneeded kill_vid code
  atl1: eliminate unneeded kill_vid code
  8139cp: fix VLAN unregistration
  sky2: Fix VLAN unregistration
  VLAN: kill_vid is only useful for VLAN filtering devices
  qla3xxx: device doesnt do hardware checksumming.
...@@ -1487,6 +1487,13 @@ L: linux-usb-devel@lists.sourceforge.net ...@@ -1487,6 +1487,13 @@ L: linux-usb-devel@lists.sourceforge.net
L: linuxppc-embedded@ozlabs.org L: linuxppc-embedded@ozlabs.org
S: Maintained S: Maintained
FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
P: Li Yang
M: leoli@freescale.com
L: netdev@vger.kernel.org
L: linuxppc-embedded@ozlabs.org
S: Maintained
FILE LOCKING (flock() and fcntl()/lockf()) FILE LOCKING (flock() and fcntl()/lockf())
P: Matthew Wilcox P: Matthew Wilcox
M: matthew@wil.cx M: matthew@wil.cx
...@@ -3545,7 +3552,7 @@ S: Maintained ...@@ -3545,7 +3552,7 @@ S: Maintained
TULIP NETWORK DRIVER TULIP NETWORK DRIVER
P: Valerie Henson P: Valerie Henson
M: val_henson@linux.intel.com M: val@nmt.edu
L: tulip-users@lists.sourceforge.net L: tulip-users@lists.sourceforge.net
W: http://sourceforge.net/projects/tulip/ W: http://sourceforge.net/projects/tulip/
S: Maintained S: Maintained
......
...@@ -435,20 +435,12 @@ static void cp_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) ...@@ -435,20 +435,12 @@ static void cp_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
spin_lock_irqsave(&cp->lock, flags); spin_lock_irqsave(&cp->lock, flags);
cp->vlgrp = grp; cp->vlgrp = grp;
cp->cpcmd |= RxVlanOn; if (grp)
cpw16(CpCmd, cp->cpcmd); cp->cpcmd |= RxVlanOn;
spin_unlock_irqrestore(&cp->lock, flags); else
} cp->cpcmd &= ~RxVlanOn;
static void cp_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct cp_private *cp = netdev_priv(dev);
unsigned long flags;
spin_lock_irqsave(&cp->lock, flags);
cp->cpcmd &= ~RxVlanOn;
cpw16(CpCmd, cp->cpcmd); cpw16(CpCmd, cp->cpcmd);
vlan_group_set_device(cp->vlgrp, vid, NULL);
spin_unlock_irqrestore(&cp->lock, flags); spin_unlock_irqrestore(&cp->lock, flags);
} }
#endif /* CP_VLAN_TAG_USED */ #endif /* CP_VLAN_TAG_USED */
...@@ -1944,7 +1936,6 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1944,7 +1936,6 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
#if CP_VLAN_TAG_USED #if CP_VLAN_TAG_USED
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = cp_vlan_rx_register; dev->vlan_rx_register = cp_vlan_rx_register;
dev->vlan_rx_kill_vid = cp_vlan_rx_kill_vid;
#endif #endif
if (pci_using_dac) if (pci_using_dac)
......
...@@ -480,12 +480,10 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev, ...@@ -480,12 +480,10 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev,
#if ACENIC_DO_VLAN #if ACENIC_DO_VLAN
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = ace_vlan_rx_register; dev->vlan_rx_register = ace_vlan_rx_register;
dev->vlan_rx_kill_vid = ace_vlan_rx_kill_vid;
#endif #endif
if (1) {
dev->tx_timeout = &ace_watchdog; dev->tx_timeout = &ace_watchdog;
dev->watchdog_timeo = 5*HZ; dev->watchdog_timeo = 5*HZ;
}
dev->open = &ace_open; dev->open = &ace_open;
dev->stop = &ace_close; dev->stop = &ace_close;
...@@ -2283,19 +2281,6 @@ static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) ...@@ -2283,19 +2281,6 @@ static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
ace_unmask_irq(dev); ace_unmask_irq(dev);
local_irq_restore(flags); local_irq_restore(flags);
} }
static void ace_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct ace_private *ap = netdev_priv(dev);
unsigned long flags;
local_irq_save(flags);
ace_mask_irq(dev);
vlan_group_set_device(ap->vlgrp, vid, NULL);
ace_unmask_irq(dev);
local_irq_restore(flags);
}
#endif /* ACENIC_DO_VLAN */ #endif /* ACENIC_DO_VLAN */
......
...@@ -787,7 +787,6 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev); ...@@ -787,7 +787,6 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev);
static int read_eeprom_byte(struct net_device *dev, unsigned long offset); static int read_eeprom_byte(struct net_device *dev, unsigned long offset);
#if ACENIC_DO_VLAN #if ACENIC_DO_VLAN
static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp); static void ace_vlan_rx_register(struct net_device *dev, struct vlan_group *grp);
static void ace_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid);
#endif #endif
#endif /* _ACENIC_H_ */ #endif /* _ACENIC_H_ */
...@@ -1728,15 +1728,8 @@ static void amd8111e_vlan_rx_register(struct net_device *dev, struct vlan_group ...@@ -1728,15 +1728,8 @@ static void amd8111e_vlan_rx_register(struct net_device *dev, struct vlan_group
lp->vlgrp = grp; lp->vlgrp = grp;
spin_unlock_irq(&lp->lock); spin_unlock_irq(&lp->lock);
} }
static void amd8111e_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct amd8111e_priv *lp = netdev_priv(dev);
spin_lock_irq(&lp->lock);
vlan_group_set_device(lp->vlgrp, vid, NULL);
spin_unlock_irq(&lp->lock);
}
#endif #endif
static int amd8111e_enable_magicpkt(struct amd8111e_priv* lp) static int amd8111e_enable_magicpkt(struct amd8111e_priv* lp)
{ {
writel( VAL1|MPPLBA, lp->mmio + CMD3); writel( VAL1|MPPLBA, lp->mmio + CMD3);
...@@ -1996,7 +1989,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, ...@@ -1996,7 +1989,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
#if AMD8111E_VLAN_TAG_USED #if AMD8111E_VLAN_TAG_USED
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX ; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX ;
dev->vlan_rx_register =amd8111e_vlan_rx_register; dev->vlan_rx_register =amd8111e_vlan_rx_register;
dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid;
#endif #endif
lp = netdev_priv(dev); lp = netdev_priv(dev);
...@@ -2049,7 +2041,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, ...@@ -2049,7 +2041,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
#if AMD8111E_VLAN_TAG_USED #if AMD8111E_VLAN_TAG_USED
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register =amd8111e_vlan_rx_register; dev->vlan_rx_register =amd8111e_vlan_rx_register;
dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid;
#endif #endif
/* Probe the external PHY */ /* Probe the external PHY */
amd8111e_probe_ext_phy(dev); amd8111e_probe_ext_phy(dev);
......
...@@ -1229,39 +1229,9 @@ static void atl1_vlan_rx_register(struct net_device *netdev, ...@@ -1229,39 +1229,9 @@ static void atl1_vlan_rx_register(struct net_device *netdev,
spin_unlock_irqrestore(&adapter->lock, flags); spin_unlock_irqrestore(&adapter->lock, flags);
} }
/* FIXME: justify or remove -- CHS */
static void atl1_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
{
/* We don't do Vlan filtering */
return;
}
/* FIXME: this looks wrong too -- CHS */
static void atl1_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
{
struct atl1_adapter *adapter = netdev_priv(netdev);
unsigned long flags;
spin_lock_irqsave(&adapter->lock, flags);
/* atl1_irq_disable(adapter); */
vlan_group_set_device(adapter->vlgrp, vid, NULL);
/* atl1_irq_enable(adapter); */
spin_unlock_irqrestore(&adapter->lock, flags);
/* We don't do Vlan filtering */
return;
}
static void atl1_restore_vlan(struct atl1_adapter *adapter) static void atl1_restore_vlan(struct atl1_adapter *adapter)
{ {
atl1_vlan_rx_register(adapter->netdev, adapter->vlgrp); atl1_vlan_rx_register(adapter->netdev, adapter->vlgrp);
if (adapter->vlgrp) {
u16 vid;
for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) {
if (!vlan_group_get_device(adapter->vlgrp, vid))
continue;
atl1_vlan_rx_add_vid(adapter->netdev, vid);
}
}
} }
static u16 tpd_avail(struct atl1_tpd_ring *tpd_ring) static u16 tpd_avail(struct atl1_tpd_ring *tpd_ring)
...@@ -2203,8 +2173,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev, ...@@ -2203,8 +2173,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
netdev->poll_controller = atl1_poll_controller; netdev->poll_controller = atl1_poll_controller;
#endif #endif
netdev->vlan_rx_register = atl1_vlan_rx_register; netdev->vlan_rx_register = atl1_vlan_rx_register;
netdev->vlan_rx_add_vid = atl1_vlan_rx_add_vid;
netdev->vlan_rx_kill_vid = atl1_vlan_rx_kill_vid;
netdev->ethtool_ops = &atl1_ethtool_ops; netdev->ethtool_ops = &atl1_ethtool_ops;
adapter->bd_number = cards_found; adapter->bd_number = cards_found;
adapter->pci_using_64 = pci_using_64; adapter->pci_using_64 = pci_using_64;
......
...@@ -4786,19 +4786,6 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) ...@@ -4786,19 +4786,6 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
bnx2_netif_start(bp); bnx2_netif_start(bp);
} }
/* Called with rtnl_lock */
static void
bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid)
{
struct bnx2 *bp = netdev_priv(dev);
bnx2_netif_stop(bp);
vlan_group_set_device(bp->vlgrp, vid, NULL);
bnx2_set_rx_mode(dev);
bnx2_netif_start(bp);
}
#endif #endif
/* Called with netif_tx_lock. /* Called with netif_tx_lock.
...@@ -6453,7 +6440,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -6453,7 +6440,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
#ifdef BCM_VLAN #ifdef BCM_VLAN
dev->vlan_rx_register = bnx2_vlan_rx_register; dev->vlan_rx_register = bnx2_vlan_rx_register;
dev->vlan_rx_kill_vid = bnx2_vlan_rx_kill_vid;
#endif #endif
dev->poll = bnx2_poll; dev->poll = bnx2_poll;
dev->ethtool_ops = &bnx2_ethtool_ops; dev->ethtool_ops = &bnx2_ethtool_ops;
......
...@@ -883,15 +883,6 @@ static void vlan_rx_register(struct net_device *dev, ...@@ -883,15 +883,6 @@ static void vlan_rx_register(struct net_device *dev,
t1_set_vlan_accel(adapter, grp != NULL); t1_set_vlan_accel(adapter, grp != NULL);
spin_unlock_irq(&adapter->async_lock); spin_unlock_irq(&adapter->async_lock);
} }
static void vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct adapter *adapter = dev->priv;
spin_lock_irq(&adapter->async_lock);
vlan_group_set_device(adapter->vlan_grp, vid, NULL);
spin_unlock_irq(&adapter->async_lock);
}
#endif #endif
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
...@@ -1099,7 +1090,6 @@ static int __devinit init_one(struct pci_dev *pdev, ...@@ -1099,7 +1090,6 @@ static int __devinit init_one(struct pci_dev *pdev,
netdev->features |= netdev->features |=
NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
netdev->vlan_rx_register = vlan_rx_register; netdev->vlan_rx_register = vlan_rx_register;
netdev->vlan_rx_kill_vid = vlan_rx_kill_vid;
#endif #endif
/* T204: disable TSO */ /* T204: disable TSO */
......
...@@ -2067,11 +2067,6 @@ static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp) ...@@ -2067,11 +2067,6 @@ static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
t3_synchronize_rx(adapter, pi); t3_synchronize_rx(adapter, pi);
} }
static void vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
/* nothing */
}
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
static void cxgb_netpoll(struct net_device *dev) static void cxgb_netpoll(struct net_device *dev)
{ {
...@@ -2409,7 +2404,6 @@ static int __devinit init_one(struct pci_dev *pdev, ...@@ -2409,7 +2404,6 @@ static int __devinit init_one(struct pci_dev *pdev,
netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; netdev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
netdev->vlan_rx_register = vlan_rx_register; netdev->vlan_rx_register = vlan_rx_register;
netdev->vlan_rx_kill_vid = vlan_rx_kill_vid;
netdev->open = cxgb_open; netdev->open = cxgb_open;
netdev->stop = cxgb_close; netdev->stop = cxgb_close;
......
...@@ -1142,13 +1142,16 @@ e1000_probe(struct pci_dev *pdev, ...@@ -1142,13 +1142,16 @@ e1000_probe(struct pci_dev *pdev,
!e1000_check_mng_mode(&adapter->hw)) !e1000_check_mng_mode(&adapter->hw))
e1000_get_hw_control(adapter); e1000_get_hw_control(adapter);
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev)))
goto err_register;
/* tell the stack to leave us alone until e1000_open() is called */ /* tell the stack to leave us alone until e1000_open() is called */
netif_carrier_off(netdev); netif_carrier_off(netdev);
netif_stop_queue(netdev); netif_stop_queue(netdev);
#ifdef CONFIG_E1000_NAPI
netif_poll_disable(netdev);
#endif
strcpy(netdev->name, "eth%d");
if ((err = register_netdev(netdev)))
goto err_register;
DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n");
......
...@@ -4605,12 +4605,7 @@ static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) ...@@ -4605,12 +4605,7 @@ static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
writel(np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); writel(np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl);
spin_unlock_irq(&np->lock); spin_unlock_irq(&np->lock);
}; }
static void nv_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
/* nothing to do */
};
/* The mgmt unit and driver use a semaphore to access the phy during init */ /* The mgmt unit and driver use a semaphore to access the phy during init */
static int nv_mgmt_acquire_sema(struct net_device *dev) static int nv_mgmt_acquire_sema(struct net_device *dev)
...@@ -4956,7 +4951,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i ...@@ -4956,7 +4951,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
np->vlanctl_bits = NVREG_VLANCONTROL_ENABLE; np->vlanctl_bits = NVREG_VLANCONTROL_ENABLE;
dev->features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX; dev->features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX;
dev->vlan_rx_register = nv_vlan_rx_register; dev->vlan_rx_register = nv_vlan_rx_register;
dev->vlan_rx_kill_vid = nv_vlan_rx_kill_vid;
} }
np->msi_flags = 0; np->msi_flags = 0;
......
...@@ -140,7 +140,6 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit); ...@@ -140,7 +140,6 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit);
static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length); static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int length);
static void gfar_vlan_rx_register(struct net_device *netdev, static void gfar_vlan_rx_register(struct net_device *netdev,
struct vlan_group *grp); struct vlan_group *grp);
static void gfar_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
void gfar_halt(struct net_device *dev); void gfar_halt(struct net_device *dev);
void gfar_start(struct net_device *dev); void gfar_start(struct net_device *dev);
static void gfar_clear_exact_match(struct net_device *dev); static void gfar_clear_exact_match(struct net_device *dev);
...@@ -284,7 +283,6 @@ static int gfar_probe(struct platform_device *pdev) ...@@ -284,7 +283,6 @@ static int gfar_probe(struct platform_device *pdev)
if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_VLAN) { if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_VLAN) {
dev->vlan_rx_register = gfar_vlan_rx_register; dev->vlan_rx_register = gfar_vlan_rx_register;
dev->vlan_rx_kill_vid = gfar_vlan_rx_kill_vid;
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
...@@ -1133,20 +1131,6 @@ static void gfar_vlan_rx_register(struct net_device *dev, ...@@ -1133,20 +1131,6 @@ static void gfar_vlan_rx_register(struct net_device *dev,
spin_unlock_irqrestore(&priv->rxlock, flags); spin_unlock_irqrestore(&priv->rxlock, flags);
} }
static void gfar_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid)
{
struct gfar_private *priv = netdev_priv(dev);
unsigned long flags;
spin_lock_irqsave(&priv->rxlock, flags);
vlan_group_set_device(priv->vlgrp, vid, NULL);
spin_unlock_irqrestore(&priv->rxlock, flags);
}
static int gfar_change_mtu(struct net_device *dev, int new_mtu) static int gfar_change_mtu(struct net_device *dev, int new_mtu)
{ {
int tempsize, tempval; int tempsize, tempval;
......
...@@ -1472,6 +1472,7 @@ static const struct ethtool_ops myri10ge_ethtool_ops = { ...@@ -1472,6 +1472,7 @@ static const struct ethtool_ops myri10ge_ethtool_ops = {
.set_sg = ethtool_op_set_sg, .set_sg = ethtool_op_set_sg,
.get_tso = ethtool_op_get_tso, .get_tso = ethtool_op_get_tso,
.set_tso = ethtool_op_set_tso, .set_tso = ethtool_op_set_tso,
.get_link = ethtool_op_get_link,
.get_strings = myri10ge_get_strings, .get_strings = myri10ge_get_strings,
.get_stats_count = myri10ge_get_stats_count, .get_stats_count = myri10ge_get_stats_count,
.get_ethtool_stats = myri10ge_get_ethtool_stats, .get_ethtool_stats = myri10ge_get_ethtool_stats,
......
...@@ -654,8 +654,6 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) ...@@ -654,8 +654,6 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
if (adapter->portnum == 0) if (adapter->portnum == 0)
netxen_free_adapter_offload(adapter); netxen_free_adapter_offload(adapter);
if (adapter->irq)
free_irq(adapter->irq, adapter);
if(adapter->portnum == 0) { if(adapter->portnum == 0) {
/* leave the hw in the same state as reboot */ /* leave the hw in the same state as reboot */
writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
......
...@@ -506,17 +506,6 @@ static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group ...@@ -506,17 +506,6 @@ static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group
spin_unlock(&dev->tx_lock); spin_unlock(&dev->tx_lock);
spin_unlock_irq(&dev->misc_lock); spin_unlock_irq(&dev->misc_lock);
} }
static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid)
{
struct ns83820 *dev = PRIV(ndev);
spin_lock_irq(&dev->misc_lock);
spin_lock(&dev->tx_lock);
vlan_group_set_device(dev->vlgrp, vid, NULL);
spin_unlock(&dev->tx_lock);
spin_unlock_irq(&dev->misc_lock);
}
#endif #endif
/* Packet Receiver /* Packet Receiver
...@@ -2083,7 +2072,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ ...@@ -2083,7 +2072,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
/* We also support hardware vlan acceleration */ /* We also support hardware vlan acceleration */
ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
ndev->vlan_rx_register = ns83820_vlan_rx_register; ndev->vlan_rx_register = ns83820_vlan_rx_register;
ndev->vlan_rx_kill_vid = ns83820_vlan_rx_kill_vid;
#endif #endif
if (using_dac) { if (using_dac) {
......
...@@ -4044,7 +4044,7 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev, ...@@ -4044,7 +4044,7 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
if (pci_using_dac) if (pci_using_dac)
ndev->features |= NETIF_F_HIGHDMA; ndev->features |= NETIF_F_HIGHDMA;
if (qdev->device_id == QL3032_DEVICE_ID) if (qdev->device_id == QL3032_DEVICE_ID)
ndev->features |= (NETIF_F_HW_CSUM | NETIF_F_SG); ndev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
qdev->mem_map_registers = qdev->mem_map_registers =
ioremap_nocache(pci_resource_start(pdev, 1), ioremap_nocache(pci_resource_start(pdev, 1),
......
...@@ -886,16 +886,6 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, ...@@ -886,16 +886,6 @@ static void rtl8169_vlan_rx_register(struct net_device *dev,
spin_unlock_irqrestore(&tp->lock, flags); spin_unlock_irqrestore(&tp->lock, flags);
} }
static void rtl8169_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct rtl8169_private *tp = netdev_priv(dev);
unsigned long flags;
spin_lock_irqsave(&tp->lock, flags);
vlan_group_set_device(tp->vlgrp, vid, NULL);
spin_unlock_irqrestore(&tp->lock, flags);
}
static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc,
struct sk_buff *skb) struct sk_buff *skb)
{ {
...@@ -1671,7 +1661,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1671,7 +1661,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
#ifdef CONFIG_R8169_VLAN #ifdef CONFIG_R8169_VLAN
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = rtl8169_vlan_rx_register; dev->vlan_rx_register = rtl8169_vlan_rx_register;
dev->vlan_rx_kill_vid = rtl8169_vlan_rx_kill_vid;
#endif #endif
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
......
...@@ -340,17 +340,6 @@ static void s2io_vlan_rx_register(struct net_device *dev, ...@@ -340,17 +340,6 @@ static void s2io_vlan_rx_register(struct net_device *dev,
/* A flag indicating whether 'RX_PA_CFG_STRIP_VLAN_TAG' bit is set or not */ /* A flag indicating whether 'RX_PA_CFG_STRIP_VLAN_TAG' bit is set or not */
static int vlan_strip_flag; static int vlan_strip_flag;
/* Unregister the vlan */
static void s2io_vlan_rx_kill_vid(struct net_device *dev, unsigned long vid)
{
struct s2io_nic *nic = dev->priv;
unsigned long flags;
spin_lock_irqsave(&nic->tx_lock, flags);
vlan_group_set_device(nic->vlgrp, vid, NULL);
spin_unlock_irqrestore(&nic->tx_lock, flags);
}
/* /*
* Constants to be programmed into the Xena's registers, to configure * Constants to be programmed into the Xena's registers, to configure
* the XAUI. * the XAUI.
...@@ -7412,7 +7401,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) ...@@ -7412,7 +7401,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = s2io_vlan_rx_register; dev->vlan_rx_register = s2io_vlan_rx_register;
dev->vlan_rx_kill_vid = (void *)s2io_vlan_rx_kill_vid;
/* /*
* will use eth_mac_addr() for dev->set_mac_address * will use eth_mac_addr() for dev->set_mac_address
......
...@@ -1049,26 +1049,22 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp ...@@ -1049,26 +1049,22 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp
u16 port = sky2->port; u16 port = sky2->port;
netif_tx_lock_bh(dev); netif_tx_lock_bh(dev);
netif_poll_disable(sky2->hw->dev[0]);
sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), RX_VLAN_STRIP_ON);
sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), TX_VLAN_TAG_ON);
sky2->vlgrp = grp; sky2->vlgrp = grp;
if (grp) {
sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T),
RX_VLAN_STRIP_ON);
sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
TX_VLAN_TAG_ON);
} else {
sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T),
RX_VLAN_STRIP_OFF);
sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
TX_VLAN_TAG_OFF);
}
netif_tx_unlock_bh(dev); netif_poll_enable(sky2->hw->dev[0]);
}
static void sky2_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
u16 port = sky2->port;
netif_tx_lock_bh(dev);
sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), RX_VLAN_STRIP_OFF);
sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), TX_VLAN_TAG_OFF);
vlan_group_set_device(sky2->vlgrp, vid, NULL);
netif_tx_unlock_bh(dev); netif_tx_unlock_bh(dev);
} }
#endif #endif
...@@ -3484,7 +3480,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw, ...@@ -3484,7 +3480,6 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
#ifdef SKY2_VLAN_TAG_USED #ifdef SKY2_VLAN_TAG_USED
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = sky2_vlan_rx_register; dev->vlan_rx_register = sky2_vlan_rx_register;
dev->vlan_rx_kill_vid = sky2_vlan_rx_kill_vid;
#endif #endif
/* read the mac address */ /* read the mac address */
......
...@@ -281,17 +281,14 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) ...@@ -281,17 +281,14 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
#elif defined(CONFIG_SUPERH) #elif defined(CONFIG_SUPERH)
#if defined(CONFIG_SH_7780_SOLUTION_ENGINE) || defined(CONFIG_SH_7722_SOLUTION_ENGINE) #ifdef CONFIG_SOLUTION_ENGINE
#define SMC_CAN_USE_8BIT 0 #define SMC_CAN_USE_8BIT 0
#define SMC_CAN_USE_16BIT 1 #define SMC_CAN_USE_16BIT 1
#define SMC_CAN_USE_32BIT 0 #define SMC_CAN_USE_32BIT 0
#define SMC_IO_SHIFT 0 #define SMC_IO_SHIFT 0
#define SMC_NOWAIT 1 #define SMC_NOWAIT 1
#define SMC_inb(a, r) (inw((a) + ((r)&~1)) >> (8*(r%2)))&0xff
#define SMC_inw(a, r) inw((a) + (r)) #define SMC_inw(a, r) inw((a) + (r))
#define SMC_outb(v, a, r) outw(((inw((a)+((r)&~1))*(0xff<<8*(r%2)))) | ((v)<<(8*(r&2)))), (a) + ((r)&~1))
#define SMC_outw(v, a, r) outw(v, (a) + (r)) #define SMC_outw(v, a, r) outw(v, (a) + (r))
#define SMC_insw(a, r, p, l) insw((a) + (r), p, l) #define SMC_insw(a, r, p, l) insw((a) + (r), p, l)
#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) #define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l)
......
...@@ -1190,43 +1190,6 @@ spider_net_poll(struct net_device *netdev, int *budget) ...@@ -1190,43 +1190,6 @@ spider_net_poll(struct net_device *netdev, int *budget)
return 1; return 1;
} }
/**
* spider_net_vlan_rx_reg - initializes VLAN structures in the driver and card
* @netdev: interface device structure
* @grp: vlan_group structure that is registered (NULL on destroying interface)
*/
static void
spider_net_vlan_rx_reg(struct net_device *netdev, struct vlan_group *grp)
{
/* further enhancement... yet to do */
return;
}
/**
* spider_net_vlan_rx_add - adds VLAN id to the card filter
* @netdev: interface device structure
* @vid: VLAN id to add
*/
static void
spider_net_vlan_rx_add(struct net_device *netdev, uint16_t vid)
{
/* further enhancement... yet to do */
/* add vid to card's VLAN filter table */
return;
}
/**
* spider_net_vlan_rx_kill - removes VLAN id to the card filter
* @netdev: interface device structure
* @vid: VLAN id to remove
*/
static void
spider_net_vlan_rx_kill(struct net_device *netdev, uint16_t vid)
{
/* further enhancement... yet to do */
/* remove vid from card's VLAN filter table */
}
/** /**
* spider_net_get_stats - get interface statistics * spider_net_get_stats - get interface statistics
* @netdev: interface device structure * @netdev: interface device structure
...@@ -2177,9 +2140,6 @@ spider_net_setup_netdev_ops(struct net_device *netdev) ...@@ -2177,9 +2140,6 @@ spider_net_setup_netdev_ops(struct net_device *netdev)
netdev->poll = &spider_net_poll; netdev->poll = &spider_net_poll;
netdev->weight = SPIDER_NET_NAPI_WEIGHT; netdev->weight = SPIDER_NET_NAPI_WEIGHT;
/* HW VLAN */ /* HW VLAN */
netdev->vlan_rx_register = &spider_net_vlan_rx_reg;
netdev->vlan_rx_add_vid = &spider_net_vlan_rx_add;
netdev->vlan_rx_kill_vid = &spider_net_vlan_rx_kill;
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
/* poll controller */ /* poll controller */
netdev->poll_controller = &spider_net_poll_controller; netdev->poll_controller = &spider_net_poll_controller;
......
...@@ -9121,21 +9121,6 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) ...@@ -9121,21 +9121,6 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
if (netif_running(dev)) if (netif_running(dev))
tg3_netif_start(tp); tg3_netif_start(tp);
} }
static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct tg3 *tp = netdev_priv(dev);
if (netif_running(dev))
tg3_netif_stop(tp);
tg3_full_lock(tp, 0);
vlan_group_set_device(tp->vlgrp, vid, NULL);
tg3_full_unlock(tp);
if (netif_running(dev))
tg3_netif_start(tp);
}
#endif #endif
static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
...@@ -11778,7 +11763,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, ...@@ -11778,7 +11763,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
#if TG3_VLAN_TAG_USED #if TG3_VLAN_TAG_USED
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = tg3_vlan_rx_register; dev->vlan_rx_register = tg3_vlan_rx_register;
dev->vlan_rx_kill_vid = tg3_vlan_rx_kill_vid;
#endif #endif
tp = netdev_priv(dev); tp = netdev_priv(dev);
......
...@@ -741,15 +741,6 @@ typhoon_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) ...@@ -741,15 +741,6 @@ typhoon_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
spin_unlock_bh(&tp->state_lock); spin_unlock_bh(&tp->state_lock);
} }
static void
typhoon_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct typhoon *tp = netdev_priv(dev);
spin_lock_bh(&tp->state_lock);
vlan_group_set_device(tp->vlgrp, vid, NULL);
spin_unlock_bh(&tp->state_lock);
}
static inline void static inline void
typhoon_tso_fill(struct sk_buff *skb, struct transmit_ring *txRing, typhoon_tso_fill(struct sk_buff *skb, struct transmit_ring *txRing,
u32 ring_dma) u32 ring_dma)
...@@ -2542,7 +2533,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2542,7 +2533,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->get_stats = typhoon_get_stats; dev->get_stats = typhoon_get_stats;
dev->set_mac_address = typhoon_set_mac_address; dev->set_mac_address = typhoon_set_mac_address;
dev->vlan_rx_register = typhoon_vlan_rx_register; dev->vlan_rx_register = typhoon_vlan_rx_register;
dev->vlan_rx_kill_vid = typhoon_vlan_rx_kill_vid;
SET_ETHTOOL_OPS(dev, &typhoon_ethtool_ops); SET_ETHTOOL_OPS(dev, &typhoon_ethtool_ops);
/* We can handle scatter gather, up to 16 entries, and /* We can handle scatter gather, up to 16 entries, and
......
...@@ -240,10 +240,8 @@ static int unregister_vlan_dev(struct net_device *real_dev, ...@@ -240,10 +240,8 @@ static int unregister_vlan_dev(struct net_device *real_dev,
* interlock with HW accelerating devices or SW vlan * interlock with HW accelerating devices or SW vlan
* input packet processing. * input packet processing.
*/ */
if (real_dev->features & if (real_dev->features & NETIF_F_HW_VLAN_FILTER)
(NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER)) {
real_dev->vlan_rx_kill_vid(real_dev, vlan_id); real_dev->vlan_rx_kill_vid(real_dev, vlan_id);
}
vlan_group_set_device(grp, vlan_id, NULL); vlan_group_set_device(grp, vlan_id, NULL);
synchronize_net(); synchronize_net();
...@@ -409,16 +407,14 @@ static struct net_device *register_vlan_device(const char *eth_IF_name, ...@@ -409,16 +407,14 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
} }
if ((real_dev->features & NETIF_F_HW_VLAN_RX) && if ((real_dev->features & NETIF_F_HW_VLAN_RX) &&
(real_dev->vlan_rx_register == NULL || !real_dev->vlan_rx_register) {
real_dev->vlan_rx_kill_vid == NULL)) {
printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n", printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
__FUNCTION__, real_dev->name); __FUNCTION__, real_dev->name);
goto out_put_dev; goto out_put_dev;
} }
if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) && if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) &&
(real_dev->vlan_rx_add_vid == NULL || (!real_dev->vlan_rx_add_vid || !real_dev->vlan_rx_kill_vid)) {
real_dev->vlan_rx_kill_vid == NULL)) {
printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n", printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
__FUNCTION__, real_dev->name); __FUNCTION__, real_dev->name);
goto out_put_dev; goto out_put_dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册