linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to unbind current mmc driver to bind mmc-test driver?
@ 2011-05-25 17:58 Robert P. J. Day
  2011-05-25 23:11 ` Chris Ball
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2011-05-25 17:58 UTC (permalink / raw)
  To: linux-mmc

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2186 bytes --]


  ever willing to embarrass myself in public, i'm going to ask how to
load and invoke the mmc_test driver on my ubuntu laptop, which is
currently running my hand-rolled super-recent, 2.6.39+ kernel.

  i'm following along in the script here:

http://www.spinics.net/lists/linux-mmc/msg05835.html

and it seems pretty straightforward -- i interpret all of that as that
one needs first to find the driver that is currently bound to the
device (mmc-block?), unbind it, then bind to the mmc test driver.
that seems easy enough except that this loop in the script:

...
cd "$drv_path"     [this is "/sys/bus/mmc/drivers"]
for d in *;do
    for l in "$d/"*;do
	[ -h "$l" ] || continue
	card="$(basename "$l")"
	driver="$(dirname "$l")"
	break
    done
    [ -n "$card" ] && break
done
...

is clearly looking for the *current* driver but, on my system, there
is none.  on this laptop, the MMC card slot appears to be managed by
the SCSI driver and USB storage, so there is no symlink there; hence,
the script fails in the next check:

...
if [ -z "$card" ];then
    echo "No MMC/SD card found"
    exit 1
fi
...

  the mmc-block driver is built as a module, but it's never loaded
upon insertion of a card.  so to try to track down what's happening, i
fired up "udevadm monitor --kernel" to watch the events upon insertion
of an SD card, and i attached the dozen lines of (abbreviated) output.

  at this point, i'm not sure what to do.  i can certainly load the
mmc_test module, at which point i will get under /sys/bus/mmc/drivers:

$ find
.
./uevent
./unbind
./bind
$

  the rest of the script requires one to perform the MMC tests by
writing to the appropriate entry under debugfs, which i have mounted
but i have no idea what to look for under there.

  thoughts?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1290 bytes --]

/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1 (usb)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0 (usb)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15 (scsi)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/scsi_host/host15 (scsi_host)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0 (scsi)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0 (scsi)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/scsi_disk/15:0:0:0 (scsi_disk)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/scsi_device/15:0:0:0 (scsi_device)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/scsi_generic/sg2 (scsi_generic)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/bsg/15:0:0:0 (bsg)
/virtual/bdi/8:16 (bdi)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/block/sdb (block)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/block/sdb/sdb1 (block)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/block/sdb/sdb2 (block)
/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host15/target15:0:0/15:0:0:0/block/sdb/sdb3 (block)

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

end of thread, other threads:[~2011-05-25 23:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 17:58 how to unbind current mmc driver to bind mmc-test driver? Robert P. J. Day
2011-05-25 23:11 ` Chris Ball
2011-05-25 23:14   ` Robert P. J. Day
2011-05-25 23:35   ` Robert P. J. Day
2011-05-25 23:44     ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).