diff mbox series

[v2,2/3] ARM: iop32x: improve N2100 PCI broken parity quirk

Message ID 5b100322-7a53-8f5e-32f9-a67c3cd2beeb@gmail.com (mailing list archive)
State Superseded
Headers show
Series PCI: Disable parity checking if broken_parity is set | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 2 maintainers not CCed: akpm@linux-foundation.org rppt@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Heiner Kallweit Jan. 6, 2021, 11:05 a.m. UTC
Use new PCI core function pci_quirk_broken_parity(), in addition to
setting broken_parity_status is disables parity checking.
This allows us to remove a quirk in r8169 driver.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
v2:
- remove additional changes from this patch
---
 arch/arm/mach-iop32x/n2100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Helgaas Jan. 6, 2021, 5:37 p.m. UTC | #1
On Wed, Jan 06, 2021 at 12:05:41PM +0100, Heiner Kallweit wrote:
> Use new PCI core function pci_quirk_broken_parity(), in addition to
> setting broken_parity_status is disables parity checking.

That sentence has a typo or something so it doesn't read quite right.
Maybe:

  Use new PCI core function pci_quirk_broken_parity() to disable
  parity checking.

"broken_parity_status" is basically internal to the PCI core and
doesn't really seem relevant here.  The only uses are the sysfs
store/show functions and edac.

> This allows us to remove a quirk in r8169 driver.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> v2:
> - remove additional changes from this patch
> ---
>  arch/arm/mach-iop32x/n2100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
> index 78b9a5ee4..9f2aae3cd 100644
> --- a/arch/arm/mach-iop32x/n2100.c
> +++ b/arch/arm/mach-iop32x/n2100.c
> @@ -125,7 +125,7 @@ static void n2100_fixup_r8169(struct pci_dev *dev)
>  	if (dev->bus->number == 0 &&
>  	    (dev->devfn == PCI_DEVFN(1, 0) ||
>  	     dev->devfn == PCI_DEVFN(2, 0)))
> -		dev->broken_parity_status = 1;
> +		pci_quirk_broken_parity(dev);
>  }
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169);
>  
> -- 
> 2.30.0
> 
>
Heiner Kallweit Jan. 6, 2021, 5:47 p.m. UTC | #2
On 06.01.2021 18:37, Bjorn Helgaas wrote:
> On Wed, Jan 06, 2021 at 12:05:41PM +0100, Heiner Kallweit wrote:
>> Use new PCI core function pci_quirk_broken_parity(), in addition to
>> setting broken_parity_status is disables parity checking.
> 
> That sentence has a typo or something so it doesn't read quite right.
> Maybe:
> 
>   Use new PCI core function pci_quirk_broken_parity() to disable
>   parity checking.
> 
OK, let me adjust this in a v3.

> "broken_parity_status" is basically internal to the PCI core and
> doesn't really seem relevant here.  The only uses are the sysfs
> store/show functions and edac.
> 
>> This allows us to remove a quirk in r8169 driver.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>> v2:
>> - remove additional changes from this patch
>> ---
>>  arch/arm/mach-iop32x/n2100.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
>> index 78b9a5ee4..9f2aae3cd 100644
>> --- a/arch/arm/mach-iop32x/n2100.c
>> +++ b/arch/arm/mach-iop32x/n2100.c
>> @@ -125,7 +125,7 @@ static void n2100_fixup_r8169(struct pci_dev *dev)
>>  	if (dev->bus->number == 0 &&
>>  	    (dev->devfn == PCI_DEVFN(1, 0) ||
>>  	     dev->devfn == PCI_DEVFN(2, 0)))
>> -		dev->broken_parity_status = 1;
>> +		pci_quirk_broken_parity(dev);
>>  }
>>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169);
>>  
>> -- 
>> 2.30.0
>>
>>
diff mbox series

Patch

diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index 78b9a5ee4..9f2aae3cd 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -125,7 +125,7 @@  static void n2100_fixup_r8169(struct pci_dev *dev)
 	if (dev->bus->number == 0 &&
 	    (dev->devfn == PCI_DEVFN(1, 0) ||
 	     dev->devfn == PCI_DEVFN(2, 0)))
-		dev->broken_parity_status = 1;
+		pci_quirk_broken_parity(dev);
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, PCI_ANY_ID, n2100_fixup_r8169);