All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function
@ 2020-04-01  9:16 Vitaly Lifshits
  2020-04-02  6:16 ` Neftin, Sasha
  2020-04-21 18:23 ` Brown, Aaron F
  0 siblings, 2 replies; 4+ messages in thread
From: Vitaly Lifshits @ 2020-04-01  9:16 UTC (permalink / raw)
  To: intel-wired-lan

igc driver has leftovers from the previous device that supported
virtualization. This can be found in the function IGC_REMOVED which
became obsolete, and can be removed.

Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_mac.h  | 4 ----
 drivers/net/ethernet/intel/igc/igc_main.c | 3 ---
 drivers/net/ethernet/intel/igc/igc_regs.h | 3 +--
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.h b/drivers/net/ethernet/intel/igc/igc_mac.h
index 832cccec87cd..b5963f86defb 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.h
+++ b/drivers/net/ethernet/intel/igc/igc_mac.h
@@ -8,10 +8,6 @@
 #include "igc_phy.h"
 #include "igc_defines.h"
 
-#ifndef IGC_REMOVED
-#define IGC_REMOVED(a) (0)
-#endif /* IGC_REMOVED */
-
 /* forward declaration */
 s32 igc_disable_pcie_master(struct igc_hw *hw);
 s32 igc_check_for_copper_link(struct igc_hw *hw);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index c3555148ca0e..cb0d523ffc19 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4662,9 +4662,6 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg)
 	u8 __iomem *hw_addr = READ_ONCE(hw->hw_addr);
 	u32 value = 0;
 
-	if (IGC_REMOVED(hw_addr))
-		return ~value;
-
 	value = readl(&hw_addr[reg]);
 
 	/* reads should not return all F's */
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index 82158176634c..21b6fc42edbb 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -277,8 +277,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg);
 #define wr32(reg, val) \
 do { \
 	u8 __iomem *hw_addr = READ_ONCE((hw)->hw_addr); \
-	if (!IGC_REMOVED(hw_addr)) \
-		writel((val), &hw_addr[(reg)]); \
+	writel((val), &hw_addr[(reg)]); \
 } while (0)
 
 #define rd32(reg) (igc_rd32(hw, reg))
-- 
2.11.0


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

* [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function
  2020-04-01  9:16 [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function Vitaly Lifshits
@ 2020-04-02  6:16 ` Neftin, Sasha
  2020-04-02  6:19   ` Neftin, Sasha
  2020-04-21 18:23 ` Brown, Aaron F
  1 sibling, 1 reply; 4+ messages in thread
From: Neftin, Sasha @ 2020-04-02  6:16 UTC (permalink / raw)
  To: intel-wired-lan

On 4/1/2020 12:16, Vitaly Lifshits wrote:
> igc driver has leftovers from the previous device that supported
> virtualization. This can be found in the function IGC_REMOVED which
> became obsolete, and can be removed.
> 
> Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_mac.h  | 4 ----
>   drivers/net/ethernet/intel/igc/igc_main.c | 3 ---
>   drivers/net/ethernet/intel/igc/igc_regs.h | 3 +--
>   3 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_mac.h b/drivers/net/ethernet/intel/igc/igc_mac.h
> index 832cccec87cd..b5963f86defb 100644
> --- a/drivers/net/ethernet/intel/igc/igc_mac.h
> +++ b/drivers/net/ethernet/intel/igc/igc_mac.h
> @@ -8,10 +8,6 @@
>   #include "igc_phy.h"
>   #include "igc_defines.h"
>   
> -#ifndef IGC_REMOVED
> -#define IGC_REMOVED(a) (0)
> -#endif /* IGC_REMOVED */
> -
>   /* forward declaration */
>   s32 igc_disable_pcie_master(struct igc_hw *hw);
>   s32 igc_check_for_copper_link(struct igc_hw *hw);
> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
> index c3555148ca0e..cb0d523ffc19 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -4662,9 +4662,6 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg)
>   	u8 __iomem *hw_addr = READ_ONCE(hw->hw_addr);
>   	u32 value = 0;
>   
> -	if (IGC_REMOVED(hw_addr))
> -		return ~value;
> -
>   	value = readl(&hw_addr[reg]);
>   
>   	/* reads should not return all F's */
> diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
> index 82158176634c..21b6fc42edbb 100644
> --- a/drivers/net/ethernet/intel/igc/igc_regs.h
> +++ b/drivers/net/ethernet/intel/igc/igc_regs.h
> @@ -277,8 +277,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg);
>   #define wr32(reg, val) \
>   do { \
>   	u8 __iomem *hw_addr = READ_ONCE((hw)->hw_addr); \
> -	if (!IGC_REMOVED(hw_addr)) \
> -		writel((val), &hw_addr[(reg)]); \
> +	writel((val), &hw_addr[(reg)]); \
>   } while (0)
>   
>   #define rd32(reg) (igc_rd32(hw, reg))
> 
Acked-by: Sasha Neftin <sasha.neftion@intel.com>

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

* [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function
  2020-04-02  6:16 ` Neftin, Sasha
@ 2020-04-02  6:19   ` Neftin, Sasha
  0 siblings, 0 replies; 4+ messages in thread
From: Neftin, Sasha @ 2020-04-02  6:19 UTC (permalink / raw)
  To: intel-wired-lan

On 4/2/2020 09:16, Neftin, Sasha wrote:
> On 4/1/2020 12:16, Vitaly Lifshits wrote:
>> igc driver has leftovers from the previous device that supported
>> virtualization. This can be found in the function IGC_REMOVED which
>> became obsolete, and can be removed.
>>
>> Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
>> ---
>> ? drivers/net/ethernet/intel/igc/igc_mac.h? | 4 ----
>> ? drivers/net/ethernet/intel/igc/igc_main.c | 3 ---
>> ? drivers/net/ethernet/intel/igc/igc_regs.h | 3 +--
>> ? 3 files changed, 1 insertion(+), 9 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/igc/igc_mac.h 
>> b/drivers/net/ethernet/intel/igc/igc_mac.h
>> index 832cccec87cd..b5963f86defb 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_mac.h
>> +++ b/drivers/net/ethernet/intel/igc/igc_mac.h
>> @@ -8,10 +8,6 @@
>> ? #include "igc_phy.h"
>> ? #include "igc_defines.h"
>> -#ifndef IGC_REMOVED
>> -#define IGC_REMOVED(a) (0)
>> -#endif /* IGC_REMOVED */
>> -
>> ? /* forward declaration */
>> ? s32 igc_disable_pcie_master(struct igc_hw *hw);
>> ? s32 igc_check_for_copper_link(struct igc_hw *hw);
>> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c 
>> b/drivers/net/ethernet/intel/igc/igc_main.c
>> index c3555148ca0e..cb0d523ffc19 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_main.c
>> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
>> @@ -4662,9 +4662,6 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg)
>> ????? u8 __iomem *hw_addr = READ_ONCE(hw->hw_addr);
>> ????? u32 value = 0;
>> -??? if (IGC_REMOVED(hw_addr))
>> -??????? return ~value;
>> -
>> ????? value = readl(&hw_addr[reg]);
>> ????? /* reads should not return all F's */
>> diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h 
>> b/drivers/net/ethernet/intel/igc/igc_regs.h
>> index 82158176634c..21b6fc42edbb 100644
>> --- a/drivers/net/ethernet/intel/igc/igc_regs.h
>> +++ b/drivers/net/ethernet/intel/igc/igc_regs.h
>> @@ -277,8 +277,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg);
>> ? #define wr32(reg, val) \
>> ? do { \
>> ????? u8 __iomem *hw_addr = READ_ONCE((hw)->hw_addr); \
>> -??? if (!IGC_REMOVED(hw_addr)) \
>> -??????? writel((val), &hw_addr[(reg)]); \
>> +??? writel((val), &hw_addr[(reg)]); \
>> ? } while (0)
>> ? #define rd32(reg) (igc_rd32(hw, reg))
>>
> Acked-by: Sasha Neftin <sasha.neftin@intel.com>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan


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

* [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function
  2020-04-01  9:16 [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function Vitaly Lifshits
  2020-04-02  6:16 ` Neftin, Sasha
@ 2020-04-21 18:23 ` Brown, Aaron F
  1 sibling, 0 replies; 4+ messages in thread
From: Brown, Aaron F @ 2020-04-21 18:23 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Vitaly
> Lifshits
> Sent: Wednesday, April 1, 2020 2:17 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function
> 
> igc driver has leftovers from the previous device that supported
> virtualization. This can be found in the function IGC_REMOVED which
> became obsolete, and can be removed.
> 
> Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
> ---
>  drivers/net/ethernet/intel/igc/igc_mac.h  | 4 ----
>  drivers/net/ethernet/intel/igc/igc_main.c | 3 ---
>  drivers/net/ethernet/intel/igc/igc_regs.h | 3 +--
>  3 files changed, 1 insertion(+), 9 deletions(-)
Tested-by: Aaron Brown <aaron.f.brown@intel.com>

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

end of thread, other threads:[~2020-04-21 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01  9:16 [Intel-wired-lan] [PATCH v1] igc: remove IGC_REMOVED function Vitaly Lifshits
2020-04-02  6:16 ` Neftin, Sasha
2020-04-02  6:19   ` Neftin, Sasha
2020-04-21 18:23 ` Brown, Aaron F

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.