Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d4e66f5cd217160da9c3a2e3ec27b22e743bd25
Commit:     3d4e66f5cd217160da9c3a2e3ec27b22e743bd25
Parent:     d2d1acdb6a632486be9a731f40c68980c09f0490
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 1 09:43:58 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sun Jun 3 11:44:19 2007 -0400

    sky2: Fix VLAN unregistration
    
    Fix sky2 disabling VLAN completely when the first vid is unregistered.
    
    sky2 disables VLAN completely when the first VID is unregistered. It
    should instead disable VLAN when the group is unregistered by calling
    sky2_vlan_rx_register with grp = NULL.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
    
     drivers/net/sky2.c |   25 +++++++++++++------------
     1 file changed, 13 insertions(+), 12 deletions(-)
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/sky2.c |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index adfbe81..fe01b96 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1049,26 +1049,22 @@ static void sky2_vlan_rx_register(struct net_device 
*dev, struct vlan_group *grp
        u16 port = sky2->port;
 
        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;
+       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);
-}
-
-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_poll_enable(sky2->hw->dev[0]);
        netif_tx_unlock_bh(dev);
 }
 #endif
@@ -3484,7 +3480,6 @@ static __devinit struct net_device 
*sky2_init_netdev(struct sky2_hw *hw,
 #ifdef SKY2_VLAN_TAG_USED
        dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
        dev->vlan_rx_register = sky2_vlan_rx_register;
-       dev->vlan_rx_kill_vid = sky2_vlan_rx_kill_vid;
 #endif
 
        /* read the mac address */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to