<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/storage, branch for-next</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=for-next</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=for-next'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-01-07T10:42:42Z</updated>
<entry>
<title>usb-storage: Add max sectors quirk for Nokia 208</title>
<updated>2025-01-07T10:42:42Z</updated>
<author>
<name>Lubomir Rintel</name>
<email>lrintel@redhat.com</email>
</author>
<published>2025-01-01T21:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdef30e0774802df2f87024d68a9d86c3b99ca2a'/>
<id>urn:sha1:cdef30e0774802df2f87024d68a9d86c3b99ca2a</id>
<content type='text'>
This fixes data corruption when accessing the internal SD card in mass
storage mode.

I am actually not too sure why. I didn't figure a straightforward way to
reproduce the issue, but i seem to get garbage when issuing a lot (over 50)
of large reads (over 120 sectors) are done in a quick succession. That is,
time seems to matter here -- larger reads are fine if they are done with
some delay between them.

But I'm not great at understanding this sort of things, so I'll assume
the issue other, smarter, folks were seeing with similar phones is the
same problem and I'll just put my quirk next to theirs.

The "Software details" screen on the phone is as follows:

  V 04.06
  07-08-13
  RM-849
  (c) Nokia

TL;DR version of the device descriptor:

  idVendor           0x0421 Nokia Mobile Phones
  idProduct          0x06c2
  bcdDevice            4.06
  iManufacturer           1 Nokia
  iProduct                2 Nokia 208

The patch assumes older firmwares are broken too (I'm unable to test, but
no biggie if they aren't I guess), and I have no idea if newer firmware
exists.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/20250101212206.2386207-1-lkundrak@v3.sk
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>module: Convert default symbol namespace to string literal</title>
<updated>2024-12-03T16:22:25Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2024-12-03T10:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ceb8bf2ceaa77fe222fe8fe32cb7789c9099ddf1'/>
<id>urn:sha1:ceb8bf2ceaa77fe222fe8fe32cb7789c9099ddf1</id>
<content type='text'>
Commit cdd30ebb1b9f ("module: Convert symbol namespace to string
literal") only converted MODULE_IMPORT_NS() and EXPORT_SYMBOL_NS(),
leaving DEFAULT_SYMBOL_NAMESPACE as a macro expansion.

This commit converts DEFAULT_SYMBOL_NAMESPACE in the same way to avoid
annoyance for the default namespace as well.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>module: Convert symbol namespace to string literal</title>
<updated>2024-12-02T19:34:44Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2024-12-02T14:59:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdd30ebb1b9f36159d66f088b61aee264e649d7a'/>
<id>urn:sha1:cdd30ebb1b9f36159d66f088b61aee264e649d7a</id>
<content type='text'>
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &amp;&amp;
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &amp;&amp;
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/usb/storage: refactor min with min_t</title>
<updated>2024-11-13T14:09:51Z</updated>
<author>
<name>Sabyrzhan Tasbolatov</name>
<email>snovitoll@gmail.com</email>
</author>
<published>2024-11-12T15:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=528ea1aca24fba5616f397d43ccb2de99d2a41d7'/>
<id>urn:sha1:528ea1aca24fba5616f397d43ccb2de99d2a41d7</id>
<content type='text'>
Ensure type safety by using min_t() instead of casted min().

Signed-off-by: Sabyrzhan Tasbolatov &lt;snovitoll@gmail.com&gt;
Link: https://lore.kernel.org/r/20241112155817.3512577-9-snovitoll@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: storage: use US_BULK_FLAG_OUT instead of constant values</title>
<updated>2024-10-29T03:33:25Z</updated>
<author>
<name>Dingyan Li</name>
<email>18500469033@163.com</email>
</author>
<published>2024-10-20T07:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b5188cdc1d4fe41e1cbd6fadf6135c4b973addb'/>
<id>urn:sha1:1b5188cdc1d4fe41e1cbd6fadf6135c4b973addb</id>
<content type='text'>
Macros with good names offer better readability.

Signed-off-by: Dingyan Li &lt;18500469033@163.com&gt;
Link: https://lore.kernel.org/r/20241020072328.26401-1-18500469033@163.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: storage: ignore bogus device raised by JieLi BR21 USB sound chip</title>
<updated>2024-10-04T13:32:25Z</updated>
<author>
<name>Icenowy Zheng</name>
<email>uwu@icenowy.me</email>
</author>
<published>2024-10-01T08:34:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6555cb1cb69db479d0760e392c175ba32426842'/>
<id>urn:sha1:a6555cb1cb69db479d0760e392c175ba32426842</id>
<content type='text'>
JieLi tends to use SCSI via USB Mass Storage to implement their own
proprietary commands instead of implementing another USB interface.
Enumerating it as a generic mass storage device will lead to a Hardware
Error sense key get reported.

Ignore this bogus device to prevent appearing a unusable sdX device
file.

Signed-off-by: Icenowy Zheng &lt;uwu@icenowy.me&gt;
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/20241001083407.8336-1-uwu@icenowy.me
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: storage: ene_ub6250: Fix right shift warnings</title>
<updated>2024-09-13T05:40:22Z</updated>
<author>
<name>Abhishek Tamboli</name>
<email>abhishektamboli9@gmail.com</email>
</author>
<published>2024-09-12T14:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9027afa89bfe9e50e46714b72179761c67ebf4ad'/>
<id>urn:sha1:9027afa89bfe9e50e46714b72179761c67ebf4ad</id>
<content type='text'>
Change bl_len from u16 to u32 to accommodate the necessary bit shifts.

Fix the following smatch warnings:

drivers/usb/storage/ene_ub6250.c:1509 ms_scsi_read_capacity() warn:
right shifting more than type allows 16 vs 24
drivers/usb/storage/ene_ub6250.c:1510 ms_scsi_read_capacity() warn:
right shifting more than type allows 16 vs 16

Signed-off-by: Abhishek Tamboli &lt;abhishektamboli9@gmail.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/20240912145247.15544-1-abhishektamboli9@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb-storage: Constify struct usb_device_id and us_unusual_dev</title>
<updated>2024-09-03T07:49:40Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2024-08-24T13:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbf0fa1c8d47914c3b4919f01b131e0523f6d804'/>
<id>urn:sha1:dbf0fa1c8d47914c3b4919f01b131e0523f6d804</id>
<content type='text'>
'struct usb_device_id' and 'struct us_unusual_dev' are not modified in
these drivers.

Constifying these structures moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers (which is the case for struct us_unusual_dev).

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  25249	   4261	    896	  30406	   76c6	drivers/usb/storage/alauda.o
   3969	    672	    360	   5001	   1389	drivers/usb/storage/cypress_atacb.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  25461	   4041	    896	  30398	   76be	drivers/usb/storage/alauda.o
   4225	    400	    360	   4985	   1379	drivers/usb/storage/cypress_atacb.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/b1b75a2a64b1f6cfad2a611f71393f281178fd3f.1724507157.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: uas: Implement the new shutdown callback</title>
<updated>2024-07-10T11:58:24Z</updated>
<author>
<name>Kerem Karabay</name>
<email>kekrby@gmail.com</email>
</author>
<published>2024-07-06T12:04:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4920d370092bbf9281e1d98c132c1b266648e35f'/>
<id>urn:sha1:4920d370092bbf9281e1d98c132c1b266648e35f</id>
<content type='text'>
A standard implementation of shutdown callback has been implemented
for USB drivers. Since the UAS driver implements a shutdown callback
this patch enables it to use the new standard implementation.

Signed-off-by: Kerem Karabay &lt;kekrby@gmail.com&gt;
Signed-off-by: Aditya Garg &lt;gargaditya08@live.com&gt;
Link: https://lore.kernel.org/r/E3A502A9-6572-4F1B-9EB2-2F6F0C4E6EA8@live.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 6.10-rc6 into usb-next</title>
<updated>2024-07-01T11:59:29Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-07-01T11:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f7697db8b1b3e80d8cd5af071a5af42c8b445fc4'/>
<id>urn:sha1:f7697db8b1b3e80d8cd5af071a5af42c8b445fc4</id>
<content type='text'>
We need the USB fixes in here as well for some follow-on patches.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
