mmc subsystem needs MODALIAS love

Bug #30335 reported by Scott James Remnant (Canonical)
18
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Andy Whitcroft
linux-source-2.6.17 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

The mmc subsystem doesn't currently generate MODALIAS and the device drivers (mmc_block, anyway) don't define aliases that map to this.

This means we don't know we have to load the secret mmc_block module to make the newly inserted device actually work.

Tags: cft-2.6.27

Related branches

Revision history for this message
Ben Collins (ben-collins) wrote :

Actually, someone just needed to think about what was going on here.

Since mmc is all about MMC block devices, and is pretty useless without this one module to implement the block layer of it, it made more sense to just build mmc_block as part of mmc_core. Even the Kconfig said "if you want mmc, you want this module".

The seperation of the two makes little sense.

So now that it's built in, whenever an MMC host is detected, and it's driver loaded, mmc_core will be have mmc_block functionality automatically.

Changed in linux-source-2.6.15:
assignee: nobody → ben-collins
status: Unconfirmed → Fix Committed
Revision history for this message
Matthew Garrett (mjg59) wrote :

No, sdio devices need mmc_core but not mmc_block.

Matthew Garrett (mjg59)
Changed in linux-source-2.6.15:
status: Fix Committed → Confirmed
Revision history for this message
Ben Collins (ben-collins) wrote :

Don't need it, or just can't have it loaded?

If it just doesn't need it, then there's nothing wrong with loading mmc_block into mmc_core. It solves the issue and breaks nothing.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

We now have another example of why this is needed, bug #55539 is an SD card that is exposed through the MMC subsystem but needs a different set of drivers (tifm_*)

Without MODALIAS, we can't do this

Revision history for this message
Chuck Short (zulcss) wrote :

I wouldn't mind taking a crack at this.

chuck

Revision history for this message
Sebastian Rode (sebastian-ro-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest updates or the Ubuntu release? Thanks in advance.

Changed in linux-source-2.6.17:
status: New → Incomplete
Changed in linux-source-2.6.17:
status: Incomplete → Won't Fix
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Yes, this is still an issue.

The MMC subsystem still has no modaliases for its modules

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The 2.6.27 kernel still has no MODALIAS love for mmc

Revision history for this message
Andy Whitcroft (apw) wrote :

We seem to have a number of aliases for some mmc devices now. Do you have specific aliases in mind which are missing?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 30335] Re: mmc subsystem needs MODALIAS love

On Wed, 2008-12-17 at 16:20 +0000, Andy Whitcroft wrote:

> We seem to have a number of aliases for some mmc devices now. Do you
> have specific aliases in mind which are missing?
>
We do?

Could you paste some examples?

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Andy Whitcroft (apw) wrote :

On Wed, Dec 17, 2008 at 04:49:27PM -0000, Scott James Remnant wrote:
> On Wed, 2008-12-17 at 16:20 +0000, Andy Whitcroft wrote:
>
> > We seem to have a number of aliases for some mmc devices now. Do you
> > have specific aliases in mind which are missing?
> >
> We do?
>
> Could you paste some examples?

We have some pci related aliases:

    modules.alias:alias pci:v00001180d00000843sv*sd*bc*sc*i* ricoh_mmc
[...]
    modules.alias:alias pci:v0000104Cd0000AC8Fsv*sd*bc*sc*i* tifm_7xx1
    modules.alias:alias pci:v0000104Cd0000803Bsv*sd*bc*sc*i* tifm_7xx1
    modules.alias:alias pci:v0000104Cd00008033sv*sd*bc*sc*i* tifm_7xx1

as well as a slew of symbol related aliases. I am assuming you have
some specific aliases in mind?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

On Thu, 2008-12-18 at 13:07 +0000, Andy Whitcroft wrote:

> On Wed, Dec 17, 2008 at 04:49:27PM -0000, Scott James Remnant wrote:
> > On Wed, 2008-12-17 at 16:20 +0000, Andy Whitcroft wrote:
> >
> > > We seem to have a number of aliases for some mmc devices now. Do you
> > > have specific aliases in mind which are missing?
> > >
> > We do?
> >
> > Could you paste some examples?
>
> We have some pci related aliases:
>
> modules.alias:alias pci:v00001180d00000843sv*sd*bc*sc*i* ricoh_mmc
> [...]
> modules.alias:alias pci:v0000104Cd0000AC8Fsv*sd*bc*sc*i* tifm_7xx1
> modules.alias:alias pci:v0000104Cd0000803Bsv*sd*bc*sc*i* tifm_7xx1
> modules.alias:alias pci:v0000104Cd00008033sv*sd*bc*sc*i* tifm_7xx1
>
> as well as a slew of symbol related aliases. I am assuming you have
> some specific aliases in mind?
>
An alias on the mmc-block module to make it be loaded automatically?

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Andy Whitcroft (apw) wrote :

I am expecting the mmc-block module to get slurped up as a dependancy on any interface specific module which is loaded. Looking at my laptop I seem to have an MMC slot so I am able to test it.

    $ lsmod | grep mmc
    mmc_core 67296 1 sdhci
    ricoh_mmc 12672 0
    $

Shoved in an SD card:

    [289098.924301] mmc0: new SD card at address e624
    [289099.085615] mmcblk0: mmc0:e624 SD01G 992000KiB
    [289099.086534] mmcblk0: p1

and now:

    $ lsmod | grep mmc
    mmc_block 19720 2
    mmc_core 67296 2 mmc_block,sdhci
    ricoh_mmc 12672 0
    $

As it was loaded on detection of the media I assume this was loaded by udev? Do you have an example where it does not work this way?

Andy Whitcroft (apw)
Changed in linux:
assignee: ben-collins → apw
status: Confirmed → In Progress
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

On Mon, 2009-01-05 at 18:12 +0000, Andy Whitcroft wrote:

> As it was loaded on detection of the media I assume this was loaded by
> udev? Do you have an example where it does not work this way?
>
Right, udev has to have a rule dedicated to just loading this one
module:

SUBSYSTEM=="mmc", RUN+="/sbin/modprobe -Qba mmc-block"

This is a bug.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Andy Whitcroft (apw) wrote :

Produced patches to add modaliases between the MMC driver and mmc-block. Pushed these upstream. In discussions with upstream on the correct format. Patches sucked up into -mm for testing.

Revision history for this message
Andy Whitcroft (apw) wrote :

After several iterations these are accepted upstream and merging in 2.6.30. Will commit these to Jaunty too.

Andy Whitcroft (apw)
Changed in linux:
status: In Progress → Fix Committed
Changed in linux-source-2.6.17:
status: Won't Fix → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.28-9.31

---------------
linux (2.6.28-9.31) jaunty; urgency=low

  [ Andy Whitcroft ]

  * SAUCE: cpufreq-nforce2: probe failures are not errors
    - LP: #332170
  * SAUCE: mmc: add MODALIAS linkage for MMC/SD devices
    - LP: #30335
  * remove test-suspend script
    - LP: #333856

  [ Kees Cook ]

  * handle relative paths in modules.dep
    Fixes 2.6.28-9.30 FTBS.

  [ Upstream Kernel Changes ]

  * ricoh_mmc: Handle newer models of Ricoh controllers

 -- Tim Gardner <email address hidden> Wed, 11 Mar 2009 08:19:24 -0600

Changed in linux:
status: Fix Committed → Fix Released
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

The 18 month support period for Edgy Eft 6.10 has reached its end of life several months ago.
As a result, we are closing the linux-source-2.6.17 task.

Changed in linux-source-2.6.17 (Ubuntu):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.