public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Configuring UDEV rules for MMC/SD hot-plugging
@ 2006-11-14  1:19 Katorgi, Maher
  2006-11-16  4:15 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Katorgi, Maher @ 2006-11-14  1:19 UTC (permalink / raw)
  To: linux-omap-open-source

Hi,

I am running 2.6.10 on OMAP2430.  When I plug SD card I get the
following at the Linux prompt, however the card does not automount.  I
do have The MMC hot plug scripts /etc/hotplug/mmc.agent and the system
hot plug script /sbin/hotplug present in the file system but they do not
get called.

# mmc0: host does not support reading read-only switch. assuming
write-enable.
mmcblk0: mmc0:a95c SD01G 992000KiB
 mmcblk0: p1

I can mount manually with no problem.  

# ls mmc*
mmcblk0    mmcblk0p1
# mount /dev/mmcblk0p1 /mnt/mmc
# ls /mnt/mmc/
audio  dcim   palm

I need help configuring udev rules for hot plugging the SD card and
automatically running /sbin/hotplug script.  Any insight into how to do
that is appreciated.  


Regards,
Maher Katorgi
Texas Instruments, Inc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Configuring UDEV rules for MMC/SD hot-plugging
  2006-11-14  1:19 Configuring UDEV rules for MMC/SD hot-plugging Katorgi, Maher
@ 2006-11-16  4:15 ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2006-11-16  4:15 UTC (permalink / raw)
  To: linux-omap-open-source

On Monday 13 November 2006 5:19 pm, Katorgi, Maher wrote:
> Hi,
> 
> I am running 2.6.10 on OMAP2430.  When I plug SD card I get the
> following at the Linux prompt, however the card does not automount.  I
> do have The MMC hot plug scripts /etc/hotplug/mmc.agent and the system
> hot plug script /sbin/hotplug present in the file system but they do not
> get called.
> 
> # mmc0: host does not support reading read-only switch. assuming
> write-enable.
> mmcblk0: mmc0:a95c SD01G 992000KiB
>  mmcblk0: p1

That suggests that the hotplug scripts ARE getting called ... all they
do is ensure that the right drivers are loaded.  FWIW on current systems
you can probably use the appended script instead of /sbin/hotplug, and
get better results.


> I can mount manually with no problem.  

I don't think "hotplug" issues "mount" commands.  But I'm fairly sure
that some folk have "udev" riles that do that; check your current PC
distros to see what they do with block devices.

- Dave



#!/bin/ash
#
# "hotplug" initializes devices ... hardware drivers get modprobed and
# create class devices.  then later udev handles /dev node creation and
# invokes programs that make userspace aware of the new device node.
#
# install as /sbin/hotplug

if [ ! -d /sys ]
then
	exit 1
fi
cd /sys

if [ "$ACTION" = "add" -a "$SUBSYSTEM" = "mmc" ]
then
	# MMC doesn't support modalias yet, but this is
	# the only choice until we have SDIO support.
	MODALIAS=mmc_block
fi

if [ "$ACTION" = "add" -a -n "$MODALIAS" -a ! -L $DEVPATH/driver ]
then
	# most important subsystems now have $MODALIAS support:
	modprobe -q $MODALIAS
fi

if [ -n "$DEVPATH" ]
then
	/sbin/udevsend $1
fi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-16  4:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14  1:19 Configuring UDEV rules for MMC/SD hot-plugging Katorgi, Maher
2006-11-16  4:15 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox