<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/natsemi.c, branch v2.6.27.49</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[netdrvr] Trim trailing whitespace for several drivers</title>
<updated>2008-05-13T05:41:58+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2008-05-13T05:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d2e3cb7000b883a8e489485ac249be572fe17b1'/>
<id>7d2e3cb7000b883a8e489485ac249be572fe17b1</id>
<content type='text'>
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>natsemi: fix MMIO for PPC 44x platforms</title>
<updated>2008-04-17T19:31:31+00:00</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sshtylyov@ru.mvista.com</email>
</author>
<published>2008-04-12T16:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=703bb99ca73aa38d3f200d4c7e9bb460dce35fda'/>
<id>703bb99ca73aa38d3f200d4c7e9bb460dce35fda</id>
<content type='text'>
The driver stores the PCI resource address into 'unsigned long' variable before
calling ioremap()  on it. This warrants a kernel oops when the registers are
accessed on PPC 44x platforms which (being 32-bit) have PCI memory space mapped
beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion of the
PCI memory resources are mapped below 4 GB, but arch/powerpc/ code got rid of
this trick, having instead CONFIG_RESOURCES_64BIT enabled.

Signed-off-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver stores the PCI resource address into 'unsigned long' variable before
calling ioremap()  on it. This warrants a kernel oops when the registers are
accessed on PPC 44x platforms which (being 32-bit) have PCI memory space mapped
beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion of the
PCI memory resources are mapped below 4 GB, but arch/powerpc/ code got rid of
this trick, having instead CONFIG_RESOURCES_64BIT enabled.

Signed-off-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>misc drivers/net annotations</title>
<updated>2008-03-26T04:18:43+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2008-03-16T22:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eca1ad82bda0293339e1f8439dc9c8dba25ff088'/>
<id>eca1ad82bda0293339e1f8439dc9c8dba25ff088</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>natsemi: section fix</title>
<updated>2008-02-10T07:41:08+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-02-10T07:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aa738adf89deede805d821feddd5b07999904ffd'/>
<id>aa738adf89deede805d821feddd5b07999904ffd</id>
<content type='text'>
gcc-3.4.4 on powerpc:

drivers/net/natsemi.c:245: error: natsemi_pci_info causes a section type conflict

Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc-3.4.4 on powerpc:

drivers/net/natsemi.c:245: error: natsemi_pci_info causes a section type conflict

Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>natsemi: Update locking documentation</title>
<updated>2008-02-03T12:28:42+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@sirena.org.uk</email>
</author>
<published>2008-01-27T13:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6344f0521aac9f93c312826216762f2185268390'/>
<id>6344f0521aac9f93c312826216762f2185268390</id>
<content type='text'>
The documentation regarding synchronisation at the head of the natsemi
driver was badly bitrotted so replace it with a general statement about
the techniques used which is less likely to bitrot.

Also remove the note saying these chips are uncommon - it makes little
difference but they were used in a number of laptops and at least one mass
market PCI ethernet card.

Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documentation regarding synchronisation at the head of the natsemi
driver was badly bitrotted so replace it with a general statement about
the techniques used which is less likely to bitrot.

Also remove the note saying these chips are uncommon - it makes little
difference but they were used in a number of laptops and at least one mass
market PCI ethernet card.

Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET]: Do not check netif_running() and carrier state in -&gt;poll()</title>
<updated>2008-01-09T07:30:09+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-01-08T04:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ec2411980d0fd2995e8dea8a06fe57aa47523cb'/>
<id>4ec2411980d0fd2995e8dea8a06fe57aa47523cb</id>
<content type='text'>
Drivers do this to try to break out of the -&gt;poll()'ing loop
when the device is being brought administratively down.

Now that we have a napi_disable() "pending" state we are going
to solve that problem generically.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drivers do this to try to break out of the -&gt;poll()'ing loop
when the device is being brought administratively down.

Now that we have a napi_disable() "pending" state we are going
to solve that problem generically.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>natsemi: fix oops, link back netdevice from private-struct</title>
<updated>2007-10-25T07:31:14+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-10-24T11:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bbbab5ca835fb7676434815a47add8f2c696bec7'/>
<id>bbbab5ca835fb7676434815a47add8f2c696bec7</id>
<content type='text'>
* Andrew Nelless &lt;andrew@nelless.net&gt; wrote:

&gt; Hi,
&gt;
&gt; I booted up 2.6.24-rc1 this morning [Real early over a brew ;-)] and
&gt; was having a problems with multiple ~5 second hangs on SATA/drive init
&gt; (Something to do with "EH" something-or-other and resets but I'll
&gt; email in separately about it later unless its fixed by the time I get
&gt; the chance).
&gt;
&gt; Anyway, I went to fire up netconsole to get a decent log dump and hit
&gt; across the following nasty. Netconsole works fine in 2.6.23.1 with a
&gt; similar config and the same kernel parameters.
&gt;
&gt; A shot of the screen is the only method I could come up with to
&gt; capture the log, I hope that is OK, it is pretty readable.
&gt;
&gt;
&gt; The nasty:
&gt; http://andotnet.nfshost.com/linux/2.6.24-rc1-netconsole-nullderef.jpg

the NULL dereference is here:

 (gdb) list *0xffffffff804a9504
 0xffffffff804a9504 is in natsemi_poll (drivers/net/natsemi.c:717).
 712             return count;
 713     }
 714
 715     static inline void __iomem *ns_ioaddr(struct net_device *dev)
 716     {
 717             return (void __iomem *) dev-&gt;base_addr;
 718     }
 719

which is this code from natsemi.c:

 2227            struct net_device *dev = np-&gt;dev;
 2228            void __iomem * ioaddr = ns_ioaddr(dev);
 2229            int work_done = 0;

seems like the NAPI changes in -rc1 added an np-&gt;dev field but forgot to
initialize it ...

does the patch below fix the oops for you?

	Ingo

--------------------&gt;
Subject: natsemi: fix oops, link back netdevice from private-struct
From: Ingo Molnar &lt;mingo@elte.hu&gt;

this commit:

  commit bea3348eef27e6044b6161fd04c3152215f96411
  Author: Stephen Hemminger &lt;shemminger@linux-foundation.org&gt;
  Date:   Wed Oct 3 16:41:36 2007 -0700

      [NET]: Make NAPI polling independent of struct net_device objects.

added np-&gt;dev to drivers/net/natsemi.c's struct netdev_private, but
forgot to initialize that new field upon driver init. The result was
a predictable NULL dereference oops the first time the hardware
generated an interrupt.

Reported-by: Andrew Nelless &lt;andrew@nelless.net&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Andrew Nelless &lt;andrew@nelless.net&gt; wrote:

&gt; Hi,
&gt;
&gt; I booted up 2.6.24-rc1 this morning [Real early over a brew ;-)] and
&gt; was having a problems with multiple ~5 second hangs on SATA/drive init
&gt; (Something to do with "EH" something-or-other and resets but I'll
&gt; email in separately about it later unless its fixed by the time I get
&gt; the chance).
&gt;
&gt; Anyway, I went to fire up netconsole to get a decent log dump and hit
&gt; across the following nasty. Netconsole works fine in 2.6.23.1 with a
&gt; similar config and the same kernel parameters.
&gt;
&gt; A shot of the screen is the only method I could come up with to
&gt; capture the log, I hope that is OK, it is pretty readable.
&gt;
&gt;
&gt; The nasty:
&gt; http://andotnet.nfshost.com/linux/2.6.24-rc1-netconsole-nullderef.jpg

the NULL dereference is here:

 (gdb) list *0xffffffff804a9504
 0xffffffff804a9504 is in natsemi_poll (drivers/net/natsemi.c:717).
 712             return count;
 713     }
 714
 715     static inline void __iomem *ns_ioaddr(struct net_device *dev)
 716     {
 717             return (void __iomem *) dev-&gt;base_addr;
 718     }
 719

which is this code from natsemi.c:

 2227            struct net_device *dev = np-&gt;dev;
 2228            void __iomem * ioaddr = ns_ioaddr(dev);
 2229            int work_done = 0;

seems like the NAPI changes in -rc1 added an np-&gt;dev field but forgot to
initialize it ...

does the patch below fix the oops for you?

	Ingo

--------------------&gt;
Subject: natsemi: fix oops, link back netdevice from private-struct
From: Ingo Molnar &lt;mingo@elte.hu&gt;

this commit:

  commit bea3348eef27e6044b6161fd04c3152215f96411
  Author: Stephen Hemminger &lt;shemminger@linux-foundation.org&gt;
  Date:   Wed Oct 3 16:41:36 2007 -0700

      [NET]: Make NAPI polling independent of struct net_device objects.

added np-&gt;dev to drivers/net/natsemi.c's struct netdev_private, but
forgot to initialize that new field upon driver init. The result was
a predictable NULL dereference oops the first time the hardware
generated an interrupt.

Reported-by: Andrew Nelless &lt;andrew@nelless.net&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Typo: depricated -&gt; deprecated</title>
<updated>2007-10-20T01:10:57+00:00</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eike-kernel@sf-tec.de</email>
</author>
<published>2007-10-20T01:10:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=405bbe9fa345050f46c411d77727f381d74a2ba8'/>
<id>405bbe9fa345050f46c411d77727f381d74a2ba8</id>
<content type='text'>
Typo: depricated -&gt; deprecated

Signed-off-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Typo: depricated -&gt; deprecated

Signed-off-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>natsemi: Check return value for pci_enable_device()</title>
<updated>2007-10-15T18:20:45+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@sirena.org.uk</email>
</author>
<published>2007-10-10T16:11:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8a935dae5de65a8f5a5371a58ad2aa73a0ea2da'/>
<id>a8a935dae5de65a8f5a5371a58ad2aa73a0ea2da</id>
<content type='text'>
pci_enable_device() is __must_check so do that in natsemi_resume().

Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pci_enable_device() is __must_check so do that in natsemi_resume().

Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>natsemi: Use round_jiffies() for slow timers</title>
<updated>2007-10-15T18:20:45+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@sirena.org.uk</email>
</author>
<published>2007-10-10T10:05:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0e5d5442cbe3399d789d6a75c6e3a0db37f846f5'/>
<id>0e5d5442cbe3399d789d6a75c6e3a0db37f846f5</id>
<content type='text'>
Unless we have failed to fill the RX ring the timer used by the natsemi
driver is not particularly urgent and can use round_jiffies() to allow
grouping with other timers.

Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unless we have failed to fill the RX ring the timer used by the natsemi
driver is not particularly urgent and can use round_jiffies() to allow
grouping with other timers.

Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
Signed-off-by: Jeff Garzik &lt;jeff@garzik.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
