Re: N900: Remove mmc1 "safety feature"? (was: Re: mmc0 on Nokia N900 on Linux 5.4.18)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Feb 12, 2020 at 02:02:53PM +0100, Merlijn Wajer wrote:
> On 10/02/2020 20:27, Aaro Koskinen wrote:
> >> So how does this currently happen, the unmounting? Does the mmc1 card
> >> just disappear from /dev/ without any safe unmount? I don't understand
> >> how the current setup can work from a userspace point of view.
> >>
> >> Userspace could react on kernel events that tell it the cover is open,
> >> but I assume the kernel doesn't just decide to nuke the node from /dev/,
> >> so in that case the current DTS setup still doesn't make sense, right?
> >>
> >> What am I missing? Could you describe how this would work in a 'real
> >> life' scenario?
> > 
> > I don't think it can work with the current mainline kernel.
> > 
> > I recall the original Nokia kernel used the GPIO for "cover switch"
> > instead of card detect, and it was visible in sysfs, and this allowed
> > userspace to react on cover removal.. In the mainline kernel we have
> > this for older Nokia devices (770, N8x0), but not for N900. Still it
> > wouldn't help much for "safe unmount" as the unmount can take quite a
> > while, and user may remove the card too early.
> 
> Shall I send in a patch removing this check from the device tree, then?

I agree it's mostly annoying and suggest to convert the GPIO
into a gpio-key using a newly defined

SW_MACHINE_COVER /* set = cover closed */

Similar to the camera lens cover. It means userspace has a chance to
show a warning, but system works generally. I think it's ok to
assume that people running mainline on their N900 nowadays know what
could happen when they hot-remove SD cards.

-- Sebastian

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux