<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/gadget/function/f_mass_storage.c, branch linux-5.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-12-13T18:04:45Z</updated>
<entry>
<title>exit: Rename complete_and_exit to kthread_complete_and_exit</title>
<updated>2021-12-13T18:04:45Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2021-11-22T17:15:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cead18552660702a4a46f58e65188fe5f36e9dfe'/>
<id>urn:sha1:cead18552660702a4a46f58e65188fe5f36e9dfe</id>
<content type='text'>
Update complete_and_exit to call kthread_exit instead of do_exit.

Change the name to reflect this change in functionality.  All of the
users of complete_and_exit are causing the current kthread to exit so
this change makes it clear what is happening.

Move the implementation of kthread_complete_and_exit from
kernel/exit.c to to kernel/kthread.c.  As this function is kthread
specific it makes most sense to live with the kthread functions.

There are no functional change.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_mass_storage: Disable eps during disconnect</title>
<updated>2021-10-30T08:55:55Z</updated>
<author>
<name>Wesley Cheng</name>
</author>
<published>2021-10-27T20:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9fff139aeb11186fd8e75860c959c86cb43ab2f6'/>
<id>urn:sha1:9fff139aeb11186fd8e75860c959c86cb43ab2f6</id>
<content type='text'>
When receiving a disconnect event from the UDC, the mass storage
function driver currently runs the handle_exception() routine
asynchronously.  For UDCs that support runtime PM, there is a
possibility the UDC is already suspended by the time the
do_set_interface() is executed.  This can lead to HW register access
while the UDC is already suspended.

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Wesley Cheng &lt;quic_wcheng@quicinc.com&gt;
Link: https://lore.kernel.org/r/1635365407-31337-3-git-send-email-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: storage: add support for media larger than 2T</title>
<updated>2021-10-10T13:07:56Z</updated>
<author>
<name>Nikita Yushchenko</name>
</author>
<published>2021-09-21T14:59:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bedbac5f66bfcf54d500967417aeaa4088f6eae0'/>
<id>urn:sha1:bedbac5f66bfcf54d500967417aeaa4088f6eae0</id>
<content type='text'>
This adds support for READ_CAPACITY(16), READ(16) and WRITE(16)
commands, and fixes READ_CAPACITY command to return 0xffffffff if
media size does not fit in 32 bits.

This makes f_mass_storage to export a 16T disk array correctly.

Signed-off-by: Nikita Yushchenko &lt;nikita.yoush@cogentembedded.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/20210921145901.11952-1-nikita.yoush@cogentembedded.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: mass_storage: Remove repeated verbose license text</title>
<updated>2021-08-26T11:25:33Z</updated>
<author>
<name>Cai Huoqing</name>
</author>
<published>2021-08-22T04:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b9f6cc845ce8ea4ee72bfabbaf9bfbf68f5fbde'/>
<id>urn:sha1:0b9f6cc845ce8ea4ee72bfabbaf9bfbf68f5fbde</id>
<content type='text'>
remove it because SPDX-License-Identifier is already used

Signed-off-by: Cai Huoqing &lt;caihuoqing@baidu.com&gt;
Link: https://lore.kernel.org/r/20210822043005.192-1-caihuoqing@baidu.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: storage: Remove unused function pointer typedef fsg_routine_t</title>
<updated>2021-03-10T08:37:15Z</updated>
<author>
<name>Chen Lin</name>
</author>
<published>2021-02-15T10:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70be046404efd82ab75595a4fb73cb751e2e1372'/>
<id>urn:sha1:70be046404efd82ab75595a4fb73cb751e2e1372</id>
<content type='text'>
Remove the 'fsg_routine_t' typedef as it is not used.

Signed-off-by: Chen Lin &lt;chen.lin5@zte.com.cn&gt;
Link: https://lore.kernel.org/r/1613384130-3028-1-git-send-email-chen45464546@163.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Use fallthrough pseudo-keyword</title>
<updated>2020-08-23T22:36:59Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2020-08-23T22:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df561f6688fef775baa341a0f5d960becd248b11'/>
<id>urn:sha1:df561f6688fef775baa341a0f5d960becd248b11</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: Use fallthrough pseudo-keyword</title>
<updated>2020-07-10T06:55:18Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2020-07-07T17:15:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a74005ab91856276ca5e424a239ebe73347079d8'/>
<id>urn:sha1:a74005ab91856276ca5e424a239ebe73347079d8</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20200707171500.GA13620@embeddedor
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: treewide: Consolidate {get,put}_unaligned_[bl]e24() definitions</title>
<updated>2020-03-17T02:08:34Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2020-03-13T20:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7afff31d56db22647251d76d6af030cd47bd97e'/>
<id>urn:sha1:a7afff31d56db22647251d76d6af030cd47bd97e</id>
<content type='text'>
Move the get_unaligned_be24(), get_unaligned_le24() and
put_unaligned_le24() definitions from various drivers into
include/linux/unaligned/generic.h. Add a put_unaligned_be24()
implementation.

Link: https://lore.kernel.org/r/20200313203102.16613-4-bvanassche@acm.org
Cc: Keith Busch &lt;kbusch@kernel.org&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Cc: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt; # For drivers/usb
Reviewed-by: Felipe Balbi &lt;balbi@kernel.org&gt; # For drivers/usb/gadget
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt</title>
<updated>2019-08-12T05:55:24Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2019-07-26T04:59:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a56a478a525d6427be90753451c40e1327caa1a'/>
<id>urn:sha1:4a56a478a525d6427be90753451c40e1327caa1a</id>
<content type='text'>
If fsg_disable() and fsg_set_alt() are called too closely to each
other (for example due to a quick reset/reconnect), what can happen
is that fsg_set_alt sets common-&gt;new_fsg from an interrupt while
handle_exception is trying to process the config change caused by
fsg_disable():

	fsg_disable()
	...
	handle_exception()
		sets state back to FSG_STATE_NORMAL
		hasn't yet called do_set_interface()
		or is inside it.

 ---&gt; interrupt
	fsg_set_alt
		sets common-&gt;new_fsg
		queues a new FSG_STATE_CONFIG_CHANGE
 &lt;---

Now, the first handle_exception can "see" the updated
new_fsg, treats it as if it was a fsg_set_alt() response,
call usb_composite_setup_continue() etc...

But then, the thread sees the second FSG_STATE_CONFIG_CHANGE,
and goes back down the same path, wipes and reattaches a now
active fsg, and .. calls usb_composite_setup_continue() which
at this point is wrong.

Not only we get a backtrace, but I suspect the second set_interface
wrecks some state causing the host to get upset in my case.

This fixes it by replacing "new_fsg" by a "state argument" (same
principle) which is set in the same lock section as the state
update, and retrieved similarly.

That way, there is never any discrepancy between the dequeued
state and the observed value of it. We keep the ability to have
the latest reconfig operation take precedence, but we guarantee
that once "dequeued" the argument (new_fsg) will not be clobbered
by any new event.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Revert "usb: gadget: storage: Remove warning message"</title>
<updated>2019-07-04T11:05:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2019-07-04T11:05:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=214cc39d175c89cafa5acfe4df22502e8d86c506'/>
<id>urn:sha1:214cc39d175c89cafa5acfe4df22502e8d86c506</id>
<content type='text'>
This reverts commit e70b3f5da00119e057b7faa557753fee7f786f17.

EJ writes:
	Thinh found this patch might cause a failure in USB CV TD 9.13
	Set Configuration Test. We are trying to fix it.  Could you
	please defer the merging of this patch until we fix it?

So am now dropping it.

Reported-by: EJ Hsu &lt;ejh@nvidia.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
