From: Francois Romieu <romieu@fr.zoreil.com>
To: jgarzik@pobox.com
Cc: Hans-Frieder Vogt <hfvogt@arcor.de>,
Andy Lutomirski <luto@myrealbox.com>,
Jon Mason <jdmason@us.ibm.com>,
Srihari Vijayaraghavan <sriharivijayaraghavan@yahoo.com.au>,
netdev@oss.sgi.com
Subject: [PATCH 2.6.9-rc2 1/1] r8169: default on disabling PCIDAC
Date: Mon, 20 Sep 2004 00:41:02 +0200 [thread overview]
Message-ID: <20040919224102.GA32577@electric-eye.fr.zoreil.com> (raw)
Default to disabling PCI DAC as this option appears unsafe on amd64
(original suggestion by Hans-Frieder Vogt <hfvogt@arcor.de>).
The driver will typically report PCI System error when something goes
wrong. The relevant interrupt is not masked any more and the driver
can thus be disabled.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
diff -puN linux-2.6.9-rc2.orig/drivers/net/r8169.c linux-2.6.9-rc2/drivers/net/r8169.c
--- linux-2.6.9-rc2.orig/drivers/net/r8169.c 2004-09-19 00:17:04.000000000 +0200
+++ linux-2.6.9-rc2/drivers/net/r8169.c 2004-09-20 00:16:02.000000000 +0200
@@ -156,6 +156,7 @@ static struct pci_device_id rtl8169_pci_
MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
static int rx_copybreak = 200;
+static int use_dac;
enum RTL8169_registers {
MAC0 = 0, /* Ethernet hardware address. */
@@ -358,6 +359,8 @@ MODULE_AUTHOR("Realtek");
MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM(rx_copybreak, "i");
+MODULE_PARM(use_dac, "i");
+MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot.");
MODULE_LICENSE("GPL");
static int rtl8169_open(struct net_device *dev);
@@ -375,7 +378,7 @@ static int rtl8169_poll(struct net_devic
#endif
static const u16 rtl8169_intr_mask =
- LinkChg | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK;
+ SYSErr | LinkChg | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK;
static const u16 rtl8169_napi_event =
RxOK | RxOverflow | RxFIFOOver | TxOK | TxErr;
static const unsigned int rtl8169_rx_config =
@@ -984,7 +987,7 @@ rtl8169_init_board(struct pci_dev *pdev,
tp->cp_cmd = PCIMulRW | RxChkSum;
if ((sizeof(dma_addr_t) > 4) &&
- !pci_set_dma_mask(pdev, DMA_64BIT_MASK))
+ !pci_set_dma_mask(pdev, DMA_64BIT_MASK) && use_dac)
tp->cp_cmd |= PCIDAC;
else {
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
@@ -1761,6 +1764,15 @@ rtl8169_interrupt(int irq, void *dev_ins
if (!(status & rtl8169_intr_mask))
break;
+ if (unlikely(status & SYSErr)) {
+ printk(KERN_ERR PFX "%s: PCI error (status: 0x%04x)."
+ " Device disabled.\n", dev->name, status);
+ RTL_W8(ChipCmd, 0x00);
+ RTL_W16(IntrMask, 0x0000);
+ RTL_R16(IntrMask);
+ break;
+ }
+
if (status & LinkChg)
rtl8169_check_link_status(dev, tp, ioaddr);
next reply other threads:[~2004-09-19 22:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-19 22:41 Francois Romieu [this message]
2004-09-20 18:14 ` [PATCH 2.6.9-rc2 1/1] r8169: default on disabling PCIDAC Jeff Garzik
2004-09-20 19:02 ` Francois Romieu
2004-09-20 19:11 ` Jeff Garzik
2004-09-20 23:36 ` Francois Romieu
[not found] ` <200409231558.29821.jdmason@us.ltcfwd.linux.ibm.com>
[not found] ` <20040923220519.GD8018@electric-eye.fr.zoreil.com>
[not found] ` <200409231840.12539.jdmason@us.ltcfwd.linux.ibm.com>
2004-09-26 23:09 ` [PATCH] r8169 tx_timeout recovery and automatic DAC step-down Francois Romieu
2004-09-30 21:36 ` Francois Romieu
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=20040919224102.GA32577@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=hfvogt@arcor.de \
--cc=jdmason@us.ibm.com \
--cc=jgarzik@pobox.com \
--cc=luto@myrealbox.com \
--cc=netdev@oss.sgi.com \
--cc=sriharivijayaraghavan@yahoo.com.au \
/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).