Skip to contentSkip to conversation

staging: r8187se: Remove write_phy routine

PATCH Applied Larry Finger 2 participants 2 messages Feb 15, 2010 – Feb 18, 2010 Staging

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 staging: r8187se: Remove write_phy routine

Remove a routine that is not used.

---

 r8180_core.c |   37 -------------------------------------
 1 file changed, 37 deletions(-)
drivers/staging/rtl8187se/r8180_core.c +0 -37
Index: linux-2.6/drivers/staging/rtl8187se/r8180_core.c
===================================================================
@@ -3207,43 +3207,6 @@ void write_phy_cck (struct net_device *d
 	rtl8185_write_phy(dev, adr, data | 0x10000);
 }
 
-/* 70*3 = 210 ms
- * I hope this is enougth
- */
-#define MAX_PHY 70
-void write_phy(struct net_device *dev, u8 adr, u8 data)
-{
-	u32 phy;
-	int i;
-
-	phy = 0xff0000;
-	phy |= adr;
-	phy |= 0x80; /* this should enable writing */
-	phy |= (data<<8);
-
-	//PHY_ADR, PHY_R and PHY_W  are contig and treated as one dword
-	write_nic_dword(dev,PHY_ADR, phy);
-
-	phy= 0xffff00;
-	phy |= adr;
-
-	write_nic_dword(dev,PHY_ADR, phy);
-	for(i=0;i<MAX_PHY;i++){
-		phy=read_nic_dword(dev,PHY_ADR);
-		phy= phy & 0xff0000;
-		phy= phy >> 16;
-		if(phy == data){ //SUCCESS!
-			force_pci_posting(dev);
-			mdelay(3); //random value
-			return;
-		}else{
-			force_pci_posting(dev);
-			mdelay(3); //random value
-		}
-	}
-	DMESGW ("Phy writing %x %x failed!", adr,data);
-}
-
 void rtl8185_set_rate(struct net_device *dev)
 {
 	int i;
#1 lore raw

patch staging-r8187se-remove-write_phy-routine.patch added to gregkh-2.6 tree

This is a note to let you know that I've just added the patch titled

Subject: staging: r8187se: Remove write_phy routine

to my gregkh-2.6 tree. Its filename is

staging-r8187se-remove-write_phy-routine.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Quoted 1 line

From [email protected] Thu Feb 18 07:43:19 2010

From: Larry Finger <[email protected]>
Date: Sun, 14 Feb 2010 21:55:16 -0600
Subject: staging: r8187se: Remove write_phy routine
To: Greg Kroah-Hartman <[email protected]>
Cc: Bernhard Schiffner <[email protected]>, wireless <[email protected]>
Message-ID: <[email protected]>

Remove a routine that is not used.

---
 drivers/staging/rtl8187se/r8180_core.c |   37 ---------------------------------
 1 file changed, 37 deletions(-)
drivers/staging/rtl8187se/r8180_core.c +0 -37
@@ -3165,43 +3165,6 @@ void write_phy_cck (struct net_device *d
 	rtl8185_write_phy(dev, adr, data | 0x10000);
 }
 
-/* 70*3 = 210 ms
- * I hope this is enougth
- */
-#define MAX_PHY 70
-void write_phy(struct net_device *dev, u8 adr, u8 data)
-{
-	u32 phy;
-	int i;
-
-	phy = 0xff0000;
-	phy |= adr;
-	phy |= 0x80; /* this should enable writing */
-	phy |= (data<<8);
-
-	//PHY_ADR, PHY_R and PHY_W  are contig and treated as one dword
-	write_nic_dword(dev,PHY_ADR, phy);
-
-	phy= 0xffff00;
-	phy |= adr;
-
-	write_nic_dword(dev,PHY_ADR, phy);
-	for(i=0;i<MAX_PHY;i++){
-		phy=read_nic_dword(dev,PHY_ADR);
-		phy= phy & 0xff0000;
-		phy= phy >> 16;
-		if(phy == data){ //SUCCESS!
-			force_pci_posting(dev);
-			mdelay(3); //random value
-			return;
-		}else{
-			force_pci_posting(dev);
-			mdelay(3); //random value
-		}
-	}
-	DMESGW ("Phy writing %x %x failed!", adr,data);
-}
-
 void rtl8185_set_rate(struct net_device *dev)
 {
 	int i;