From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Corcodel Marian <corcodel.marian@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH, net-next] r8169: Disable some bits on pcie
Date: Thu, 20 Aug 2015 16:29:44 +0300 [thread overview]
Message-ID: <55D5D648.6010407@cogentembedded.com> (raw)
In-Reply-To: <55D5CEA0.2090900@cogentembedded.com>
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
next prev parent reply other threads:[~2015-08-20 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-08-20 13:44 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D5D648.6010407@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=corcodel.marian@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).