Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 232673 - tifm_sd module has read/write errors
Summary: tifm_sd module has read/write errors
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Brian Brock
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2007-03-16 15:54 UTC by Aurelien Bompard
Modified: 2008-05-07 01:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-05-07 01:18:01 UTC

Attachments (Terms of Use)

Description Aurelien Bompard 2007-03-16 15:54:23 UTC
Description of problem:
My laptop has a Texas Instruments SD card reader, using the tifm module.
The tifm_sd module is not loaded automtically, but that's another story (bug
232370). When I load the module manually, and plug in the SD card, the LED
blinks and I get many errors in /var/log/messages, like this:

mmcblk0: error 1 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1993664
Buffer I/O error on device mmcblk0, logical block 249208
(hundreds of time)
Buffer I/O error on device mmcblk0p1, logical block 249104
mmcblk0: mmc1:0001 SD 996864KiB 
 mmcblk0: p1
tifm_sd: card failed to respond for a long period of time<6>tifm_7xx1: demand
removing card from socket 1

This is the relevant lspci output:
02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader
02:06.3 Class 0805: Texas Instruments PCIxx12 SDA Standard Compliant SD Host
02:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based
SmartCard controller

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. load the tifm_sd module
2. tail -f /var/log/messages
3. plug the SD card in

Comment 1 pasqual milvaques 2007-04-22 15:13:21 UTC

the same problem happened to me but here:

I found a method to getting this work, it uses the setpci command to configure
the device so its capable to work. here are the steps I follow to make it work:

1.- find the device data with the command lspci:
[root@xxx ~]# lspci | grep Mass
05:09.3 Mass storage controller: Texas Instruments PCIxx21 Integrated FlashMedia
[root@xxx ~]# 

2.- load the module 
modprobe tifm_sd 

3.- configure it with setpci, the number after -s is the device identificator
found with lspci
setpci -s 05:09.3 4c.b=0x02

I hope the bug with be resolved for fedora core 7 :)

best regards

Comment 2 Chuck Ebbert 2007-04-23 16:56:34 UTC
(In reply to comment #1)
> setpci -s 05:09.3 4c.b=0x02

So where is the explanation of what this voodoo setting actually does?

Comment 3 pasqual milvaques 2007-04-23 23:03:59 UTC
what is doing this instruction is telling the device to change its behaviour by
changing its internal control registers, more specifically the instruction sets
the register in the address 4c (.d means that the address is of the width of a
byte) to the value 0x02. and what this means?

well, hoping not to make the zombies angry I have taken a look to see what can I
found in the web and the bug is pretty well studied here:

but the report is very large to summarize here, take a look if you have
curiosity about it. 
the most interesting thing I have found is here:

where there is a talk about hacking the registers and blaming texas instruments,
quite funny :)

after seeing this I tried to find what is in register 4c and I found in the web
the specification document of the chip:

in it the behavior of register 4c is described as a register control and the bit
we are setting with the instruction generates this effect:

MMC/SD disable. Setting this bit disables support for MMC/SD cards. The FlashMedia
controller reports a MMC/SD card as an unsupported card if this bit is set.
Also, if this bit is
set, all of the SD_SUPPORT bits in the socket enumeration registers are 0s.

so we are disabling MMC/SD support in the chip. 

a thing I have taken a look is the dmesg output when I insert a card, it changes
after setting the bit. 

before setpci:
tifm_7xx1: xd card detected in socket 2
tifm_7xx1: demand removing card from socket 2
tifm_7xx1: sd card detected in socket 3

after setpci:
mmc2: Problem switching card into high-speed mode!
mmcblk0: mmc2:e624 SD128 123008KiB 
 mmcblk0: p1

so it seems that another module is managing the device, well, I think that
that's the hack: module tifm is broken but module sdhci is capable for managing
the device so we force this by disabling MMC/SD support in the chip. I think
that in the ubuntu bug report something in this direction is said.

well, I hope this could help

best regards 

Comment 4 Bug Zapper 2008-04-03 23:42:02 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here: to ensure this
doesn't happen again.

Comment 5 Bug Zapper 2008-05-07 01:17:59 UTC
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:

Note You need to log in before you can comment on or make changes to this bug.