]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: gadget: f_mass_storage: Stop ums on START-STOP UNIT SCSI command
authorMarek Vasut <marex@denx.de>
Tue, 7 Nov 2023 00:09:59 +0000 (01:09 +0100)
committerMattijs Korpershoek <mkorpershoek@baylibre.com>
Tue, 21 Nov 2023 14:28:15 +0000 (15:28 +0100)
commit1041ee64eb18f7a3af30085765ced149cb4dc7cf
tree0b0f9c0b658eb27dc124bb0b7f6d925b9f059598
parentf49062330967a549d2967242c36a2fe984b16b4e
usb: gadget: f_mass_storage: Stop ums on START-STOP UNIT SCSI command

Exit the UMS handler loop in case START-STOP UNIT SCSI command is
received. This is sent e.g. by the util-linux eject(1) command and
indicates to the device that it is supposed to spin down the media
and enter low power state.

This effectively adds support for exitting the 'ums' command from
host using 'eject /dev/sdN' that is on par with 'dfu-util -e' .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231107001018.55640-1-marex@denx.de
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
drivers/usb/gadget/f_mass_storage.c