<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/gadget/function/f_tcm.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-12-04T13:25:17Z</updated>
<entry>
<title>usb: gadget: f_tcm: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()</title>
<updated>2023-12-04T13:25:17Z</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2023-11-30T10:54:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dadc0f0f7afc0273ff680b504ed830d0c307dea3'/>
<id>urn:sha1:dadc0f0f7afc0273ff680b504ed830d0c307dea3</id>
<content type='text'>
Since snprintf() has the documented, but still rather strange trait of
returning the length of the data that *would have been* written to the
array if space were available, rather than the arguably more useful
length of data *actually* written, it is usually considered wise to use
something else instead in order to avoid confusion.

In the case of sysfs call-backs, new wrappers exist that do just that.

This patch replaces just one use of snprintf() found in the sysfs
.show() call-back with the new sysfs_emit() helper.

Link: https://lwn.net/Articles/69419/
Link: https://github.com/KSPP/linux/issues/105
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Cc: linux-usb@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20231130105459.3208986-6-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: target: Have drivers report if they support direct submissions</title>
<updated>2023-10-13T19:53:57Z</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2023-09-28T02:09:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=194605d45dcb511983caca699d81855693b25fe0'/>
<id>urn:sha1:194605d45dcb511983caca699d81855693b25fe0</id>
<content type='text'>
In some cases, like with multiple LUN targets or where the target has to
respond to transport level requests from the receiving context it can be
better to defer cmd submission to a helper thread. If the backend driver
blocks on something like request/tag allocation it can block the entire
target submission path and other LUs and transport IO on that session.

In other cases like single LUN targets with storage that can support all
the commands that the target can queue, then it's best to submit the cmd
to the backend from the target's cmd receiving context.

Subsequent commits will allow the user to config what they prefer, but
drivers like loop can't directly submit because they can be called from a
context that can't sleep. And, drivers like vhost-scsi can support direct
submission, but need to keep their default behavior of deferring execution
to avoid possible regressions where the backend can block.

Make the drivers tell LIO core if they support direct submissions and their
current default, so we can prevent users from misconfiguring the system and
initialize devices correctly.

Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Link: https://lore.kernel.org/r/20230928020907.5730-2-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge patch series "target: TMF and recovery fixes"</title>
<updated>2023-03-24T21:39:15Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2023-03-24T21:39:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ae2fb3cb0f00482c0ec0079e4244bdee3e1fc46b'/>
<id>urn:sha1:ae2fb3cb0f00482c0ec0079e4244bdee3e1fc46b</id>
<content type='text'>
Mike Christie &lt;michael.christie@oracle.com&gt; says:

The following patches apply over Martin's 6.4 branches and Linus's tree.
They fix a couple regressions in iscsit that occur when there are TMRs
executing and a connection is closed. It also includes Dimitry's fixes in
related code paths for cmd cleanup when ERL2 is used and the write pending
hang during conn cleanup.

This version of the patchset brings it back to just regressions and fixes
for bugs we have a lot of users hitting. I'm going to fix isert and get it
hooked into iscsit properly in a second patchset, because this one was
getting so large. I've also moved my cleanup type of patches for a 3rd
patchset.

Link: https://lore.kernel.org/r/20230319015620.96006-1-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: Pass in cmd counter to use during cmd setup</title>
<updated>2023-03-24T21:32:23Z</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2023-03-19T01:56:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8e288be8606ad87c1726618eacfb8fbd3ab4b806'/>
<id>urn:sha1:8e288be8606ad87c1726618eacfb8fbd3ab4b806</id>
<content type='text'>
Allow target_get_sess_cmd() users to pass in the cmd counter they want to
use. Right now we pass in the session's cmd counter but in a subsequent
commit iSCSI will switch from per session to per conn.

Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Link: https://lore.kernel.org/r/20230319015620.96006-4-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: usb: gadget: f_tcm: Remove default fabric ops callouts</title>
<updated>2023-03-17T03:36:36Z</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2023-03-13T18:11:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55a42c313ec9003f5fec265dba7de655ac3840d4'/>
<id>urn:sha1:55a42c313ec9003f5fec265dba7de655ac3840d4</id>
<content type='text'>
Remove callouts that are identical to the default implementations in TCM
Core.

Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Link: https://lore.kernel.org/r/20230313181110.20566-8-d.bogdanov@yadro.com
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: add _init/__exit annotations to module init/exit funcs</title>
<updated>2022-09-22T13:52:29Z</updated>
<author>
<name>Xiu Jianfeng</name>
<email>xiujianfeng@huawei.com</email>
</author>
<published>2022-09-17T08:44:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7489ec86bcb3830d3bd161365da425fd28d6382f'/>
<id>urn:sha1:7489ec86bcb3830d3bd161365da425fd28d6382f</id>
<content type='text'>
Add missing _init/__exit annotations to module init/exit funcs.

Signed-off-by: Xiu Jianfeng &lt;xiujianfeng@huawei.com&gt;
Link: https://lore.kernel.org/r/20220917084413.23957-1-xiujianfeng@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: target: usb: Replace enable attr with ops.enable</title>
<updated>2021-10-05T03:27:39Z</updated>
<author>
<name>Dmitry Bogdanov</name>
<email>d.bogdanov@yadro.com</email>
</author>
<published>2021-09-10T08:41:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5384ee089d1f79b027bb62b0cfa729890ca71f8b'/>
<id>urn:sha1:5384ee089d1f79b027bb62b0cfa729890ca71f8b</id>
<content type='text'>
Remove tpg/enable attribute.  Add fabric ops enable_tpg implementation
instead.

Link: https://lore.kernel.org/r/20210910084133.17956-8-d.bogdanov@yadro.com
Reviewed-by: Roman Bolshakov &lt;r.bolshakov@yadro.com&gt;
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Dmitry Bogdanov &lt;d.bogdanov@yadro.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>usb: fix various gadgets null ptr deref on 10gbps cabling.</title>
<updated>2021-06-09T08:37:13Z</updated>
<author>
<name>Maciej Żenczykowski</name>
<email>maze@google.com</email>
</author>
<published>2021-06-08T04:41:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=90c4d05780d47e14a50e11a7f17373104cd47d25'/>
<id>urn:sha1:90c4d05780d47e14a50e11a7f17373104cd47d25</id>
<content type='text'>
This avoids a null pointer dereference in
f_{ecm,eem,hid,loopback,printer,rndis,serial,sourcesink,subset,tcm}
by simply reusing the 5gbps config for 10gbps.

Fixes: eaef50c76057 ("usb: gadget: Update usb_assign_descriptors for SuperSpeedPlus")
Cc: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Cc: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Michael R Sweet &lt;msweet@msweet.org&gt;
Cc: Mike Christie &lt;michael.christie@oracle.com&gt;
Cc: Pawel Laszczak &lt;pawell@cadence.com&gt;
Cc: Peter Chen &lt;peter.chen@nxp.com&gt;
Cc: Sudhakar Panneerselvam &lt;sudhakar.panneerselvam@oracle.com&gt;
Cc: Wei Ming Chen &lt;jj251510319013@gmail.com&gt;
Cc: Will McVicker &lt;willmcvicker@google.com&gt;
Cc: Zqiang &lt;qiang.zhang@windriver.com&gt;
Reviewed-By: Lorenzo Colitti &lt;lorenzo@google.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Maciej Żenczykowski &lt;maze@google.com&gt;
Link: https://lore.kernel.org/r/20210608044141.3898496-1-zenczykowski@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: target: usb: gadget: Convert to new submission API</title>
<updated>2021-03-04T22:37:01Z</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2021-02-27T16:59:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=12340930a3e10a3bec110f808be9eeb301969abf'/>
<id>urn:sha1:12340930a3e10a3bec110f808be9eeb301969abf</id>
<content type='text'>
target_submit_cmd() is now only for simple drivers that do their own sync
during shutdown and do not use target_stop_session(). It will never return
a failure, so we can remove that code from the driver.

Note: Before these patches target_submit_cmd() would never return an error
for usb since it does not use target_stop_session(). If it did then we
would have hit a refcount error here:

    transport_send_check_condition_and_sense(se_cmd,
                             TCM_UNSUPPORTED_SCSI_OPCODE, 1);
    transport_generic_free_cmd(&amp;cmd-&gt;se_cmd, 0);

transport_send_check_condition_and_sense() calls queue_status and the
driver can sometimes do transport_generic_free_cmd() from there via
uasp_status_data_cmpl(). In that case, the above
transport_generic_free_cmd() would then hit a refcount error.

So that other use of the above error path in the driver is also probably
wrong, but someone with the hardware needs to fix that.

Link: https://lore.kernel.org/r/20210227170006.5077-11-michael.christie@oracle.com
Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: target: core: Rename transport_init_se_cmd()</title>
<updated>2021-03-04T22:37:00Z</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2021-02-27T16:59:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a78b713618c02752310b2be7da465a34fb660ed9'/>
<id>urn:sha1:a78b713618c02752310b2be7da465a34fb660ed9</id>
<content type='text'>
Rename transport_init_se_cmd() to __target_init_cmd() to reflect that it is
more of an internal function that drivers should normally not use and
because we are going to add a new init function in the next patches.

Link: https://lore.kernel.org/r/20210227170006.5077-4-michael.christie@oracle.com
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@oracle.com&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
