<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/libfc, branch v3.1.1</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>[SCSI] libfc: fix referencing to fc_fcp_pkt from the frame pointer via fr_fsp()</title>
<updated>2011-08-29T02:40:30+00:00</updated>
<author>
<name>Yi Zou</name>
<email>yi.zou@intel.com</email>
</author>
<published>2011-08-25T19:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3ee17f59c5378af8d245f82498e3919b7de2ab40'/>
<id>3ee17f59c5378af8d245f82498e3919b7de2ab40</id>
<content type='text'>
In commit 6a716a8, while releasing the DDP context in case frame_send() failed,
the frame may already be freed, so we should store the pointer to fc_fcp_pkt and
release the DDP context using the locally stored fsp instead of getting fsp from
the fr_fsp(fp) on a frame.

Signed-off-by: Yi Zou &lt;yi.zou@intel.com&gt;
Reported-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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 commit 6a716a8, while releasing the DDP context in case frame_send() failed,
the frame may already be freed, so we should store the pointer to fc_fcp_pkt and
release the DDP context using the locally stored fsp instead of getting fsp from
the fr_fsp(fp) on a frame.

Signed-off-by: Yi Zou &lt;yi.zou@intel.com&gt;
Reported-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: block SCSI eh thread for blocked rports</title>
<updated>2011-08-29T02:40:12+00:00</updated>
<author>
<name>Vasu Dev</name>
<email>vasu.dev@intel.com</email>
</author>
<published>2011-08-25T19:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=21cc0bd3a9e524b44a4f0ff05ac612aa0ff1a26e'/>
<id>21cc0bd3a9e524b44a4f0ff05ac612aa0ff1a26e</id>
<content type='text'>
Call fc_block_scsi_eh() in all fcoe eh to blocks
the scsi_eh thread for blocked rports.

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Reviewed-by: Yi Zou &lt;yi.zou@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
Call fc_block_scsi_eh() in all fcoe eh to blocks
the scsi_eh thread for blocked rports.

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Reviewed-by: Yi Zou &lt;yi.zou@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: fix fc_eh_host_reset</title>
<updated>2011-08-29T02:39:37+00:00</updated>
<author>
<name>Vasu Dev</name>
<email>vasu.dev@intel.com</email>
</author>
<published>2011-08-25T19:40:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=77a2b73a7805a3c6a473b6741aa514ef40295d26'/>
<id>77a2b73a7805a3c6a473b6741aa514ef40295d26</id>
<content type='text'>
Current fc_eh_host_reset leaves lport offline
permanently  due to FLOGI response getting
handled by LOGO response from last reset as both
had same exchange id.

So fix this by having end to end exches clean-up
using exchange abort along exches reset
done from fc_eh_host_reset. This would avoid
exchanges collision between the sessions across
the reset. In this case implicit login should have
done that but no aborting support for FIP
frames, so just wait till lport-&gt;r_a_tov before
restarting next flogi to ensure all exchanges
are good to use again for next session.

Below is the trace of LOGO from older session
coming ahead of FLOGI response with same exche id
0x203:-

617  86.435165     4e.00.0b -&gt; ff.ff.fc     FC ELS LOGO 0x203
618  86.435195     4e.00.0b -&gt; b6.02.00     FC ELS LOGO 0x213
619  86.435220     4e.00.0b -&gt; 18.03.00     FC ELS LOGO 0x223
620  86.435244     4e.00.0b -&gt; 18.02.00     FC ELS LOGO 0x233
621  86.435267     4e.00.0b -&gt; 18.01.00     FC ELS LOGO 0x243
622  86.435349     00.00.00 -&gt; ff.ff.fe     FC ELS FLOGI 0x203
623  86.435549     ff.ff.fc -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x203
624  86.438721     ff.ff.fe -&gt; 4e.00.0b     FC ELS ACC (FLOGI) 0x203
625  86.442059     18.03.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x223
626  86.443683     b6.02.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x213
627  86.447693     18.01.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x243
628  86.453499     18.02.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x233

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Reviewed-by: Yi Zou &lt;yi.zou@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
Current fc_eh_host_reset leaves lport offline
permanently  due to FLOGI response getting
handled by LOGO response from last reset as both
had same exchange id.

So fix this by having end to end exches clean-up
using exchange abort along exches reset
done from fc_eh_host_reset. This would avoid
exchanges collision between the sessions across
the reset. In this case implicit login should have
done that but no aborting support for FIP
frames, so just wait till lport-&gt;r_a_tov before
restarting next flogi to ensure all exchanges
are good to use again for next session.

Below is the trace of LOGO from older session
coming ahead of FLOGI response with same exche id
0x203:-

617  86.435165     4e.00.0b -&gt; ff.ff.fc     FC ELS LOGO 0x203
618  86.435195     4e.00.0b -&gt; b6.02.00     FC ELS LOGO 0x213
619  86.435220     4e.00.0b -&gt; 18.03.00     FC ELS LOGO 0x223
620  86.435244     4e.00.0b -&gt; 18.02.00     FC ELS LOGO 0x233
621  86.435267     4e.00.0b -&gt; 18.01.00     FC ELS LOGO 0x243
622  86.435349     00.00.00 -&gt; ff.ff.fe     FC ELS FLOGI 0x203
623  86.435549     ff.ff.fc -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x203
624  86.438721     ff.ff.fe -&gt; 4e.00.0b     FC ELS ACC (FLOGI) 0x203
625  86.442059     18.03.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x223
626  86.443683     b6.02.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x213
627  86.447693     18.01.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x243
628  86.453499     18.02.00 -&gt; 4e.00.0b     FC ELS ACC (LOGO) 0x233

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Reviewed-by: Yi Zou &lt;yi.zou@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: fix warn on in lport retry</title>
<updated>2011-07-28T08:13:36+00:00</updated>
<author>
<name>Vasu Dev</name>
<email>vasu.dev@intel.com</email>
</author>
<published>2011-07-27T22:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=320036e083bb2a0f60820b51cb9f0bfa651ee62f'/>
<id>320036e083bb2a0f60820b51cb9f0bfa651ee62f</id>
<content type='text'>
The lport retry timer hits warn on in case
it has become ready in response from fip
login from fcoe_ctlr_flogi_send(), this is
possible but safe code path, therefore
removing this warn on.

Jun 22 03:16:30 10.0.16.6 [488198.316517] host3: Assigned Port ID 180f02
Jun 22 03:16:32 10.0.16.6 [488200.091561] ------------[ cut here ]------------
Jun 22 03:16:32 10.0.16.6 [488200.091586] WARNING: at
drivers/scsi/libfc/fc_lport.c:1355 fc_lport_timeout+0xd9/0xe0 [libfc]()

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
The lport retry timer hits warn on in case
it has become ready in response from fip
login from fcoe_ctlr_flogi_send(), this is
possible but safe code path, therefore
removing this warn on.

Jun 22 03:16:30 10.0.16.6 [488198.316517] host3: Assigned Port ID 180f02
Jun 22 03:16:32 10.0.16.6 [488200.091561] ------------[ cut here ]------------
Jun 22 03:16:32 10.0.16.6 [488200.091586] WARNING: at
drivers/scsi/libfc/fc_lport.c:1355 fc_lport_timeout+0xd9/0xe0 [libfc]()

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: Remove the reference to FCP packet from scsi_cmnd in case of error</title>
<updated>2011-07-28T08:13:15+00:00</updated>
<author>
<name>Neerav Parikh</name>
<email>Neerav.Parikh@intel.com</email>
</author>
<published>2011-07-27T22:10:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c9d24a76184b3ecbedc66d45f840c3dfd921f12b'/>
<id>c9d24a76184b3ecbedc66d45f840c3dfd921f12b</id>
<content type='text'>
fc_queuecommand() allocates an FCP packet for each SCSI command and sends
it out on the wire. In the process it stores the reference to the FCP packet
in the scsi_cmnd structure.
Now, in case under stress testing the libfc exchange layer runs out of
exchanges the fc_queuecommand() may not be able to send out commands out on
the wire. In such a scenario if there is an error in sending the FCP packet
out the wire; fc_queuecommand() deletes the FCP packet from internal queue,
releases the FCP packet and returns a SCSI_MLQUEUE_HOST_BUSY status to the
scsi-ml. But, the reference to the FCP packet set in the scsi_cmnd is not
removed from the scsi_cmnd in this code path.

This might lead to a crash under stress testing where the scsi_cmnd failed by
fc_queuecommand() comes up to fc_eh_abort() via scsi eh thread. fc_eh_abort()
will get reference to the FCP packet to be aborted from the scsi_cmnd for
further FCP abort related processing and then try to release the FCP packet
that has already been released.

This patch removes the FCP packet reference from the scsi_cmnd before returning
back from fc_queuecommand() in case of an error in sending out the FCP packet.

Signed-off-by: Neerav Parikh &lt;Neerav.Parikh@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
fc_queuecommand() allocates an FCP packet for each SCSI command and sends
it out on the wire. In the process it stores the reference to the FCP packet
in the scsi_cmnd structure.
Now, in case under stress testing the libfc exchange layer runs out of
exchanges the fc_queuecommand() may not be able to send out commands out on
the wire. In such a scenario if there is an error in sending the FCP packet
out the wire; fc_queuecommand() deletes the FCP packet from internal queue,
releases the FCP packet and returns a SCSI_MLQUEUE_HOST_BUSY status to the
scsi-ml. But, the reference to the FCP packet set in the scsi_cmnd is not
removed from the scsi_cmnd in this code path.

This might lead to a crash under stress testing where the scsi_cmnd failed by
fc_queuecommand() comes up to fc_eh_abort() via scsi eh thread. fc_eh_abort()
will get reference to the FCP packet to be aborted from the scsi_cmnd for
further FCP abort related processing and then try to release the FCP packet
that has already been released.

This patch removes the FCP packet reference from the scsi_cmnd before returning
back from fc_queuecommand() in case of an error in sending out the FCP packet.

Signed-off-by: Neerav Parikh &lt;Neerav.Parikh@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: cleanup sending SRR request</title>
<updated>2011-07-28T08:12:27+00:00</updated>
<author>
<name>Hillf Danton</name>
<email>dhillf@gmail.com</email>
</author>
<published>2011-07-27T22:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=85982127273be0474e9505c0aac35973a0a013f8'/>
<id>85982127273be0474e9505c0aac35973a0a013f8</id>
<content type='text'>
The variable on stack, namely cdb_op, is not used but removed.

[ Patch reworked by Robert Love due to invalid patch format ]

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
The variable on stack, namely cdb_op, is not used but removed.

[ Patch reworked by Robert Love due to invalid patch format ]

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: two minor changes in comments</title>
<updated>2011-07-28T08:12:06+00:00</updated>
<author>
<name>Hillf Danton</name>
<email>dhillf@gmail.com</email>
</author>
<published>2011-07-27T22:10:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=547fb12b7a1c8de6bb57a68553f2319430a3541a'/>
<id>547fb12b7a1c8de6bb57a68553f2319430a3541a</id>
<content type='text'>
One change is to cleanup typo in comment for fc_fcp_recv(), another corrects
the misleading comment for fc_fcp_abts_resp().

[ Patch reworked by Robert Love due to invalid patch format ]

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
One change is to cleanup typo in comment for fc_fcp_recv(), another corrects
the misleading comment for fc_fcp_abts_resp().

[ Patch reworked by Robert Love due to invalid patch format ]

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc, fcoe: ignore rx frame with wrong xid info</title>
<updated>2011-07-28T08:10:35+00:00</updated>
<author>
<name>Vasu Dev</name>
<email>vasu.dev@intel.com</email>
</author>
<published>2011-07-27T22:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=324f667833d7ddd9501ed8c0e3ec5754ddb1b695'/>
<id>324f667833d7ddd9501ed8c0e3ec5754ddb1b695</id>
<content type='text'>
Drop the rx frame having xid with wrong cpu info
or received with xid  not matching to our xid.

Not dropping such frame is causing panic as
that causes accessing data struct beyond their
bounds.

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
Drop the rx frame having xid with wrong cpu info
or received with xid  not matching to our xid.

Not dropping such frame is causing panic as
that causes accessing data struct beyond their
bounds.

Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: release exchg cache</title>
<updated>2011-07-28T08:10:13+00:00</updated>
<author>
<name>Hillf Danton</name>
<email>dhillf@gmail.com</email>
</author>
<published>2011-07-27T22:10:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6'/>
<id>6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6</id>
<content type='text'>
If fail to create workqueue, the newly created cache for exchg has to be
released.

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Reviewed-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
If fail to create workqueue, the newly created cache for exchg has to be
released.

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Reviewed-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] libfc: use FC_MAX_ERROR_CNT</title>
<updated>2011-07-28T08:09:36+00:00</updated>
<author>
<name>Hillf Danton</name>
<email>dhillf@gmail.com</email>
</author>
<published>2011-07-27T22:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=688fd36427050a87b19f6830c882ee77bb851ecf'/>
<id>688fd36427050a87b19f6830c882ee77bb851ecf</id>
<content type='text'>
Though defined, FC_MAX_ERROR_CNT is not used. It is used now for CRC error in
the path of receiving FCP frame.

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.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>
Though defined, FC_MAX_ERROR_CNT is not used. It is used now for CRC error in
the path of receiving FCP frame.

Signed-off-by: Hillf Danton &lt;dhillf@gmail.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
