From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: mmc: tmio: why enable/disable SDIO irq on every transaction with IOMOD? Date: Tue, 29 Nov 2016 15:23:47 +0900 Message-ID: <87h96qkdn0.wl@dns1.atmark-techno.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from p654789.hkidff01.ap.so-net.ne.jp ([121.101.71.137]:32791 "EHLO gw.atmark-techno.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753735AbcK2GbJ (ORCPT ); Tue, 29 Nov 2016 01:31:09 -0500 Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by gw.atmark-techno.com (Postfix) with ESMTPS id 46B0420168 for ; Tue, 29 Nov 2016 15:23:58 +0900 (JST) Received: by mail-pf0-f199.google.com with SMTP id 17so245788011pfy.2 for ; Mon, 28 Nov 2016 22:23:58 -0800 (PST) Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: linux-mmc@vger.kernel.org Hello, We've been using tmio_mmc_pio.c and seeing the following message: "sh_mobile_sdhi sh_mobile_sdhi.1: timeout waiting for SD bus idle" While searching for a fix, we found some code we don't understand. I'm sending this question with a hope that someone would enlighten us a bit. So, here goes. The SDIO spec. seems to allow sending SDIO IRQ between the blocks of multi-block transfer. The hardware, SCLKDIVEN bit of SD_INFO02, is set to zero (0) and prohibits to access IOMOD bit of SDIO_MODE register while multi-block transfer is going. The current code, however, tries to disable SDIO IRQ by setting IOMOD to zero in tmio_mmc_enable_sdio_irq() all the time, even during multi-block transfer. This prints the above waring. What we don't understand is that the code does both masking and disabling the IRQ. So my question is that "What is the reason behind to disable IRQ with SDIO_MODE? Is there any situation which masking with SDIO_INFO1_MASK is not enough? Thanks you, -- yashi