* [PATCH 1/2] sky2: restore multicast addresses after recovery @ 2008-01-24 3:11 Stephen Hemminger 2008-01-24 3:16 ` [PATCH 2/2] sky2: fix Wake On Lan interaction with BIOS Stephen Hemminger 2008-01-30 8:51 ` [PATCH 1/2] sky2: restore multicast addresses after recovery Jeff Garzik 0 siblings, 2 replies; 3+ messages in thread From: Stephen Hemminger @ 2008-01-24 3:11 UTC (permalink / raw) To: Jeff Garzik; +Cc: netdev If the sky2 deadman timer forces a recovery, the multicast hash list is lost. Move the call to sky2_set_multicast to the end of sky2_up() so all paths that bring device up will restore multicast. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> --- Please apply for 2.6.24 --- a/drivers/net/sky2.c 2008-01-23 16:00:34.000000000 -0800 +++ b/drivers/net/sky2.c 2008-01-23 16:04:20.000000000 -0800 @@ -1412,6 +1412,7 @@ static int sky2_up(struct net_device *de imask |= portirq_msk[port]; sky2_write32(hw, B0_IMSK, imask); + sky2_set_multicast(dev); return 0; err_out: @@ -3533,8 +3534,6 @@ static int sky2_set_ringparam(struct net err = sky2_up(dev); if (err) dev_close(dev); - else - sky2_set_multicast(dev); } return err; @@ -4368,8 +4367,6 @@ static int sky2_resume(struct pci_dev *p dev_close(dev); goto out; } - - sky2_set_multicast(dev); } } ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] sky2: fix Wake On Lan interaction with BIOS 2008-01-24 3:11 [PATCH 1/2] sky2: restore multicast addresses after recovery Stephen Hemminger @ 2008-01-24 3:16 ` Stephen Hemminger 2008-01-30 8:51 ` [PATCH 1/2] sky2: restore multicast addresses after recovery Jeff Garzik 1 sibling, 0 replies; 3+ messages in thread From: Stephen Hemminger @ 2008-01-24 3:16 UTC (permalink / raw) To: Jeff Garzik; +Cc: netdev This patch disables config mode access after clearing PCI settings. Some BIOS's seem to not do WOL if config bit still set. Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=9721 Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> --- Please get this into 2.6.24. --- a/drivers/net/sky2.c 2008-01-23 16:31:13.000000000 -0800 +++ b/drivers/net/sky2.c 2008-01-23 16:31:16.000000000 -0800 @@ -621,6 +621,7 @@ static void sky2_phy_power(struct sky2_h static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD }; static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA }; + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); /* Turn on/off phy power saving */ if (onoff) @@ -632,7 +633,8 @@ static void sky2_phy_power(struct sky2_h reg1 |= coma_mode[port]; sky2_pci_write32(hw, PCI_DEV_REG1, reg1); - reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); + sky2_pci_read32(hw, PCI_DEV_REG1); udelay(100); } @@ -2427,6 +2429,7 @@ static void sky2_hw_intr(struct sky2_hw if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { u16 pci_err; + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); pci_err = sky2_pci_read16(hw, PCI_STATUS); if (net_ratelimit()) dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", @@ -2434,12 +2437,14 @@ static void sky2_hw_intr(struct sky2_hw sky2_pci_write16(hw, PCI_STATUS, pci_err | PCI_STATUS_ERROR_BITS); + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); } if (status & Y2_IS_PCI_EXP) { /* PCI-Express uncorrectable Error occurred */ u32 err; + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, 0xfffffffful); @@ -2447,6 +2452,7 @@ static void sky2_hw_intr(struct sky2_hw dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); } if (status & Y2_HWE_L1_MASK) @@ -2812,6 +2818,7 @@ static void sky2_reset(struct sky2_hw *h } sky2_power_on(hw); + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); for (i = 0; i < hw->ports; i++) { sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] sky2: restore multicast addresses after recovery 2008-01-24 3:11 [PATCH 1/2] sky2: restore multicast addresses after recovery Stephen Hemminger 2008-01-24 3:16 ` [PATCH 2/2] sky2: fix Wake On Lan interaction with BIOS Stephen Hemminger @ 2008-01-30 8:51 ` Jeff Garzik 1 sibling, 0 replies; 3+ messages in thread From: Jeff Garzik @ 2008-01-30 8:51 UTC (permalink / raw) To: Stephen Hemminger; +Cc: netdev Stephen Hemminger wrote: > If the sky2 deadman timer forces a recovery, the multicast hash > list is lost. Move the call to sky2_set_multicast to the end > of sky2_up() so all paths that bring device up will restore multicast. > > Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> > > --- > Please apply for 2.6.24 applied 1-2 You'll want to send this to stable@kernel.org, since by the time I read your mail, 2.6.24 had been released, just around 24 hours thereafter. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-30 8:51 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-01-24 3:11 [PATCH 1/2] sky2: restore multicast addresses after recovery Stephen Hemminger 2008-01-24 3:16 ` [PATCH 2/2] sky2: fix Wake On Lan interaction with BIOS Stephen Hemminger 2008-01-30 8:51 ` [PATCH 1/2] sky2: restore multicast addresses after recovery Jeff Garzik
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.