]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb-storage: Add quirk for incorrect WP on Kingston DT Ultimate 3.0 G3
authorTasos Sahanidis <tasos@tasossah.com>
Thu, 7 Dec 2023 13:44:41 +0000 (15:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:39:01 +0000 (12:39 +0000)
commit228d9960ae819cdd9e57eecabb424c2350d749a8
treeebdc7ea1466bc680670a1ac680d13b55203e8ef0
parent82f913724bc99d0acfed5ddf0c48e74978252e1a
usb-storage: Add quirk for incorrect WP on Kingston DT Ultimate 3.0 G3

commit 772685c14743ad565bb271041ad3c262298cd6fc upstream.

This flash drive reports write protect during the first mode sense.

In the past this was not an issue as the kernel called revalidate twice,
thus asking the device for its write protect status twice, with write
protect being disabled in the second mode sense.

However, since commit 1e029397d12f ("scsi: sd: Reorganize DIF/DIX code to
avoid calling revalidate twice") that is no longer the case, thus the
device shows up read only.

[490891.289495] sd 12:0:0:0: [sdl] Write Protect is on
[490891.289497] sd 12:0:0:0: [sdl] Mode Sense: 2b 00 80 08

This does not appear to be a timing issue, as enabling the usbcore quirk
USB_QUIRK_DELAY_INIT has no effect on write protect.

Fixes: 1e029397d12f ("scsi: sd: Reorganize DIF/DIX code to avoid calling revalidate twice")
Cc: stable <stable@kernel.org>
Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20231207134441.298131-1-tasos@tasossah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/unusual_devs.h