lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1004231020300.1777-100000@iolanthe.rowland.org>
Date:	Fri, 23 Apr 2010 10:23:33 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	fabien.chouteau@...il.com
cc:	linux-usb@...r.kernel.org,
	Fabien Chouteau <fabien.chouteau@...co.com>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Michal Nazarewicz <m.nazarewicz@...sung.com>,
	Peter Korsgaard <jacmet@...site.dk>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND 2/2] Mass storage gadget: Handle eject request

On Fri, 23 Apr 2010 fabien.chouteau@...il.com wrote:

> From: Fabien Chouteau <fabien.chouteau@...co.com>
> 
> This patch adds handling of the "Start/Stop Unit" SCSI request to simulate media
> ejection. A sysfs entry to get the "eject" state of a LUN is also added.

Sorry I didn't notice this earlier...

> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -163,6 +163,13 @@
>   * ro setting are not allowed when the medium is loaded or if CD-ROM
>   * emulation is being used.
>   *
> + * When a LUN receive an "eject" SCSI request (Start/Stop Unit),
> + * if the LUN is removable, the backing file is released to simulate
> + * ejection.
> + * The "eject" state of a LUN is available in the "ejected" file of the
> + * LUN's sysfs directory (see above). The "eject" state is only updated
> + * by SCSI request, not by user ejection.

What's the reason for that?  With a real removable device, like a CD 
player, it doesn't make any difference whether the medium was ejected 
because of a SCSI command or because I pressed the "eject" button.

I just don't see any point in keeping track of the two actions 
separately, since they end up having the same final result.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ