From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Levitsky Date: Tue, 15 Jun 2010 17:46:14 +0000 Subject: Re: New rule for xD FTL driver Message-Id: <1276623974.23766.8.camel@maxim-laptop> List-Id: References: <1276347244.4481.15.camel@maxim-laptop> In-Reply-To: <1276347244.4481.15.camel@maxim-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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