mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Hans-Frieder Vogt <hfvogt@arcor.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.9-rc1-bk11+ and 2.6.9-rc1-mm3,4 r8169: freeze during boot (FIX included)
Date: Mon, 13 Sep 2004 01:26:04 +0200	[thread overview]
Message-ID: <20040912232604.GC27282@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <200409130035.50823.hfvogt@arcor.de>

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

Hans-Frieder Vogt <hfvogt@arcor.de> :
[2.6.9-rc1-bk11 r8169 freeze on amd64]
> Until somebody comes up with a proper solution for this problem, I suggest as 
> a work-around to introduce a parameter so that the DAC can be simply 
> unselected if necessary, as outlined in the patch below.
> 
> Thanks for any suggestions as to what the problem might be.

Remove the workaround, apply the attached patch and watch the oops.

If it happens in rtl8169_rx_interrupt(), you may notice that R12 is set to 0xbfc.
R12 is pkt_len in rtl8169_rx_interrupt. This value is twice too high. I have not
figured why so far and I'll go to bed.

Please Cc: netdev and jgarzik@pobox.com on followup.

--
Ueimor

[-- Attachment #2: r8169-dbg-b.patch --]
[-- Type: text/plain, Size: 1531 bytes --]

--- linux-2.6.9-rc1-bk17.orig/drivers/net/r8169.c	2004-09-10 21:57:57.000000000 +0200
+++ linux-2.6.9-rc1-bk17/drivers/net/r8169.c	2004-09-11 14:06:33.000000000 +0200
@@ -984,9 +984,10 @@ 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)) {
 		tp->cp_cmd |= PCIDAC;
-	else {
+		dev->features |= NETIF_F_HIGHDMA;
+	} else {
 		rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
 		if (rc < 0) {
 			printk(KERN_ERR PFX "DMA configuration failed.\n");
@@ -1308,7 +1309,7 @@ rtl8169_hw_start(struct net_device *dev)
 	RTL_W8(EarlyTxThres, EarlyTxThld);
 
 	// For gigabit rtl8169
-	RTL_W16(RxMaxSize, RxPacketMaxSize);
+	RTL_W16(RxMaxSize, RX_BUF_SIZE);
 
 	// Set Rx Config register
 	i = rtl8169_rx_config |
@@ -1681,7 +1682,7 @@ rtl8169_rx_interrupt(struct net_device *
 		} else {
 			struct RxDesc *desc = tp->RxDescArray + entry;
 			struct sk_buff *skb = tp->Rx_skbuff[entry];
-			int pkt_size = (status & 0x00001FFF) - 4;
+			int pkt_size = (status & 0x00003FFF) - 4;
 			void (*pci_action)(struct pci_dev *, dma_addr_t,
 				size_t, int) = pci_dma_sync_single_for_device;
 
@@ -1698,6 +1699,7 @@ rtl8169_rx_interrupt(struct net_device *
 			pci_action(tp->pci_dev, le64_to_cpu(desc->addr),
 				   RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
 
+			BUG_ON(pkt_size > (RX_BUF_SIZE - 4));
 			skb_put(skb, pkt_size);
 			skb->protocol = eth_type_trans(skb, dev);
 			rtl8169_rx_skb(skb);

  reply	other threads:[~2004-09-12 23:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-12 22:35 Hans-Frieder Vogt
2004-09-12 23:26 ` Francois Romieu [this message]
2004-09-13 12:43   ` Hans-Frieder Vogt
2004-09-13 22:02     ` Francois Romieu
2004-09-13 23:31       ` Hans-Frieder Vogt
2004-09-15 22:40         ` Hans-Frieder Vogt
2004-09-15 23:09           ` Francois Romieu
2004-09-15 23:32             ` Hans-Frieder Vogt
2004-09-16  7:02               ` Francois Romieu
2004-09-16 18:20                 ` Jon Mason
2004-09-17 15:43                   ` Jon Mason
2004-09-17 16:01                     ` Francois Romieu
2004-09-19 21:17                       ` Andy Lutomirski
2004-09-19 21:39                         ` Francois Romieu
2004-09-19 23:51                           ` Andy Lutomirski
2004-09-20  2:56                           ` Jeff Garzik
2004-09-20  7:17                             ` Francois Romieu
2004-09-20 17:59                               ` Jeff Garzik
2004-09-20 21:15                                 ` Francois Romieu
2004-09-20 16:06                         ` Jon Mason

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=20040912232604.GC27282@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=hfvogt@arcor.de \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®