mmc: core: bus:
Fix mmc_bus_suspend and mmc_bus_resume panic kernel bug. Since pm notify call
chain fall into mmc subsystem, host controller driver may not register bus_ops indeed ,
actually it's optional for bus-level drivers to complete this hook pointer.
[ 42.603423] Freezing user space processes ... (elapsed 0.008 seconds) done.
[ 42.611886] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 42.614351] Unable to handle kernel NULL pointer dereference at virtual address
00000000
[ 42.630102] pgd =
c0004000
[ 42.632816] [
00000000] *pgd=
00000000
[ 42.636483] Internal error: Oops:
80000005 [#1] PREEMPT SMP ARM
....
[ 43.426496] [<
c045f788>] (mmc_bus_suspend+0x40/0x44) from [<
c02e94dc>] (dpm_run_callback.isra.5+0x28/0x60)
[ 43.436168] [<
c02e94dc>] (dpm_run_callback.isra.5+0x28/0x60) from [<
c02e9b78>] (__device_suspend+0x1e4/0x274)
mmc: core: rockchip:
Tags rockchip eMMC controller's pm_caps with MMC_PM_IGNORE_PM_NOTIFY refered to commit
3549af216ba41d5bd70.
eMMC controller now only ack probe/shudown and remove event by poweroff notify. Otherwise, PM freezing will be disterbed
by emergancy I/O error from file system.
[ 42.710633] PM: suspend entry 2013-01-21 09:54:47.
245333254 UTC
[ 42.710659] PM: Syncing filesystems ... done.
[ 42.728095] mmc0: card 0001 removed
[ 42.828461] EXT4-fs error (device mmcblk0p12): ext4_wait_block_bitmap:466:
comm PackageManager: Cannot read block bitmap - block_group = 1, block_bitmap = 34
[ 42.828653] EXT4-fs (mmcblk0p12): delayed block allocation failed for inode 647 at logical offset 0 with
max blocks 30 with error -5
[ 42.828689] EXT4-fs (mmcblk0p12): This should not happen!! Data will be lost
[ 42.829227] Aborting journal on device mmcblk0p12-8.
[ 42.829322] JBD2: Error -5 detected when updating journal superblock for mmcblk0p12-8.
[ 42.829409] journal commit I/O error
[ 42.829942] EXT4-fs (mmcblk0p12): previous I/O error to superblock detected
......
[ 43.179043] Freezing user space processes ...
[ 43.179519] active wakeup source: mmc0_detect
Signed-off-by: lintao <lintao@rock-chips.com>