[OpenWrt-Devel] periodic task checking for usb flash media?
Karl Palsson
karlp at tweak.net.au
Tue Sep 29 08:51:11 EDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Karl Palsson <karlp at tweak.net.au> wrote:
> Hi,
>
> I've got a custom board with an onboard USB flash media
> interface. It works well, I can mount and access micro SD cards
> nicely, and all that basic stuff.
>
> However, card detection doesn't work. The USB flash interface
> is Mass Storage Bulk Only, and on my desktop linux system,
> there's a period task polling the device every two seconds,
> sending SCSI "TEST UNIT READY" and "REQUEST SENSE" commands,
> and this happily detects card insertions/removals, (after the
> next poll)
>
> On openwrt, this doesn't happen. With usbmon I don't see any
> periodic traffic. Calling "block info" manually reliably detect
> any changes and gets new device nodes created, that works just
> fine, but do I really need to call that periodically myself?
>
> Is this how it's meant to be? Am I missing some important
> package or config? I'm not asking about automounting, there's
> plenty of wiki help and options for that, but how do I get the
> card to be detected at all?
>
fwiw, originally, the values of the kernel block checking task
were:
# cat /sys/block/sda/events_poll_msecs
- -1
# cat /sys/module/block/parameters/events_dfl_poll_msecs
0
And changing them to 2000 had no effect at all.
https://github.com/surkovalex/openpctv/blob/master/packages/systemd/patches/Set-default-polling-interval-on-removable-devices-as.patch
and others imply that those settings have no impact when the
block module is compiled in, as appears to be the case on
OpenWrt. So I've added a new patch that changes the default to
2000, but I still get no events of any sort when a card is
plugged in or removed.
Still, running "block info" will happily rescan and create/delete
the /dev/sda1 node.
Sincerely,
Karl Palsson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBAgAGBQJWColAAAoJEBmotQ/U1cr2lYIP/RPk5aFutiA90KL3gkImXdM8
TUUgMs7ICxwJSsFlGVMaYGR5PDkj6v6Xfy2nShJjYC4wdMOTFlL2bn7aTaLd8eep
aQYrwv0dFSNEd49zBvkbpdJvarEe+ZJtcwYD9dCZQCGbyjxZ0ZgfQDDlGL0oDxoG
205pgfXTSNUAuqVGYc5dFvZeK7rfbTnqIES06XnOo2hn5AAHpKWMy40OUc1clPdF
ka+4uqnh4978NOovzABk+Wbwj9s746m0Yp2U/StLi5clr8w11fT8x5N70apYQNk1
9uBEIwZOPyZzc1MYIaqOOLW4aHrZoEwY6GxpuBGCKkX7j7AMNk9LqFc8omSnjl+D
B+OHWlzGdpQ5/Wsexvt0YJjfIlRvlksTIoOQH+H+B5L7gpKBvTJiRyLu7Psd4R3a
zppzi+8O6pwjPRiUa6Z/p1vZe0XAeac66ebhkqGbQtP5J71V4MpNLNFkGF+86ylF
h9Y2hM4fTfoP7+5cr9Ral0ncrvly543/GiC3Us9ziPHZThZqAOxHzOxiQLYfqud9
jhbwE7ufNQojTlWDMQXL6QHddhI/jAOAvppoOzZfdSI4+Ee3ivYVRMFIhulFwIr6
aXO3HBtMJk2r2rukkl2WtFjML7pjiyDT+IPH3xVd4vS7u9SFRVVpcamx0Ed20roZ
EbkAGRK09Cz9X751aOPy
=qAKt
-----END PGP SIGNATURE-----
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list