lkml.org 
[lkml]   [2008]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] MMC: DATA_CARRY is not boolean in tifm_sd_transfer_data() (was: MMC: logical-bitwise and confusion in tifm_sd_transfer_data()?)
Alex Dubov wrote:
> --- Pierre Ossman <drzeus-mmc@drzeus.cx> wrote:
>
>> On Sun, 09 Mar 2008 21:31:08 +0100
>> Roel Kluin <12o3l@tiscali.nl> wrote:
>>
>>> from drivers/mmc/host/tifm_sd.c:183:
>>>
>>> if ((r_data->flags & MMC_DATA_WRITE)
>>> && DATA_CARRY)
>>>
>>> shouldn't this be bit-wise &?
>> First off, I'm not the maintainer of that driver, Alex Dubov is.
>>
>> Second, the code seems broken, but not in the way you suggest. It should probably have been:
>>
>> if ((r_data->flags & MMC_DATA_WRITE)
>> && (host->cmd_flags & DATA_CARRY))
>>
>
> Yes, this is the intended meaning. Can you fix it yourself or should I send a separate patch?

Thanks,
---
DATA_CARRY is not boolean

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c
index 20d5c7b..1c14a18 100644
--- a/drivers/mmc/host/tifm_sd.c
+++ b/drivers/mmc/host/tifm_sd.c
@@ -180,7 +180,7 @@ static void tifm_sd_transfer_data(struct tifm_sd *host)
host->sg_pos++;
if (host->sg_pos == host->sg_len) {
if ((r_data->flags & MMC_DATA_WRITE)
- && DATA_CARRY)
+ && (host->cmd_flags & DATA_CARRY))
writel(host->bounce_buf_data[0],
host->dev->addr
+ SOCK_MMCSD_DATA);

\
 
 \ /
  Last update: 2008-03-11 09:03    [W:0.041 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site