<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/net/bna/bnad.c, branch v3.12.8</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.12.8</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.12.8'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2011-08-11T09:41:14+00:00</updated>
<entry>
<title>bna: Move the Brocade driver</title>
<updated>2011-08-11T09:41:14+00:00</updated>
<author>
<name>Jeff Kirsher</name>
<email>jeffrey.t.kirsher@intel.com</email>
</author>
<published>2011-05-13T08:00:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f844a0ead401c3ce0f01a8bb4d6cea2f0f6ad863'/>
<id>urn:sha1:f844a0ead401c3ce0f01a8bb4d6cea2f0f6ad863</id>
<content type='text'>
Moves the Brocade driver into drivers/net/ethernet/brocade/ and make
the necessary Kconfig and Makefile changes.

CC: Rasesh Mody &lt;rmody@brocade.com&gt;
CC: Debashis Dutt &lt;ddutt@brocade.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>bnad: remove duplicated #include</title>
<updated>2011-07-24T03:01:15+00:00</updated>
<author>
<name>Huang Weiyi</name>
<email>weiyi.huang@gmail.com</email>
</author>
<published>2011-07-22T22:19:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4fa5ee31b4fd109536aa5745d8c6af7c3bfd6d3b'/>
<id>urn:sha1:4fa5ee31b4fd109536aa5745d8c6af7c3bfd6d3b</id>
<content type='text'>
Remove duplicated #include('s) in
  drivers/net/bna/bnad.c

Signed-off-by: Huang Weiyi &lt;weiyi.huang@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bna: Minor IRQ Index and Definition Change</title>
<updated>2011-07-23T00:01:13+00:00</updated>
<author>
<name>Rasesh Mody</name>
<email>rmody@brocade.com</email>
</author>
<published>2011-07-22T08:07:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8811e267d0443af9caca6f127d62c0119c96314f'/>
<id>urn:sha1:8811e267d0443af9caca6f127d62c0119c96314f</id>
<content type='text'>
Change details:
 - Always set mbox irq index to zero and make corresponding changes in mbox
   irq alloc/sync function and txrx irq index calculation. Add definition of
   BNAD_INTX_TX_IB_BITMASK &amp; BNAD_INTX_RX_IB_BITMASK and update
   bnad_txrx_irq_alloc accordingly.

Signed-off-by: Rasesh Mody &lt;rmody@brocade.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bna: CheckPatch Cleanup</title>
<updated>2011-07-23T00:01:13+00:00</updated>
<author>
<name>Rasesh Mody</name>
<email>rmody@brocade.com</email>
</author>
<published>2011-07-22T08:07:41+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0120b99c8d56b5d3f2d80aaf8769dea05ef80439'/>
<id>urn:sha1:0120b99c8d56b5d3f2d80aaf8769dea05ef80439</id>
<content type='text'>
Change details:
 - Driver cleanup as per new checkpatch v0.31

Signed-off-by: Rasesh Mody &lt;rmody@brocade.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bna: Print Driver Version</title>
<updated>2011-07-23T00:01:13+00:00</updated>
<author>
<name>Rasesh Mody</name>
<email>rmody@brocade.com</email>
</author>
<published>2011-07-22T08:07:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5aad00118fe8bc741725557372cd185d1ee1f248'/>
<id>urn:sha1:5aad00118fe8bc741725557372cd185d1ee1f248</id>
<content type='text'>
Change details:
 - Print the dirver version when module is loaded.

Signed-off-by: Rasesh Mody &lt;rmody@brocade.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bnad: do vlan cleanup</title>
<updated>2011-07-21T20:47:54+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2011-07-20T04:54:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f859d7cb7967efaedae194dd90a23a7a72fb216d'/>
<id>urn:sha1:f859d7cb7967efaedae194dd90a23a7a72fb216d</id>
<content type='text'>
- unify vlan and nonvlan rx path
- kill bnad-&gt;vlan_grp and bnad_vlan_rx_register

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Separate handling of irq type flags variable from the irq_flags request_irq variable</title>
<updated>2011-07-15T15:08:26+00:00</updated>
<author>
<name>Shyam Iyer</name>
<email>shyam.iyer.t@gmail.com</email>
</author>
<published>2011-07-14T15:00:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8279171a5fe95902be12f4018907f246d51616d4'/>
<id>urn:sha1:8279171a5fe95902be12f4018907f246d51616d4</id>
<content type='text'>
Commit 5f77898de17ff983ff0e2988b73a6bdf4b6f9f8b does not completely
fix the problem of handling allocations with irqs disabled..  The
below patch on top of it fixes the problem completely.

Based on review by "Ivan Vecera" &lt;ivecera@redhat.com&gt;..
"
Small note, the root of the problem was that non-atomic allocation was requested with IRQs disabled. Your patch description does not contain wwhy were the IRQs disabled.

The function bnad_mbox_irq_alloc incorrectly uses 'flags' var for two different things, 1) to save current CPU flags and 2) for request_irq
call.
First the spin_lock_irqsave disables the IRQs and saves _all_ CPU flags (including one that enables/disables interrupts) to 'flags'. Then the 'flags' is overwritten by 0 or 0x80 (IRQF_SHARED). Finally the spin_unlock_irqrestore should restore saved flags, but these flags are now either 0x00 or 0x80. The interrupt bit value in flags register on x86 arch is 0x100.
This means that the interrupt bit is zero (IRQs disabled) after spin_unlock_irqrestore so the request_irq function is called with disabled interrupts.
"

Signed-off-by: Shyam Iyer &lt;shyam_iyer@dell.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bna: use netdev_alloc_skb_ip_align()</title>
<updated>2011-07-08T16:09:07+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-07-08T05:29:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0a0e2344a62ce9e7fac6129d6292e59aecfceced'/>
<id>urn:sha1:0a0e2344a62ce9e7fac6129d6292e59aecfceced</id>
<content type='text'>
Some workloads need some headroom (NET_SKB_PAD) to avoid expensive
reallocations.

Using netdev_alloc_skb_ip_align() instead of bare skb_alloc() brings the
NET_IP_ALIGN and the NET_SKB_PAD headroom.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Rasesh Mody &lt;rmody@brocade.com&gt;
CC: Debashis Dutt &lt;ddutt@brocade.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Fix call trace when interrupts are disabled while sleeping function kzalloc is called</title>
<updated>2011-07-02T00:49:45+00:00</updated>
<author>
<name>Shyam Iyer</name>
<email>shyam.iyer.t@gmail.com</email>
</author>
<published>2011-06-28T08:58:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5f77898de17ff983ff0e2988b73a6bdf4b6f9f8b'/>
<id>urn:sha1:5f77898de17ff983ff0e2988b73a6bdf4b6f9f8b</id>
<content type='text'>
request_threaded irq will call kzalloc that can sleep. Initializing the flags variable outside of spin_lock_irqsave/restore in bnad_mbox_irq_alloc will avoid call traces like below.

Jun 27 08:15:24 home-t710 kernel: [11735.634550] Brocade 10G Ethernet driver
Jun 27 08:15:24 home-t710 kernel: [11735.634590] bnad_pci_probe : (0xffff880427f3d000, 0xffffffffa020f3e0) PCI Func : (2)
Jun 27 08:15:24 home-t710 kernel: [11735.637677] bna 0000:82:00.2: PCI INT A -&gt; GSI 66 (level, low) -&gt; IRQ 66
Jun 27 08:15:24 home-t710 kernel: [11735.638290] bar0 mapped to ffffc90014980000, len 262144
Jun 27 08:15:24 home-t710 kernel: [11735.638732] BUG: sleeping function called from invalid context at mm/slub.c:847
Jun 27 08:15:24 home-t710 kernel: [11735.638736] in_atomic(): 0, irqs_disabled(): 1, pid: 11243, name: insmod
Jun 27 08:15:24 home-t710 kernel: [11735.638740] Pid: 11243, comm: insmod Not tainted 3.0.0-rc4+ #6
Jun 27 08:15:24 home-t710 kernel: [11735.638743] Call Trace:
Jun 27 08:15:24 home-t710 kernel: [11735.638755]  [&lt;ffffffff81046427&gt;] __might_sleep+0xeb/0xf0
Jun 27 08:15:24 home-t710 kernel: [11735.638766]  [&lt;ffffffffa01fe469&gt;] ? netif_wake_queue+0x3d/0x3d [bna]
Jun 27 08:15:24 home-t710 kernel: [11735.638773]  [&lt;ffffffff8111201c&gt;] kmem_cache_alloc_trace+0x43/0xd8
Jun 27 08:15:24 home-t710 kernel: [11735.638782]  [&lt;ffffffffa01fe469&gt;] ? netif_wake_queue+0x3d/0x3d [bna]
Jun 27 08:15:24 home-t710 kernel: [11735.638787]  [&lt;ffffffff810ab791&gt;] request_threaded_irq+0xa1/0x113
Jun 27 08:15:24 home-t710 kernel: [11735.638798]  [&lt;ffffffffa020f0c0&gt;] bnad_pci_probe+0x612/0x8e5 [bna]
Jun 27 08:15:24 home-t710 kernel: [11735.638807]  [&lt;ffffffffa01fe469&gt;] ? netif_wake_queue+0x3d/0x3d [bna]
Jun 27 08:15:24 home-t710 kernel: [11735.638816]  [&lt;ffffffff81482ef4&gt;] ? _raw_spin_unlock_irqrestore+0x17/0x19
Jun 27 08:15:24 home-t710 kernel: [11735.638822]  [&lt;ffffffff8124d17a&gt;] local_pci_probe+0x44/0x75
Jun 27 08:15:24 home-t710 kernel: [11735.638826]  [&lt;ffffffff8124dc06&gt;] pci_device_probe+0xd0/0xff
Jun 27 08:15:24 home-t710 kernel: [11735.638832]  [&lt;ffffffff812ef8ab&gt;] driver_probe_device+0x131/0x213
Jun 27 08:15:24 home-t710 kernel: [11735.638836]  [&lt;ffffffff812ef9e7&gt;] __driver_attach+0x5a/0x7e
Jun 27 08:15:24 home-t710 kernel: [11735.638840]  [&lt;ffffffff812ef98d&gt;] ? driver_probe_device+0x213/0x213
Jun 27 08:15:24 home-t710 kernel: [11735.638844]  [&lt;ffffffff812ee933&gt;] bus_for_each_dev+0x53/0x89
Jun 27 08:15:24 home-t710 kernel: [11735.638848]  [&lt;ffffffff812ef48a&gt;] driver_attach+0x1e/0x20
Jun 27 08:15:24 home-t710 kernel: [11735.638852]  [&lt;ffffffff812ef0ae&gt;] bus_add_driver+0xd1/0x224
Jun 27 08:15:24 home-t710 kernel: [11735.638858]  [&lt;ffffffffa01b8000&gt;] ? 0xffffffffa01b7fff
Jun 27 08:15:24 home-t710 kernel: [11735.638862]  [&lt;ffffffff812efe57&gt;] driver_register+0x98/0x105
Jun 27 08:15:24 home-t710 kernel: [11735.638866]  [&lt;ffffffffa01b8000&gt;] ? 0xffffffffa01b7fff
Jun 27 08:15:24 home-t710 kernel: [11735.638871]  [&lt;ffffffff8124e4c9&gt;] __pci_register_driver+0x56/0xc1
Jun 27 08:15:24 home-t710 kernel: [11735.638875]  [&lt;ffffffffa01b8000&gt;] ? 0xffffffffa01b7fff
Jun 27 08:15:24 home-t710 kernel: [11735.638884]  [&lt;ffffffffa01b8040&gt;] bnad_module_init+0x40/0x60 [bna]
Jun 27 08:15:24 home-t710 kernel: [11735.638892]  [&lt;ffffffff81002099&gt;] do_one_initcall+0x7f/0x136
Jun 27 08:15:24 home-t710 kernel: [11735.638899]  [&lt;ffffffff8108608b&gt;] sys_init_module+0x88/0x1d0
Jun 27 08:15:24 home-t710 kernel: [11735.638906]  [&lt;ffffffff81489682&gt;] system_call_fastpath+0x16/0x1b
Jun 27 08:15:24 home-t710 kernel: [11735.639642] bnad_pci_probe : (0xffff880427f3e000, 0xffffffffa020f3e0) PCI Func : (3)
Jun 27 08:15:24 home-t710 kernel: [11735.639665] bna 0000:82:00.3: PCI INT A -&gt; GSI 66 (level, low) -&gt; IRQ 66
Jun 27 08:15:24 home-t710 kernel: [11735.639735] bar0 mapped to ffffc90014400000, len 262144

Signed-off-by: Shyam Iyer &lt;shyam_iyer@dell.com&gt;
Acked-by: Rasesh Mody &lt;rmody@brocade.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Add appropriate &lt;linux/prefetch.h&gt; include for prefetch users</title>
<updated>2011-05-23T04:41:57+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-22T20:47:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=70c71606190e9115e5f8363bfcd164c582eb314a'/>
<id>urn:sha1:70c71606190e9115e5f8363bfcd164c582eb314a</id>
<content type='text'>
After discovering that wide use of prefetch on modern CPUs
could be a net loss instead of a win, net drivers which were
relying on the implicit inclusion of prefetch.h via the list
headers showed up in the resulting cleanup fallout.  Give
them an explicit include via the following $0.02 script.

 =========================================
 #!/bin/bash
 MANUAL=""
 for i in `git grep -l 'prefetch(.*)' .` ; do
 	grep -q '&lt;linux/prefetch.h&gt;' $i
 	if [ $? = 0 ] ; then
 		continue
 	fi

 	(	echo '?^#include &lt;linux/?a'
 		echo '#include &lt;linux/prefetch.h&gt;'
 		echo .
 		echo w
 		echo q
 	) | ed -s $i &gt; /dev/null 2&gt;&amp;1
 	if [ $? != 0 ]; then
 		echo $i needs manual fixup
 		MANUAL="$i $MANUAL"
 	fi
 done
 echo ------------------- 8\&lt;----------------------
 echo vi $MANUAL
 =========================================

Signed-off-by: Paul &lt;paul.gortmaker@windriver.com&gt;
[ Fixed up some incorrect #include placements, and added some
  non-network drivers and the fib_trie.c case    - Linus ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
