* [06/11] [TCP]: Put back tcp_timer_bug_msg[] symbol export.
[not found] <20050310230519.GA22112@kroah.com>
@ 2005-03-10 23:08 ` Greg KH
2005-03-10 23:20 ` Christoph Hellwig
2005-03-10 23:09 ` [09/11] r8169: receive descriptor length fix Greg KH
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2005-03-10 23:08 UTC (permalink / raw)
To: davem, kuznet, pekkas, jmorris, yoshfuji, kaber, netdev
Cc: linux-kernel, stable
-stable review patch. If anyone has any objections, please let us know.
------------------
This wrecks the ipv6 modular build for a lot of people.
In fact, since I always build ipv6 modular I am surprised
I never hit this. My best guess is that my compiler is
optimizing the reference away, but that can never be
depended upon and the symbol export really is needed.
[TCP]: Put back tcp_timer_bug_msg[] symbol export.
It is needed for tcp_reset_xmit_timer(), which is invoked by
tcp_prequeue() which is invoked from tcp_ipv6.c
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
--- a/net/ipv4/tcp_timer.c 2005-03-09 17:20:38 -08:00
+++ b/net/ipv4/tcp_timer.c 2005-03-09 17:20:38 -08:00
@@ -38,6 +38,7 @@
#ifdef TCP_DEBUG
const char tcp_timer_bug_msg[] = KERN_DEBUG "tcpbug: unknown timer value\n";
+EXPORT_SYMBOL(tcp_timer_bug_msg);
#endif
/*
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [06/11] [TCP]: Put back tcp_timer_bug_msg[] symbol export.
2005-03-10 23:08 ` [06/11] [TCP]: Put back tcp_timer_bug_msg[] symbol export Greg KH
@ 2005-03-10 23:20 ` Christoph Hellwig
2005-03-10 23:47 ` David S. Miller
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2005-03-10 23:20 UTC (permalink / raw)
To: Greg KH
Cc: davem, kuznet, pekkas, jmorris, yoshfuji, kaber, netdev,
linux-kernel, stable
> --- a/net/ipv4/tcp_timer.c 2005-03-09 17:20:38 -08:00
> +++ b/net/ipv4/tcp_timer.c 2005-03-09 17:20:38 -08:00
> @@ -38,6 +38,7 @@
>
> #ifdef TCP_DEBUG
> const char tcp_timer_bug_msg[] = KERN_DEBUG "tcpbug: unknown timer value\n";
> +EXPORT_SYMBOL(tcp_timer_bug_msg);
> #endif
not complaining about putting this into -stable, but why do people have
TCP_DEBUG turned on for normal builds?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [06/11] [TCP]: Put back tcp_timer_bug_msg[] symbol export.
2005-03-10 23:20 ` Christoph Hellwig
@ 2005-03-10 23:47 ` David S. Miller
0 siblings, 0 replies; 6+ messages in thread
From: David S. Miller @ 2005-03-10 23:47 UTC (permalink / raw)
To: Christoph Hellwig
Cc: greg, kuznet, pekkas, jmorris, yoshfuji, kaber, netdev,
linux-kernel, stable
On Thu, 10 Mar 2005 23:20:14 +0000
Christoph Hellwig <hch@infradead.org> wrote:
> > --- a/net/ipv4/tcp_timer.c 2005-03-09 17:20:38 -08:00
> > +++ b/net/ipv4/tcp_timer.c 2005-03-09 17:20:38 -08:00
> > @@ -38,6 +38,7 @@
> >
> > #ifdef TCP_DEBUG
> > const char tcp_timer_bug_msg[] = KERN_DEBUG "tcpbug: unknown timer value\n";
> > +EXPORT_SYMBOL(tcp_timer_bug_msg);
> > #endif
>
> not complaining about putting this into -stable, but why do people have
> TCP_DEBUG turned on for normal builds?
It is on in everyone's build unless they edit include/net/tcp.h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [09/11] r8169: receive descriptor length fix
[not found] <20050310230519.GA22112@kroah.com>
2005-03-10 23:08 ` [06/11] [TCP]: Put back tcp_timer_bug_msg[] symbol export Greg KH
@ 2005-03-10 23:09 ` Greg KH
2005-03-10 23:09 ` [10/11] sis900 kernel oops fix Greg KH
2005-03-10 23:09 ` [11/11] [VIA RHINE] older chips oops on shutdown Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2005-03-10 23:09 UTC (permalink / raw)
To: shemminger, romieu, netdev, jgarzik; +Cc: linux-kernel, stable
-stable review patch. If anyone has any objections, please let us know.
------------------
The status and received packets indication in the Rx descriptor ring
are not correctly reset when a descriptor is recycled.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -puN drivers/net/r8169.c~r8169-490 drivers/net/r8169.c
--- a/drivers/net/r8169.c~r8169-490 2005-03-08 00:01:26.000000000 +0100
+++ b/drivers/net/r8169.c 2005-03-09 00:38:34.235464833 +0100
@@ -1683,16 +1683,19 @@ static void rtl8169_free_rx_skb(struct r
rtl8169_make_unusable_by_asic(desc);
}
-static inline void rtl8169_return_to_asic(struct RxDesc *desc, int rx_buf_sz)
+static inline void rtl8169_mark_to_asic(struct RxDesc *desc, u32 rx_buf_sz)
{
- desc->opts1 |= cpu_to_le32(DescOwn + rx_buf_sz);
+ u32 eor = le32_to_cpu(desc->opts1) & RingEnd;
+
+ desc->opts1 = cpu_to_le32(DescOwn | eor | rx_buf_sz);
}
-static inline void rtl8169_give_to_asic(struct RxDesc *desc, dma_addr_t mapping,
- int rx_buf_sz)
+static inline void rtl8169_map_to_asic(struct RxDesc *desc, dma_addr_t mapping,
+ u32 rx_buf_sz)
{
desc->addr = cpu_to_le64(mapping);
- desc->opts1 |= cpu_to_le32(DescOwn + rx_buf_sz);
+ wmb();
+ rtl8169_mark_to_asic(desc, rx_buf_sz);
}
static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff,
@@ -1712,7 +1715,7 @@ static int rtl8169_alloc_rx_skb(struct p
mapping = pci_map_single(pdev, skb->tail, rx_buf_sz,
PCI_DMA_FROMDEVICE);
- rtl8169_give_to_asic(desc, mapping, rx_buf_sz);
+ rtl8169_map_to_asic(desc, mapping, rx_buf_sz);
out:
return ret;
@@ -2150,7 +2153,7 @@ static inline int rtl8169_try_rx_copy(st
skb_reserve(skb, NET_IP_ALIGN);
eth_copy_and_sum(skb, sk_buff[0]->tail, pkt_size, 0);
*sk_buff = skb;
- rtl8169_return_to_asic(desc, rx_buf_sz);
+ rtl8169_mark_to_asic(desc, rx_buf_sz);
ret = 0;
}
}
_
--
Ueimor
^ permalink raw reply [flat|nested] 6+ messages in thread* [10/11] sis900 kernel oops fix
[not found] <20050310230519.GA22112@kroah.com>
2005-03-10 23:08 ` [06/11] [TCP]: Put back tcp_timer_bug_msg[] symbol export Greg KH
2005-03-10 23:09 ` [09/11] r8169: receive descriptor length fix Greg KH
@ 2005-03-10 23:09 ` Greg KH
2005-03-10 23:09 ` [11/11] [VIA RHINE] older chips oops on shutdown Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2005-03-10 23:09 UTC (permalink / raw)
To: jgarzik, netdev, herbert, ollie, linux-net; +Cc: linux-kernel, stable
-stable review patch. If anyone has any objections, please let us know.
------------------
Backport of fix described below.
From: Herbert Xu <herbert@gondor.apana.org.au>
Fix bug #4223.
OK, this happened because we got preempted before sis900_mii_probe
finished setting the sis_priv->mii. Theoretically this can happen
with SMP as well but I suppose the number of SMP machines with sis900
is fairly small.
Anyway, the fix is to make sure that sis900_mii_probe is done before
the device can be opened. This patch does it by moving the setup
before register_netdevice.
Since the netdev name is not available before register_netdev, I've
changed the relevant printk's to use pci_name instead. Note that
one of those printk's may be called after register_netdev as well.
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- 1.62/drivers/net/sis900.c 2005-01-10 08:52:27 -08:00
+++ edited/drivers/net/sis900.c 2005-03-10 12:23:49 -08:00
@@ -236,7 +236,7 @@ static int __devinit sis900_get_mac_addr
signature = (u16) read_eeprom(ioaddr, EEPROMSignature);
if (signature == 0xffff || signature == 0x0000) {
printk (KERN_INFO "%s: Error EERPOM read %x\n",
- net_dev->name, signature);
+ pci_name(pci_dev), signature);
return 0;
}
@@ -268,7 +268,7 @@ static int __devinit sis630e_get_mac_add
if (!isa_bridge)
isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, isa_bridge);
if (!isa_bridge) {
- printk("%s: Can not find ISA bridge\n", net_dev->name);
+ printk("%s: Can not find ISA bridge\n", pci_name(pci_dev));
return 0;
}
pci_read_config_byte(isa_bridge, 0x48, ®);
@@ -456,10 +456,6 @@ static int __devinit sis900_probe(struct
net_dev->tx_timeout = sis900_tx_timeout;
net_dev->watchdog_timeo = TX_TIMEOUT;
net_dev->ethtool_ops = &sis900_ethtool_ops;
-
- ret = register_netdev(net_dev);
- if (ret)
- goto err_unmap_rx;
/* Get Mac address according to the chip revision */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &revision);
@@ -476,7 +472,7 @@ static int __devinit sis900_probe(struct
if (ret == 0) {
ret = -ENODEV;
- goto err_out_unregister;
+ goto err_unmap_rx;
}
/* 630ET : set the mii access mode as software-mode */
@@ -486,7 +482,7 @@ static int __devinit sis900_probe(struct
/* probe for mii transceiver */
if (sis900_mii_probe(net_dev) == 0) {
ret = -ENODEV;
- goto err_out_unregister;
+ goto err_unmap_rx;
}
/* save our host bridge revision */
@@ -496,6 +492,10 @@ static int __devinit sis900_probe(struct
pci_dev_put(dev);
}
+ ret = register_netdev(net_dev);
+ if (ret)
+ goto err_unmap_rx;
+
/* print some information about our NIC */
printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", net_dev->name,
card_name, ioaddr, net_dev->irq);
@@ -505,8 +505,6 @@ static int __devinit sis900_probe(struct
return 0;
- err_out_unregister:
- unregister_netdev(net_dev);
err_unmap_rx:
pci_free_consistent(pci_dev, RX_TOTAL_SIZE, sis_priv->rx_ring,
sis_priv->rx_ring_dma);
@@ -533,6 +531,7 @@ static int __devinit sis900_probe(struct
static int __init sis900_mii_probe(struct net_device * net_dev)
{
struct sis900_private * sis_priv = net_dev->priv;
+ const char *dev_name = pci_name(sis_priv->pci_dev);
u16 poll_bit = MII_STAT_LINK, status = 0;
unsigned long timeout = jiffies + 5 * HZ;
int phy_addr;
@@ -582,21 +581,20 @@ static int __init sis900_mii_probe(struc
mii_phy->phy_types =
(mii_status & (MII_STAT_CAN_TX_FDX | MII_STAT_CAN_TX)) ? LAN : HOME;
printk(KERN_INFO "%s: %s transceiver found at address %d.\n",
- net_dev->name, mii_chip_table[i].name,
+ dev_name, mii_chip_table[i].name,
phy_addr);
break;
}
if( !mii_chip_table[i].phy_id1 ) {
printk(KERN_INFO "%s: Unknown PHY transceiver found at address %d.\n",
- net_dev->name, phy_addr);
+ dev_name, phy_addr);
mii_phy->phy_types = UNKNOWN;
}
}
if (sis_priv->mii == NULL) {
- printk(KERN_INFO "%s: No MII transceivers found!\n",
- net_dev->name);
+ printk(KERN_INFO "%s: No MII transceivers found!\n", dev_name);
return 0;
}
@@ -621,7 +619,7 @@ static int __init sis900_mii_probe(struc
poll_bit ^= (mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS) & poll_bit);
if (time_after_eq(jiffies, timeout)) {
printk(KERN_WARNING "%s: reset phy and link down now\n",
- net_dev->name);
+ dev_name);
return -ETIME;
}
}
@@ -691,7 +689,7 @@ static u16 sis900_default_phy(struct net
sis_priv->mii = default_phy;
sis_priv->cur_phy = default_phy->phy_addr;
printk(KERN_INFO "%s: Using transceiver found at address %d as default\n",
- net_dev->name,sis_priv->cur_phy);
+ pci_name(sis_priv->pci_dev), sis_priv->cur_phy);
}
status = mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL);
^ permalink raw reply [flat|nested] 6+ messages in thread* [11/11] [VIA RHINE] older chips oops on shutdown
[not found] <20050310230519.GA22112@kroah.com>
` (2 preceding siblings ...)
2005-03-10 23:09 ` [10/11] sis900 kernel oops fix Greg KH
@ 2005-03-10 23:09 ` Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2005-03-10 23:09 UTC (permalink / raw)
To: rl, olof, jgarzik, netdev; +Cc: linux-kernel, stable
-stable review patch. If anyone has any objections, please let us know.
------------------
Kernel 2.6.11, hardware is a MSI KT333-based board with an XP1800.
I'm oopsing on shutdown on a machine that has a Via Rhine adapter in it:
Unable to handle kernel paging request at virtual address e0803003
printing eip:
c01f262c
*pde = 014dc067
*pte = 00000000
Oops: 0000 [#1]
Modules linked in: cpufreq_userspace cpufreq_powersave cpufreq_ondemand
CPU: 0
EIP: 0060:[<c01f262c>] Not tainted VLI
EFLAGS: 00010292 (2.6.11)
EIP is at ioread8+0x2c/0x40
eax: e0803003 ebx: e0803003 ecx: c026b430 edx: e0803003
esi: dff90260 edi: e0802f80 ebp: dd117e74 esp: dd117e74
ds: 007b es: 007b ss: 0068
Process reboot (pid: 5769, threadinfo=dd117000 task=dfafa080)
Stack: dd117e8c c026b490 dff90040 c151ccd4 c044a1a8 b7fdc078 dd117ea4
c0253ad9
c151ccd4 00000042 fee1dead 00000001 dd117fbc c012461c c04d72a8 00000001
00000000 00010800 00000000 dd117ed8 c013b40b dffe7380 00030800 00000000
Call Trace:
[<c0103d5f>] show_stack+0x7f/0xa0
[<c0103efa>] show_registers+0x15a/0x1c0
[<c01040ce>] die+0xce/0x150
[<c0113406>] do_page_fault+0x356/0x692
[<c01039ff>] error_code+0x2b/0x30
[<c026b490>] rhine_shutdown+0x60/0x140
[<c0253ad9>] device_shutdown+0x89/0x8b
[<c012461c>] sys_reboot+0xac/0x200
[<c0102f71>] sysenter_past_esp+0x52/0x75
Code: 3d ff ff 03 00 89 c2 89 e5 77 20 66 31 c0 3d 00 00 01 00 75 0c
81 e2 ff ff 00 00 ec 0f b6 c0 c9 c3 0f 0b 37 00 7b 65 3b c0 eb ea <0f>
b6 00 eb ec eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 90 55
Seems like it is the ioread8 in:
/* Hit power state D3 (sleep) */
iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
that fails. StickyHW is 0x83. lspci says:
0000:00:07.0 Ethernet controller: VIA Technologies, Inc. VT86C100A
[Rhine] (rev 06)
Flags: bus master, medium devsel, latency 32, IRQ 18
I/O ports at ec00 [size=128]
Memory at dfffff80 (32-bit, non-prefetchable) [size=128]
In other words, it's trying to read outside of the I/O range (0x80),
which matches the fauling address.
I'm guessing my chip revision doesn't support WOL, it's a crappy noname
card.
It does seem as if rhine_power_init checks quirks for rqWOL before
touching any registers. Should rhine_shutdown do the same? Proposed
patch below, which resolves the problem on my system.
Check to make sure WOL is supported before setting it up in
rhine_shutdown.
Signed-off-by: Olof Johansson <olof@austin.ibm.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- linux-2.6.11.orig/drivers/net/via-rhine.c 2005-03-02 01:38:32.000000000 -0600
+++ linux-2.6.11/drivers/net/via-rhine.c 2005-03-05 12:25:34.000000000
-0600
@@ -1899,6 +1899,9 @@
struct rhine_private *rp = netdev_priv(dev);
void __iomem *ioaddr = rp->base;
+ if (!(rp->quirks & rqWOL))
+ return; /* Nothing to do for non-WOL adapters */
+
rhine_power_init(dev);
/* Make sure we use pattern 0, 1 and not 4, 5 */
^ permalink raw reply [flat|nested] 6+ messages in thread