netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 0/5] VLAN driver API fixes
       [not found] <20070601164356.673375550@linux-foundation.org>
@ 2007-06-01 17:12 ` Patrick McHardy
       [not found] ` <20070601164705.586224195@linux-foundation.org>
       [not found] ` <20070601164705.300415731@linux-foundation.org>
  2 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2007-06-01 17:12 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, Jeff Garzk, Ben Greear, netdev

Stephen Hemminger wrote:
> Patrick's fix for sky2 VLAN unregister, started me looking at
> other drivers. Many drivers had bogus kill_vid hooks, and the whole
> interface for kill_vid is only useful for devices that do receive
> filtering, so fix the interface and the drivers.


Looks good too me.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4/5] atl1: eliminate unneeded kill_vid code
       [not found] ` <20070601164705.586224195@linux-foundation.org>
@ 2007-06-01 18:04   ` Chris Snook
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Snook @ 2007-06-01 18:04 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: David Miller, Jeff Garzk, Patrick McHardy, Ben Greear,
	Jay Cliburn, netdev, atl1-devel

Stephen Hemminger wrote:
> This driver has unneeded stubs for VLAN filtering.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
> 
> ---
>  drivers/net/atl1/atl1_main.c   |   25 +------------------------
> 
> ---
>  drivers/net/atl1/atl1_main.c |   33 +--------------------------------
>  1 file changed, 1 insertion(+), 32 deletions(-)
> 
> --- a/drivers/net/atl1/atl1_main.c	2007-06-01 09:21:53.000000000 -0700
> +++ b/drivers/net/atl1/atl1_main.c	2007-06-01 09:27:53.000000000 -0700
> @@ -1229,39 +1229,9 @@ static void atl1_vlan_rx_register(struct
>  	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)
>  {
>  	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)
> @@ -2203,8 +2173,7 @@ static int __devinit atl1_probe(struct p
>  	netdev->poll_controller = atl1_poll_controller;
>  #endif
>  	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;
>  	adapter->bd_number = cards_found;
>  	adapter->pci_using_64 = pci_using_64;
> 

As the comments indicate, I was going to get around to doing this in my 
Copious Free Time anyway, so:

Acked-By: Chris Snook <csnook@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/5] VLAN: kill_vid is only useful for VLAN filtering devices
       [not found] ` <20070601164705.300415731@linux-foundation.org>
@ 2007-06-03 15:47   ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-06-03 15:47 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, Patrick McHardy, Ben Greear, netdev

Stephen Hemminger wrote:
> The interface for network device VLAN extension was confusing.
> The kill_vid function is only really useful for devices that do
> hardware filtering. Devices that only do VLAN receiption without
> filtering were being forced to provide the hook, and there were
> bugs in those devices.
> 
> Many drivers had kill_vid routine that called vlan_group_set_device, with
> NULL, but that is done already.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

applied 1-5 to #upstream-fixes



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-03 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070601164356.673375550@linux-foundation.org>
2007-06-01 17:12 ` [PATCH 0/5] VLAN driver API fixes Patrick McHardy
     [not found] ` <20070601164705.586224195@linux-foundation.org>
2007-06-01 18:04   ` [PATCH 4/5] atl1: eliminate unneeded kill_vid code Chris Snook
     [not found] ` <20070601164705.300415731@linux-foundation.org>
2007-06-03 15:47   ` [PATCH 1/5] VLAN: kill_vid is only useful for VLAN filtering devices Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).