[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#404107: [PATCH] [linux-image-2.6.18-3-686] sky2 crashes on boot or resume



Please, test this patch below.
Thanks to Stephen Hemminger!

-- 
Renato S. Yamane
Fingerprint: 68AE A381 938A F4B9 8A23  D11A E351 5030 D420 515A
PGP Server: http://pgp.mit.edu/ --> KeyID: 0xD420515A
<http://www.renatoyamane.com>



---
 drivers/net/sky2.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

--- sky2-dev.orig/drivers/net/sky2.c	2007-03-19 14:28:00.000000000 -0700
+++ sky2-dev/drivers/net/sky2.c	2007-03-19 15:24:16.000000000 -0700
@@ -2489,9 +2489,13 @@
 {
 	u8 t8;

+	hw->chip_id = sky2_read8(hw, B2_CHIP_ID);
+	/* Make sure and enable all clocks */
+	if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U)
+		sky2_pci_write32(hw, PCI_DEV_REG3, 0);
+
 	sky2_write8(hw, B0_CTST, CS_RST_CLR);

-	hw->chip_id = sky2_read8(hw, B2_CHIP_ID);
 	if (hw->chip_id < CHIP_ID_YUKON_XL || hw->chip_id > CHIP_ID_YUKON_FE) {
 		dev_err(&hw->pdev->dev, "unsupported chip type 0x%x\n",
 			hw->chip_id);
@@ -2501,11 +2505,6 @@
 	if (hw->chip_id == CHIP_ID_YUKON_EX)
 		dev_warn(&hw->pdev->dev, "this driver not yet tested on this chip type\n"
 			 "Please report success or failure to <netdev@vger.kernel.org>\n");
-
-	/* Make sure and enable all clocks */
-	if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U)
-		sky2_pci_write32(hw, PCI_DEV_REG3, 0);
-
 	hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4;

 	/* This rev is really old, and requires untested workarounds */




Reply to: