hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Fri Jun 1 13:08:31 PDT 2007


 fdi/preprobe/10osvendor/20-broken-usb-sticks.fdi |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)

New commits:
diff-tree ffdf0a433d21b2fde36a1d222b40bfed4ad524ad (from 9e59ecd6c5bdc4449f1f0eb01d5671b1fd469cc4)
Author: Frederic Crozat <fcrozat at mandriva.com>
Date:   Fri Jun 1 16:08:24 2007 -0400

    disable polling addon for select USB sticks
    
    > > among the various patches in mandriva package for hal, I have one to
    > > deal with some usb keys we have here which doesn't support getting
    > > polled at all, causing a lot of kernel error in syslog. Moreover, there
    > > isn't really a need to poll these kind of usb devices, since kernel
    > > events will notify when it is unplugged from the system.
    > >
    > > I have some kind of ugly patch (attached) which disable polling for
    > > those devices after initial fs detection but it is only effective once
    > > usb key is mounted.
    > >
    > > What do you think of adding a storage.disable_media_check (or maybe
    > > disable_polling) property to have this kind of device ?
    >
    > Wouldn't it work with just an fdi file that sets storage.removable to
    > FALSE?
    
    Just tried, it didn't work.
    
    But it works when disabling storage.media_check_enabled.
    
    I've attached a patch for hal-info for two keys we have with this
    problem.
    
    I'm wondering if polling is useful at all on usb sticks. But maybe we
    are forced to use it since we can't distinguish them from cards reader
    or floppy usb drive.

diff --git a/fdi/preprobe/10osvendor/20-broken-usb-sticks.fdi b/fdi/preprobe/10osvendor/20-broken-usb-sticks.fdi
index 0d14053..29700b5 100644
--- a/fdi/preprobe/10osvendor/20-broken-usb-sticks.fdi
+++ b/fdi/preprobe/10osvendor/20-broken-usb-sticks.fdi
@@ -15,6 +15,17 @@
 	  </match>
 	</match>
       </match>
-    </match>
+     <!-- some usb sticks don't like polling -->
+     <match key="@storage.originating_device:usb.vendor_id" int="0x054c">
+       <match key="@storage.originating_device:usb.product_id" int="0x008b">
+         <merge key="storage.media_check_enabled" type="bool">false</merge>
+       </match>
+     </match>
+     <match key="@storage.originating_device:usb.vendor_id" int="0x67b">
+       <match key="@storage.originating_device:usb.product_id" int="0x2317">
+         <merge key="storage.media_check_enabled" type="bool">false</merge>
+       </match>
+     </match>
+   </match>
   </device>
 </deviceinfo>


More information about the hal-commit mailing list