netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).