* [PATCH, net-next] r8169:Avoid to use I/O Space access on new design and others
@ 2015-08-20 12:28 Corcodel Marian
2015-08-20 13:40 ` Eric Dumazet
0 siblings, 1 reply; 2+ messages in thread
From: Corcodel Marian @ 2015-08-20 12:28 UTC (permalink / raw)
To: netdev; +Cc: Corcodel Marian
Avoid to use on pci express interface I/O Space access
and do not enable Bus Master is set on BIOS. Warning: Do not apply this
patch must apply previously patch first.
To: netdev@vger.kernel.org
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 b1fb54f..6cd7226 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8171,6 +8171,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (pci_is_pcie(pdev))
pci_intx(pdev, 0);
+ if (pci_is_pcie(pdev))
+ pci_write_config_word(pdev, PCI_COMMAND, ~PCI_COMMAND_IO);
+
/* Identify chip attached to board */
rtl8169_get_mac_version(tp, dev, cfg->default_ver);
@@ -8183,8 +8186,8 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
rtl_hw_reset(tp);
rtl_ack_events(tp, 0xffff);
-
- pci_set_master(pdev);
+ if (!pci_is_pcie(pdev))
+ pci_set_master(pdev);
rtl_init_mdio_ops(tp);
rtl_init_pll_power_ops(tp);
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH, net-next] r8169:Avoid to use I/O Space access on new design and others
2015-08-20 12:28 [PATCH, net-next] r8169:Avoid to use I/O Space access on new design and others Corcodel Marian
@ 2015-08-20 13:40 ` Eric Dumazet
0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2015-08-20 13:40 UTC (permalink / raw)
To: Corcodel Marian; +Cc: netdev
On Thu, 2015-08-20 at 15:28 +0300, Corcodel Marian wrote:
> Avoid to use on pci express interface I/O Space access
> and do not enable Bus Master is set on BIOS. Warning: Do not apply this
> patch must apply previously patch first.
> To: netdev@vger.kernel.org
It is time you carefully read Documentation/SubmittingPatches
Seriously.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-20 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-20 12:28 [PATCH, net-next] r8169:Avoid to use I/O Space access on new design and others Corcodel Marian
2015-08-20 13:40 ` 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).