* [PATCH 0/6] skge/sky2 patches for 2.6.21.2
@ 2007-05-15 22:08 Stephen Hemminger
2007-05-15 22:08 ` [PATCH 1/6] skge: allow WOL except for known broken chips Stephen Hemminger
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Stephen Hemminger @ 2007-05-15 22:08 UTC (permalink / raw)
To: stable; +Cc: netdev
This is a backport of all the bugfixes in 2.6.22-rc1 (or later)
to 2.6.21.y
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/6] skge: allow WOL except for known broken chips
2007-05-15 22:08 [PATCH 0/6] skge/sky2 patches for 2.6.21.2 Stephen Hemminger
@ 2007-05-15 22:08 ` Stephen Hemminger
2007-05-15 22:08 ` [PATCH 2/6] skge: default WOL should be magic only Stephen Hemminger
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Stephen Hemminger @ 2007-05-15 22:08 UTC (permalink / raw)
To: stable; +Cc: netdev
[-- Attachment #1: skge-wol-chips --]
[-- Type: text/plain, Size: 927 bytes --]
Wake On Lan works correctly on Yukon-FE and other variants.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>a
---
drivers/net/skge.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- linux-2.6.21.y.orig/drivers/net/skge.c 2007-05-10 12:10:38.000000000 -0700
+++ linux-2.6.21.y/drivers/net/skge.c 2007-05-10 13:26:26.000000000 -0700
@@ -135,10 +135,13 @@ static void skge_get_regs(struct net_dev
/* Wake on Lan only supported on Yukon chips with rev 1 or above */
static u32 wol_supported(const struct skge_hw *hw)
{
- if (hw->chip_id == CHIP_ID_YUKON && hw->chip_rev != 0)
- return WAKE_MAGIC | WAKE_PHY;
- else
+ if (hw->chip_id == CHIP_ID_GENESIS)
return 0;
+
+ if (hw->chip_id == CHIP_ID_YUKON && hw->chip_rev == 0)
+ return 0;
+
+ return WAKE_MAGIC | WAKE_PHY;
}
static u32 pci_wake_enabled(struct pci_dev *dev)
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/6] skge: default WOL should be magic only
2007-05-15 22:08 [PATCH 0/6] skge/sky2 patches for 2.6.21.2 Stephen Hemminger
2007-05-15 22:08 ` [PATCH 1/6] skge: allow WOL except for known broken chips Stephen Hemminger
@ 2007-05-15 22:08 ` Stephen Hemminger
2007-05-15 22:08 ` [PATCH 3/6] sky2: allow 88E8056 Stephen Hemminger
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Stephen Hemminger @ 2007-05-15 22:08 UTC (permalink / raw)
To: stable; +Cc: netdev
[-- Attachment #1: skge-wol-magic --]
[-- Type: text/plain, Size: 866 bytes --]
By default, the skge driver now enables wake on magic and wake on PHY.
This is a bad default (bug), wake on PHY means machine will never shutdown
if connected to a switch.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>a
---
drivers/net/skge.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- linux-2.6.21.y.orig/drivers/net/skge.c 2007-05-10 13:26:26.000000000 -0700
+++ linux-2.6.21.y/drivers/net/skge.c 2007-05-10 13:26:31.000000000 -0700
@@ -3586,7 +3586,9 @@ static struct net_device *skge_devinit(s
skge->duplex = -1;
skge->speed = -1;
skge->advertising = skge_supported_modes(hw);
- skge->wol = pci_wake_enabled(hw->pdev) ? wol_supported(hw) : 0;
+
+ if (pci_wake_enabled(hw->pdev))
+ skge->wol = wol_supported(hw) & WAKE_MAGIC;
hw->dev[port] = dev;
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/6] sky2: allow 88E8056
2007-05-15 22:08 [PATCH 0/6] skge/sky2 patches for 2.6.21.2 Stephen Hemminger
2007-05-15 22:08 ` [PATCH 1/6] skge: allow WOL except for known broken chips Stephen Hemminger
2007-05-15 22:08 ` [PATCH 2/6] skge: default WOL should be magic only Stephen Hemminger
@ 2007-05-15 22:08 ` Stephen Hemminger
2007-05-17 1:23 ` [stable] " Chris Wright
2007-05-15 22:08 ` [PATCH 4/6] sky2: 88e8071 support not ready Stephen Hemminger
` (2 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2007-05-15 22:08 UTC (permalink / raw)
To: stable; +Cc: netdev
[-- Attachment #1: sky2-88e8056-allow.patch --]
[-- Type: text/plain, Size: 1066 bytes --]
It looks like the problems of Gigabyte 88E8056 are unique to that chip
motherboard and maybe fixable by EEPROM update.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
drivers/net/sky2.c | 3 ---
1 file changed, 3 deletions(-)
--- linux-2.6.21.y.orig/drivers/net/sky2.c 2007-05-15 09:06:58.000000000 -0700
+++ linux-2.6.21.y/drivers/net/sky2.c 2007-05-15 09:07:11.000000000 -0700
@@ -123,10 +123,7 @@ static const struct pci_device_id sky2_i
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, /* 88E8050 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4362) }, /* 88E8053 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4363) }, /* 88E8055 */
-#ifdef broken
- /* This device causes data corruption problems that are not resolved */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4364) }, /* 88E8056 */
-#endif
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4366) }, /* 88EC036 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4367) }, /* 88EC032 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/6] sky2: 88e8071 support not ready
2007-05-15 22:08 [PATCH 0/6] skge/sky2 patches for 2.6.21.2 Stephen Hemminger
` (2 preceding siblings ...)
2007-05-15 22:08 ` [PATCH 3/6] sky2: allow 88E8056 Stephen Hemminger
@ 2007-05-15 22:08 ` Stephen Hemminger
2007-05-17 1:24 ` [stable] " Chris Wright
2007-05-15 22:08 ` [PATCH 5/6] skge: crash on shutdown/suspend Stephen Hemminger
2007-05-15 22:08 ` [PATCH 6/6] sky2: fix oops on shutdown Stephen Hemminger
5 siblings, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2007-05-15 22:08 UTC (permalink / raw)
To: stable; +Cc: netdev
[-- Attachment #1: sky2-ex-disable.patch --]
[-- Type: text/plain, Size: 902 bytes --]
The driver is not ready to support 88e8071 chip, it requires several
more changes (not done yet). If this chip is present, system will hang on boot.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
drivers/net/sky2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.21.y.orig/drivers/net/sky2.c 2007-05-15 09:07:11.000000000 -0700
+++ linux-2.6.21.y/drivers/net/sky2.c 2007-05-15 09:07:14.000000000 -0700
@@ -129,7 +129,7 @@ static const struct pci_device_id sky2_i
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4369) }, /* 88EC042 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436A) }, /* 88E8058 */
- { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */
+// { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */
{ 0 }
};
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/6] skge: crash on shutdown/suspend
2007-05-15 22:08 [PATCH 0/6] skge/sky2 patches for 2.6.21.2 Stephen Hemminger
` (3 preceding siblings ...)
2007-05-15 22:08 ` [PATCH 4/6] sky2: 88e8071 support not ready Stephen Hemminger
@ 2007-05-15 22:08 ` Stephen Hemminger
2007-05-15 22:08 ` [PATCH 6/6] sky2: fix oops on shutdown Stephen Hemminger
5 siblings, 0 replies; 9+ messages in thread
From: Stephen Hemminger @ 2007-05-15 22:08 UTC (permalink / raw)
To: stable; +Cc: netdev
[-- Attachment #1: skge-shutdown.patch --]
[-- Type: text/plain, Size: 1237 bytes --]
If device fails during module startup for some reason (like unsupported chip
version) then driver would crash dereferencing a null pointer, on shutdown
or suspend/resume.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
drivers/net/skge.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- linux-2.6.21.y.orig/drivers/net/skge.c 2007-05-15 09:06:30.000000000 -0700
+++ linux-2.6.21.y/drivers/net/skge.c 2007-05-15 09:07:20.000000000 -0700
@@ -3794,6 +3794,9 @@ static int skge_suspend(struct pci_dev *
struct skge_hw *hw = pci_get_drvdata(pdev);
int i, err, wol = 0;
+ if (!hw)
+ return 0;
+
err = pci_save_state(pdev);
if (err)
return err;
@@ -3822,6 +3825,9 @@ static int skge_resume(struct pci_dev *p
struct skge_hw *hw = pci_get_drvdata(pdev);
int i, err;
+ if (!hw)
+ return 0;
+
err = pci_set_power_state(pdev, PCI_D0);
if (err)
goto out;
@@ -3860,6 +3866,9 @@ static void skge_shutdown(struct pci_dev
struct skge_hw *hw = pci_get_drvdata(pdev);
int i, wol = 0;
+ if (!hw)
+ return;
+
for (i = 0; i < hw->ports; i++) {
struct net_device *dev = hw->dev[i];
struct skge_port *skge = netdev_priv(dev);
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6/6] sky2: fix oops on shutdown
2007-05-15 22:08 [PATCH 0/6] skge/sky2 patches for 2.6.21.2 Stephen Hemminger
` (4 preceding siblings ...)
2007-05-15 22:08 ` [PATCH 5/6] skge: crash on shutdown/suspend Stephen Hemminger
@ 2007-05-15 22:08 ` Stephen Hemminger
5 siblings, 0 replies; 9+ messages in thread
From: Stephen Hemminger @ 2007-05-15 22:08 UTC (permalink / raw)
To: stable; +Cc: netdev
[-- Attachment #1: sky2-shutdown.patch --]
[-- Type: text/plain, Size: 1362 bytes --]
If the device fails during module startup for some reason like unsupported chip
version then the driver would crash dereferencing a null pointer, on shutdown
or suspend/resume.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
drivers/net/sky2.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- linux-2.6.21.y.orig/drivers/net/sky2.c 2007-05-15 09:07:14.000000000 -0700
+++ linux-2.6.21.y/drivers/net/sky2.c 2007-05-15 09:07:32.000000000 -0700
@@ -3719,6 +3719,7 @@ err_out_free_regions:
pci_release_regions(pdev);
pci_disable_device(pdev);
err_out:
+ pci_set_drvdata(pdev, NULL);
return err;
}
@@ -3771,6 +3772,9 @@ static int sky2_suspend(struct pci_dev *
struct sky2_hw *hw = pci_get_drvdata(pdev);
int i, wol = 0;
+ if (!hw)
+ return 0;
+
del_timer_sync(&hw->idle_timer);
netif_poll_disable(hw->dev[0]);
@@ -3802,6 +3806,9 @@ static int sky2_resume(struct pci_dev *p
struct sky2_hw *hw = pci_get_drvdata(pdev);
int i, err;
+ if (!hw)
+ return 0;
+
err = pci_set_power_state(pdev, PCI_D0);
if (err)
goto out;
@@ -3848,6 +3855,9 @@ static void sky2_shutdown(struct pci_dev
struct sky2_hw *hw = pci_get_drvdata(pdev);
int i, wol = 0;
+ if (!hw)
+ return;
+
del_timer_sync(&hw->idle_timer);
netif_poll_disable(hw->dev[0]);
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [stable] [PATCH 3/6] sky2: allow 88E8056
2007-05-15 22:08 ` [PATCH 3/6] sky2: allow 88E8056 Stephen Hemminger
@ 2007-05-17 1:23 ` Chris Wright
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wright @ 2007-05-17 1:23 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: stable, netdev
* Stephen Hemminger (shemminger@linux-foundation.org) wrote:
> It looks like the problems of Gigabyte 88E8056 are unique to that chip
> motherboard and maybe fixable by EEPROM update.
So, drop the Gigabyte hunks in the original patch...ok, thanks.
-chris
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [stable] [PATCH 4/6] sky2: 88e8071 support not ready
2007-05-15 22:08 ` [PATCH 4/6] sky2: 88e8071 support not ready Stephen Hemminger
@ 2007-05-17 1:24 ` Chris Wright
0 siblings, 0 replies; 9+ messages in thread
From: Chris Wright @ 2007-05-17 1:24 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: stable, netdev
* Stephen Hemminger (shemminger@linux-foundation.org) wrote:
> - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */
> +// { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */
Where-o-where are the CodingStyle police? ;-)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-17 1:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15 22:08 [PATCH 0/6] skge/sky2 patches for 2.6.21.2 Stephen Hemminger
2007-05-15 22:08 ` [PATCH 1/6] skge: allow WOL except for known broken chips Stephen Hemminger
2007-05-15 22:08 ` [PATCH 2/6] skge: default WOL should be magic only Stephen Hemminger
2007-05-15 22:08 ` [PATCH 3/6] sky2: allow 88E8056 Stephen Hemminger
2007-05-17 1:23 ` [stable] " Chris Wright
2007-05-15 22:08 ` [PATCH 4/6] sky2: 88e8071 support not ready Stephen Hemminger
2007-05-17 1:24 ` [stable] " Chris Wright
2007-05-15 22:08 ` [PATCH 5/6] skge: crash on shutdown/suspend Stephen Hemminger
2007-05-15 22:08 ` [PATCH 6/6] sky2: fix oops on shutdown Stephen Hemminger
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.