* [PATCH, net-next] r8169: Disable some bits on pcie
@ 2015-08-20 10:12 Corcodel Marian
2015-08-20 12:57 ` Sergei Shtylyov
2015-08-20 13:44 ` Eric Dumazet
0 siblings, 2 replies; 4+ messages in thread
From: Corcodel Marian @ 2015-08-20 10:12 UTC (permalink / raw)
To: netdev; +Cc: Corcodel Marian
Disable legacy interrupt on pci express interface use msi
disable some bits from pci express interface wich is not need on this nic.
Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6d16de3..b1fb54f 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8164,6 +8164,13 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (!pci_is_pcie(pdev))
netif_info(tp, probe, dev, "not PCI Express\n");
+ if (pci_is_pcie(pdev))
+ pci_write_config_word(pdev, PCI_COMMAND, ~(PCI_COMMAND_FAST_BACK | PCI_COMMAND_WAIT |
+ PCI_COMMAND_VGA_PALETTE | PCI_COMMAND_INVALIDATE | PCI_COMMAND_SPECIAL));
+
+ if (pci_is_pcie(pdev))
+ pci_intx(pdev, 0);
+
/* Identify chip attached to board */
rtl8169_get_mac_version(tp, dev, cfg->default_ver);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH, net-next] r8169: Disable some bits on pcie
2015-08-20 10:12 [PATCH, net-next] r8169: Disable some bits on pcie Corcodel Marian
@ 2015-08-20 12:57 ` Sergei Shtylyov
2015-08-20 13:29 ` Sergei Shtylyov
2015-08-20 13:44 ` Eric Dumazet
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2015-08-20 12:57 UTC (permalink / raw)
To: Corcodel Marian, netdev
Hello.
On 8/20/2015 1:12 PM, Corcodel Marian wrote:
> Disable legacy interrupt on pci express interface use msi
> disable some bits from pci express interface wich is not need on this nic.
>
>
> Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 6d16de3..b1fb54f 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -8164,6 +8164,13 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> if (!pci_is_pcie(pdev))
> netif_info(tp, probe, dev, "not PCI Express\n");
>
> + if (pci_is_pcie(pdev))
> + pci_write_config_word(pdev, PCI_COMMAND, ~(PCI_COMMAND_FAST_BACK | PCI_COMMAND_WAIT |
> + PCI_COMMAND_VGA_PALETTE | PCI_COMMAND_INVALIDATE | PCI_COMMAND_SPECIAL));
Please start the continuation line under 'pdev' on the first line.
> +
> + if (pci_is_pcie(pdev))
> + pci_intx(pdev, 0);
> +
Why two identical *if* statements? Please make it one.
MBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, net-next] r8169: Disable some bits on pcie
2015-08-20 12:57 ` Sergei Shtylyov
@ 2015-08-20 13:29 ` Sergei Shtylyov
0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2015-08-20 13:29 UTC (permalink / raw)
To: Corcodel Marian, netdev
On 8/20/2015 3:57 PM, Sergei Shtylyov wrote:
>> Disable legacy interrupt on pci express interface use msi
>> disable some bits from pci express interface wich is not need on this nic.
>>
>>
>> Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
>>
>> diff --git a/drivers/net/ethernet/realtek/r8169.c
>> b/drivers/net/ethernet/realtek/r8169.c
>> index 6d16de3..b1fb54f 100644
>> --- a/drivers/net/ethernet/realtek/r8169.c
>> +++ b/drivers/net/ethernet/realtek/r8169.c
>> @@ -8164,6 +8164,13 @@ static int rtl_init_one(struct pci_dev *pdev, const
>> struct pci_device_id *ent)
>> if (!pci_is_pcie(pdev))
>> netif_info(tp, probe, dev, "not PCI Express\n");
>>
>> + if (pci_is_pcie(pdev))
>> + pci_write_config_word(pdev, PCI_COMMAND, ~(PCI_COMMAND_FAST_BACK |
>> PCI_COMMAND_WAIT |
>> + PCI_COMMAND_VGA_PALETTE | PCI_COMMAND_INVALIDATE |
>> PCI_COMMAND_SPECIAL));
>
> Please start the continuation line under 'pdev' on the first line.
Can all those bits indeed be set for a networking device?
PCI_COMMAND_VGA_PALETTE is the most incredible...
>> +
>> + if (pci_is_pcie(pdev))
>> + pci_intx(pdev, 0);
>> +
>
> Why two identical *if* statements? Please make it one.
Ah, I missed the *if* at the top. You need just an *else* clause here.
MBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, net-next] r8169: Disable some bits on pcie
2015-08-20 10:12 [PATCH, net-next] r8169: Disable some bits on pcie Corcodel Marian
2015-08-20 12:57 ` Sergei Shtylyov
@ 2015-08-20 13:44 ` Eric Dumazet
1 sibling, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2015-08-20 13:44 UTC (permalink / raw)
To: Corcodel Marian; +Cc: netdev
On Thu, 2015-08-20 at 13:12 +0300, Corcodel Marian wrote:
> Disable legacy interrupt on pci express interface use msi
> disable some bits from pci express interface wich is not need on this nic.
>
>
> Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 6d16de3..b1fb54f 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -8164,6 +8164,13 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> if (!pci_is_pcie(pdev))
> netif_info(tp, probe, dev, "not PCI Express\n");
>
> + if (pci_is_pcie(pdev))
> + pci_write_config_word(pdev, PCI_COMMAND, ~(PCI_COMMAND_FAST_BACK | PCI_COMMAND_WAIT |
> + PCI_COMMAND_VGA_PALETTE | PCI_COMMAND_INVALIDATE | PCI_COMMAND_SPECIAL));
> +
> + if (pci_is_pcie(pdev))
> + pci_intx(pdev, 0);
> +
> /* Identify chip attached to board */
> rtl8169_get_mac_version(tp, dev, cfg->default_ver);
>
Why is it needed ?
PCI_COMMAND_VGA_PALETTE is never used in a networking driver, why should
we eventually take care ?
What exact problem are you solving ?
We wont accept a patch without a clear description, given all the crap
you have sent.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-20 13:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-20 10:12 [PATCH, net-next] r8169: Disable some bits on pcie Corcodel Marian
2015-08-20 12:57 ` Sergei Shtylyov
2015-08-20 13:29 ` Sergei Shtylyov
2015-08-20 13:44 ` Eric Dumazet
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).