197b:2391 [Dell XPS 15 (L501X)] SD card reader inaccessible without pci bus rescan

Bug #703180 reported by pascal germroth on 2011-01-15
214
This bug affects 41 people
Affects Status Importance Assigned to Milestone
Linux
Confirmed
Medium
linux (Ubuntu)
Low
Unassigned

Bug Description

This is a Dell XPS L501X laptop (the new ones with USB3 etc: http://www.dell.com/us/p/xps-15/pd.aspx)

The card reader neither shows up in lspci nor in lsusb (only device connected via USB seems to be the internal webcam which works), so I can't even figure out which model it is…

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-image-2.6.35-24-generic-pae 2.6.35-24.42
Regression: No
Reproducible: No
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic-pae 2.6.35.8
Uname: Linux 2.6.35-24-generic-pae i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC665 Analog [ALC665 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: pascal 1777 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf0900000 irq 49'
   Mixer name : 'Intel IbexPeak HDMI'
   Components : 'HDA:10ec0665,1028046e,00100003 HDA:80862804,80860101,00100000'
   Controls : 29
   Simple ctrls : 13
Card1.Amixer.info:
 Card hw:1 'NVidia'/'HDA NVidia at 0xadefc000 irq 17'
   Mixer name : 'Nvidia GPU 14 HDMI/DP'
   Components : 'HDA:10de0014,10de0101,00100100'
   Controls : 16
   Simple ctrls : 4
Date: Sat Jan 15 05:06:50 2011
Frequency: Once a day.
HibernationDevice: RESUME=UUID=e7d13dad-6e7f-4320-8b4f-98e29cfde6f0
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
Lsusb:
 Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 003: ID 0408:2fb1 Quanta Computer, Inc.
 Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. XPS L501X
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-24-generic-pae root=UUID=b8eb30a4-6bd4-4d52-b356-8cb3431ba849 ro quiet splash
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/usr/bin/zsh
RelatedPackageVersions: linux-firmware 1.38.3
SourcePackage: linux
dmi.bios.date: 11/26/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A04
dmi.board.name: 00CKNG
dmi.board.vendor: Dell Inc.
dmi.board.version: A04
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: A04
dmi.modalias: dmi:bvnDellInc.:bvrA04:bd11/26/2010:svnDellInc.:pnXPSL501X:pvrA04:rvnDellInc.:rn00CKNG:rvrA04:cvnDellInc.:ct8:cvrA04:
dmi.product.name: XPS L501X
dmi.product.version: A04
dmi.sys.vendor: Dell Inc.

Ah now that's weird: it works when I boot with an SD card inserted (rebooted into windows to check: the reader appears as 4 PCIe devices for each standard it supports)

lspci now lists:

07:00.0 System peripheral: JMicron Technology Corp. SD/MMC Host Controller (rev 30)
07:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller (rev 30)
07:00.3 System peripheral: JMicron Technology Corp. MS Host Controller (rev 30)
07:00.4 System peripheral: JMicron Technology Corp. xD Host Controller (rev 30)

new dmesg messages:

[ 1.203436] sdhci: Secure Digital Host Controller Interface driver
[ 1.203439] sdhci: Copyright(c) Pierre Ossman
[ 1.204503] sdhci-pci 0000:07:00.2: SDHCI controller found [197b:2391] (rev 30)
[ 1.204534] sdhci-pci 0000:07:00.2: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 1.204576] sdhci-pci 0000:07:00.2: setting latency timer to 64
[ 1.204610] Registered led device: mmc0::
[ 1.204654] mmc0: SDHCI controller on PCI [0000:07:00.2] using DMA
...
[ 1.474595] mmc0: new SDHC card at address b368
[ 1.477257] mmcblk0: mmc0:b368 NCard 15.0 GiB
[ 1.477307] mmcblk0: p1

now I can eject and insert cards, everything works.

But when no card is inserted during boot, the PCI devices don't even exist… (is there maybe a PCI rescan-option to set somewhere?)

Philipp Kewisch (kewisch) wrote :

Newer Kernels allow the following, you must be root.

echo 1 > /sys/bus/pci/rescan

I'm still getting Error -110 (as I've read a timeout error) though:

[11198.241468] mmc0: error -110 whilst initialising SD card
...
[11468.786524] mmcblk0: error -110 sending status comand
[11468.786532] mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0

Jeremy Foshee (jeremyfoshee) wrote :

Hi pascal,

If you could also please test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete

@Fallen:
rescanning works for me. Very odd, rescanning again without a card inserted doesn't let the four devices disappear. Maybe it's a hardware bug, like they don't get switched on by BIOS on boot without a medium?

Testing 2.6.35-25-generic-pae tomorrow.

Eric Zimmerman (eric-zimtek) wrote :

I have have the same issue on 11.04 Beta 1 @Fallen rescan works to mount card.

Rocko (rockorequin) wrote :

Did anyone ever figure this out? It's still broken with the 2.6.39-rc7 kernel. But after I trigger the rescan, it detects both card insertion and removal. (I've booted the kernel with the argument pciehp.pciehp_force=1 because someone said it fixed the issue on an L501x, but it didn't make any difference on the L502x.)

Rocko (rockorequin) wrote :

Changed back to new as I've tested the latest upstream kernel as requested.

This is an issue on the XPS 15 L502x model as well as the L501x.

Changed in linux (Ubuntu):
status: Incomplete → New
Brad Figg (brad-figg) on 2011-05-13
Changed in linux (Ubuntu):
status: New → Confirmed
Rocko (rockorequin) wrote :

This is still a problem with the 3.0-rc1 kernel.

Etienne Tourigny (etiennesky) wrote :

The rescan command worked for me.

echo 1 > /sys/bus/pci/rescan

Is there a way to do this at boot time?

Dell XPS 15 502x, Ubuntu 11.04, kernel 2.6.38-8-generic, 64-bit.

C Michal (michal-physics) wrote :

In my experience, doing this at boot time doesn't help. It only finds the controller after an sd card has been inserted.

If there is an sd card present at boot time then the rescan is unnecessary as the controller is found anyway.

@Etienne: rescanning also doesn't actually solve the problem: remove the SD card and rescan and the device disappears again! It's only when rescanning (or booting) with a card inserted and then not rescanning that it stays.

I guess the only solution would be to rescan the bus any time the system polls for mounts… (do they still poll? I guess more than once per second would affect performance… I don't know anything about PCI, does polling wake up devices etc? Would it be bad for battery life to poll too often?)

C Michal (michal-physics) wrote :

Actually, what might be a good workaround would be to set a keybinding to the rescan - so you would insert an sd card, then hit some hot-key to trigger the rescan and mount the card?

C Michal (michal-physics) wrote :

I set up a hot-key to call a tiny suid program that triggers the rescan. Works great.
Put the following in rescan.c:

#include <stdio.h>
main(){
  FILE *outfile;
  outfile=fopen("/sys/bus/pci/rescan","w");
  if (outfile != NULL){
    fprintf(outfile,"1\n");
    fclose(outfile);
  }
  else printf("permission denied\n");
}

then compile with:
gcc rescan.c -o rescan
sudo cp rescan /usr/local/bin
sudo chown root /usr/local/bin/rescan
sudo chmod u+s /usr/local/bin/rescan

then in system->preferences->keyboard shortcuts, create a custom keybinding (Add). The command should point to /usr/local/bin/rescan, and set whatever key combination you like - I used the gears button on the top left of the keyboard, which produces 'super-L'

Rocko (rockorequin) wrote :

Another option is to use the attached script, which automates the process of detecting the reader, so you don't have to press a hotkey.

* copy the attached file scan_sd_reader.sh to /etc/init.d/ and make it executable:

sudo cp scan_sd_reader.sh /etc/init.d && sudo chmod +x /etc/init.d/scan_sd_reader.sh

* make it run at startup:

sudo update-rc.d scan_sd_reader.sh defaults

Then when you reboot the script will run in the background, checking every 2 seconds if the reader is on the PCI bus, ie which happens when you insert a card. It quits once the reader is detected.

You can start it immediately (without rebooting) with:

sudo /etc/init.d/scan_sd_reader.sh

C Michal (michal-physics) wrote :

The problem with that script is that the reader doesn't appear in the output of lspci until *after* a rescan with a card inserted. So you could switch that around to rescan every few seconds and then quit after the reader appears in the lspci output, but as is, I don't think that will work.

Rocko (rockorequin) wrote :

"So you could switch that around to rescan every few seconds and then quit after the reader appears in the lspci output."

But that is exactly what it does.

C Michal (michal-physics) wrote :

indeed - sorry. too hasty in my reading.

Rocko (rockorequin) wrote :

A disadvantage of the regular PCI rescan method is that the scan adds this warning to the syslog every time it runs:

i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment

Rocko (rockorequin) wrote :
summary: - SD card reader doesn't work on new Dell XPS
+ SD card reader inaccessible without pci bus rescan

I've still got this issue after trying both fixes
booting the kernel with the argument pciehp.pciehp_force=1
and
echo 1 > /sys/bus/pci/rescan

I'm running 11.04 on XPS L501X
2.6.38-11-generic

Is there a fix?

Ooops...

Correction: It now works with my Kingston SD card :-)
but still not with my SanDisk SD card (which does work in other devices) :-(

I guess the pciehp.pciehp_force=1 fixed it cause I don't even have to rescan.

Anyone have any ideas why the SanDisk still does not work?

pascal germroth, thank you for reporting this and helping make Ubuntu better. Maverick reached EOL on April 2012.
Please see this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We were wondering if this is still an issue in a supported release? If so, can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue in a supported release, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux <replace-with-bug-number>

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Raul Dias (rsd) wrote :

I can confirm that this still happens on 11.10.
the pci rescan solves as a workaround.

tags: removed: maverick needs-upstream-testing

AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC665 Analog [ALC665 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: raul 6003 F.... pulseaudio
 /dev/snd/pcmC0D0p: raul 6003 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf1c00000 irq 53'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0665,1028050e,00100003 HDA:80862805,80860101,00100000'
   Controls : 28
   Simple ctrls : 14
DistroRelease: Ubuntu 11.10
HibernationDevice: RESUME=UUID=3371164c-92d8-4b27-a304-1153c14eed6a
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MachineType: Dell Inc. Dell System XPS L502X
Package: linux 3.0.0.17.20
PackageArchitecture: amd64
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-17-generic root=UUID=592f20ec-0c3f-49dd-8ccd-508c09a9a019 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.0.0-17.30-generic 3.0.22
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-17-generic N/A
 linux-backports-modules-3.0.0-17-generic N/A
 linux-firmware 1.60
StagingDrivers: mei
Tags: oneiric staging
Uname: Linux 3.0.0-17-generic x86_64
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (170 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 01/13/2012
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A09
dmi.board.name: 0NJT03
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA09:bd01/13/2012:svnDellInc.:pnDellSystemXPSL502X:pvr:rvnDellInc.:rn0NJT03:rvrA00:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Dell System XPS L502X
dmi.sys.vendor: Dell Inc.

tags: added: apport-collected oneiric staging

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Raul Dias (rsd) wrote : IwConfig.txt

apport information

Raul Dias (rsd) wrote : Lspci.txt

apport information

Raul Dias (rsd) wrote : Lsusb.txt

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Raul Dias (rsd) wrote : RfKill.txt

apport information

Raul Dias (rsd) wrote : UdevDb.txt

apport information

Raul Dias (rsd) wrote : UdevLog.txt

apport information

apport information

Raul Dias, please file a new bug via the Terminal and feel free to subscribe me to it:
ubuntu-bug linux

Thanks!

tags: added: needs-upstream-testing
Rocko (rockorequin) wrote :

This bug is present in ubuntu 12.04 as well.

Rocko, please file a new bug via the Terminal and feel free to subscribe me to it:
ubuntu-bug linux

Thanks!

Callahan (thomas-born) wrote :

May I suggest that all affected users move to the same bug detected on 12.04 precise?

I think this is more effective as filing a new, duplicated bug.

Bug number is #969583.

@ Christopher: This is the same bug on the same machine. Dump files are attached and upstream kernel tests failed.

Thanks!

Callahan:
"May I suggest that all affected users move to the same bug detected on 12.04 precise?"
please do not make this suggestion.

"I think this is more effective as filing a new, duplicated bug."
It's not.

Thanks!

Hi Christopher,

Could you please explain why not? I really want to understand this.

Thanks,

Thomas
Am 03.04.2012 11:53 schrieb "Christopher M. Penalver" <
<email address hidden>>:

Changed in linux (Ubuntu):
assignee: nobody → Rafael Bedendo (rafael-bedendo)
Changed in linux (Ubuntu):
assignee: Rafael Bedendo (rafael-bedendo) → nobody
tags: added: apport-bugi386
removed: apport-bug apport-collected i386 oneiric staging
tags: added: maverick
summary: - SD card reader inaccessible without pci bus rescan
+ 197b:2391 SD card reader inaccessible without pci bus rescan
Download full text (3.7 KiB)

Tried it, but after modprobe-ing all the built drivers in my system, it
still doesn't work if I don't rescan..

On Fri, Feb 8, 2013 at 11:25 PM, James M. Leddy
<email address hidden>wrote:

> The driver from here may help: http://kernel.ubuntu.com/git?p=lexical
> /lexical-jmb38x.git;a=summary
>
>
> ** Also affects: linux via
> http://bugzilla.kernel.org/show_bug.cgi?id=40802
> Importance: Unknown
> Status: Unknown
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/703180
>
> Title:
> 197b:2391 SD card reader inaccessible without pci bus rescan
>
> Status in The Linux Kernel:
> Unknown
> Status in “linux” package in Ubuntu:
> Incomplete
>
> Bug description:
> This is a Dell XPS L501X laptop (the new ones with USB3 etc:
> http://www.dell.com/us/p/xps-15/pd.aspx)
>
> The card reader neither shows up in lspci nor in lsusb (only device
> connected via USB seems to be the internal webcam which works), so I
> can't even figure out which model it is…
>
> ProblemType: Bug
> DistroRelease: Ubuntu 10.10
> Package: linux-image-2.6.35-24-generic-pae 2.6.35-24.42
> Regression: No
> Reproducible: No
> ProcVersionSignature: Ubuntu 2.6.35-24.42-generic-pae 2.6.35.8
> Uname: Linux 2.6.35-24-generic-pae i686
> AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
> Architecture: i386
> ArecordDevices:
> **** List of CAPTURE Hardware Devices ****
> card 0: Intel [HDA Intel], device 0: ALC665 Analog [ALC665 Analog]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> AudioDevicesInUse:
> USER PID ACCESS COMMAND
> /dev/snd/controlC0: pascal 1777 F.... pulseaudio
> CRDA: Error: [Errno 2] No such file or directory
> Card0.Amixer.info:
> Card hw:0 'Intel'/'HDA Intel at 0xf0900000 irq 49'
> Mixer name : 'Intel IbexPeak HDMI'
> Components : 'HDA:10ec0665,1028046e,00100003
> HDA:80862804,80860101,00100000'
> Controls : 29
> Simple ctrls : 13
> Card1.Amixer.info:
> Card hw:1 'NVidia'/'HDA NVidia at 0xadefc000 irq 17'
> Mixer name : 'Nvidia GPU 14 HDMI/DP'
> Components : 'HDA:10de0014,10de0101,00100100'
> Controls : 16
> Simple ctrls : 4
> Date: Sat Jan 15 05:06:50 2011
> Frequency: Once a day.
> HibernationDevice: RESUME=UUID=e7d13dad-6e7f-4320-8b4f-98e29cfde6f0
> InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386
> (20101007)
> Lsusb:
> Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching
> Hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 003: ID 0408:2fb1 Quanta Computer, Inc.
> Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching
> Hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> MachineType: Dell Inc. XPS L501X
> ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-24-generic-pae
> root=UUID=b8eb30a4-6bd4-4d52-b356-8cb3431ba849 ro quiet splash
> ProcEnviron:
> LANG=en_US.UTF-8
> SHELL=/usr/bin/zsh
> RelatedPackageVersions: linux-firmware 1.38.3
> SourcePackage: linux
> dmi.bios.date: 11/26...

Read more...

Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed

This seems to be fixed in the currenty trusty daily image. It just works out-of-the-box.

Rocko (rockorequin) wrote :

Yes, this bug was fixed in the 3.13 kernel, so it works fine in Trusty (and should do in earlier releases if you install a 3.13 kernel). But I don't know exactly what fixed it.

tags: added: bios-outdated-a08
summary: - 197b:2391 SD card reader inaccessible without pci bus rescan
+ 197b:2391 [Dell XPS 15 (L501X)] SD card reader inaccessible without pci
+ bus rescan
Changed in linux (Ubuntu):
importance: Undecided → Low
Daniel Kessel (dkessel) wrote :

This is broken again on wily.

tags: added: wily

Daniel Kessel, it will help immensely if you filed a new report via a terminal:
ubuntu-bug linux

Please feel free to subscribe me to it.

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

Other bug subscribers

Remote bug watches

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