Bug 8352

Summary: [mmc] alternative TI FM MMC/SD driver
Product: Drivers Reporter: Sergey Yanovich (ynvich)
Component: MMC/SDAssignee: Sergey Yanovich (ynvich)
Status: REJECTED DUPLICATE    
Severity: normal CC: oakad
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.21-rc7 Subsystem:
Regression: --- Bisected commit-id:
Attachments: [PATCH 1/2] [mmc] alternative TI FM MMC/SD driver for 2.6.21-rc7
[PATCH 2/2] [mmc] alternative TIFM driver config for 2.6.21-rc7
Unit test script [USES SUDO!]
patch removes custom debug macro
patch reduces delay on insert/removal
updated Unit test script [USES SUDO!]

Description Sergey Yanovich 2007-04-19 13:06:40 UTC
Most recent kernel where this bug did *NOT* occur: 2.6.21-rc7
Distribution: none
Hardware Environment: i386, Pentium M, Sony laptop
Software Environment: n/a
Problem Description: n/a

Steps to reproduce: n/a

Patches against v2.6.21-rc7 will follow.
Comment 1 Sergey Yanovich 2007-04-19 13:08:47 UTC
Created attachment 11238 [details]
[PATCH 1/2] [mmc] alternative TI FM MMC/SD driver for 2.6.21-rc7

The device is present in many notebooks. Notebooks depend heavily on
suspend/resume functionality. tifm_core/7xx1/sd family is an ambitous,
but uncompleted project. It used to crash on resuming, or hang up
on suspending. A less common failure used to be trigerred by a fast
card insert/removal sequence. Finally, tifm_sd module needs to be
manually inserted.

This driver is kind of mutant. The bones are taken from sdhci and omap,
the meat - from tifm_*. It contains all features (and bugs except named
above) of tifm_* as it was in kernel 2.6.21-rc7.

I have been testing this version since linux-2.6.18 (daily reading photos
from cards, daily suspending/resuming) without a single glitch.

This patch only provides sources. Kernel configuration follows
in next message.
Comment 2 Sergey Yanovich 2007-04-19 13:10:16 UTC
Created attachment 11239 [details]
[PATCH 2/2] [mmc] alternative TIFM driver config for 2.6.21-rc7

* [TIFM_CORE] Updated prompt "...interface" -> "..virtual bus",
  updated help message to reflect implementation details.
* [TIFM_7XX1] Updated help message;
* [MMC_TIFM] New symbol to allow alternative.
* [MMC_TIFM_7XX1] New symbol for the driver.

This patch will preserve any existing kernel config concerning tifm
modules.

The agregate symbol [MMC_TIFM] describes [MMC_TIFM_7XX1], because
the latter can be hidden if [TIFM_7XX1] is selected.

[TIFM_7XX1] and [MMC_TIFM_7XX1] are mutually exclusive, but belong
to different dirs. For that reason, we cannot use obvious 'choice'
kernel config keyword.

[MMC_TIFM_SD] and [MMC_TIFM_7XX1] are not mutually exclusive. If there
is a virtual bus controller different that [TIFM_7XX1], those two
modules can serve different cards at the same time.
Comment 3 Sergey Yanovich 2007-04-19 13:14:52 UTC
Uploaded version compiles cleanly and runs smoothly on my sony laptop. I
routinely keep the computer running for several weeks without reboots, but with
daily suspend/resume. My photo uses mmc/sd cards, so it is stupid to use
external card reader when you have a built-in one.
Comment 4 Sergey Yanovich 2007-04-19 13:18:10 UTC
Created attachment 11240 [details]
Unit test script [USES SUDO!]

This is a "test suite" for those who like XP programming style, as I do.
Comment 5 Sergey Yanovich 2007-04-25 15:27:56 UTC
Created attachment 11272 [details]
patch removes custom debug macro
Comment 6 Sergey Yanovich 2007-04-25 15:29:34 UTC
Created attachment 11273 [details]
patch reduces delay on insert/removal
Comment 7 Sergey Yanovich 2007-04-28 02:05:36 UTC
Created attachment 11308 [details]
updated Unit test script [USES SUDO!]

Reconfigured for [tifm_*].
All magic values replaced with variables.
Comment 8 Sergey Yanovich 2007-04-28 09:18:07 UTC
Today's tar on http://download.berlios.de/tifmxx/tifm-0.8e.tar.bz2 seems to
be stable enough.

*** This bug has been marked as a duplicate of 8052 ***