public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] rtsx patch for for-next branch in MFD tree
@ 2012-11-20  2:09 wei_wang
  2012-11-20  2:09 ` [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi wei_wang
  2012-11-20  2:09 ` [PATCH v2 2/2] mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c wei_wang
  0 siblings, 2 replies; 6+ messages in thread
From: wei_wang @ 2012-11-20  2:09 UTC (permalink / raw)
  To: cjb, sameo
  Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG

From: Wei WANG <wei_wang@realsil.com.cn>

Wei WANG (2):
  mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi
  mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c

 drivers/mmc/host/rtsx_pci_sdmmc.c |    2 ++
 1 file changed, 2 insertions(+)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi
  2012-11-20  2:09 [PATCH v2 0/2] rtsx patch for for-next branch in MFD tree wei_wang
@ 2012-11-20  2:09 ` wei_wang
  2012-11-20  2:21   ` Chris Ball
  2012-11-20  2:09 ` [PATCH v2 2/2] mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c wei_wang
  1 sibling, 1 reply; 6+ messages in thread
From: wei_wang @ 2012-11-20  2:09 UTC (permalink / raw)
  To: cjb, sameo
  Cc: arnd, oakad, gregkh, linux-mmc, linux-kernel, Wei WANG, bp, devel

From: Wei WANG <wei_wang@realsil.com.cn>

For Realtek card reader, internal regsiter SD_CFG2 should be configured
before transferring data. In the prior version, the value of this register
has been calculated, but forgotten to write back to the internal register.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 0e934bf..067dd46 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -405,6 +405,7 @@ static int sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq)
 	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE,
 			0x01, RING_BUFFER);
 
+	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG2, 0xFF, cfg2);
 	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_TRANSFER, 0xFF,
 			trans_mode | SD_TRANSFER_START);
 	rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c
  2012-11-20  2:09 [PATCH v2 0/2] rtsx patch for for-next branch in MFD tree wei_wang
  2012-11-20  2:09 ` [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi wei_wang
@ 2012-11-20  2:09 ` wei_wang
  1 sibling, 0 replies; 6+ messages in thread
From: wei_wang @ 2012-11-20  2:09 UTC (permalink / raw)
  To: cjb, sameo
  Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG

From: Wei WANG <wei_wang@realsil.com.cn>

This fixes the following build error on some architectures (parisc at least):

drivers/mmc/host/rtsx_pci_sdmmc.c: In function 'sd_normal_rw':
drivers/mmc/host/rtsx_pci_sdmmc.c:448:2: error: implicit
declaration of function 'kzalloc'
[-Werror=implicit-function-declaration]
drivers/mmc/host/rtsx_pci_sdmmc.c:448:6: warning: assignment
makes pointer from integer without a cast [enabled by default]
drivers/mmc/host/rtsx_pci_sdmmc.c:472:2: error: implicit
declaration of function 'kfree'
[-Werror=implicit-function-declaration]

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 067dd46..571915d 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -21,6 +21,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/highmem.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi
  2012-11-20  2:09 ` [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi wei_wang
@ 2012-11-20  2:21   ` Chris Ball
  2012-11-20  2:40     ` wwang
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Ball @ 2012-11-20  2:21 UTC (permalink / raw)
  To: wei_wang; +Cc: sameo, devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp

Hi,

Sorry to be pedantic, but:

On Mon, Nov 19 2012, wei_wang@realsil.com.cn wrote:
> For Realtek card reader, internal regsiter SD_CFG2 should be configured
> before transferring data. In the prior version, the value of this register
> has been calculated, but forgotten to write back to the internal register.

With what consequences?  Was the  data transfer failing?  Under which
circumstances?

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi
  2012-11-20  2:21   ` Chris Ball
@ 2012-11-20  2:40     ` wwang
  2012-11-20  3:09       ` Chris Ball
  0 siblings, 1 reply; 6+ messages in thread
From: wwang @ 2012-11-20  2:40 UTC (permalink / raw)
  To: Chris Ball
  Cc: sameo@linux.intel.com, devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	gregkh@linuxfoundation.org, arnd@arndb.de, oakad@yahoo.com,
	bp@alien8.de

于 2012年11月20日 10:21, Chris Ball 写道:
> Hi,
>
> Sorry to be pedantic, but:
>
> On Mon, Nov 19 2012, wei_wang@realsil.com.cn wrote:
>> For Realtek card reader, internal regsiter SD_CFG2 should be configured
>> before transferring data. In the prior version, the value of this register
>> has been calculated, but forgotten to write back to the internal register.
> With what consequences?  Was the  data transfer failing?  Under which
> circumstances?
>
> Thanks,
>
> - Chris.

Hi Chris:

It's about compatibility issue. The default value of SD_CFG2 is proper 
for writing data. But for reading sequence, the timing is not good 
enough. So in some extreme circumstance,  card reader may sample the 
response data from the card as good even if the data is wrong. And this 
will cause the bad consequence.

Shall I modify the commit and resend the patchset again?

BR,
Wei WANG

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi
  2012-11-20  2:40     ` wwang
@ 2012-11-20  3:09       ` Chris Ball
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Ball @ 2012-11-20  3:09 UTC (permalink / raw)
  To: wwang
  Cc: sameo@linux.intel.com, devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	gregkh@linuxfoundation.org, arnd@arndb.de, oakad@yahoo.com,
	bp@alien8.de

Hi,

On Mon, Nov 19 2012, wwang wrote:
> It's about compatibility issue. The default value of SD_CFG2 is proper
> for writing data. But for reading sequence, the timing is not good
> enough. So in some extreme circumstance,  card reader may sample the
> response data from the card as good even if the data is wrong. And
> this will cause the bad consequence.
>
> Shall I modify the commit and resend the patchset again?

Thanks!  Yes, please resend.

I won't be merging this one because Samuel is merging the initial
patchset, but I'll merge patches for the MMC side after 3.8.  For these:

Acked-by: Chris Ball <cjb@laptop.org>

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-20  3:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-20  2:09 [PATCH v2 0/2] rtsx patch for for-next branch in MFD tree wei_wang
2012-11-20  2:09 ` [PATCH v2 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi wei_wang
2012-11-20  2:21   ` Chris Ball
2012-11-20  2:40     ` wwang
2012-11-20  3:09       ` Chris Ball
2012-11-20  2:09 ` [PATCH v2 2/2] mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c wei_wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox