Message ID | 1304594063-19408-1-git-send-email-linus.walleij@stericsson.com |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 6e27433..e238462 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -753,7 +753,10 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id) if (status & MCI_TXACTIVE) len = mmci_pio_write(host, buffer, remain, status); - sg_miter->consumed = len; + if (len > sg_miter->consumed) + len = sg_miter->consumed; + else + sg_miter->consumed = len; host->size -= len; remain -= len;