diff --git a/udev/rules.d/96-cryptosd.rules b/udev/rules.d/96-cryptosd.rules index 5bd7add..b409430 100644 --- a/udev/rules.d/96-cryptosd.rules +++ b/udev/rules.d/96-cryptosd.rules @@ -13,12 +13,18 @@ SUBSYSTEM!="block", GOTO="cryptosd_end" -# Ignore the additions / changes by Jolla per -# https://git.sailfishos.org/mer-core/udisks2/blob/master/rpm/0005-Add-udev-rule-for-the-sda-drives.patch +# Ignore the additions / changes by Jolla before and after this commit / PR 4 +# https://github.com/sailfishos/udisks2/pull/4/files # by setting these anew / clobbering these for *all suitable* devices. KERNEL=="mmcblk[1-9]*", ENV{DEVTYPE}=="disk", ENV{MMC_TYPE}!="?*", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1" SUBSYSTEMS=="usb", KERNEL=="mmcblk0*|sd*|sr*", ENV{DEVTYPE}=="disk", ATTR{queue/rotational}=="0", ENV{MMC_TYPE}!="?*", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1" +# Do not try to handle (i.e., to auto-mount) internal eMMC (ToDo: in the future also UFS & NVMe) devices with either boot areas or RPMBs: +KERNEL=="mmcblk[0-9]*", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ATTR{%kboot0/size}=="?*", ENV{CRYPTOSD_IGNORE}="1" +KERNEL=="mmcblk[0-9]*", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ATTR{%krpmb/size}=="??*", ENV{CRYPTOSD_IGNORE}="1" +KERNEL=="mmcblk[0-9]*", SUBSYSTEMS=="mmc", ENV{DEVTYPE}!="disk", IMPORT{parent}="CRYPTOSD_IGNORE" +ENV{CRYPTOSD_IGNORE}=="1", GOTO="cryptosd_end" + # Set power control / UDISKS_CAN_POWER_OFF for all devices dealt with, here: This is also supported for partitions, not only disks!?! # KERNEL=="mmcblk[1-9]*", ATTR{power/control}=="off", ATTR{power/control}="auto" # SUBSYSTEMS=="usb", KERNEL=="mmcblk0*|sd*|sr*", ATTR{power/control}=="off", ATTR{power/control}="auto"