public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Einon <mark.einon@gmail.com>
To: gregkh@suse.de
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	o.hartmann@telovital.com, Mark Einon <mark.einon@gmail.com>
Subject: [PATCH 03/12] staging: et131x: Remove redundant struct adapter members
Date: Sun,  4 Sep 2011 11:24:34 +0100	[thread overview]
Message-ID: <1315131883-11068-4-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <1315131883-11068-1-git-send-email-mark.einon@gmail.com>

adapter->speed_duplex was never referenced.
adapter->registry_phy_coma was always set to zero, even in the vendor driver.

Removing all member references and associated dead code.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et1310_phy.c     |    6 ------
 drivers/staging/et131x/et131x_adapter.h |    2 --
 drivers/staging/et131x/et131x_initpci.c |    4 +---
 3 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c
index 41f0afa..0fccb86 100644
--- a/drivers/staging/et131x/et1310_phy.c
+++ b/drivers/staging/et131x/et1310_phy.c
@@ -496,12 +496,6 @@ void et131x_mii_check(struct et131x_adapter *adapter,
 
 			/* Setup ET1310 as per the documentation */
 			et131x_adapter_setup(adapter);
-
-			/* Setup the PHY into coma mode until the cable is
-			 * plugged back in
-			 */
-			if (adapter->registry_phy_coma == 1)
-				et1310_enable_phy_coma(adapter);
 		}
 	}
 
diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
index a63f376..5656472 100644
--- a/drivers/staging/et131x/et131x_adapter.h
+++ b/drivers/staging/et131x/et131x_adapter.h
@@ -178,9 +178,7 @@ struct et131x_adapter {
 	struct address_map __iomem *regs;
 
 	/* Registry parameters */
-	u8 speed_duplex;	/* speed/duplex */
 	u8 wanted_flow;		/* Flow we want for 802.3x flow control */
-	u8 registry_phy_coma;	/* Phy Coma mode enable/disable */
 
 	u32 registry_rx_mem_end;	/* Size of internal rx memory */
 	u32 registry_jumbo_packet;	/* Max supported ethernet packet size */
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index eb08889..799aad6 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -250,14 +250,12 @@ void et131x_error_timer_handler(unsigned long data)
 		    "No interrupts, in PHY coma, pm_csr = 0x%x\n", pm_csr);
 
 	if (!(adapter->bmsr & BMSR_LSTATUS) &&
-	    adapter->registry_phy_coma &&
 	    adapter->boot_coma < 11) {
 		adapter->boot_coma++;
 	}
 
 	if (adapter->boot_coma == 10) {
-		if (!(adapter->bmsr & BMSR_LSTATUS)
-		    && adapter->registry_phy_coma) {
+		if (!(adapter->bmsr & BMSR_LSTATUS)) {
 			if ((pm_csr & ET_PM_PHY_SW_COMA) == 0) {
 				/* NOTE - This was originally a 'sync with
 				 *  interrupt'. How to do that under Linux?
-- 
1.7.6


  parent reply	other threads:[~2011-09-04 10:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-04 10:24 [PATCH 00/12] staging: et131x: Following mvoe to use phydev, remove detritus Mark Einon
2011-09-04 10:24 ` [PATCH 01/12] staging: et131x: Remove private adapter->linkspeed and use phydev->speed instead Mark Einon
2011-09-04 10:24 ` [PATCH 02/12] staging: et131x: Remove private adapter->duplex_mode and use phydev->duplex instead Mark Einon
2011-09-04 10:24 ` Mark Einon [this message]
2011-09-04 10:24 ` [PATCH 04/12] staging: et131x: Remove PHY interrupt handling code from driver isr handler Mark Einon
2011-09-04 10:24 ` [PATCH 05/12] staging: et131x: remove calls to netif_carrier_[on|off] from et131x_mii_check Mark Einon
2011-09-04 10:24 ` [PATCH 06/12] staging: et131x: Remove registry_rx_mem_end from struct et131x_adapter Mark Einon
2011-09-04 10:24 ` [PATCH 07/12] staging: et131x: Remove cached_mask_value from et131x_adapter Mark Einon
2011-09-04 10:24 ` [PATCH 08/12] staging: et131x: Remove duplicated register defines from et1310_phy.h Mark Einon
2011-09-04 10:24 ` [PATCH 09/12] staging: et131x: Replace magic numbers in et1310_phy.c with defines Mark Einon
2011-09-04 10:24 ` [PATCH 10/12] staging: et131x: Remove struct mi_regs from et1310_phy.h Mark Einon
2011-09-04 10:24 ` [PATCH 11/12] staging: et131x: Remove ai_force_[duplex|speed] from et131x_adapter Mark Einon
2011-09-04 10:24 ` [PATCH 12/12] staging: et131x: Update README file Mark Einon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1315131883-11068-4-git-send-email-mark.einon@gmail.com \
    --to=mark.einon@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o.hartmann@telovital.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox