skge/sky2 patches for 2.6.21.2
Subsystems (2)
cover skge/sky2 patches for 2.6.21.2
This is a backport of all the bugfixes in 2.6.22-rc1 (or later) to 2.6.21.y
--
Stephen Hemminger <[email protected]>
PATCH 1/6 skge: allow WOL except for known broken chips
Wake On Lan works correctly on Yukon-FE and other variants.
--- drivers/net/skge.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/net/skge.c +6 -3
@@ -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 <[email protected]>
PATCH 2/6 skge: default WOL should be magic only
In reply to Stephen HemmingerBy 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.
--- drivers/net/skge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/skge.c +3 -1
@@ -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 <[email protected]>
PATCH 3/6 sky2: allow 88E8056
In reply to Stephen HemmingerIt looks like the problems of Gigabyte 88E8056 are unique to that chip motherboard and maybe fixable by EEPROM update.
--- drivers/net/sky2.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/sky2.c +0 -3
@@ -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 <[email protected]>
Re: [stable] [PATCH 3/6] sky2: allow 88E8056
Quoted 2 lines · * Stephen Hemminger ([email protected]) 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
PATCH 4/6 sky2: 88e8071 support not ready
In reply to Stephen HemmingerThe 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.
--- drivers/net/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sky2.c +1 -1
@@ -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 <[email protected]>
Re: [stable] [PATCH 4/6] sky2: 88e8071 support not ready
drivers/net/sky2.c static const struct pci_device_id sky2_i · line 132
Quoted 2 lines · * Stephen Hemminger ([email protected]) wrote:
drivers/net/sky2.c +1
-1- { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */ +// { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */
Where-o-where are the CodingStyle police? ;-)
PATCH 5/6 skge: crash on shutdown/suspend
In reply to Stephen HemmingerIf 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.
--- drivers/net/skge.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/skge.c +9 -0
@@ -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 *pstruct 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_devstruct 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 <[email protected]>
PATCH 6/6 sky2: fix oops on shutdown
In reply to Stephen HemmingerIf 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.
--- drivers/net/sky2.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/sky2.c +10 -0
@@ -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 *pstruct 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_devstruct 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 <[email protected]>