Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.1830);
	 Tue, 24 Jun 2008 19:41:57 -0700
Received: from chiesmta2-1.messageone.com ([216.203.30.55]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Tue, 24 Jun 2008 19:41:56 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by chiesmta2-1.messageone.com (8.13.8/8.13.8) with ESMTP id m5P2ftl0029555
	for <andy.sharp@onstor.com>; Tue, 24 Jun 2008 21:41:55 -0500
Received: from localhost.localdomain ([127.0.0.1]:59567 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S20042917AbYFYClf (ORCPT <rfc822;andy.sharp@onstor.com>);
	Wed, 25 Jun 2008 03:41:35 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 25 Jun 2008 03:41:18 +0100 (BST)
Received: from topsns2.toshiba-tops.co.jp ([202.230.225.126]:50816 "EHLO
	topsns2.toshiba-tops.co.jp") by ftp.linux-mips.org with ESMTP
	id S20042932AbYFYClL (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Wed, 25 Jun 2008 03:41:11 +0100
Received: from no.name.available by topsns2.toshiba-tops.co.jp
          via smtpd (for ftp.linux-mips.org [213.58.128.207]) with ESMTP; Wed, 25 Jun 2008 11:41:09 +0900
Received: from topsms.toshiba-tops.co.jp (localhost.localdomain [127.0.0.1])
	by localhost.toshiba-tops.co.jp (Postfix) with ESMTP id 3BDF342496;
	Wed, 25 Jun 2008 11:41:03 +0900 (JST)
Received: from srd2sd.toshiba-tops.co.jp (srd2sd.toshiba-tops.co.jp [172.17.28.2])
	by topsms.toshiba-tops.co.jp (Postfix) with ESMTP id 30B4B1EF5F;
	Wed, 25 Jun 2008 11:41:03 +0900 (JST)
Received: from localhost (fragile [172.17.28.65])
	by srd2sd.toshiba-tops.co.jp (8.12.10/8.12.10) with ESMTP id m5P2f1fl054647;
	Wed, 25 Jun 2008 11:41:02 +0900 (JST)
	(envelope-from anemo@mba.ocn.ne.jp)
Date: 	Wed, 25 Jun 2008 11:41:01 +0900 (JST)
Message-Id: <20080625.114101.102912128.nemoto@toshiba-tops.co.jp>
To: linux-mips@linux-mips.org
Cc: Jeff Garzik <jeff@garzik.org>, netdev@vger.kernel.org
Subject: [PATCH] tc35815: Mark carrier-off before starting PHY
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 6.1 on Emacs 22.2 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-archive-position: 19631
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: anemo@mba.ocn.ne.jp
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7161:2.4.4,1.2.40,4.0.164 definitions=2008-06-24_08:2008-06-24,2008-06-24,2008-06-24 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0805090000 definitions=main-0806240160
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 25 Jun 2008 02:41:56.0856 (UTC) FILETIME=[08DD4F80:01C8D66D]

Call netif_carrier_off() before starting PHY device.  This is a
behavior before converting to generic PHY layer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index 10e4e85..dccea52 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -1394,6 +1394,7 @@ tc35815_open(struct net_device *dev)
 	tc35815_chip_init(dev);
 	spin_unlock_irq(&lp->lock);
 
+	netif_carrier_off(dev);
 	/* schedule a link state check */
 	phy_start(lp->phy_dev);
 
@@ -2453,6 +2454,7 @@ static int tc35815_resume(struct pci_dev *pdev)
 		return 0;
 	pci_set_power_state(pdev, PCI_D0);
 	tc35815_restart(dev);
+	netif_carrier_off(dev);
 	if (lp->phy_dev)
 		phy_start(lp->phy_dev);
 	netif_device_attach(dev);

