From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756567Ab2HNPMQ (ORCPT ); Tue, 14 Aug 2012 11:12:16 -0400 Received: from mail.skyhub.de ([78.46.96.112]:55758 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756200Ab2HNPF7 (ORCPT ); Tue, 14 Aug 2012 11:05:59 -0400 Date: Tue, 14 Aug 2012 17:05:52 +0200 From: Borislav Petkov To: wei_wang@realsil.com.cn Cc: gregkh@linuxfoundation.org, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, cjb@laptop.org, arnd@arndb.de, sameo@linux.intel.com Subject: Re: [PATCH v2 0/2] Add modules to support realtek PCIE card reader Message-ID: <20120814150550.GA4091@x1.osrc.amd.com> Mail-Followup-To: Borislav Petkov , wei_wang@realsil.com.cn, gregkh@linuxfoundation.org, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, cjb@laptop.org, arnd@arndb.de, sameo@linux.intel.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 14, 2012 at 06:40:36PM +0800, wei_wang@realsil.com.cn wrote: > From: Wei WANG > > Support for Realtek PCI-Express driver-based card readers including rts5209 and rts5229. > > Wei WANG (2): > drivers/mfd: Add realtek pcie card reader driver > drivers/mmc: Add realtek pcie sdmmc host driver > > drivers/mfd/Kconfig | 9 + > drivers/mfd/Makefile | 4 + > drivers/mfd/rts5209.c | 102 +++ > drivers/mfd/rts5229.c | 117 +++ > drivers/mfd/rtsx_pcr.c | 1464 +++++++++++++++++++++++++++++++++++++ > drivers/mfd/rtsx_pcr.h | 31 + > drivers/mmc/host/Kconfig | 7 + > drivers/mmc/host/Makefile | 2 + > drivers/mmc/host/rtsx_pci_sdmmc.c | 1348 ++++++++++++++++++++++++++++++++++ > include/linux/mfd/rtsx_common.h | 47 ++ > include/linux/mfd/rtsx_pci.h | 692 ++++++++++++++++++ > 11 files changed, 3823 insertions(+) > create mode 100644 drivers/mfd/rts5209.c > create mode 100644 drivers/mfd/rts5229.c > create mode 100644 drivers/mfd/rtsx_pcr.c > create mode 100644 drivers/mfd/rtsx_pcr.h > create mode 100644 drivers/mmc/host/rtsx_pci_sdmmc.c > create mode 100644 include/linux/mfd/rtsx_common.h > create mode 100644 include/linux/mfd/rtsx_pci.h Yeah, this thing still has issues though. When I slide in an SD card and do $ mkfs.ext3 /dev/mmcblk0p1 after having created the partition with fdisk, we run out of DMA space and the hung-tasks detector triggers: ... [ 286.244866] mmc0: new ultra high speed SDR50 SDHC card at address e624 [ 286.277199] mmcblk0: mmc0:e624 SU16G 14.8 GiB [ 286.318163] mmcblk0: [ 363.754647] mmcblk0: p1 [ 379.545510] DMA: Out of SW-IOMMU space for 438272 bytes at device 0000:03:00.0 [ 389.578514] DMA: Out of SW-IOMMU space for 380928 bytes at device 0000:03:00.0 [ 399.590953] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 409.590698] DMA: Out of SW-IOMMU space for 380928 bytes at device 0000:03:00.0 [ 419.589054] DMA: Out of SW-IOMMU space for 380928 bytes at device 0000:03:00.0 [ 429.587710] DMA: Out of SW-IOMMU space for 380928 bytes at device 0000:03:00.0 [ 439.586748] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 449.603357] DMA: Out of SW-IOMMU space for 516096 bytes at device 0000:03:00.0 [ 459.602781] DMA: Out of SW-IOMMU space for 385024 bytes at device 0000:03:00.0 [ 469.604105] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 479.602964] DMA: Out of SW-IOMMU space for 385024 bytes at device 0000:03:00.0 [ 489.601303] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 499.599617] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 509.597943] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 519.596815] DMA: Out of SW-IOMMU space for 385024 bytes at device 0000:03:00.0 [ 529.594130] DMA: Out of SW-IOMMU space for 389120 bytes at device 0000:03:00.0 [ 539.593000] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 549.594701] DMA: Out of SW-IOMMU space for 471040 bytes at device 0000:03:00.0 [ 559.594068] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 569.592643] DMA: Out of SW-IOMMU space for 389120 bytes at device 0000:03:00.0 [ 579.589890] DMA: Out of SW-IOMMU space for 520192 bytes at device 0000:03:00.0 [ 589.588743] DMA: Out of SW-IOMMU space for 393216 bytes at device 0000:03:00.0 [ 599.587003] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 [ 600.415530] INFO: task flush-179:0:3418 blocked for more than 120 seconds. [ 600.418439] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 600.421516] flush-179:0 D ffff880117c40050 0 3418 2 0x00000000 [ 600.424578] ffff88011578f650 0000000000000086 ffff88011578f5f0 ffffffff810a567d [ 600.426155] ffff88011578ffd8 ffff880117e459a0 ffff88011578ffd8 ffff88011578ffd8 [ 600.427705] ffffffff81a13420 ffff880117e459a0 ffff88011578f620 ffff880117e459a0 [ 600.430917] Call Trace: [ 600.432458] [] ? trace_hardirqs_on+0xd/0x10 [ 600.434041] [] schedule+0x29/0x70 [ 600.435627] [] io_schedule+0x8f/0xd0 [ 600.437204] [] get_request+0x15b/0x5e0 [ 600.438766] [] ? ioc_lookup_icq+0x9f/0xf0 [ 600.440340] [] ? __init_waitqueue_head+0x60/0x60 [ 600.441904] [] blk_queue_bio+0x7d/0x400 [ 600.443486] [] generic_make_request+0xc2/0x110 [ 600.445057] [] submit_bio+0x75/0x100 [ 600.446616] [] ? bio_alloc_bioset+0x5a/0x100 [ 600.448191] [] submit_bh+0xf4/0x130 [ 600.449748] [] __block_write_full_page+0x1f7/0x390 [ 600.451299] [] ? __block_write_full_page+0x390/0x390 [ 600.452837] [] ? blkdev_get_blocks+0xc0/0xc0 [ 600.452840] [] ? blkdev_get_blocks+0xc0/0xc0 [ 600.452845] [] block_write_full_page_endio+0x10f/0x130 [ 600.452852] [] ? clear_page_dirty_for_io+0xba/0x100 [ 600.452856] [] block_write_full_page+0x15/0x20 [ 600.452861] [] blkdev_writepage+0x18/0x20 [ 600.452865] [] __writepage+0x1a/0x50 [ 600.452870] [] write_cache_pages+0x241/0x490 [ 600.452874] [] ? mapping_tagged+0x20/0x20 [ 600.452880] [] generic_writepages+0x43/0x60 [ 600.452884] [] do_writepages+0x21/0x50 [ 600.452888] [] __writeback_single_inode.isra.32+0x3b/0x190 [ 600.452893] [] ? sub_preempt_count+0x79/0xd0 [ 600.452897] [] writeback_sb_inodes+0x345/0x4f0 [ 600.452901] [] __writeback_inodes_wb+0x97/0xd0 [ 600.452905] [] wb_writeback+0x20b/0x340 [ 600.452910] [] wb_do_writeback+0x205/0x260 [ 600.452915] [] bdi_writeback_thread+0x93/0x2b0 [ 600.452919] [] ? wb_do_writeback+0x260/0x260 [ 600.452923] [] kthread+0xea/0xf0 [ 600.452930] [] kernel_thread_helper+0x4/0x10 [ 600.452935] [] ? finish_task_switch+0x85/0x110 [ 600.452939] [] ? _raw_spin_unlock_irq+0x3b/0x60 [ 600.452943] [] ? retint_restore_args+0xe/0xe [ 600.452947] [] ? kthread_create_on_node+0x160/0x160 [ 600.452951] [] ? gs_change+0xb/0xb [ 600.452978] 1 lock held by flush-179:0/3418: [ 600.452990] #0: (&type->s_umount_key#19){.+.+..}, at: [] grab_super_passive+0x43/0x90 [ 600.452993] INFO: task mkfs.ext3:3438 blocked for more than 120 seconds. [ 600.452995] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 600.453000] mkfs.ext3 D ffff880117c40098 0 3438 3353 0x00000000 [ 600.453005] ffff880117e519b8 0000000000000082 ffff880117e51958 ffffffff810a567d [ 600.453010] ffff880117e51fd8 ffff880117e42cd0 ffff880117e51fd8 ffff880117e51fd8 [ 600.453015] ffffffff81a13420 ffff880117e42cd0 ffff880117e51988 ffff880117e42cd0 [ 600.453017] Call Trace: [ 600.453021] [] ? trace_hardirqs_on+0xd/0x10 [ 600.453026] [] schedule+0x29/0x70 [ 600.453031] [] io_schedule+0x8f/0xd0 [ 600.453034] [] get_request+0x15b/0x5e0 [ 600.453039] [] ? ioc_lookup_icq+0x9f/0xf0 [ 600.453043] [] ? __init_waitqueue_head+0x60/0x60 [ 600.453047] [] blk_queue_bio+0x7d/0x400 [ 600.453052] [] generic_make_request+0xc2/0x110 [ 600.453055] [] submit_bio+0x75/0x100 [ 600.453060] [] ? bio_alloc_bioset+0x5a/0x100 [ 600.453064] [] submit_bh+0xf4/0x130 [ 600.453068] [] __block_write_full_page+0x1f7/0x390 [ 600.453073] [] ? __block_write_full_page+0x390/0x390 [ 600.453076] [] ? blkdev_get_blocks+0xc0/0xc0 [ 600.453080] [] ? blkdev_get_blocks+0xc0/0xc0 [ 600.453084] [] block_write_full_page_endio+0x10f/0x130 [ 600.453089] [] ? clear_page_dirty_for_io+0xba/0x100 [ 600.453094] [] block_write_full_page+0x15/0x20 [ 600.453098] [] blkdev_writepage+0x18/0x20 [ 600.453102] [] __writepage+0x1a/0x50 [ 600.453106] [] write_cache_pages+0x241/0x490 [ 600.453111] [] ? mapping_tagged+0x20/0x20 [ 600.453117] [] generic_writepages+0x43/0x60 [ 600.453121] [] do_writepages+0x21/0x50 [ 600.453125] [] __filemap_fdatawrite_range+0x51/0x60 [ 600.453129] [] filemap_write_and_wait_range+0x52/0x70 [ 600.453133] [] blkdev_fsync+0x24/0x50 [ 600.453137] [] do_fsync+0x50/0x80 [ 600.453140] [] sys_fsync+0x10/0x20 [ 600.453144] [] system_call_fastpath+0x16/0x1b [ 600.453147] no locks held by mkfs.ext3/3438. [ 609.585190] DMA: Out of SW-IOMMU space for 524288 bytes at device 0000:03:00.0 -- Regards/Gruss, Boris.