<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/bnx2fc, branch v3.14.20</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>cnic,bnx2i,bnx2fc: Fix inconsistent use of page size</title>
<updated>2014-03-18T20:02:16+00:00</updated>
<author>
<name>Michael Chan</name>
<email>mchan@broadcom.com</email>
</author>
<published>2014-03-18T03:19:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be1fefc21433f6202fcd76bdc7916e557fe80b9a'/>
<id>be1fefc21433f6202fcd76bdc7916e557fe80b9a</id>
<content type='text'>
The bnx2/bnx2x rings are made up of linked pages.  However there is an
upper limit on the page size as some the page size settings are 16-bit
in the hardware/firmware interface.  In the current code, some parts
use BNX2_PAGE_SIZE which has a 16K upper limit and some parts use
PAGE_SIZE.  On archs with &gt;= 64K PAGE_SIZE, it generates some compile
warnings.  Define a new CNIC_PAGE_SZIE which has an upper limit of
16K and use it consistently in all relevant parts.

Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&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 bnx2/bnx2x rings are made up of linked pages.  However there is an
upper limit on the page size as some the page size settings are 16-bit
in the hardware/firmware interface.  In the current code, some parts
use BNX2_PAGE_SIZE which has a 16K upper limit and some parts use
PAGE_SIZE.  On archs with &gt;= 64K PAGE_SIZE, it generates some compile
warnings.  Define a new CNIC_PAGE_SZIE which has an upper limit of
16K and use it consistently in all relevant parts.

Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'fcoe-3.13' into for-linus</title>
<updated>2013-11-10T04:19:15+00:00</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2013-11-10T04:19:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=323f6226a816f0b01514d25fba5529e0e68636c3'/>
<id>323f6226a816f0b01514d25fba5529e0e68636c3</id>
<content type='text'>
Pull Request for 3.13 for FCOE tree.

Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull Request for 3.13 for FCOE tree.

Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] bnx2fc: Bump version from 1.0.14 to 2.4.1</title>
<updated>2013-10-25T08:58:03+00:00</updated>
<author>
<name>Eddie Wai</name>
<email>eddie.wai@broadcom.com</email>
</author>
<published>2013-09-18T05:33:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aa106202e4485e25e96c5ced29238dabc07bccd1'/>
<id>aa106202e4485e25e96c5ced29238dabc07bccd1</id>
<content type='text'>
Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] BNX2FC: hung task timeout warning observed when rmmod bnx2x with active FCoE targets</title>
<updated>2013-10-25T08:58:02+00:00</updated>
<author>
<name>Eddie Wai</name>
<email>eddie.wai@broadcom.com</email>
</author>
<published>2013-09-26T05:01:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0680810c11fe16e7f8797908c8cb94e6a4933cbd'/>
<id>0680810c11fe16e7f8797908c8cb94e6a4933cbd</id>
<content type='text'>
[v2] - removed the interface-&gt;enabled flag setting which prevented the
       fcoe ctlr link from being brought back up after a MTU change

A rtnl_lock deadlock was observed from the rmmod thread where it
tries to unregister the fcoe_ctlr device.  This unregistration
triggered a flush of the sysfs queue of the associated ctlr and led to
a call to the set_fcoe_ctlr_enabled routine.  This will eventually propagate
down to call the bnx2fc_disable routine and contented for the rtnl_lock
in the same context.

This patch creates a subset of the bnx2fc_enable/disable routine which
removes the unnecesary rtnl_lock and the bnx2fc_dev_lock acquisition from
the set_fcoe_ctlr_enabled path.

 kernel: INFO: task rmmod:7874 blocked for more than 120 seconds.
 kernel:      Tainted: G        W  ---------------    2.6.32-415.0.1.el6.x86_64 #1
 kernel: "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 kernel: rmmod         D 000000000000000f     0  7874   6518 0x00000080
 kernel: ffff88022158f7d8 0000000000000086 0000000000000000 0000000000000000
 kernel: ffff88023fe72600 ffff88043c74d410 ffff88043c74d400 ffff88043c74d000
 kernel: ffff88021ecbe5f8 ffff88022158ffd8 000000000000fbc8 ffff88021ecbe5f8
 kernel: Call Trace:
 kernel: [&lt;ffffffff81525985&gt;] schedule_timeout+0x215/0x2e0
 kernel: [&lt;ffffffff810680c0&gt;] ? pick_next_task_fair+0xd0/0x130
 kernel: [&lt;ffffffff81524858&gt;] ? schedule+0x178/0x3b2
 kernel: [&lt;ffffffff81525603&gt;] wait_for_common+0x123/0x180
 kernel: [&lt;ffffffff81066b40&gt;] ? default_wake_function+0x0/0x20
 kernel: [&lt;ffffffff811a486e&gt;] ? ifind_fast+0x5e/0xb0
 kernel: [&lt;ffffffff8152571d&gt;] wait_for_completion+0x1d/0x20
 kernel: [&lt;ffffffff81203868&gt;] sysfs_addrm_finish+0x228/0x270
 kernel: [&lt;ffffffff812014ab&gt;] sysfs_hash_and_remove+0x5b/0x90
 kernel: [&lt;ffffffff812056af&gt;] sysfs_remove_group+0x5f/0x100
 kernel: [&lt;ffffffff81367e8b&gt;] device_remove_groups+0x3b/0x60
 kernel: [&lt;ffffffff8136811d&gt;] device_remove_attrs+0x3d/0x90
 kernel: [&lt;ffffffff81368295&gt;] device_del+0x125/0x1e0
 kernel: [&lt;ffffffff81368372&gt;] device_unregister+0x22/0x60
 kernel: [&lt;ffffffffa038ead2&gt;] fcoe_ctlr_device_delete+0xe2/0xf4 [libfcoe]
 kernel: [&lt;ffffffffa03c43cb&gt;] bnx2fc_interface_release+0x5b/0x90 [bnx2fc]
 kernel: [&lt;ffffffffa03c4370&gt;] ? bnx2fc_interface_release+0x0/0x90 [bnx2fc]
 kernel: [&lt;ffffffff812835e7&gt;] kref_put+0x37/0x70
 kernel: [&lt;ffffffffa03c4192&gt;] __bnx2fc_destroy+0x72/0xa0 [bnx2fc]
 kernel: [&lt;ffffffffa03c5265&gt;] bnx2fc_ulp_exit+0xf5/0x160 [bnx2fc]    &lt;- got bnx2fc_dev_lock mutex_lock
 kernel: [&lt;ffffffffa03b03c6&gt;] cnic_ulp_exit+0xb6/0xc0 [cnic]
 kernel: [&lt;ffffffffa03b5418&gt;] cnic_netdev_event+0x368/0x370 [cnic]
 kernel: [&lt;ffffffffa038c56c&gt;] ? fcoe_del_netdev_mapping+0x8c/0xa0 [libfcoe]
 kernel: [&lt;ffffffff8152a6e5&gt;] notifier_call_chain+0x55/0x80
 kernel: [&lt;ffffffff810a0a46&gt;] raw_notifier_call_chain+0x16/0x20
 kernel: [&lt;ffffffff81459beb&gt;] call_netdevice_notifiers+0x1b/0x20
 kernel: [&lt;ffffffff8145ab34&gt;] rollback_registered_many+0x154/0x280
 kernel: [&lt;ffffffff8145ad08&gt;] rollback_registered+0x38/0x50
 kernel: [&lt;ffffffff8145ad78&gt;] unregister_netdevice_queue+0x58/0xa0
 kernel: [&lt;ffffffff8145add0&gt;] unregister_netdevice+0x10/0x20
 kernel: [&lt;ffffffff8145adfe&gt;] unregister_netdev+0x1e/0x30                  &lt;- got rtnl_lock!!!!!!!!!
 kernel: [&lt;ffffffffa0122278&gt;] __bnx2x_remove+0x48/0x270 [bnx2x] &lt;- got &amp; rel rtnl_lock
 kernel: [&lt;ffffffffa0122554&gt;] bnx2x_remove_one+0x44/0x80 [bnx2x]
 kernel: [&lt;ffffffff812a3af7&gt;] pci_device_remove+0x37/0x70
 kernel: [&lt;ffffffff8136b2ef&gt;] __device_release_driver+0x6f/0xe0
 kernel: [&lt;ffffffff8136b428&gt;] driver_detach+0xc8/0xd0
 kernel: [&lt;ffffffff8136a22e&gt;] bus_remove_driver+0x8e/0x110
 kernel: [&lt;ffffffff8136bc12&gt;] driver_unregister+0x62/0xa0
 kernel: [&lt;ffffffff812a3e04&gt;] pci_unregister_driver+0x44/0xb0
 kernel: [&lt;ffffffffa0191954&gt;] bnx2x_cleanup+0x18/0x73 [bnx2x]
 kernel: [&lt;ffffffff810b8be4&gt;] sys_delete_module+0x194/0x260
 kernel: [&lt;ffffffff810e1347&gt;] ? audit_syscall_entry+0x1d7/0x200
 kernel: [&lt;ffffffff8100b072&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[v2] - removed the interface-&gt;enabled flag setting which prevented the
       fcoe ctlr link from being brought back up after a MTU change

A rtnl_lock deadlock was observed from the rmmod thread where it
tries to unregister the fcoe_ctlr device.  This unregistration
triggered a flush of the sysfs queue of the associated ctlr and led to
a call to the set_fcoe_ctlr_enabled routine.  This will eventually propagate
down to call the bnx2fc_disable routine and contented for the rtnl_lock
in the same context.

This patch creates a subset of the bnx2fc_enable/disable routine which
removes the unnecesary rtnl_lock and the bnx2fc_dev_lock acquisition from
the set_fcoe_ctlr_enabled path.

 kernel: INFO: task rmmod:7874 blocked for more than 120 seconds.
 kernel:      Tainted: G        W  ---------------    2.6.32-415.0.1.el6.x86_64 #1
 kernel: "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 kernel: rmmod         D 000000000000000f     0  7874   6518 0x00000080
 kernel: ffff88022158f7d8 0000000000000086 0000000000000000 0000000000000000
 kernel: ffff88023fe72600 ffff88043c74d410 ffff88043c74d400 ffff88043c74d000
 kernel: ffff88021ecbe5f8 ffff88022158ffd8 000000000000fbc8 ffff88021ecbe5f8
 kernel: Call Trace:
 kernel: [&lt;ffffffff81525985&gt;] schedule_timeout+0x215/0x2e0
 kernel: [&lt;ffffffff810680c0&gt;] ? pick_next_task_fair+0xd0/0x130
 kernel: [&lt;ffffffff81524858&gt;] ? schedule+0x178/0x3b2
 kernel: [&lt;ffffffff81525603&gt;] wait_for_common+0x123/0x180
 kernel: [&lt;ffffffff81066b40&gt;] ? default_wake_function+0x0/0x20
 kernel: [&lt;ffffffff811a486e&gt;] ? ifind_fast+0x5e/0xb0
 kernel: [&lt;ffffffff8152571d&gt;] wait_for_completion+0x1d/0x20
 kernel: [&lt;ffffffff81203868&gt;] sysfs_addrm_finish+0x228/0x270
 kernel: [&lt;ffffffff812014ab&gt;] sysfs_hash_and_remove+0x5b/0x90
 kernel: [&lt;ffffffff812056af&gt;] sysfs_remove_group+0x5f/0x100
 kernel: [&lt;ffffffff81367e8b&gt;] device_remove_groups+0x3b/0x60
 kernel: [&lt;ffffffff8136811d&gt;] device_remove_attrs+0x3d/0x90
 kernel: [&lt;ffffffff81368295&gt;] device_del+0x125/0x1e0
 kernel: [&lt;ffffffff81368372&gt;] device_unregister+0x22/0x60
 kernel: [&lt;ffffffffa038ead2&gt;] fcoe_ctlr_device_delete+0xe2/0xf4 [libfcoe]
 kernel: [&lt;ffffffffa03c43cb&gt;] bnx2fc_interface_release+0x5b/0x90 [bnx2fc]
 kernel: [&lt;ffffffffa03c4370&gt;] ? bnx2fc_interface_release+0x0/0x90 [bnx2fc]
 kernel: [&lt;ffffffff812835e7&gt;] kref_put+0x37/0x70
 kernel: [&lt;ffffffffa03c4192&gt;] __bnx2fc_destroy+0x72/0xa0 [bnx2fc]
 kernel: [&lt;ffffffffa03c5265&gt;] bnx2fc_ulp_exit+0xf5/0x160 [bnx2fc]    &lt;- got bnx2fc_dev_lock mutex_lock
 kernel: [&lt;ffffffffa03b03c6&gt;] cnic_ulp_exit+0xb6/0xc0 [cnic]
 kernel: [&lt;ffffffffa03b5418&gt;] cnic_netdev_event+0x368/0x370 [cnic]
 kernel: [&lt;ffffffffa038c56c&gt;] ? fcoe_del_netdev_mapping+0x8c/0xa0 [libfcoe]
 kernel: [&lt;ffffffff8152a6e5&gt;] notifier_call_chain+0x55/0x80
 kernel: [&lt;ffffffff810a0a46&gt;] raw_notifier_call_chain+0x16/0x20
 kernel: [&lt;ffffffff81459beb&gt;] call_netdevice_notifiers+0x1b/0x20
 kernel: [&lt;ffffffff8145ab34&gt;] rollback_registered_many+0x154/0x280
 kernel: [&lt;ffffffff8145ad08&gt;] rollback_registered+0x38/0x50
 kernel: [&lt;ffffffff8145ad78&gt;] unregister_netdevice_queue+0x58/0xa0
 kernel: [&lt;ffffffff8145add0&gt;] unregister_netdevice+0x10/0x20
 kernel: [&lt;ffffffff8145adfe&gt;] unregister_netdev+0x1e/0x30                  &lt;- got rtnl_lock!!!!!!!!!
 kernel: [&lt;ffffffffa0122278&gt;] __bnx2x_remove+0x48/0x270 [bnx2x] &lt;- got &amp; rel rtnl_lock
 kernel: [&lt;ffffffffa0122554&gt;] bnx2x_remove_one+0x44/0x80 [bnx2x]
 kernel: [&lt;ffffffff812a3af7&gt;] pci_device_remove+0x37/0x70
 kernel: [&lt;ffffffff8136b2ef&gt;] __device_release_driver+0x6f/0xe0
 kernel: [&lt;ffffffff8136b428&gt;] driver_detach+0xc8/0xd0
 kernel: [&lt;ffffffff8136a22e&gt;] bus_remove_driver+0x8e/0x110
 kernel: [&lt;ffffffff8136bc12&gt;] driver_unregister+0x62/0xa0
 kernel: [&lt;ffffffff812a3e04&gt;] pci_unregister_driver+0x44/0xb0
 kernel: [&lt;ffffffffa0191954&gt;] bnx2x_cleanup+0x18/0x73 [bnx2x]
 kernel: [&lt;ffffffff810b8be4&gt;] sys_delete_module+0x194/0x260
 kernel: [&lt;ffffffff810e1347&gt;] ? audit_syscall_entry+0x1d7/0x200
 kernel: [&lt;ffffffff8100b072&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] bnx2fc: Fixed a SCSI CMD cmpl race condition between ABTS and CLEANUP</title>
<updated>2013-10-25T08:58:02+00:00</updated>
<author>
<name>Eddie Wai</name>
<email>eddie.wai@broadcom.com</email>
</author>
<published>2013-09-18T05:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=21837896097a6d141c7ac581500ee648c5b4bb89'/>
<id>21837896097a6d141c7ac581500ee648c5b4bb89</id>
<content type='text'>
In the case when a SCSI_CMD times out, bnx2fc will initiate the sending of the
ABTS.  However, if the SCSI layer's SCSI command timer also times out, it'll
instantiate a task abort of the same xid.

The race condition this patch tries to fix is as follows:

SCSI_CMD timeout (20s)
thread 1                   thread 2
send ABTS
rx ABTS cmpl
                           task abort_eh
                           explicit LOGO since ABTS was engaged
                           CLEANUP cmpl
SCSI_CMD cmpl (ABTS cmpl)
instantiate RRQ
wait 10s
attempt to send RRQ (because of LOGO, it wouldn't continue)

Note that there is no call to scsi_done for this SCSI_CMD cmpletion
in this path.

The patch changes the path of execution to call scsi_done immediately
instead of instantiating the RRQ.

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case when a SCSI_CMD times out, bnx2fc will initiate the sending of the
ABTS.  However, if the SCSI layer's SCSI command timer also times out, it'll
instantiate a task abort of the same xid.

The race condition this patch tries to fix is as follows:

SCSI_CMD timeout (20s)
thread 1                   thread 2
send ABTS
rx ABTS cmpl
                           task abort_eh
                           explicit LOGO since ABTS was engaged
                           CLEANUP cmpl
SCSI_CMD cmpl (ABTS cmpl)
instantiate RRQ
wait 10s
attempt to send RRQ (because of LOGO, it wouldn't continue)

Note that there is no call to scsi_done for this SCSI_CMD cmpletion
in this path.

The patch changes the path of execution to call scsi_done immediately
instead of instantiating the RRQ.

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: Convert uses of compare_ether_addr to ether_addr_equal</title>
<updated>2013-10-14T15:25:40+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-09-02T03:32:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6942df7f775107b504f10de42c81971f514d718d'/>
<id>6942df7f775107b504f10de42c81971f514d718d</id>
<content type='text'>
Preliminary to removing compare_ether_addr altogether:

Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.

Done via cocci script:

$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
-	!compare_ether_addr(a, b)
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	compare_ether_addr(a, b)
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) == 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) != 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) == 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) != 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!!ether_addr_equal(a, b)
+	ether_addr_equal(a, b)

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Preliminary to removing compare_ether_addr altogether:

Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.

Done via cocci script:

$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
-	!compare_ether_addr(a, b)
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	compare_ether_addr(a, b)
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) == 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!ether_addr_equal(a, b) != 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) == 0
+	!ether_addr_equal(a, b)

@@
expression a,b;
@@
-	ether_addr_equal(a, b) != 0
+	ether_addr_equal(a, b)

@@
expression a,b;
@@
-	!!ether_addr_equal(a, b)
+	ether_addr_equal(a, b)

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfcoe: Make fcoe_sysfs optional / fix fnic NULL exception</title>
<updated>2013-10-11T20:25:40+00:00</updated>
<author>
<name>Robert Love</name>
<email>robert.w.love@intel.com</email>
</author>
<published>2013-09-05T07:47:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9d34876f820d55c94bd0b2a2ed3d2e2976cbd997'/>
<id>9d34876f820d55c94bd0b2a2ed3d2e2976cbd997</id>
<content type='text'>
fnic doesn't use any of the create/destroy/enable/disable interfaces
either from the (legacy) module paramaters or the (new) fcoe_sysfs
interfaces. When fcoe_sysfs was introduced fnic wasn't changed since
it wasn't using the interfaces. libfcoe incorrectly assumed that that
all of its users were using fcoe_sysfs and when adding and deleting
FCFs would assume the existance of a fcoe_ctlr_device. fnic was not
allocating this structure because it doesn't care about the standard
user interfaces (fnic starts on link only). If/When libfcoe tried to use
the fcoe_ctlr_device's lock for the first time a NULL pointer exception
would be triggered.

Since fnic doesn't care about sysfs or user interfaces, the solution
is to drop libfcoe's assumption that all drivers are using fcoe_sysfs.

This patch accomplishes this by changing some of the structure
relationships.

We need a way to determine when a LLD is using fcoe_sysfs or not and
we can do that by checking for the existance of the fcoe_ctlr_device.
Prior to this patch, it was assumed that the fcoe_ctlr structure was
allocated with the fcoe_ctlr_device and immediately followed it in
memory. To reach the fcoe_ctlr_device we would simply go back in memory
from the fcoe_ctlr to get the fcoe_ctlr_device.

Since fnic doesn't allocate the fcoe_ctlr_device, we cannot keep that
assumption. This patch adds a pointer from the fcoe_ctlr to the
fcoe_ctlr_device. For bnx2fc and fcoe we will continue to allocate the
two structures together, but then we'll set the ctlr-&gt;cdev pointer
to point at the fcoe_ctlr_device. fnic will not change and will continue
to allocate the fcoe_ctlr itself, and ctlr-&gt;cdev will remain NULL.

When libfcoe adds fcoe_fcf's to the fcoe_ctlr it will check if ctlr-&gt;cdev
is set and only if so will it continue to interact with fcoe_sysfs.

Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Tested-by: Hiral Patel &lt;hiralpat@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fnic doesn't use any of the create/destroy/enable/disable interfaces
either from the (legacy) module paramaters or the (new) fcoe_sysfs
interfaces. When fcoe_sysfs was introduced fnic wasn't changed since
it wasn't using the interfaces. libfcoe incorrectly assumed that that
all of its users were using fcoe_sysfs and when adding and deleting
FCFs would assume the existance of a fcoe_ctlr_device. fnic was not
allocating this structure because it doesn't care about the standard
user interfaces (fnic starts on link only). If/When libfcoe tried to use
the fcoe_ctlr_device's lock for the first time a NULL pointer exception
would be triggered.

Since fnic doesn't care about sysfs or user interfaces, the solution
is to drop libfcoe's assumption that all drivers are using fcoe_sysfs.

This patch accomplishes this by changing some of the structure
relationships.

We need a way to determine when a LLD is using fcoe_sysfs or not and
we can do that by checking for the existance of the fcoe_ctlr_device.
Prior to this patch, it was assumed that the fcoe_ctlr structure was
allocated with the fcoe_ctlr_device and immediately followed it in
memory. To reach the fcoe_ctlr_device we would simply go back in memory
from the fcoe_ctlr to get the fcoe_ctlr_device.

Since fnic doesn't allocate the fcoe_ctlr_device, we cannot keep that
assumption. This patch adds a pointer from the fcoe_ctlr to the
fcoe_ctlr_device. For bnx2fc and fcoe we will continue to allocate the
two structures together, but then we'll set the ctlr-&gt;cdev pointer
to point at the fcoe_ctlr_device. fnic will not change and will continue
to allocate the fcoe_ctlr itself, and ctlr-&gt;cdev will remain NULL.

When libfcoe adds fcoe_fcf's to the fcoe_ctlr it will check if ctlr-&gt;cdev
is set and only if so will it continue to interact with fcoe_sysfs.

Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Tested-by: Hiral Patel &lt;hiralpat@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bnx2x, cnic, bnx2i, bnx2fc: Fix bnx2i and bnx2fc regressions.</title>
<updated>2013-09-18T16:24:32+00:00</updated>
<author>
<name>Michael Chan</name>
<email>mchan@broadcom.com</email>
</author>
<published>2013-09-18T08:50:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f78afb356303e5f78750321a63809ef5c2d13c0d'/>
<id>f78afb356303e5f78750321a63809ef5c2d13c0d</id>
<content type='text'>
commit b9871bcfd211d316adee317608dab44c58d6ea2d
    bnx2x: VF RSS support - PF side

changed the configuration of the doorbell HW and it broke iSCSI and FCoE.
We fix this by making compatible changes to the doorbell address in bnx2i
and bnx2fc.  For the userspace driver, we need to pass a modified CID
so that the existing userspace driver will calculate the correct doorbell
address and continue to work.

Signed-off-by: Ariel Elior &lt;ariele@broadcom.com&gt;
Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: Michael Chan &lt;mchan@broadcom.com&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>
commit b9871bcfd211d316adee317608dab44c58d6ea2d
    bnx2x: VF RSS support - PF side

changed the configuration of the doorbell HW and it broke iSCSI and FCoE.
We fix this by making compatible changes to the doorbell address in bnx2i
and bnx2fc.  For the userspace driver, we need to pass a modified CID
so that the existing userspace driver will calculate the correct doorbell
address and continue to work.

Signed-off-by: Ariel Elior &lt;ariele@broadcom.com&gt;
Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] bnx2fc: Bumped version to 1.0.14</title>
<updated>2013-05-02T14:32:26+00:00</updated>
<author>
<name>Bhanu Prakash Gollapudi</name>
<email>bprakash@broadcom.com</email>
</author>
<published>2013-03-08T23:53:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a7d1d360aa3c7578deff480db080ac2544725e8'/>
<id>0a7d1d360aa3c7578deff480db080ac2544725e8</id>
<content type='text'>
Signed-off-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] bnx2fc: Update copyright dates</title>
<updated>2013-05-02T14:32:25+00:00</updated>
<author>
<name>Bhanu Prakash Gollapudi</name>
<email>bprakash@broadcom.com</email>
</author>
<published>2013-03-08T21:28:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cf1221912fcdc2542509ef41543117ee86254d04'/>
<id>cf1221912fcdc2542509ef41543117ee86254d04</id>
<content type='text'>
Signed-off-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
