Re: [PATCH 09/10] mmc: mmci: Handle CMD irq before DATA irq

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

 



On Wed, Jan 22, 2014 at 04:00:23PM +0100, Ulf Hansson wrote:
> In case of a read operation both MCI_CMDRESPEND and MCI_DATAEND can be
> set in the status register when entering the interrupt handler. This is
> due to that the card start sending data before the host has
> acknowledged the command response.
> 
> To resolve the issue for this scenario, we must start by handling the
> CMD irq instead of the DATA irq. The reason is beacuse the completion
> of the DATA irq will not respect the current command and then causing
> it to be garbled.

And that's because the driver isn't written to be able to handle a
command being issued concurrently with a data transfer, because it
only has one place to store the current command.

Consider what happens in this case:

- Command issued to start a transfer.
- Command completes, data transfer starts.
- New command comes along to be issued, and is in progress
- Data transfer finishes, we now issue the stop command to halt the
  transfer
- We overwrite the new command with the stop command

All hell breaks loose.  No, this isn't a fix I want to see until the
driver can properly handle concurrent commands.

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".
--
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