[OpenWrt-Devel] periodic task checking for usb flash media?
karlp at tweak.net.au
Tue Sep 29 08:51:11 EDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Karl Palsson <karlp at tweak.net.au> wrote:
> 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
# cat /sys/block/sda/events_poll_msecs
# cat /sys/module/block/parameters/events_dfl_poll_msecs
And changing them to 2000 had no effect at all.
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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
-----END PGP SIGNATURE-----
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel