[#3849] SPI mmc driver can't auto create entrys of spi_mmc1 and spi_mmc2 in /sys/block/spi_mmc/ after system reboot
Submitted By: Vivi Li
Open Date
2008-01-23 00:17:19 Close Date
2008-03-17 02:33:13
Priority:
Medium High Assignee:
Graf Yang
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
2007_Oct_07
App binary format:
N/A
Summary: SPI mmc driver can't auto create entrys of spi_mmc1 and spi_mmc2 in /sys/block/spi_mmc/ after system reboot
Details:
There are two folders (spi_mmc1/spi_mmc2) in /sys/block/spi_mmc/ when two partitions have been made in MMC card by fdisk.
Then reboot kernel.
There is no such folder in /sys/block/spi_mmc/ unless command "fdisk /dev/spi_mmc" is executed. They should be created automatically by driver when kernel boot up.
No such bug in 2007R1 release.
Below is the log after system reboot:
--
root:/> ls /sys/block/
ram0 ram11 ram14 ram3 ram6 ram9
ram1 ram12 ram15 ram4 ram7 spi_mmc
ram10 ram13 ram2 ram5 ram8
root:/> ls /sys/block/spi_mmc/
capability holders range size stat uevent
dev queue removable slaves subsystem
root:/> fdisk /dev/spi_mmc
spi_mmc: spi_mmc1 spi_mmc2
The number of cylinders for this disk is set to 2045.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/spi_mmc: 8 heads, 62 sectors, 2045 cylinders
Units = cylinders of 496 * 512 bytes
Device Boot Start End Blocks Id System
/dev/spi_mmc1 1 1033 256153 83 Linux
/dev/spi_mmc2 1034 2045 250976 83 Linux
Command (m for help): q
root:/> ls /sys/block/spi_mmc/
capability queue size spi_mmc2 uevent
dev range slaves stat
holders removable spi_mmc1 subsystem
root:/>
--
Follow-ups
--- Sonic Zhang 2008-03-11 00:07:32
Graf,
could you also take a look?
--- Graf Yang 2008-03-13 06:50:36
Fixed this bug in 2008R1 and Trunk.
When probing the spi_mmc driver, we should firstly validate the card then call
add_disk(). The original code use schedule_work(&pdev->cd_ws) to call
spi_mmc_revalidate(), this can't ensure the validation work have been done
before add_disk().
--- Vivi Li 2008-03-17 02:33:12
OK now. Close it. Thanks!
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found