From 34cf9e37507c65f7398df4c21a18d4a3e83881d7 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 4 Nov 2005 18:43:39 +0000 Subject: [PATCH 1/3] [MMC] Response to write commands is R1 nor R1b Signed-off-by: Russell King --- drivers/mmc/mmc_block.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 9b629856c735..d91fcf7c3178 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -203,7 +203,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) brq.data.flags |= MMC_DATA_READ; } else { brq.cmd.opcode = MMC_WRITE_BLOCK; - brq.cmd.flags = MMC_RSP_R1B; brq.data.flags |= MMC_DATA_WRITE; brq.data.blocks = 1; } From 25cc5e5bd20e9274dddb9d1e55b83798363528dc Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Sat, 5 Nov 2005 10:16:50 +0000 Subject: [PATCH 2/3] [MMC] Fix chip config in wbsd There is a broken if clause in the wbsd driver that can cause the driver to try and configure the chip even though none is found. This results in i/o on invalid ports. Signed-off-by: Pierre Ossman Signed-off-by: Russell King --- drivers/mmc/wbsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 942668e93a74..ea0c4b3361bf 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c @@ -1852,9 +1852,9 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma, /* * See if chip needs to be configured. */ - if (pnp && (host->config != 0)) + if (pnp) { - if (!wbsd_chip_validate(host)) + if ((host->config != 0) && !wbsd_chip_validate(host)) { printk(KERN_WARNING DRIVER_NAME ": PnP active but chip not configured! " From d191634f7ab3a1c8e9da0c5e986c30b2612f0eb0 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Sat, 5 Nov 2005 10:36:35 +0000 Subject: [PATCH 3/3] [MMC] Use controller id instead of driver name for printks The printks that aren't for debugging should use the name of the controller, not the driver name. Multiple MMC controllers aren't that common today, but this is the right way to do things. Signed-off-by: Pierre Ossman Signed-off-by: Russell King --- drivers/mmc/wbsd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index ea0c4b3361bf..4ff67e7363d9 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c @@ -201,7 +201,7 @@ static void wbsd_reset(struct wbsd_host* host) { u8 setup; - printk(KERN_ERR DRIVER_NAME ": Resetting chip\n"); + printk(KERN_ERR "%s: Resetting chip\n", mmc_hostname(host->mmc)); /* * Soft reset of chip (SD/MMC part). @@ -880,8 +880,9 @@ static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data) */ if (count) { - printk(KERN_ERR DRIVER_NAME ": Incomplete DMA " - "transfer. %d bytes left.\n", count); + printk(KERN_ERR "%s: Incomplete DMA transfer. " + "%d bytes left.\n", + mmc_hostname(host->mmc), count); data->error = MMC_ERR_FAILED; } @@ -1169,8 +1170,8 @@ static void wbsd_tasklet_card(unsigned long param) if (host->mrq) { - printk(KERN_ERR DRIVER_NAME - ": Card removed during transfer!\n"); + printk(KERN_ERR "%s: Card removed during transfer!\n", + mmc_hostname(host->mmc)); wbsd_reset(host); host->mrq->cmd->error = MMC_ERR_FAILED;