Message ID | 20101025194632.GA3545@linux-ox1b.qlogic.org |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, Oct 25, 2010 at 12:46 PM, Ron Mercer <ron.mercer@qlogic.com> wrote: > +static void qlge_restore_vlan(struct ql_adapter *qdev) > +{ > + qlge_vlan_rx_register(qdev->ndev, qdev->vlgrp); > + > + if (qdev->vlgrp) { > + u16 vid; > + for (vid = 0; vid < VLAN_N_VID; vid++) { > + if (!vlan_group_get_device(qdev->vlgrp, vid)) > + continue; > + qlge_vlan_rx_add_vid(qdev->ndev, vid); > + } > + } > +} Using vlan groups within a driver is now deprecated. I realize that this is just a bug fix but it would nice if we can avoid introducing more code around vlan groups. Of course, fully switching the driver over to use the new vlan model would be even nicer. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Oct 25, 2010 at 05:56:57PM -0700, Jesse Gross wrote: > > Using vlan groups within a driver is now deprecated. I realize that > this is just a bug fix but it would nice if we can avoid introducing > more code around vlan groups. Of course, fully switching the driver > over to use the new vlan model would be even nicer. I would like this bug fix to be applied though we will schedule switching to the new vlan model ASAP. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Ron Mercer <ron.mercer@qlogic.com> Date: Tue, 26 Oct 2010 13:54:22 -0700 > On Mon, Oct 25, 2010 at 05:56:57PM -0700, Jesse Gross wrote: >> >> Using vlan groups within a driver is now deprecated. I realize that >> this is just a bug fix but it would nice if we can avoid introducing >> more code around vlan groups. Of course, fully switching the driver >> over to use the new vlan model would be even nicer. > > I would like this bug fix to be applied though we will schedule switching > to the new vlan model ASAP. Then why did you put "net-next-2.6" in the subject lines? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Oct 26, 2010 at 02:21:52PM -0700, David Miller wrote: > From: Ron Mercer <ron.mercer@qlogic.com> > Date: Tue, 26 Oct 2010 13:54:22 -0700 > > > On Mon, Oct 25, 2010 at 05:56:57PM -0700, Jesse Gross wrote: > >> > >> Using vlan groups within a driver is now deprecated. I realize that > >> this is just a bug fix but it would nice if we can avoid introducing > >> more code around vlan groups. Of course, fully switching the driver > >> over to use the new vlan model would be even nicer. > > > > I would like this bug fix to be applied though we will schedule switching > > to the new vlan model ASAP. > > Then why did you put "net-next-2.6" in the subject lines? It should have been by itself against net-2.6. I will re-spin these patches. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index ba0053d..5077d38 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -2382,6 +2382,20 @@ static void qlge_vlan_rx_kill_vid(struct net_device *ndev, u16 vid) } +static void qlge_restore_vlan(struct ql_adapter *qdev) +{ + qlge_vlan_rx_register(qdev->ndev, qdev->vlgrp); + + if (qdev->vlgrp) { + u16 vid; + for (vid = 0; vid < VLAN_N_VID; vid++) { + if (!vlan_group_get_device(qdev->vlgrp, vid)) + continue; + qlge_vlan_rx_add_vid(qdev->ndev, vid); + } + } +} + /* MSI-X Multiple Vector Interrupt Handler for inbound completions. */ static irqreturn_t qlge_msix_rx_isr(int irq, void *dev_id) { @@ -3957,6 +3971,9 @@ static int ql_adapter_up(struct ql_adapter *qdev) clear_bit(QL_PROMISCUOUS, &qdev->flags); qlge_set_multicast_list(qdev->ndev); + /* Restore vlan setting. */ + qlge_restore_vlan(qdev); + ql_enable_interrupts(qdev); ql_enable_all_completion_interrupts(qdev); netif_tx_start_all_queues(qdev->ndev);