From patchwork Thu Mar 11 13:17:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Spaeth X-Patchwork-Id: 47316 X-Patchwork-Delegate: stefan.bader@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 81AB7B7CD5 for ; Fri, 12 Mar 2010 00:17:27 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1NpiGR-00059I-9a; Thu, 11 Mar 2010 13:17:23 +0000 Received: from caiajhbdcahe.dreamhost.com ([208.97.132.74] helo=homiemail-a17.g.dreamhost.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1NpiGO-00057v-7O for kernel-team@lists.ubuntu.com; Thu, 11 Mar 2010 13:17:20 +0000 Received: from localhost.localdomain (unknown [84.55.211.9]) by homiemail-a17.g.dreamhost.com (Postfix) with ESMTPA id 740917A806D; Thu, 11 Mar 2010 05:17:18 -0800 (PST) From: Sebastian Spaeth To: kernel-team@lists.ubuntu.com Subject: net: Add missing TST_CFG_WRITE bits around sky2_pci_write Date: Thu, 11 Mar 2010 14:17:12 +0100 Message-Id: <1268313433-7030-3-git-send-email-Sebastian@SSpaeth.de> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1268313433-7030-2-git-send-email-Sebastian@SSpaeth.de> References: <87iq93t2yo.fsf@SSpaeth.de> <1268313433-7030-1-git-send-email-Sebastian@SSpaeth.de> <1268313433-7030-2-git-send-email-Sebastian@SSpaeth.de> References: bnc#544760 Cc: Takashi Iwai X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Takashi Iwai Add missing TST_CFG_WRITE bits around sky2_pci_write*() in Optima setup routines. Without the cfg-write bits, the driver may spew endless link-up messages through qlink irq. Signed-off-by: Takashi Iwai --- drivers/net/sky2.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2122,7 +2122,9 @@ static void sky2_qlink_intr(struct sky2_ /* reset PHY Link Detect */ phy = sky2_pci_read16(hw, PSM_CONFIG_REG4); + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); sky2_pci_write16(hw, PSM_CONFIG_REG4, phy | 1); + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); sky2_link_up(sky2); } @@ -3043,6 +3045,7 @@ static void sky2_reset(struct sky2_hw *h reg <<= PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE; /* reset PHY Link Detect */ + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); sky2_pci_write16(hw, PSM_CONFIG_REG4, reg | PSM_CONFIG_REG4_RST_PHY_LINK_DETECT); sky2_pci_write16(hw, PSM_CONFIG_REG4, reg); @@ -3061,6 +3064,7 @@ static void sky2_reset(struct sky2_hw *h /* restore the PCIe Link Control register */ sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg); } + sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); /* re-enable PEX PM in PEX PHY debug reg. 8 (clear bit 12) */ sky2_write32(hw, Y2_PEX_PHY_DATA, PEX_DB_ACCESS | (0x08UL << 16));