Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210451
b: refs/heads/master
c: 5600efb
h: refs/heads/master
i:
  210449: 21280c5
  210447: 0509e57
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Linus Torvalds committed Sep 10, 2010
1 parent 359cd95 commit fd17077
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b78d6c5f51935ba89df8db33a57bacb547aa7325
refs/heads/master: 5600efb1bc2745d93ae0bc08130117a84f2b9d69
7 changes: 4 additions & 3 deletions trunk/drivers/mmc/host/tmio_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand All @@ -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);
Expand Down
8 changes: 3 additions & 5 deletions trunk/drivers/mmc/host/tmio_mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,17 @@ static inline int tmio_mmc_next_sg(struct tmio_mmc_host *host)
return --host->sg_len;
}

static inline char *tmio_mmc_kmap_atomic(struct tmio_mmc_host *host,
static inline char *tmio_mmc_kmap_atomic(struct scatterlist *sg,
unsigned long *flags)
{
struct scatterlist *sg = host->sg_ptr;

local_irq_save(*flags);
return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
}

static inline void tmio_mmc_kunmap_atomic(struct tmio_mmc_host *host,
static inline void tmio_mmc_kunmap_atomic(void *virt,
unsigned long *flags)
{
kunmap_atomic(sg_page(host->sg_ptr), KM_BIO_SRC_IRQ);
kunmap_atomic(virt, KM_BIO_SRC_IRQ);
local_irq_restore(*flags);
}

Expand Down

0 comments on commit fd17077

Please sign in to comment.