From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Sat, 26 Apr 2014 16:34:06 +0200
Subject: Set default polling interval on removable devices as well

The events_dfl_poll_msecs rule will not trigger if "block" is not a module, but
built in. This will avoid udisks etc. having to poll from userspace, and
provide proper ejection when the hardware eject button is pressed.

Bug-Debian: https://bugs.debian.org/713877
Bug-Ubuntu: https://launchpad.net/bugs/890592
---
 rules/60-persistent-storage.rules | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 475b151..40b4eb9 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -10,6 +10,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
 
 # enable in-kernel media-presence polling
 ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}=="0", ATTR{parameters/events_dfl_poll_msecs}="2000"
+ACTION=="add", ATTR{removable}=="1", ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2000"
 
 SUBSYSTEM!="block", GOTO="persistent_storage_end"
 
