Skip to content

Commit

Permalink
wbsd: remove block crc test
Browse files Browse the repository at this point in the history
Block completion interrupts occur faster than we can process
them, so just ignore them competely.

Commit also fixes up some incorrect register defines.

Signed-off-by: Pierre Ossman <[email protected]>
  • Loading branch information
Pierre Ossman committed May 1, 2007
1 parent 976d927 commit 5721dbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 deletions.
32 changes: 1 addition & 31 deletions drivers/mmc/wbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,8 @@ static void wbsd_init_device(struct wbsd_host *host)
ier = 0;
ier |= WBSD_EINT_CARD;
ier |= WBSD_EINT_FIFO_THRE;
ier |= WBSD_EINT_CCRC;
ier |= WBSD_EINT_TIMEOUT;
ier |= WBSD_EINT_CRC;
ier |= WBSD_EINT_TIMEOUT;
ier |= WBSD_EINT_TC;

outb(ier, host->base + WBSD_EIR);
Expand Down Expand Up @@ -1166,30 +1165,6 @@ static void wbsd_tasklet_finish(unsigned long param)
spin_unlock(&host->lock);
}

static void wbsd_tasklet_block(unsigned long param)
{
struct wbsd_host *host = (struct wbsd_host *)param;
struct mmc_data *data;

spin_lock(&host->lock);

if ((wbsd_read_index(host, WBSD_IDX_CRCSTATUS) & WBSD_CRC_MASK) !=
WBSD_CRC_OK) {
data = wbsd_get_data(host);
if (!data)
goto end;

DBGF("CRC error\n");

data->error = MMC_ERR_BADCRC;

tasklet_schedule(&host->finish_tasklet);
}

end:
spin_unlock(&host->lock);
}

/*
* Interrupt handling
*/
Expand Down Expand Up @@ -1220,8 +1195,6 @@ static irqreturn_t wbsd_irq(int irq, void *dev_id)
tasklet_hi_schedule(&host->crc_tasklet);
if (isr & WBSD_INT_TIMEOUT)
tasklet_hi_schedule(&host->timeout_tasklet);
if (isr & WBSD_INT_BUSYEND)
tasklet_hi_schedule(&host->block_tasklet);
if (isr & WBSD_INT_TC)
tasklet_schedule(&host->finish_tasklet);

Expand Down Expand Up @@ -1522,8 +1495,6 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
(unsigned long)host);
tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish,
(unsigned long)host);
tasklet_init(&host->block_tasklet, wbsd_tasklet_block,
(unsigned long)host);

return 0;
}
Expand All @@ -1542,7 +1513,6 @@ static void __devexit wbsd_release_irq(struct wbsd_host *host)
tasklet_kill(&host->crc_tasklet);
tasklet_kill(&host->timeout_tasklet);
tasklet_kill(&host->finish_tasklet);
tasklet_kill(&host->block_tasklet);
}

/*
Expand Down
5 changes: 2 additions & 3 deletions drivers/mmc/wbsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@

#define WBSD_EINT_CARD 0x40
#define WBSD_EINT_FIFO_THRE 0x20
#define WBSD_EINT_CCRC 0x10
#define WBSD_EINT_CRC 0x10
#define WBSD_EINT_TIMEOUT 0x08
#define WBSD_EINT_PROGEND 0x04
#define WBSD_EINT_CRC 0x02
#define WBSD_EINT_BUSYEND 0x02
#define WBSD_EINT_TC 0x01

#define WBSD_INT_PENDING 0x80
Expand Down Expand Up @@ -180,7 +180,6 @@ struct wbsd_host
struct tasklet_struct crc_tasklet;
struct tasklet_struct timeout_tasklet;
struct tasklet_struct finish_tasklet;
struct tasklet_struct block_tasklet;

struct timer_list ignore_timer; /* Ignore detection timer */
};

0 comments on commit 5721dbf

Please sign in to comment.