netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove
@ 2011-12-07 16:41 Florian Fainelli
  2011-12-07 16:41 ` [PATCH 2/2] e1000: cleanup CE4100 MDIO registers access Florian Fainelli
  2011-12-07 22:01 ` [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove Jeff Kirsher
  0 siblings, 2 replies; 6+ messages in thread
From: Florian Fainelli @ 2011-12-07 16:41 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: e1000-devel, netdev, Florian Fainelli

We are not unmapping ce4100_gbe_mdio_base_virt in exit path in case
we are running on a CE4100 adapter, fix that.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
---
 drivers/net/ethernet/intel/e1000/e1000_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 82f4ef1..7bb3337 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -1286,6 +1286,8 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
 	kfree(adapter->tx_ring);
 	kfree(adapter->rx_ring);
 
+	if (hw->mac_type == e1000_ce4100)
+		iounmap(ce4100_gbe_mdio_base_virt);
 	iounmap(hw->hw_addr);
 	if (hw->flash_address)
 		iounmap(hw->flash_address);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] e1000: cleanup CE4100 MDIO registers access
  2011-12-07 16:41 [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove Florian Fainelli
@ 2011-12-07 16:41 ` Florian Fainelli
  2011-12-07 22:01 ` [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove Jeff Kirsher
  1 sibling, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2011-12-07 16:41 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: e1000-devel, netdev, Florian Fainelli

A global variable is currently used to hold the virtual address of the
CE4100 MDIO base register address. Store the address in the e1000_hw
structure and update macros accordingly.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
---
 drivers/net/ethernet/intel/e1000/e1000_hw.h   |    4 ++--
 drivers/net/ethernet/intel/e1000/e1000_main.c |   14 ++++----------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.h b/drivers/net/ethernet/intel/e1000/e1000_hw.h
index cf7e3c0..f6c4d7e 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_hw.h
+++ b/drivers/net/ethernet/intel/e1000/e1000_hw.h
@@ -812,8 +812,7 @@ struct e1000_ffvt_entry {
 #define E1000_FLA      0x0001C	/* Flash Access - RW */
 #define E1000_MDIC     0x00020	/* MDI Control - RW */
 
-extern void __iomem *ce4100_gbe_mdio_base_virt;
-#define INTEL_CE_GBE_MDIO_RCOMP_BASE    (ce4100_gbe_mdio_base_virt)
+#define INTEL_CE_GBE_MDIO_RCOMP_BASE    (hw->ce4100_gbe_mdio_base_virt)
 #define E1000_MDIO_STS  (INTEL_CE_GBE_MDIO_RCOMP_BASE + 0)
 #define E1000_MDIO_CMD  (INTEL_CE_GBE_MDIO_RCOMP_BASE + 4)
 #define E1000_MDIO_DRV  (INTEL_CE_GBE_MDIO_RCOMP_BASE + 8)
@@ -1343,6 +1342,7 @@ struct e1000_hw_stats {
 struct e1000_hw {
 	u8 __iomem *hw_addr;
 	u8 __iomem *flash_address;
+	void __iomem *ce4100_gbe_mdio_base_virt;
 	e1000_mac_type mac_type;
 	e1000_phy_type phy_type;
 	u32 phy_init_script;
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 7bb3337..39d3178 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -33,11 +33,6 @@
 #include <linux/bitops.h>
 #include <linux/if_vlan.h>
 
-/* Intel Media SOC GbE MDIO physical base address */
-static unsigned long ce4100_gbe_mdio_base_phy;
-/* Intel Media SOC GbE MDIO virtual base address */
-void __iomem *ce4100_gbe_mdio_base_virt;
-
 char e1000_driver_name[] = "e1000";
 static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
 #define DRV_VERSION "7.3.21-k8-NAPI"
@@ -1054,11 +1049,10 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
 
 	err = -EIO;
 	if (hw->mac_type == e1000_ce4100) {
-		ce4100_gbe_mdio_base_phy = pci_resource_start(pdev, BAR_1);
-		ce4100_gbe_mdio_base_virt = ioremap(ce4100_gbe_mdio_base_phy,
+		hw->ce4100_gbe_mdio_base_virt = ioremap(pci_resource_start(pdev, BAR_1),
 		                                pci_resource_len(pdev, BAR_1));
 
-		if (!ce4100_gbe_mdio_base_virt)
+		if (!hw->ce4100_gbe_mdio_base_virt)
 			goto err_mdio_ioremap;
 	}
 
@@ -1249,7 +1243,7 @@ err_eeprom:
 err_dma:
 err_sw_init:
 err_mdio_ioremap:
-	iounmap(ce4100_gbe_mdio_base_virt);
+	iounmap(hw->ce4100_gbe_mdio_base_virt);
 	iounmap(hw->hw_addr);
 err_ioremap:
 	free_netdev(netdev);
@@ -1287,7 +1281,7 @@ static void __devexit e1000_remove(struct pci_dev *pdev)
 	kfree(adapter->rx_ring);
 
 	if (hw->mac_type == e1000_ce4100)
-		iounmap(ce4100_gbe_mdio_base_virt);
+		iounmap(hw->ce4100_gbe_mdio_base_virt);
 	iounmap(hw->hw_addr);
 	if (hw->flash_address)
 		iounmap(hw->flash_address);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove
  2011-12-07 16:41 [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove Florian Fainelli
  2011-12-07 16:41 ` [PATCH 2/2] e1000: cleanup CE4100 MDIO registers access Florian Fainelli
@ 2011-12-07 22:01 ` Jeff Kirsher
  2012-01-04 19:01   ` Florian Fainelli
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2011-12-07 22:01 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]

On Wed, 2011-12-07 at 08:41 -0800, Florian Fainelli wrote:
> We are not unmapping ce4100_gbe_mdio_base_virt in exit path in case
> we are running on a CE4100 adapter, fix that.
> 
> Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
> ---
>  drivers/net/ethernet/intel/e1000/e1000_main.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-) 

Thanks Florian, I have added your two patches to my queue.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove
  2011-12-07 22:01 ` [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove Jeff Kirsher
@ 2012-01-04 19:01   ` Florian Fainelli
  2012-01-04 21:41     ` Jeff Kirsher
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2012-01-04 19:01 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org

Hello Jeff,

On 12/07/11 23:01, Jeff Kirsher wrote:
> On Wed, 2011-12-07 at 08:41 -0800, Florian Fainelli wrote:
>> We are not unmapping ce4100_gbe_mdio_base_virt in exit path in case
>> we are running on a CE4100 adapter, fix that.
>>
>> Signed-off-by: Florian Fainelli<ffainelli@freebox.fr>
>> ---
>>   drivers/net/ethernet/intel/e1000/e1000_main.c |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> Thanks Florian, I have added your two patches to my queue.

I have not seen these patches in the last "Intel Wired LAN" pull requets 
that you did, are you holding them for a later pull request?

Thanks.
--
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove
  2012-01-04 19:01   ` Florian Fainelli
@ 2012-01-04 21:41     ` Jeff Kirsher
  2012-01-06 14:21       ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2012-01-04 21:41 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

On Wed, 2012-01-04 at 20:01 +0100, Florian Fainelli wrote:
> Hello Jeff,
> 
> On 12/07/11 23:01, Jeff Kirsher wrote:
> > On Wed, 2011-12-07 at 08:41 -0800, Florian Fainelli wrote:
> >> We are not unmapping ce4100_gbe_mdio_base_virt in exit path in case
> >> we are running on a CE4100 adapter, fix that.
> >>
> >> Signed-off-by: Florian Fainelli<ffainelli@freebox.fr>
> >> ---
> >>   drivers/net/ethernet/intel/e1000/e1000_main.c |    2 ++
> >>   1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > Thanks Florian, I have added your two patches to my queue.
> 
> I have not seen these patches in the last "Intel Wired LAN" pull requets 
> that you did, are you holding them for a later pull request?
> 
> Thanks.
> --
> Florian
> 

Yes, I apologize and had overlooked your patches when putting together
the last to pull requests.  I will make sure they are in the one of the
next 2 pull requests.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove
  2012-01-04 21:41     ` Jeff Kirsher
@ 2012-01-06 14:21       ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2012-01-06 14:21 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org



On 01/04/12 22:41, Jeff Kirsher wrote:
> On Wed, 2012-01-04 at 20:01 +0100, Florian Fainelli wrote:
>> Hello Jeff,
>>
>> On 12/07/11 23:01, Jeff Kirsher wrote:
>>> On Wed, 2011-12-07 at 08:41 -0800, Florian Fainelli wrote:
>>>> We are not unmapping ce4100_gbe_mdio_base_virt in exit path in case
>>>> we are running on a CE4100 adapter, fix that.
>>>>
>>>> Signed-off-by: Florian Fainelli<ffainelli@freebox.fr>
>>>> ---
>>>>    drivers/net/ethernet/intel/e1000/e1000_main.c |    2 ++
>>>>    1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> Thanks Florian, I have added your two patches to my queue.
>>
>> I have not seen these patches in the last "Intel Wired LAN" pull requets
>> that you did, are you holding them for a later pull request?
>>
>> Thanks.
>> --
>> Florian
>>
>
> Yes, I apologize and had overlooked your patches when putting together
> the last to pull requests.  I will make sure they are in the one of the
> next 2 pull requests.

I just saw them, thanks Jeff!
--
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-06 14:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 16:41 [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove Florian Fainelli
2011-12-07 16:41 ` [PATCH 2/2] e1000: cleanup CE4100 MDIO registers access Florian Fainelli
2011-12-07 22:01 ` [PATCH 1/2] e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove Jeff Kirsher
2012-01-04 19:01   ` Florian Fainelli
2012-01-04 21:41     ` Jeff Kirsher
2012-01-06 14:21       ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).