From patchwork Wed Jul 6 06:33:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 948772 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p666XsIV003664 for ; Wed, 6 Jul 2011 06:33:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751188Ab1GFGdx (ORCPT ); Wed, 6 Jul 2011 02:33:53 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:49308 "EHLO relmlor3.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751093Ab1GFGdx (ORCPT ); Wed, 6 Jul 2011 02:33:53 -0400 Received: from relmlir3.idc.renesas.com ([10.200.68.153]) by relmlor3.idc.renesas.com ( SJSMS) with ESMTP id <0LNW002N7FKFNA10@relmlor3.idc.renesas.com>; Wed, 06 Jul 2011 15:33:51 +0900 (JST) Received: from relmlac4.idc.renesas.com ([10.200.69.24]) by relmlir3.idc.renesas.com ( SJSMS) with ESMTP id <0LNW007BTFKF9I50@relmlir3.idc.renesas.com>; Wed, 06 Jul 2011 15:33:51 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 8EA7548087; Wed, 06 Jul 2011 15:33:51 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 8763D48070; Wed, 06 Jul 2011 15:33:51 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id RAF14826; Wed, 06 Jul 2011 15:33:51 +0900 X-IronPort-AV: E=Sophos; i="4.65,484,1304262000"; d="scan'208"; a="35547390" Received: from unknown (HELO [172.30.8.157]) ([172.30.8.157]) by relmlii2.idc.renesas.com with ESMTP; Wed, 06 Jul 2011 15:33:51 +0900 Message-id: <4E1401CF.4080804@renesas.com> Date: Wed, 06 Jul 2011 15:33:51 +0900 From: Yoshihiro Shimoda User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-version: 1.0 To: davem@davemloft.net Cc: netdev@vger.kernel.org, SH-Linux Subject: [PATCH 1/2] net: sh_eth: fix cannot work half-duplex mode Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 06 Jul 2011 06:34:16 +0000 (UTC) When link was down, the bit of DM in ECMR was always set. So, we could not use half-duplex mode on the controller. Signed-off-by: Yoshihiro Shimoda --- drivers/net/sh_eth.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 09b5aa8..c08d9e1 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -1185,8 +1185,8 @@ static void sh_eth_adjust_link(struct net_device *ndev) mdp->cd->set_rate(ndev); } if (mdp->link == PHY_DOWN) { - sh_eth_write(ndev, (sh_eth_read(ndev, ECMR) & ~ECMR_TXF) - | ECMR_DM, ECMR); + sh_eth_write(ndev, + (sh_eth_read(ndev, ECMR) & ~ECMR_TXF), ECMR); new_state = 1; mdp->link = phydev->link; }