Conflicting mmc modules built in

Bug #1762835 reported by Adam Smith on 2018-04-10
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi2 (Ubuntu)
Undecided
Unassigned

Bug Description

SRU Justification

[Impact]

The Bionic Linux-raspi2 kernel has both the upstream and downstream pi mmc modules enabled. Running the latest server image users can see this error in dmesg:

Error: Driver 'sdhost-bcm2835' is already registered, aborting...

Due to this error the pi server image is failing a testcase on the iso tracker.

It is also not clear to users what mmc modules are in use.

The attached patch removes the upstream mmc modules from the kernel config.

[Test Case]

The bug can be reproduced by running the latest bionic 'classic' raspberrypi server image - http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/bionic-preinstalled-server-armhf+raspi2.img.xz

Inspect the dmesg and observe the error.

To check this is fixed, once the patched kernel has been installed, reboot, inspect the dmesg again and the error should be gone.

[Regression potential]

This should be low. This config is the default used by raspbian and recommended by the pi foundation, and is therefore well tested.

The patch changes the mmc modules, so if things go wrong the pi may not boot or the wifi on the pi3 may not work.

I've built the kernel with the patch and everything still works.

[Other Info]

I think it is important to get this change in before the server images are released.

Note the pi3 wifi doesn't work out-of-the-box, there is a missing brcmfmac43430-sdio.txt file.

---

Original description:

Linux-raspi2 has both the upstream and downstream pi mmc modules enabled. In dmesg I get this error:

Error: Driver 'sdhost-bcm2835' is already registered, aborting...

I asked on the Raspberry Pi forums [1] about this and PhilE (Raspberry Pi engineer) answered:

"For general guidance, in the Raspberry Pi kernels we use the bcm2835-sdhost driver for the SD card or EMMC interface and bcm2835-mmc for SDIO to the WiFi chip. Upstream uses bcm2835 for SD and sdhci-iproc for SDIO."

I'm not entirely sure what the config used in raspbian is, but I think it is this:

#
# MMC/SD/SDIO Host Controller Drivers
#
CONFIG_MMC_BCM2835_MMC=y
CONFIG_MMC_BCM2835_DMA=y
CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
CONFIG_MMC_BCM2835_SDHOST=y
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_ARMMMCI is not set
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
# CONFIG_MMC_SDHCI_OF_ARASAN is not set
# CONFIG_MMC_SDHCI_OF_AT91 is not set
# CONFIG_MMC_SDHCI_CADENCE is not set
# CONFIG_MMC_SDHCI_F_SDH30 is not set
# CONFIG_MMC_SDHCI_IPROC is not set
CONFIG_MMC_SPI=m
# CONFIG_MMC_DW is not set
# CONFIG_MMC_VUB300 is not set
# CONFIG_MMC_USHC is not set
# CONFIG_MMC_USDHI6ROL0 is not set
# CONFIG_MMC_BCM2835 is not set
# CONFIG_MMC_MTK is not set
# CONFIG_MMC_SDHCI_XENON is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
# CONFIG_LEDS_CLASS_FLASH is not set
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set

I'll run apport to collect the Ubuntu configs and dmesg logs etc.

[1] https://www.raspberrypi.org/forums/viewtopic.php?f=71&t=210225

Adam Smith (adamsmith) wrote :
Adam Smith (adamsmith) wrote :
Adam Smith (adamsmith) wrote :
Adam Smith (adamsmith) wrote :
Adam Smith (adamsmith) wrote :

Same problem if I upgrade to 4.15. Note the

sdhci_iproc 16384 0

line in lsmod. I can't remember if I had the wifi firmware present when I ran the 4.13 logs (sorry!).

Adam Smith (adamsmith) wrote :
Adam Smith (adamsmith) wrote :
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1762835

tags: added: iso-testing
Adam Smith (adamsmith) wrote :

This is the Xenial config: It uses bcm2835 and bcm2835_sdhost which is a mix of the upstream and downstream drivers.

CONFIG_MMC=y
CONFIG_MMC35240=m
CONFIG_MMC_ARMMMCI=y
CONFIG_MMC_BCM2835=y
CONFIG_MMC_BCM2835_DMA=y
CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
CONFIG_MMC_BCM2835_SDHOST=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_BOUNCE=y
CONFIG_MMC_BLOCK_MINORS=32
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_DW=m
CONFIG_MMC_DW_EXYNOS=m
CONFIG_MMC_DW_K3=m
CONFIG_MMC_DW_PLTFM=m
CONFIG_MMC_MTK=m
CONFIG_MMC_REALTEK_USB=m
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_F_SDH30=m
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
CONFIG_MMC_SDHCI_OF_ARASAN=m
CONFIG_MMC_SDHCI_OF_AT91=m
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SPI=m
# CONFIG_MMC_TEST is not set
CONFIG_MMC_TMIO=m
CONFIG_MMC_TMIO_CORE=m
CONFIG_MMC_USDHI6ROL0=m
CONFIG_MMC_USHC=m

Adam Smith (adamsmith) wrote :

Attached is a config patch.

Is a device tree change needed too?

tags: added: patch
Adam Smith (adamsmith) on 2018-04-16
description: updated
Adam Smith (adamsmith) wrote :

This is the dmesg with the patched kernel (upstream mmc modules removed).

Adam Smith (adamsmith) wrote :

Just for fun I did the reverse - i.e. downstream mmc modules removed and upstream modules kept in. Note how confusing the mmc module messages are in dmesg. It is impossible for the casual reader of the dmesg logs to tell which mmc module are in use.

Adam Smith (adamsmith) wrote :

Raspbian dmesg

Adam Smith (adamsmith) wrote :

This really needs fixing as it clearly is confusing users. It is a very visible error message, especially if you boot with 'quite splash' as it remains on the boot screen for quite a few seconds.

Adam Smith (adamsmith) wrote :

I sent the patch to the kernel mailing list back in April: https://lists.ubuntu.com/archives/kernel-team/2018-April/091646.html

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers