Re: [RFC] MMC multiwrite capability removal

From: David Brownell
Date: Mon Apr 21 2008 - 15:11:18 EST


On Saturday 19 April 2008, Pierre Ossman wrote:
> 1. Data starts moving from main memory to host memory (DMA or PIO)
> 2. Data finishes moving from main memory to host memory
> 3. A sector moves to the front of the device write queue
> 4. The sector starts being sent over the wire
> 5. The sector finishes being sent over the wire
> 6. The card acknowledges a successful transfer

The mmc_spi driver will report failure at this point, when
the card reports an error.


> 7. The card finishes busy signalling

The mmc_spi driver won't report that a sector has been
successfully written until the card stops BUSY signaling.

It's also possible to report an error at this point, such
as ETIMEDOUT if the card doesn't finish that signaling.


> 8. The sector moves to the front of the card write queue
> 9. The sector gets picked up by the FTL
> 10. The sector is written to media
>
> In a perfect world we would report the number of sectors that made it
> to 10. Unfortunately we have limited insight into what the card is up
> to.
>
> What your host drivers should report is sectors that have passed stage
> 6. If your controller doesn't give you enough information to determine
> that, then you must report 0 for all failed transfers.

Seems like mmc_spi does that. Though having looked at this,
I wonder whether per-driver variations in fault reports on
these paths wouldn't make some trouble...

- Dave

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