<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/bnx2.c, branch linux-3.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-07-21T19:38:32Z</updated>
<entry>
<title>bnx2: Fix endian swapping on firmware version string</title>
<updated>2011-07-21T19:38:32Z</updated>
<author>
<name>Michael Chan</name>
</author>
<published>2011-07-20T14:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3aeb7d2243e55ddcad3c0b402e7b09619a67f5da'/>
<id>urn:sha1:3aeb7d2243e55ddcad3c0b402e7b09619a67f5da</id>
<content type='text'>
so that ethtool -i will display it correctly on big endian systems.

Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Reviewed-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bnx2: Close device if tx_timeout reset fails</title>
<updated>2011-07-16T17:13:19Z</updated>
<author>
<name>Michael Chan</name>
</author>
<published>2011-07-15T06:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd6340199f65cad63262db0fd561bdcfd69df3bd'/>
<id>urn:sha1:cd6340199f65cad63262db0fd561bdcfd69df3bd</id>
<content type='text'>
Based on original patch and description from Flavio Leitner &lt;fbl@redhat.com&gt;

When bnx2_reset_task() is called, it will stop,
(re)initialize and start the interface to restore
the working condition.

The bnx2_init_nic() calls bnx2_reset_nic() which will
reset the chip and then calls bnx2_free_skbs() to free
all the skbs.

The problem happens when bnx2_init_chip() fails because
bnx2_reset_nic() will just return skipping the ring
initializations at bnx2_init_all_rings(). Later, the
reset task starts the interface again and the system
crashes due a NULL pointer access (no skb in the ring).

To fix it, we call dev_close() if bnx2_init_nic() fails.
One minor wrinkle to deal with is the cancel_work_sync()
call in bnx2_close() to cancel bnx2_reset_task().  The
call will wait forever because it is trying to cancel
itself and the workqueue will be stuck.

Since bnx2_reset_task() holds the rtnl_lock() and checks
for netif_running() before proceeding, there is no need
to cancel bnx2_reset_task() in bnx2_close() even if
bnx2_close() and bnx2_reset_task() are running concurrently.
The rtnl_lock() serializes the 2 calls.

We need to move the cancel_work_sync() call to
bnx2_remove_one() to make sure it is canceled before freeing
the netdev struct.

Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: Matt Carlson &lt;mcarlson@broadcom.com&gt;
Cc: Flavio Leitner &lt;fbl@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bnx2: Read iSCSI config from shared memory during -&gt;probe()</title>
<updated>2011-07-14T15:46:08Z</updated>
<author>
<name>Michael Chan</name>
</author>
<published>2011-07-13T17:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41c2178adce37b249147063624f8a27b064b471e'/>
<id>urn:sha1:41c2178adce37b249147063624f8a27b064b471e</id>
<content type='text'>
The scratchpad location that we were reading from has not been
initialized yet during -&gt;probe(), so we were getting inaccurate
information.

Update version to 2.1.10.

Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Reviewed-by: Matt Carlson &lt;mcarlson@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bnx2: Add MCP dump</title>
<updated>2011-07-14T15:46:08Z</updated>
<author>
<name>Jeffrey Huang</name>
</author>
<published>2011-07-13T17:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecdbf6e0d555d353188647d1b2dee9a79db69c68'/>
<id>urn:sha1:ecdbf6e0d555d353188647d1b2dee9a79db69c68</id>
<content type='text'>
to help debug issues related to management firmware.

Signed-off-by: Jeffrey Huang &lt;huangjw@broadcom.com&gt;
Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Reviewed-by: Matt Carlson &lt;mcarlson@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bnx2: remove unnecessary read of PCI_CAP_ID_EXP</title>
<updated>2011-06-28T04:40:45Z</updated>
<author>
<name>Jon Mason</name>
</author>
<published>2011-06-27T07:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e82760e7d6498d24d1a92f22767ba578c8980a6d'/>
<id>urn:sha1:e82760e7d6498d24d1a92f22767ba578c8980a6d</id>
<content type='text'>
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).

Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>cnic, bnx2: Check iSCSI support early in bnx2_init_one()</title>
<updated>2011-06-09T06:52:37Z</updated>
<author>
<name>Michael Chan</name>
</author>
<published>2011-06-08T19:29:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7625eb2f2fff7bfae41d3119b472c20b48874895'/>
<id>urn:sha1:7625eb2f2fff7bfae41d3119b472c20b48874895</id>
<content type='text'>
Based on earlier patch from Neil Horman &lt;nhorman@tuxdriver.com&gt;

If iSCSI is not supported on a bnx2 device, bnx2_cnic_probe() will
return NULL and the cnic device will not be visible to bnx2i.  This
will prevent bnx2i from registering and then unregistering during
cnic_start() and cause the warning message:

bnx2 0003:01:00.1: eth1: Failed waiting for ULP up call to complete

Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-05-05T21:59:02Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2011-05-05T21:59:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7143b7d41218d4fc2ea33e6056c73609527ae687'/>
<id>urn:sha1:7143b7d41218d4fc2ea33e6056c73609527ae687</id>
<content type='text'>
Conflicts:
	drivers/net/tg3.c
</content>
</entry>
<entry>
<title>ethtool: cosmetic: Use ethtool ethtool_cmd_speed API</title>
<updated>2011-04-29T21:03:01Z</updated>
<author>
<name>David Decotigny</name>
</author>
<published>2011-04-27T18:32:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=707394972093e2056e1e8cc39be19cf9bcb3e7b3'/>
<id>urn:sha1:707394972093e2056e1e8cc39be19cf9bcb3e7b3</id>
<content type='text'>
This updates the network drivers so that they don't access the
ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
instead.

For most of the drivers, these changes are purely cosmetic and don't
fix any problem, such as for those 1GbE/10GbE drivers that indirectly
call their own ethtool get_settings()/mii_ethtool_gset(). The changes
are meant to enforce code consistency and provide robustness with
future larger throughputs, at the expense of a few CPU cycles for each
ethtool operation.

All drivers compiled with make allyesconfig ion x86_64 have been
updated.

Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
Signed-off-by: David Decotigny &lt;decot@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: Use full 32 bit speed range in ethtool's set_settings</title>
<updated>2011-04-29T21:03:00Z</updated>
<author>
<name>David Decotigny</name>
</author>
<published>2011-04-27T18:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=25db0338813a8915457636b1f6abe6a28fa73f8d'/>
<id>urn:sha1:25db0338813a8915457636b1f6abe6a28fa73f8d</id>
<content type='text'>
This makes sure the ethtool's set_settings() callback of network
drivers don't ignore the 16 most significant bits when ethtool calls
their set_settings().

All drivers compiled with make allyesconfig on x86_64 have been
updated.

Signed-off-by: David Decotigny &lt;decot@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bnx2: cancel timer on device removal</title>
<updated>2011-04-29T19:32:35Z</updated>
<author>
<name>Neil Horman</name>
</author>
<published>2011-04-26T10:30:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8333a46ad3877485e4d67ef499c6dda36bfd1f9a'/>
<id>urn:sha1:8333a46ad3877485e4d67ef499c6dda36bfd1f9a</id>
<content type='text'>
This oops was recently reported to me:

invalid opcode: 0000 [#1] SMP
last sysfs file:
/sys/devices/pci0000:00/0000:00:01.0/0000:01:0d.0/0000:02:05.0/device
CPU 1
Modules linked in: bnx2(+) sunrpc ipv6 dm_mirror dm_region_hash dm_log sg
microcode serio_raw amd64_edac_mod edac_core edac_mce_amd k8temp i2c_piix4
shpchp ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas radeon ttm drm_kms_helper drm hwmon i2c_algo_bit i2c_core
dm_mod [last unloaded: bnx2]

Modules linked in: bnx2(+) sunrpc ipv6 dm_mirror dm_region_hash dm_log sg
microcode serio_raw amd64_edac_mod edac_core edac_mce_amd k8temp i2c_piix4
shpchp ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas radeon ttm drm_kms_helper drm hwmon i2c_algo_bit i2c_core
dm_mod [last unloaded: bnx2]
Pid: 23900, comm: pidof Not tainted 2.6.32-130.el6.x86_64 #1 BladeCenter LS21
-[797251Z]-
RIP: 0010:[&lt;ffffffffa058b270&gt;]  [&lt;ffffffffa058b270&gt;] 0xffffffffa058b270
RSP: 0018:ffff880002083e48  EFLAGS: 00010246
RAX: ffff880002083e90 RBX: ffff88007ccd4000 RCX: 0000000000000000
RDX: 0000000000000100 RSI: dead000000200200 RDI: ffff8800007b8700
RBP: ffff880002083ed0 R08: ffff88000208db40 R09: 0000022d191d27c8
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800007b9bc8
R13: ffff880002083e90 R14: ffff8800007b8700 R15: ffffffffa058b270
FS:  00007fbb3bcf7700(0000) GS:ffff880002080000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001664a98 CR3: 0000000060395000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process pidof (pid: 23900, threadinfo ffff8800007e8000, task ffff8800091c0040)
Stack:
 ffffffff81079f77 ffffffff8109e010 ffff88007ccd5c20 ffff88007ccd5820
&lt;0&gt; ffff88007ccd5420 ffff8800007e9fd8 ffff8800007e9fd8 0000010000000000
&lt;0&gt; ffff88007ccd5020 ffff880002083e90 ffff880002083e90 ffffffff8102a00d
Call Trace:
 &lt;IRQ&gt;
 [&lt;ffffffff81079f77&gt;] ? run_timer_softirq+0x197/0x340
 [&lt;ffffffff8109e010&gt;] ? tick_sched_timer+0x0/0xc0
 [&lt;ffffffff8102a00d&gt;] ? lapic_next_event+0x1d/0x30
 [&lt;ffffffff8106f737&gt;] __do_softirq+0xb7/0x1e0
 [&lt;ffffffff81092cc0&gt;] ? hrtimer_interrupt+0x140/0x250
 [&lt;ffffffff81185f90&gt;] ? filldir+0x0/0xe0
 [&lt;ffffffff8100c2cc&gt;] call_softirq+0x1c/0x30
 [&lt;ffffffff8100df05&gt;] do_softirq+0x65/0xa0
 [&lt;ffffffff8106f525&gt;] irq_exit+0x85/0x90
 [&lt;ffffffff814e3340&gt;] smp_apic_timer_interrupt+0x70/0x9b
 [&lt;ffffffff8100bc93&gt;] apic_timer_interrupt+0x13/0x20
 &lt;EOI&gt;
 [&lt;ffffffff81211ba5&gt;] ? selinux_file_permission+0x45/0x150
 [&lt;ffffffff81262a75&gt;] ? _atomic_dec_and_lock+0x55/0x80
 [&lt;ffffffff812050c6&gt;] security_file_permission+0x16/0x20
 [&lt;ffffffff811861c1&gt;] vfs_readdir+0x71/0xe0
 [&lt;ffffffff81186399&gt;] sys_getdents+0x89/0xf0
 [&lt;ffffffff8100b172&gt;] system_call_fastpath+0x16/0x1b

It occured during some stress testing, in which the reporter was repeatedly
removing and modprobing the bnx2 module while doing various other random
operations on the bnx2 registered net device.  Noting that this error occured on
a serdes based device, we noted that there were a few ethtool operations (most
notably self_test and set_phys_id) that have execution paths that lead into
bnx2_setup_serdes_phy.  This function is notable because it executes a mod_timer
call, which starts the bp-&gt;timer running.  Currently bnx2 is setup to assume
that this timer only nees to be stopped when bnx2_close or bnx2_suspend is
called.  Since the above ethtool operations are not gated on the net device
having been opened however, that assumption is incorrect, and can lead to the
timer still running after the module has been removed, leading to the oops above
(as well as other simmilar oopses).

Fix the problem by ensuring that the timer is stopped when pci_device_unregister
is called.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reported-by: Hushan Jia &lt;hjia@redhat.com&gt;
CC: Michael Chan &lt;mchan@broadcom.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Acked-by: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
