sky2: disable ASF on all chip types
authorStephen Hemminger <shemminger@linux-foundation.org>
Wed, 11 Apr 2007 21:48:00 +0000 (14:48 -0700)
committerJeff Garzik <jeff@garzik.org>
Thu, 19 Apr 2007 19:01:17 +0000 (15:01 -0400)
Need to make sure and disable ASF on all chip types. Otherwise, there may be
random reboots.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/sky2.c

index a2cc721a2bf5bcaaf7d9aa2b47f2bfb5bc585b28..910c600a6caf592cb0b2cb324045b591f1962683 100644 (file)
@@ -2542,16 +2542,14 @@ static void sky2_reset(struct sky2_hw *hw)
        int i;
 
        /* disable ASF */
-       if (hw->chip_id <= CHIP_ID_YUKON_EC) {
-               if (hw->chip_id == CHIP_ID_YUKON_EX) {
-                       status = sky2_read16(hw, HCU_CCSR);
-                       status &= ~(HCU_CCSR_AHB_RST | HCU_CCSR_CPU_RST_MODE |
-                                   HCU_CCSR_UC_STATE_MSK);
-                       sky2_write16(hw, HCU_CCSR, status);
-               } else
-                       sky2_write8(hw, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET);
-               sky2_write16(hw, B0_CTST, Y2_ASF_DISABLE);
-       }
+       if (hw->chip_id == CHIP_ID_YUKON_EX) {
+               status = sky2_read16(hw, HCU_CCSR);
+               status &= ~(HCU_CCSR_AHB_RST | HCU_CCSR_CPU_RST_MODE |
+                           HCU_CCSR_UC_STATE_MSK);
+               sky2_write16(hw, HCU_CCSR, status);
+       } else
+               sky2_write8(hw, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET);
+       sky2_write16(hw, B0_CTST, Y2_ASF_DISABLE);
 
        /* do a SW reset */
        sky2_write8(hw, B0_CTST, CS_RST_SET);