|
@@ -164,6 +164,7 @@ tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd)
|
|
|
static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
|
|
|
{
|
|
|
struct mmc_data *data = host->data;
|
|
|
+ void *sg_virt;
|
|
|
unsigned short *buf;
|
|
|
unsigned int count;
|
|
|
unsigned long flags;
|
|
@@ -173,8 +174,8 @@ static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- buf = (unsigned short *)(tmio_mmc_kmap_atomic(host, &flags) +
|
|
|
- host->sg_off);
|
|
|
+ sg_virt = tmio_mmc_kmap_atomic(host->sg_ptr, &flags);
|
|
|
+ buf = (unsigned short *)(sg_virt + host->sg_off);
|
|
|
|
|
|
count = host->sg_ptr->length - host->sg_off;
|
|
|
if (count > data->blksz)
|
|
@@ -191,7 +192,7 @@ static void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
|
|
|
|
|
|
host->sg_off += count;
|
|
|
|
|
|
- tmio_mmc_kunmap_atomic(host, &flags);
|
|
|
+ tmio_mmc_kunmap_atomic(sg_virt, &flags);
|
|
|
|
|
|
if (host->sg_off == host->sg_ptr->length)
|
|
|
tmio_mmc_next_sg(host);
|