From patchwork Wed Sep 8 21:11:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 64223 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CC5FBB6EEC for ; Thu, 9 Sep 2010 07:11:16 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755427Ab0IHVKx (ORCPT ); Wed, 8 Sep 2010 17:10:53 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:46813 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755387Ab0IHVKt (ORCPT ); Wed, 8 Sep 2010 17:10:49 -0400 Received: by mail-wy0-f174.google.com with SMTP id 22so488057wyf.19 for ; Wed, 08 Sep 2010 14:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:date:subject :mime-version:x-uid:x-length:to:reply-to:content-type :content-transfer-encoding:message-id; bh=P+wjVqy0nDJLDd36iV7YFAVforz3DlErzae9U99UlsE=; b=a+QK59eK7iY5HwLw1qACwuX6DeCixuNunPIcGahsiKs5aImZ3nZTEk0arfl96L0OEh yBql1MhwCfIb9MH8CaNaextY6tg69w4cEOCxlK/3f4yI33bQgmyS3+cg/2N3UuaWra/2 Q04gkEX0+lsc/0aZV2XGiyFwcrKrHXtZBSEx0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:date:subject:mime-version:x-uid:x-length:to:reply-to :content-type:content-transfer-encoding:message-id; b=k5SGH2I/Z+bzAO4iYUjlDv5PXu867HtujArYS1LS4NXNtZJ4AiHyQLPFPXitE7lLG8 aJfYNK6HuvlueN9AGWY6lr4+XDdube7Ci+TrVYBUY7IgEvwGT33q9IZHo+wupGb36zrY JDYt0pUEJ548ZTQMJiI4JelDahUrJAD3spcZw= Received: by 10.227.138.141 with SMTP id a13mr45427wbu.208.1283980247979; Wed, 08 Sep 2010 14:10:47 -0700 (PDT) Received: from lenovo.localnet (129.199.66-86.rev.gaoland.net [86.66.199.129]) by mx.google.com with ESMTPS id b23sm413304wbb.22.2010.09.08.14.10.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 08 Sep 2010 14:10:46 -0700 (PDT) From: Florian Fainelli Date: Wed, 8 Sep 2010 23:11:59 +0200 Subject: [PATCH 7/7 v3] au1000-eth: change multi-line comments style MIME-Version: 1.0 X-UID: 223 X-Length: 4845 To: netdev@vger.kernel.org, David Miller Reply-To: Florian Fainelli Message-Id: <201009082312.00527.florian@openwrt.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Florian Fainelli --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index f4c394f..43489f8 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c @@ -229,11 +229,15 @@ static void au1000_mdio_write(struct net_device *dev, int phy_addr, static int au1000_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) { /* WARNING: bus->phy_map[phy_addr].attached_dev == dev does - * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */ + * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) + */ struct net_device *const dev = bus->priv; - au1000_enable_mac(dev, 0); /* make sure the MAC associated with this - * mii_bus is enabled */ + /* make sure the MAC associated with this + * mii_bus is enabled + */ + au1000_enable_mac(dev, 0); + return au1000_mdio_read(dev, phy_addr, regnum); } @@ -242,8 +246,11 @@ static int au1000_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, { struct net_device *const dev = bus->priv; - au1000_enable_mac(dev, 0); /* make sure the MAC associated with this - * mii_bus is enabled */ + /* make sure the MAC associated with this + * mii_bus is enabled + */ + au1000_enable_mac(dev, 0); + au1000_mdio_write(dev, phy_addr, regnum, value); return 0; } @@ -252,8 +259,11 @@ static int au1000_mdiobus_reset(struct mii_bus *bus) { struct net_device *const dev = bus->priv; - au1000_enable_mac(dev, 0); /* make sure the MAC associated with this - * mii_bus is enabled */ + /* make sure the MAC associated with this + * mii_bus is enabled + */ + au1000_enable_mac(dev, 0); + return 0; } @@ -380,7 +390,8 @@ static int au1000_mii_probe(struct net_device *dev) } /* find the first (lowest address) PHY - * on the current MAC's MII bus */ + * on the current MAC's MII bus + */ for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) if (aup->mii_bus->phy_map[phy_addr]) { phydev = aup->mii_bus->phy_map[phy_addr]; @@ -774,7 +785,8 @@ static void au1000_update_tx_stats(struct net_device *dev, u32 status) if (!aup->phy_dev || (DUPLEX_FULL == aup->phy_dev->duplex)) { if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) { /* any other tx errors are only valid - * in half duplex mode */ + * in half duplex mode + */ ps->tx_errors++; ps->tx_aborted_errors++; } @@ -1068,8 +1080,9 @@ static int __devinit au1000_probe(struct platform_device *pdev) aup->msg_enable = (au1000_debug < 4 ? AU1000_DEF_MSG_ENABLE : au1000_debug); - /* Allocate the data buffers */ - /* Snooping works fine with eth on all au1xxx */ + /* Allocate the data buffers + * Snooping works fine with eth on all au1xxx + */ aup->vaddr = (u32)dma_alloc_noncoherent(NULL, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), &aup->dma_addr, 0); @@ -1226,7 +1239,8 @@ err_out: mdiobus_unregister(aup->mii_bus); /* here we should have a valid dev plus aup-> register addresses - * so we can reset the mac properly.*/ + * so we can reset the mac properly. + */ au1000_reset_mac(dev); for (i = 0; i < NUM_RX_DMA; i++) { diff --git a/drivers/net/au1000_eth.h b/drivers/net/au1000_eth.h index 4b638df..6229c77 100644 --- a/drivers/net/au1000_eth.h +++ b/drivers/net/au1000_eth.h @@ -100,7 +100,8 @@ struct au1000_private { int mac_id; int mac_enabled; /* whether MAC is currently enabled and running - (req. for mdio) */ + * (req. for mdio) + */ int old_link; /* used by au1000_adjust_link */ int old_speed; @@ -119,7 +120,8 @@ struct au1000_private { int phy_irq; /* These variables are just for quick access - * to certain regs addresses. */ + * to certain regs addresses. + */ struct mac_reg *mac; /* mac registers */ u32 *enable; /* address of MAC Enable Register */