All of lore.kernel.org
 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

* Re: how to unbind current mmc driver to bind mmc-test driver?
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Ball @ 2011-05-25 23:11 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linux-mmc

Hi Robert,

On Wed, May 25, 2011 at 01:58:13PM -0400, Robert P. J. Day wrote:
> 
>   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:
> 
> ...
> 
> 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:

You don't actually have a drivers/mmc device, then -- a controller
somewhere is making your SD slot look like a mass storage device,
in hardware.  The drivers/mmc stack is for devices that aren't
being mediated in this way.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: how to unbind current mmc driver to bind mmc-test driver?
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2011-05-25 23:14 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc

On Thu, 26 May 2011, Chris Ball wrote:

> Hi Robert,
>
> On Wed, May 25, 2011 at 01:58:13PM -0400, Robert P. J. Day wrote:
> >
> >   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:
> >
> > ...
> >
> > 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:
>
> You don't actually have a drivers/mmc device, then -- a controller
> somewhere is making your SD slot look like a mass storage device, in
> hardware.  The drivers/mmc stack is for devices that aren't being
> mediated in this way.

  i'd eventually come to that conclusion.  i guess it's time to drag
out one of my embedded systems, which will probably behave the way i
was expecting.  thanks.

rday

-- 

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

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

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

* Re: how to unbind current mmc driver to bind mmc-test driver?
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2011-05-25 23:35 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc

On Thu, 26 May 2011, Chris Ball wrote:

> Hi Robert,
>
> On Wed, May 25, 2011 at 01:58:13PM -0400, Robert P. J. Day wrote:
> >
> >   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:
> >
> > ...
> >
> > 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:
>
> You don't actually have a drivers/mmc device, then -- a controller
> somewhere is making your SD slot look like a mass storage device,
> in hardware.  The drivers/mmc stack is for devices that aren't
> being mediated in this way.

  i should ask, of course, whether there's a way to still use the
mmc_test module in this situation, but i'm guessing there isn't.

rday

-- 

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

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

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

* Re: how to unbind current mmc driver to bind mmc-test driver?
  2011-05-25 23:35   ` Robert P. J. Day
@ 2011-05-25 23:44     ` Chris Ball
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Ball @ 2011-05-25 23:44 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linux-mmc

Hi,

On Wed, May 25, 2011 at 07:35:56PM -0400, Robert P. J. Day wrote:
> > You don't actually have a drivers/mmc device, then -- a controller
> > somewhere is making your SD slot look like a mass storage device,
> > in hardware.  The drivers/mmc stack is for devices that aren't
> > being mediated in this way.
> 
>   i should ask, of course, whether there's a way to still use the
> mmc_test module in this situation, but i'm guessing there isn't.

Correct, it's not possible.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.