Re: New rule for xD FTL driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-06-15 at 09:05 -0700, Greg KH wrote: 
> On Tue, Jun 15, 2010 at 06:45:48PM +0300, Maxim Levitsky wrote:
> > Can udev helper tell udev to load modules by setting some variable?
> 
> Not really, except for the modalias stuff.  Use that if you can.
> 
> But I think you've pointed out the real solution already.  You need to
> look at the signature on the device and then know what to load, just
> like we do for filesystems.
> 
> good luck,
> 
> greg k-h


It seems to work just fine.
mtdchar I see it loaded automatically anyway due to char device alias.

So this rules does the trick:

ACTION!="add", GOTO="mtd_probe_end"
KERNEL=="mtd*ro", IMPORT{program}="mtd_probe --export $tempnode"
LABEL="mtd_probe_end"


And all I have to do is to write the mtd_probe

My current stub mtd-probe is:


#!/bin/sh
# $1 = device node
echo "MODALIAS=sm_ftl"
echo "ID_DRIVE_FLASH=1"

Best regards,
Maxim Levitsky

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux