<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/target/tcm_fc, branch v3.2.12</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>target: Drop config_item_name usage in fabric TFO-&gt;free_wwn()</title>
<updated>2011-12-06T06:00:51+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-12T17:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6297b07cbc42eb6b53eb88fce70a4727ea230797'/>
<id>6297b07cbc42eb6b53eb88fce70a4727ea230797</id>
<content type='text'>
This patch removes config_item_name() informational usage of
TFO-&gt;free_wwn() treewide in loopback, tcm_fc, ib_srpt and
tcm_vhost module code.

Using v4 target_core_fabric_configfs.c logic, a fabric call for
config_item_name() in TFO-&gt;drop_wwn() context returns NULL as
target_fabric_drop_wwn() invoking config_item_put() -&gt;
config_group_put() will release fabric_port-&gt;port_wwn.wwn_group
before the last config_item_put() -&gt; TFO-&gt;drop_wwn() is
invoked.

Reported-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes config_item_name() informational usage of
TFO-&gt;free_wwn() treewide in loopback, tcm_fc, ib_srpt and
tcm_vhost module code.

Using v4 target_core_fabric_configfs.c logic, a fabric call for
config_item_name() in TFO-&gt;drop_wwn() context returns NULL as
target_fabric_drop_wwn() invoking config_item_put() -&gt;
config_group_put() will release fabric_port-&gt;port_wwn.wwn_group
before the last config_item_put() -&gt; TFO-&gt;drop_wwn() is
invoked.

Reported-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Address legacy PYX_TRANSPORT_* return code breakage</title>
<updated>2011-12-06T06:00:49+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-04T09:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=03e98c9eb916f3f0868c1dc344dde2a60287ff72'/>
<id>03e98c9eb916f3f0868c1dc344dde2a60287ff72</id>
<content type='text'>
This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number
of locations and addresses cases where transport_generic_request_failure()
was returning the incorrect sense upon CHECK_CONDITION status after the
v3.1 converson to use errno return codes.

This includes the conversion of transport_generic_request_failure() to
process cmd-&gt;scsi_sense_reason and handle extra TCM_RESERVATION_CONFLICT
before calling transport_send_check_condition_and_sense() to queue up
response status.  It also drops PYX_TRANSPORT_OUT_OF_MEMORY_RESOURCES legacy
usgae, and returns TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE w/ a response
for these cases.

transport_generic_allocate_tasks(), transport_generic_new_cmd(), backend
SCF_SCSI_DATA_SG_IO_CDB -&gt;do_task(), and emulated -&gt;execute_task() have
all been updated to set se_cmd-&gt;scsi_sense_reason and return errno codes
universally upon failure.  This includes cmd-&gt;scsi_sense_reason assignment
in target_core_alua.c, target_core_pr.c and target_core_cdb.c emulation code.

Finally it updates fabric modules to remove the legacy usage, and for
TFO-&gt;new_cmd_map() callers forwards return values outside of fabric code.
iscsi-target has also been updated to remove a handful of special cases
related to the cleanup and signaling QUEUE_FULL handling w/ ft_write_pending()

(v2: Drop extra SCF_SCSI_CDB_EXCEPTION check during failure from
     transport_generic_new_cmd, and re-add missing task-&gt;task_error_status
     assignment in transport_complete_task)

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number
of locations and addresses cases where transport_generic_request_failure()
was returning the incorrect sense upon CHECK_CONDITION status after the
v3.1 converson to use errno return codes.

This includes the conversion of transport_generic_request_failure() to
process cmd-&gt;scsi_sense_reason and handle extra TCM_RESERVATION_CONFLICT
before calling transport_send_check_condition_and_sense() to queue up
response status.  It also drops PYX_TRANSPORT_OUT_OF_MEMORY_RESOURCES legacy
usgae, and returns TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE w/ a response
for these cases.

transport_generic_allocate_tasks(), transport_generic_new_cmd(), backend
SCF_SCSI_DATA_SG_IO_CDB -&gt;do_task(), and emulated -&gt;execute_task() have
all been updated to set se_cmd-&gt;scsi_sense_reason and return errno codes
universally upon failure.  This includes cmd-&gt;scsi_sense_reason assignment
in target_core_alua.c, target_core_pr.c and target_core_cdb.c emulation code.

Finally it updates fabric modules to remove the legacy usage, and for
TFO-&gt;new_cmd_map() callers forwards return values outside of fabric code.
iscsi-target has also been updated to remove a handful of special cases
related to the cleanup and signaling QUEUE_FULL handling w/ ft_write_pending()

(v2: Drop extra SCF_SCSI_CDB_EXCEPTION check during failure from
     transport_generic_new_cmd, and re-add missing task-&gt;task_error_status
     assignment in transport_complete_task)

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Make TFO-&gt;check_stop_free return free status</title>
<updated>2011-11-02T15:58:30+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-02T10:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=88dd9e26d6d3e743f9c7e4562b94b2ad3c2994d3'/>
<id>88dd9e26d6d3e743f9c7e4562b94b2ad3c2994d3</id>
<content type='text'>
This patch converts target_core_fabric_ops-&gt;check_stop_free() usage in
transport_cmd_check_stop() and associated fabric module usage to
return '1' when the passed se_cmd has been released directly within
-&gt;check_stop_free(), or return '0' when the passed se_cmd has not
been released.

This addresses an issue where transport_cmd_finish_abort() -&gt;
transport_cmd_check_stop_to_fabric() was leaking descriptors during
LUN_RESET for modules using -&gt;check_stop_free(), but not directly
releasing se_cmd in all cases.

Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@risingtidesystems.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts target_core_fabric_ops-&gt;check_stop_free() usage in
transport_cmd_check_stop() and associated fabric module usage to
return '1' when the passed se_cmd has been released directly within
-&gt;check_stop_free(), or return '0' when the passed se_cmd has not
been released.

This addresses an issue where transport_cmd_finish_abort() -&gt;
transport_cmd_check_stop_to_fabric() was leaking descriptors during
LUN_RESET for modules using -&gt;check_stop_free(), but not directly
releasing se_cmd in all cases.

Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@risingtidesystems.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: remove the TRANSPORT_REMOVE state</title>
<updated>2011-10-24T03:21:47+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-10-17T17:56:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bfaf40ada2e15bc972cab4cd5452a88720e30647'/>
<id>bfaf40ada2e15bc972cab4cd5452a88720e30647</id>
<content type='text'>
We never queue an command with this state, and only set it in a completely
bogus place in tcm_fc.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We never queue an command with this state, and only set it in a completely
bogus place in tcm_fc.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Have core_tmr_alloc_req() take an explicit GFP_xxx flag</title>
<updated>2011-10-24T03:20:53+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-10-06T16:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dd503a5fcc0dfb8b5fd887bd967b6f431176864b'/>
<id>dd503a5fcc0dfb8b5fd887bd967b6f431176864b</id>
<content type='text'>
Testing in_interrupt() to know when sleeping is allowed is not really
reliable (since eg it won't be true if the caller is holding a spinlock).
Instead have the caller tell core_tmr_alloc_req() what GFP_xxx to use;
every caller except tcm_qla2xxx can use GFP_KERNEL.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Testing in_interrupt() to know when sleeping is allowed is not really
reliable (since eg it won't be true if the caller is holding a spinlock).
Instead have the caller tell core_tmr_alloc_req() what GFP_xxx to use;
every caller except tcm_qla2xxx can use GFP_KERNEL.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: remove custom hex_to_bin in ft_parse_wwn</title>
<updated>2011-10-24T03:20:49+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2011-09-30T11:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=635a2b3f3e561278cb5b837ea305e50e3fa7f063'/>
<id>635a2b3f3e561278cb5b837ea305e50e3fa7f063</id>
<content type='text'>
This patch converts ft_parse_wwn() to use hex_to_bin() instead of custom
conversion code.

(Andy: Re-add missing strict &amp;&amp; isupper(c) check)

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: "Nicholas A. Bellinger" &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts ft_parse_wwn() to use hex_to_bin() instead of custom
conversion code.

(Andy: Re-add missing strict &amp;&amp; isupper(c) check)

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: "Nicholas A. Bellinger" &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: push session reinstatement out of transport_generic_free_cmd</title>
<updated>2011-10-24T03:20:38+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2011-09-13T21:09:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=82f1c8a4e7739eae9f1c32c2c419efdc19b8af41'/>
<id>82f1c8a4e7739eae9f1c32c2c419efdc19b8af41</id>
<content type='text'>
Push session reinstatement out of transport_generic_free_cmd into the only
caller that actually needs it.  Clean up transport_generic_free_cmd a bit,
and remove the useless comment.  I'd love to add a more useful kerneldoc
comment for it, but as this point I'm still a bit confused in where it
stands in the command release stack.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Push session reinstatement out of transport_generic_free_cmd into the only
caller that actually needs it.  Clean up transport_generic_free_cmd a bit,
and remove the useless comment.  I'd love to add a more useful kerneldoc
comment for it, but as this point I'm still a bit confused in where it
stands in the command release stack.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tfm_fc: use transport_handle_cdb_direct</title>
<updated>2011-10-24T03:20:24+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2011-09-12T19:50:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ca495e0630b6fd960f94f89a9f13ad32b91bc96'/>
<id>4ca495e0630b6fd960f94f89a9f13ad32b91bc96</id>
<content type='text'>
ft_send_work is always called from workqueue context, which means we can
handle the CDB directly instead of doing another context switch.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Kiran Patil &lt;kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ft_send_work is always called from workqueue context, which means we can
handle the CDB directly instead of doing another context switch.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Kiran Patil &lt;kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Remove unneeded version.h includes</title>
<updated>2011-10-11T04:10:19+00:00</updated>
<author>
<name>Jesper Juhl</name>
<email>jj@chaosbits.net</email>
</author>
<published>2011-08-01T21:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9375b1bfd2555c8bc828d394a4419a212b46ba71'/>
<id>9375b1bfd2555c8bc828d394a4419a212b46ba71</id>
<content type='text'>
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/target/.
This patch removes them.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/target/.
This patch removes them.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: Work queue based approach instead of managing own thread and event based mechanism</title>
<updated>2011-09-16T09:50:09+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2011-08-26T16:25:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=58fc73d10f3e92bfcd1e9a8391eb3e49b68df8e5'/>
<id>58fc73d10f3e92bfcd1e9a8391eb3e49b68df8e5</id>
<content type='text'>
Problem: Changed from wake_up_interruptible -&gt; wake_up_process and
wait_event_interruptible-&gt; schedule_timeout_interruptible broke the FCoE
target.  Earlier approach of wake_up_interruptible was also looking at
'queue_cnt' which is not necessary, because it increment of 'queue_cnt'
with wake_up_inetrriptible / waker_up_process introduces race condition.

Fix: Instead of fixing the code which used wake_up_process and remove
'queue_cnt', using work_queue based approach is cleaner and acheives
same result. As well, work queue based approach has less programming
overhead and OS manages threads which processes work queues.

This patch is developed by Christoph Hellwig and reviwed+validated by
Kiran Patil.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Kiran Patil &lt;kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Changed from wake_up_interruptible -&gt; wake_up_process and
wait_event_interruptible-&gt; schedule_timeout_interruptible broke the FCoE
target.  Earlier approach of wake_up_interruptible was also looking at
'queue_cnt' which is not necessary, because it increment of 'queue_cnt'
with wake_up_inetrriptible / waker_up_process introduces race condition.

Fix: Instead of fixing the code which used wake_up_process and remove
'queue_cnt', using work_queue based approach is cleaner and acheives
same result. As well, work queue based approach has less programming
overhead and OS manages threads which processes work queues.

This patch is developed by Christoph Hellwig and reviwed+validated by
Kiran Patil.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Kiran Patil &lt;kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
