Commit a727fea9 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  tifm_sd: treat "status error" as normal command completion
  mmc: wbsd: Remove stray kunmap_atomic()
  mmc: sdhci: Stop asking for mail
  mmc: sdhci: Remove driver version
  mmc: wbsd: Remove driver version
parents cb18eccf 12c83452
...@@ -22,9 +22,6 @@ ...@@ -22,9 +22,6 @@
#include "sdhci.h" #include "sdhci.h"
#define DRIVER_NAME "sdhci" #define DRIVER_NAME "sdhci"
#define DRIVER_VERSION "0.12"
#define BUGMAIL "<sdhci-devel@list.drzeus.cx>"
#define DBG(f, x...) \ #define DBG(f, x...) \
pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x)
...@@ -154,8 +151,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) ...@@ -154,8 +151,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
/* hw clears the bit when it's done */ /* hw clears the bit when it's done */
while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) { while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) {
if (timeout == 0) { if (timeout == 0) {
printk(KERN_ERR "%s: Reset 0x%x never completed. " printk(KERN_ERR "%s: Reset 0x%x never completed.\n",
"Please report this to " BUGMAIL ".\n",
mmc_hostname(host->mmc), (int)mask); mmc_hostname(host->mmc), (int)mask);
sdhci_dumpregs(host); sdhci_dumpregs(host);
return; return;
...@@ -474,12 +470,11 @@ static void sdhci_finish_data(struct sdhci_host *host) ...@@ -474,12 +470,11 @@ static void sdhci_finish_data(struct sdhci_host *host)
if ((data->error == MMC_ERR_NONE) && blocks) { if ((data->error == MMC_ERR_NONE) && blocks) {
printk(KERN_ERR "%s: Controller signalled completion even " printk(KERN_ERR "%s: Controller signalled completion even "
"though there were blocks left. Please report this " "though there were blocks left.\n",
"to " BUGMAIL ".\n", mmc_hostname(host->mmc)); mmc_hostname(host->mmc));
data->error = MMC_ERR_FAILED; data->error = MMC_ERR_FAILED;
} else if (host->size != 0) { } else if (host->size != 0) {
printk(KERN_ERR "%s: %d bytes were left untransferred. " printk(KERN_ERR "%s: %d bytes were left untransferred.\n",
"Please report this to " BUGMAIL ".\n",
mmc_hostname(host->mmc), host->size); mmc_hostname(host->mmc), host->size);
data->error = MMC_ERR_FAILED; data->error = MMC_ERR_FAILED;
} }
...@@ -526,8 +521,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) ...@@ -526,8 +521,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) {
if (timeout == 0) { if (timeout == 0) {
printk(KERN_ERR "%s: Controller never released " printk(KERN_ERR "%s: Controller never released "
"inhibit bit(s). Please report this to " "inhibit bit(s).\n", mmc_hostname(host->mmc));
BUGMAIL ".\n", mmc_hostname(host->mmc));
sdhci_dumpregs(host); sdhci_dumpregs(host);
cmd->error = MMC_ERR_FAILED; cmd->error = MMC_ERR_FAILED;
tasklet_schedule(&host->finish_tasklet); tasklet_schedule(&host->finish_tasklet);
...@@ -548,8 +542,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) ...@@ -548,8 +542,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
sdhci_set_transfer_mode(host, cmd->data); sdhci_set_transfer_mode(host, cmd->data);
if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) {
printk(KERN_ERR "%s: Unsupported response type! " printk(KERN_ERR "%s: Unsupported response type!\n",
"Please report this to " BUGMAIL ".\n",
mmc_hostname(host->mmc)); mmc_hostname(host->mmc));
cmd->error = MMC_ERR_INVALID; cmd->error = MMC_ERR_INVALID;
tasklet_schedule(&host->finish_tasklet); tasklet_schedule(&host->finish_tasklet);
...@@ -647,9 +640,8 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) ...@@ -647,9 +640,8 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
while (!((clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL)) while (!((clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL))
& SDHCI_CLOCK_INT_STABLE)) { & SDHCI_CLOCK_INT_STABLE)) {
if (timeout == 0) { if (timeout == 0) {
printk(KERN_ERR "%s: Internal clock never stabilised. " printk(KERN_ERR "%s: Internal clock never "
"Please report this to " BUGMAIL ".\n", "stabilised.\n", mmc_hostname(host->mmc));
mmc_hostname(host->mmc));
sdhci_dumpregs(host); sdhci_dumpregs(host);
return; return;
} }
...@@ -899,9 +891,8 @@ static void sdhci_timeout_timer(unsigned long data) ...@@ -899,9 +891,8 @@ static void sdhci_timeout_timer(unsigned long data)
spin_lock_irqsave(&host->lock, flags); spin_lock_irqsave(&host->lock, flags);
if (host->mrq) { if (host->mrq) {
printk(KERN_ERR "%s: Timeout waiting for hardware interrupt. " printk(KERN_ERR "%s: Timeout waiting for hardware "
"Please report this to " BUGMAIL ".\n", "interrupt.\n", mmc_hostname(host->mmc));
mmc_hostname(host->mmc));
sdhci_dumpregs(host); sdhci_dumpregs(host);
if (host->data) { if (host->data) {
...@@ -935,8 +926,6 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) ...@@ -935,8 +926,6 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
printk(KERN_ERR "%s: Got command interrupt even though no " printk(KERN_ERR "%s: Got command interrupt even though no "
"command operation was in progress.\n", "command operation was in progress.\n",
mmc_hostname(host->mmc)); mmc_hostname(host->mmc));
printk(KERN_ERR "%s: Please report this to " BUGMAIL ".\n",
mmc_hostname(host->mmc));
sdhci_dumpregs(host); sdhci_dumpregs(host);
return; return;
} }
...@@ -972,8 +961,6 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) ...@@ -972,8 +961,6 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
printk(KERN_ERR "%s: Got data interrupt even though no " printk(KERN_ERR "%s: Got data interrupt even though no "
"data operation was in progress.\n", "data operation was in progress.\n",
mmc_hostname(host->mmc)); mmc_hostname(host->mmc));
printk(KERN_ERR "%s: Please report this to " BUGMAIL ".\n",
mmc_hostname(host->mmc));
sdhci_dumpregs(host); sdhci_dumpregs(host);
return; return;
...@@ -1045,8 +1032,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) ...@@ -1045,8 +1032,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
intmask &= SDHCI_INT_BUS_POWER; intmask &= SDHCI_INT_BUS_POWER;
if (intmask) { if (intmask) {
printk(KERN_ERR "%s: Unexpected interrupt 0x%08x. Please " printk(KERN_ERR "%s: Unexpected interrupt 0x%08x.\n",
"report this to " BUGMAIL ".\n",
mmc_hostname(host->mmc), intmask); mmc_hostname(host->mmc), intmask);
sdhci_dumpregs(host); sdhci_dumpregs(host);
...@@ -1528,8 +1514,7 @@ static struct pci_driver sdhci_driver = { ...@@ -1528,8 +1514,7 @@ static struct pci_driver sdhci_driver = {
static int __init sdhci_drv_init(void) static int __init sdhci_drv_init(void)
{ {
printk(KERN_INFO DRIVER_NAME printk(KERN_INFO DRIVER_NAME
": Secure Digital Host Controller Interface driver, " ": Secure Digital Host Controller Interface driver\n");
DRIVER_VERSION "\n");
printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n"); printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n");
return pci_register_driver(&sdhci_driver); return pci_register_driver(&sdhci_driver);
...@@ -1551,7 +1536,6 @@ module_param(debug_quirks, uint, 0444); ...@@ -1551,7 +1536,6 @@ module_param(debug_quirks, uint, 0444);
MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver");
MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)"); MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)");
......
...@@ -36,8 +36,8 @@ module_param(fixed_timeout, bool, 0644); ...@@ -36,8 +36,8 @@ module_param(fixed_timeout, bool, 0644);
#define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */ #define TIFM_MMCSD_INAB 0x0080 /* abort / initialize command */
#define TIFM_MMCSD_READ 0x8000 #define TIFM_MMCSD_READ 0x8000
#define TIFM_MMCSD_DATAMASK 0x001d /* set bits: EOFB, BRS, CB, EOC */ #define TIFM_MMCSD_DATAMASK 0x401d /* set bits: CERR, EOFB, BRS, CB, EOC */
#define TIFM_MMCSD_ERRMASK 0x41e0 /* set bits: CERR, CCRC, CTO, DCRC, DTO */ #define TIFM_MMCSD_ERRMASK 0x01e0 /* set bits: CCRC, CTO, DCRC, DTO */
#define TIFM_MMCSD_EOC 0x0001 /* end of command phase */ #define TIFM_MMCSD_EOC 0x0001 /* end of command phase */
#define TIFM_MMCSD_CB 0x0004 /* card enter busy state */ #define TIFM_MMCSD_CB 0x0004 /* card enter busy state */
#define TIFM_MMCSD_BRS 0x0008 /* block received/sent */ #define TIFM_MMCSD_BRS 0x0008 /* block received/sent */
...@@ -242,7 +242,7 @@ change_state: ...@@ -242,7 +242,7 @@ change_state:
case IDLE: case IDLE:
return; return;
case CMD: case CMD:
if (host_status & TIFM_MMCSD_EOC) { if (host_status & (TIFM_MMCSD_EOC | TIFM_MMCSD_CERR)) {
tifm_sd_fetch_resp(cmd, sock); tifm_sd_fetch_resp(cmd, sock);
if (cmd->data) { if (cmd->data) {
host->state = BRS; host->state = BRS;
...@@ -341,10 +341,7 @@ static void tifm_sd_signal_irq(struct tifm_dev *sock, ...@@ -341,10 +341,7 @@ static void tifm_sd_signal_irq(struct tifm_dev *sock,
goto done; goto done;
if (host_status & TIFM_MMCSD_ERRMASK) { if (host_status & TIFM_MMCSD_ERRMASK) {
if (host_status & TIFM_MMCSD_CERR) if (host_status & (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO))
error_code = MMC_ERR_FAILED;
else if (host_status
& (TIFM_MMCSD_CTO | TIFM_MMCSD_DTO))
error_code = MMC_ERR_TIMEOUT; error_code = MMC_ERR_TIMEOUT;
else if (host_status else if (host_status
& (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC)) & (TIFM_MMCSD_CCRC | TIFM_MMCSD_DCRC))
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include "wbsd.h" #include "wbsd.h"
#define DRIVER_NAME "wbsd" #define DRIVER_NAME "wbsd"
#define DRIVER_VERSION "1.6"
#define DBG(x...) \ #define DBG(x...) \
pr_debug(DRIVER_NAME ": " x) pr_debug(DRIVER_NAME ": " x)
...@@ -344,7 +343,6 @@ static inline void wbsd_dma_to_sg(struct wbsd_host *host, struct mmc_data *data) ...@@ -344,7 +343,6 @@ static inline void wbsd_dma_to_sg(struct wbsd_host *host, struct mmc_data *data)
memcpy(sgbuf, dmabuf, size); memcpy(sgbuf, dmabuf, size);
else else
memcpy(sgbuf, dmabuf, sg[i].length); memcpy(sgbuf, dmabuf, sg[i].length);
kunmap_atomic(sgbuf, KM_BIO_SRC_IRQ);
dmabuf += sg[i].length; dmabuf += sg[i].length;
if (size < sg[i].length) if (size < sg[i].length)
...@@ -2101,8 +2099,7 @@ static int __init wbsd_drv_init(void) ...@@ -2101,8 +2099,7 @@ static int __init wbsd_drv_init(void)
int result; int result;
printk(KERN_INFO DRIVER_NAME printk(KERN_INFO DRIVER_NAME
": Winbond W83L51xD SD/MMC card interface driver, " ": Winbond W83L51xD SD/MMC card interface driver\n");
DRIVER_VERSION "\n");
printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n"); printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n");
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
...@@ -2166,7 +2163,6 @@ module_param(dma, int, 0444); ...@@ -2166,7 +2163,6 @@ module_param(dma, int, 0444);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver"); MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver");
MODULE_VERSION(DRIVER_VERSION);
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
MODULE_PARM_DESC(nopnp, "Scan for device instead of relying on PNP. (default 0)"); MODULE_PARM_DESC(nopnp, "Scan for device instead of relying on PNP. (default 0)");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment