Re: [PATCH] tmio_mmc: Prevents unexpected status clear

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew

Thank you for your comment.

>>  #define ack_mmc_irqs(host, i) \
>>  	do { \
>> -		u32 mask;\
>> -		mask  = sd_ctrl_read32((host), CTL_STATUS); \
>> -		mask &= ~((i) & TMIO_MASK_IRQ); \
>> -		sd_ctrl_write32((host), CTL_STATUS, mask); \
>> +		sd_ctrl_write32((host), CTL_STATUS, ~(i)); \
>>  	} while (0)
> 
> Can we have a better changelog please?
> 
> What was wrong with the old code?
> 
> How does the patch fix it?
> 
> What are the user-visible runtime effects of the bug?
> 
> (It looks like that was a pretty gross bug - how did it pass testing??)
Example
 - CMD53(Single block read / Received data size : 64Byte)

 1) Send CMD53
 2) Receive "CMD53 response"
 3) Call tmio_mmc_cmd_irq(host, status);
-- original code ----------------------------------------------------
 #define ack_mmc_irqs(host, i) \
	do { \
		u32 mask;\
		mask  = sd_ctrl_read32((host), CTL_STATUS); \
	< case 1 >
		mask &= ~((i) & TMIO_MASK_IRQ); \
	< case 2 >
		sd_ctrl_write32((host), CTL_STATUS, mask); \
	} while (0)
---------------------------------------------------------------------

TMIO_STAT_RXRDY status will be cleared by "sd_ctrl_write32((host), CTL_STATUS, mask);"
if TMIO_STAT_RXRDY becomes effective between "< case 1 >" and "< case 2 >".

This causes the phenomenon that a TMIO_STAT_RXRDY interrupt does not occur.
When received data are small, it rarely occurs.


Thanks,
Goda

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux