* [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value. @ 2008-06-30 23:53 Tomas Winkler 2008-06-30 23:53 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Tomas Winkler 2008-07-01 1:45 ` [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value Marcel Holtmann 0 siblings, 2 replies; 11+ messages in thread From: Tomas Winkler @ 2008-06-30 23:53 UTC (permalink / raw) To: drzeus-list; +Cc: marcel, linux-kernel, Benzi Zbit From: Benzi Zbit <Benzi.Zbit@intel.com> This adds reading and using of enable_timeout from the CIS Signed-off-by: Benzi Zbit <Benzi.Zbit@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> --- drivers/mmc/core/sdio_cis.c | 2 ++ drivers/mmc/core/sdio_io.c | 7 ++----- include/linux/mmc/sdio_func.h | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c index d5e51b1..e3a9797 100644 --- a/drivers/mmc/core/sdio_cis.c +++ b/drivers/mmc/core/sdio_cis.c @@ -129,6 +129,8 @@ static int cistpl_funce_func(struct sdio_func *func, /* TPLFE_MAX_BLK_SIZE */ func->max_blksize = buf[12] | (buf[13] << 8); + /* TPLFE_ENABLE_TIMEOUT_VAL */ + func->enable_timeout = buf[28] | (buf[29] << 8); return 0; } diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c index 625b92c..252c4fd 100644 --- a/drivers/mmc/core/sdio_io.c +++ b/drivers/mmc/core/sdio_io.c @@ -76,11 +76,8 @@ int sdio_enable_func(struct sdio_func *func) if (ret) goto err; - /* - * FIXME: This should timeout based on information in the CIS, - * but we don't have card to parse that yet. - */ - timeout = jiffies + HZ; + /* max enable timeout is in units of 10mS */ + timeout = jiffies + msecs_to_jiffies(func->enable_timeout * 10); while (1) { ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, ®); diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index b050f4d..8de40f1 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h @@ -46,6 +46,7 @@ struct sdio_func { unsigned max_blksize; /* maximum block size */ unsigned cur_blksize; /* current block size */ + unsigned enable_timeout; /* max enable timeout in units of 10mS steps */ unsigned int state; /* function state */ #define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ -- 1.5.4.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable 2008-06-30 23:53 [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value Tomas Winkler @ 2008-06-30 23:53 ` Tomas Winkler 2008-06-30 23:53 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Tomas Winkler ` (2 more replies) 2008-07-01 1:45 ` [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value Marcel Holtmann 1 sibling, 3 replies; 11+ messages in thread From: Tomas Winkler @ 2008-06-30 23:53 UTC (permalink / raw) To: drzeus-list; +Cc: marcel, linux-kernel, Tomas Winkler This patch fix warning :shadowing dma variable and made use of module_param_named instead of module_param Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> --- drivers/mmc/host/wbsd.c | 39 ++++++++++++++++++++------------------- 1 files changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 67e5a9b..9dffe5f 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -68,16 +68,16 @@ static const int unlock_codes[] = { 0x83, 0x87 }; static const int valid_ids[] = { 0x7112, - }; +}; #ifdef CONFIG_PNP -static unsigned int nopnp = 0; +static unsigned int param_nopnp = 0; #else -static const unsigned int nopnp = 1; +static const unsigned int param_nopnp = 1; #endif -static unsigned int io = 0x248; -static unsigned int irq = 6; -static int dma = 2; +static unsigned int param_io = 0x248; +static unsigned int param_irq = 6; +static int param_dma = 2; /* * Basic functions @@ -1765,7 +1765,7 @@ static void __devexit wbsd_shutdown(struct device *dev, int pnp) static int __devinit wbsd_probe(struct platform_device *dev) { /* Use the module parameters for resources */ - return wbsd_init(&dev->dev, io, irq, dma, 0); + return wbsd_init(&dev->dev, param_io, param_irq, param_dma, 0); } static int __devexit wbsd_remove(struct platform_device *dev) @@ -1979,14 +1979,14 @@ static int __init wbsd_drv_init(void) #ifdef CONFIG_PNP - if (!nopnp) { + if (!param_nopnp) { result = pnp_register_driver(&wbsd_pnp_driver); if (result < 0) return result; } #endif /* CONFIG_PNP */ - if (nopnp) { + if (param_nopnp) { result = platform_driver_register(&wbsd_driver); if (result < 0) return result; @@ -2012,12 +2012,12 @@ static void __exit wbsd_drv_exit(void) { #ifdef CONFIG_PNP - if (!nopnp) + if (!param_nopnp) pnp_unregister_driver(&wbsd_pnp_driver); #endif /* CONFIG_PNP */ - if (nopnp) { + if (param_nopnp) { platform_device_unregister(wbsd_device); platform_driver_unregister(&wbsd_driver); @@ -2029,15 +2029,11 @@ static void __exit wbsd_drv_exit(void) module_init(wbsd_drv_init); module_exit(wbsd_drv_exit); #ifdef CONFIG_PNP -module_param(nopnp, uint, 0444); +module_param_named(nopnp, param_nopnp, uint, 0444); #endif -module_param(io, uint, 0444); -module_param(irq, uint, 0444); -module_param(dma, int, 0444); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); -MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver"); +module_param_named(io, param_io, uint, 0444); +module_param_named(irq, param_irq, uint, 0444); +module_param_named(dma, param_dma, int, 0444); #ifdef CONFIG_PNP MODULE_PARM_DESC(nopnp, "Scan for device instead of relying on PNP. (default 0)"); @@ -2045,3 +2041,8 @@ MODULE_PARM_DESC(nopnp, "Scan for device instead of relying on PNP. (default 0)" MODULE_PARM_DESC(io, "I/O base to allocate. Must be 8 byte aligned. (default 0x248)"); MODULE_PARM_DESC(irq, "IRQ to allocate. (default 6)"); MODULE_PARM_DESC(dma, "DMA channel to allocate. -1 for no DMA. (default 2)"); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); +MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver"); + -- 1.5.4.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/5] MMC: fix sdio_io sparse errors 2008-06-30 23:53 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Tomas Winkler @ 2008-06-30 23:53 ` Tomas Winkler 2008-06-30 23:53 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Tomas Winkler 2008-07-01 1:54 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Marcel Holtmann 2008-07-01 1:44 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Marcel Holtmann 2008-07-05 22:38 ` Pierre Ossman 2 siblings, 2 replies; 11+ messages in thread From: Tomas Winkler @ 2008-06-30 23:53 UTC (permalink / raw) To: drzeus-list; +Cc: marcel, linux-kernel, Tomas Winkler This patch fixes sdio_io sparse errors. This fix changes signature of API functions, changing unsigned char -> u8 unsigned short -> u16 unsigned long -> u32 - this was probably a bug in 64 bit platforms Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> --- drivers/mmc/core/sdio_io.c | 43 +++++++++++++++------------------------- include/linux/mmc/sdio_func.h | 33 ++++++++++++++----------------- 2 files changed, 31 insertions(+), 45 deletions(-) mode change 100644 => 100755 drivers/mmc/core/sdio_io.c mode change 100644 => 100755 include/linux/mmc/sdio_func.h diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c old mode 100644 new mode 100755 index 252c4fd..62ebeba --- a/drivers/mmc/core/sdio_io.c +++ b/drivers/mmc/core/sdio_io.c @@ -164,10 +164,8 @@ int sdio_set_block_size(struct sdio_func *func, unsigned blksz) return -EINVAL; if (blksz == 0) { - blksz = min(min( - func->max_blksize, - func->card->host->max_blk_size), - 512u); + blksz = min(func->max_blksize, func->card->host->max_blk_size); + blksz = min(blksz, 512u); } ret = mmc_io_rw_direct(func->card, 1, 0, @@ -183,7 +181,6 @@ int sdio_set_block_size(struct sdio_func *func, unsigned blksz) func->cur_blksize = blksz; return 0; } - EXPORT_SYMBOL_GPL(sdio_set_block_size); /* Split an arbitrarily sized data transfer into several @@ -200,10 +197,9 @@ static int sdio_io_rw_ext_helper(struct sdio_func *func, int write, /* Blocks per command is limited by host count, host transfer * size (we only use a single sg entry) and the maximum for * IO_RW_EXTENDED of 511 blocks. */ - max_blocks = min(min( - func->card->host->max_blk_count, - func->card->host->max_seg_size / func->cur_blksize), - 511u); + max_blocks = min(func->card->host->max_blk_count, + func->card->host->max_seg_size / func->cur_blksize); + max_blocks = min(max_blocks, 511u); while (remainder > func->cur_blksize) { unsigned blocks; @@ -257,11 +253,10 @@ static int sdio_io_rw_ext_helper(struct sdio_func *func, int write, * function. If there is a problem reading the address, 0xff * is returned and @err_ret will contain the error code. */ -unsigned char sdio_readb(struct sdio_func *func, unsigned int addr, - int *err_ret) +u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret) { int ret; - unsigned char val; + u8 val; BUG_ON(!func); @@ -290,8 +285,7 @@ EXPORT_SYMBOL_GPL(sdio_readb); * function. @err_ret will contain the status of the actual * transfer. */ -void sdio_writeb(struct sdio_func *func, unsigned char b, unsigned int addr, - int *err_ret) +void sdio_writeb(struct sdio_func *func, u8 b, unsigned int addr, int *err_ret) { int ret; @@ -352,7 +346,6 @@ int sdio_readsb(struct sdio_func *func, void *dst, unsigned int addr, { return sdio_io_rw_ext_helper(func, 0, addr, 0, dst, count); } - EXPORT_SYMBOL_GPL(sdio_readsb); /** @@ -382,8 +375,7 @@ EXPORT_SYMBOL_GPL(sdio_writesb); * function. If there is a problem reading the address, 0xffff * is returned and @err_ret will contain the error code. */ -unsigned short sdio_readw(struct sdio_func *func, unsigned int addr, - int *err_ret) +u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret) { int ret; @@ -397,7 +389,7 @@ unsigned short sdio_readw(struct sdio_func *func, unsigned int addr, return 0xFFFF; } - return le16_to_cpu(*(u16*)func->tmpbuf); + return le16_to_cpup((__le16 *)func->tmpbuf); } EXPORT_SYMBOL_GPL(sdio_readw); @@ -412,12 +404,11 @@ EXPORT_SYMBOL_GPL(sdio_readw); * function. @err_ret will contain the status of the actual * transfer. */ -void sdio_writew(struct sdio_func *func, unsigned short b, unsigned int addr, - int *err_ret) +void sdio_writew(struct sdio_func *func, u16 b, unsigned int addr, int *err_ret) { int ret; - *(u16*)func->tmpbuf = cpu_to_le16(b); + *(__le16 *)func->tmpbuf = cpu_to_le16(b); ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 2); if (err_ret) @@ -436,8 +427,7 @@ EXPORT_SYMBOL_GPL(sdio_writew); * 0xffffffff is returned and @err_ret will contain the error * code. */ -unsigned long sdio_readl(struct sdio_func *func, unsigned int addr, - int *err_ret) +u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret) { int ret; @@ -451,7 +441,7 @@ unsigned long sdio_readl(struct sdio_func *func, unsigned int addr, return 0xFFFFFFFF; } - return le32_to_cpu(*(u32*)func->tmpbuf); + return le32_to_cpup((__le32 *)func->tmpbuf); } EXPORT_SYMBOL_GPL(sdio_readl); @@ -466,12 +456,11 @@ EXPORT_SYMBOL_GPL(sdio_readl); * function. @err_ret will contain the status of the actual * transfer. */ -void sdio_writel(struct sdio_func *func, unsigned long b, unsigned int addr, - int *err_ret) +void sdio_writel(struct sdio_func *func, u32 b, unsigned int addr, int *err_ret) { int ret; - *(u32*)func->tmpbuf = cpu_to_le32(b); + *(__le32 *)func->tmpbuf = cpu_to_le32(b); ret = sdio_memcpy_toio(func, addr, func->tmpbuf, 4); if (err_ret) diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h old mode 100644 new mode 100755 index 8de40f1..3511607 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h @@ -121,34 +121,31 @@ extern int sdio_set_block_size(struct sdio_func *func, unsigned blksz); extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler); extern int sdio_release_irq(struct sdio_func *func); -extern unsigned char sdio_readb(struct sdio_func *func, - unsigned int addr, int *err_ret); -extern unsigned short sdio_readw(struct sdio_func *func, - unsigned int addr, int *err_ret); -extern unsigned long sdio_readl(struct sdio_func *func, - unsigned int addr, int *err_ret); +extern u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret); +extern u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret); +extern u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret); extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst, - unsigned int addr, int count); + unsigned int addr, int count); extern int sdio_readsb(struct sdio_func *func, void *dst, - unsigned int addr, int count); + unsigned int addr, int count); -extern void sdio_writeb(struct sdio_func *func, unsigned char b, - unsigned int addr, int *err_ret); -extern void sdio_writew(struct sdio_func *func, unsigned short b, - unsigned int addr, int *err_ret); -extern void sdio_writel(struct sdio_func *func, unsigned long b, - unsigned int addr, int *err_ret); +extern void sdio_writeb(struct sdio_func *func, u8 b, + unsigned int addr, int *err_ret); +extern void sdio_writew(struct sdio_func *func, u16 b, + unsigned int addr, int *err_ret); +extern void sdio_writel(struct sdio_func *func, u32 b, + unsigned int addr, int *err_ret); extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, - void *src, int count); + void *src, int count); extern int sdio_writesb(struct sdio_func *func, unsigned int addr, - void *src, int count); + void *src, int count); extern unsigned char sdio_f0_readb(struct sdio_func *func, - unsigned int addr, int *err_ret); + unsigned int addr, int *err_ret); extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b, - unsigned int addr, int *err_ret); + unsigned int addr, int *err_ret); #endif -- 1.5.4.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/5] MMC: fix spares errors of sdhci.c 2008-06-30 23:53 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Tomas Winkler @ 2008-06-30 23:53 ` Tomas Winkler 2008-06-30 23:53 ` [PATCH 5/5] MMC: cleanup endianity conversions Tomas Winkler 2008-07-01 1:47 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Marcel Holtmann 2008-07-01 1:54 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Marcel Holtmann 1 sibling, 2 replies; 11+ messages in thread From: Tomas Winkler @ 2008-06-30 23:53 UTC (permalink / raw) To: drzeus-list; +Cc: marcel, linux-kernel, Tomas Winkler Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> --- drivers/mmc/host/sdhci.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 6441e44..aa268e3 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -386,12 +386,12 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) } if (host->flags & SDHCI_REQ_USE_DMA) { - int count; + int dma_cnt; - count = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, + dma_cnt = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, (data->flags & MMC_DATA_READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); - WARN_ON(count != 1); + WARN_ON(dma_cnt != 1); writel(sg_dma_address(data->sg), host->ioaddr + SDHCI_DMA_ADDRESS); @@ -1224,7 +1224,7 @@ int sdhci_add_host(struct sdhci_host *host) /* XXX: Hack to get MMC layer to avoid highmem */ if (!(host->flags & SDHCI_USE_DMA)) - mmc_dev(host->mmc)->dma_mask = 0; + mmc_dev(host->mmc)->dma_mask = NULL; host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; -- 1.5.4.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 5/5] MMC: cleanup endianity conversions 2008-06-30 23:53 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Tomas Winkler @ 2008-06-30 23:53 ` Tomas Winkler 2008-07-01 1:51 ` Marcel Holtmann 2008-07-01 1:47 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Marcel Holtmann 1 sibling, 1 reply; 11+ messages in thread From: Tomas Winkler @ 2008-06-30 23:53 UTC (permalink / raw) To: drzeus-list; +Cc: marcel, linux-kernel, Tomas Winkler This patch cleans up endianity conversions im mmc core Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> --- drivers/mmc/card/block.c | 5 ++--- drivers/mmc/core/mmc_ops.c | 12 ++++++------ drivers/mmc/core/sd_ops.c | 7 ++++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index f9ad960..4b840de 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -144,7 +144,7 @@ struct mmc_blk_request { static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) { int err; - u32 blocks; + __be32 blocks; struct mmc_request mrq; struct mmc_command cmd; @@ -203,9 +203,8 @@ static u32 mmc_sd_num_wr_blocks(struct mmc_card *card) if (cmd.error || data.error) return (u32)-1; - blocks = ntohl(blocks); - return blocks; + return be32_to_cpu(blocks); } static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index e6703e5..3ad340c 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -271,17 +271,17 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host, int mmc_send_csd(struct mmc_card *card, u32 *csd) { int ret, i; - + __be32 csd_buf[4]; if (!mmc_host_is_spi(card->host)) return mmc_send_cxd_native(card->host, card->rca << 16, csd, MMC_SEND_CSD); - ret = mmc_send_cxd_data(card, card->host, MMC_SEND_CSD, csd, 16); + ret = mmc_send_cxd_data(card, card->host, MMC_SEND_CSD, csd_buf, 16); if (ret) return ret; for (i = 0;i < 4;i++) - csd[i] = be32_to_cpu(csd[i]); + csd[i] = be32_to_cpu(csd_buf[i]); return 0; } @@ -289,7 +289,7 @@ int mmc_send_csd(struct mmc_card *card, u32 *csd) int mmc_send_cid(struct mmc_host *host, u32 *cid) { int ret, i; - + __be32 cid_buf[4]; if (!mmc_host_is_spi(host)) { if (!host->card) return -EINVAL; @@ -297,12 +297,12 @@ int mmc_send_cid(struct mmc_host *host, u32 *cid) cid, MMC_SEND_CID); } - ret = mmc_send_cxd_data(NULL, host, MMC_SEND_CID, cid, 16); + ret = mmc_send_cxd_data(NULL, host, MMC_SEND_CID, cid_buf, 16); if (ret) return ret; for (i = 0;i < 4;i++) - cid[i] = be32_to_cpu(cid[i]); + cid[i] = be32_to_cpu(cid_buf[i]); return 0; } diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index 0d96080..7ef7b6c 100644 --- a/drivers/mmc/core/sd_ops.c +++ b/drivers/mmc/core/sd_ops.c @@ -254,6 +254,7 @@ int mmc_app_send_scr(struct mmc_card *card, u32 *scr) struct mmc_command cmd; struct mmc_data data; struct scatterlist sg; + __be32 scr_buf[2]; BUG_ON(!card); BUG_ON(!card->host); @@ -282,7 +283,7 @@ int mmc_app_send_scr(struct mmc_card *card, u32 *scr) data.sg = &sg; data.sg_len = 1; - sg_init_one(&sg, scr, 8); + sg_init_one(&sg, scr_buf, 8); mmc_set_data_timeout(&data, card); @@ -293,8 +294,8 @@ int mmc_app_send_scr(struct mmc_card *card, u32 *scr) if (data.error) return data.error; - scr[0] = be32_to_cpu(scr[0]); - scr[1] = be32_to_cpu(scr[1]); + scr[0] = be32_to_cpu(scr_buf[0]); + scr[1] = be32_to_cpu(scr_buf[1]); return 0; } -- 1.5.4.1 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] MMC: cleanup endianity conversions 2008-06-30 23:53 ` [PATCH 5/5] MMC: cleanup endianity conversions Tomas Winkler @ 2008-07-01 1:51 ` Marcel Holtmann 0 siblings, 0 replies; 11+ messages in thread From: Marcel Holtmann @ 2008-07-01 1:51 UTC (permalink / raw) To: Tomas Winkler; +Cc: drzeus-list, linux-kernel Hi Tomas, > static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) > diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c > index e6703e5..3ad340c 100644 > --- a/drivers/mmc/core/mmc_ops.c > +++ b/drivers/mmc/core/mmc_ops.c > @@ -271,17 +271,17 @@ mmc_send_cxd_data(struct mmc_card *card, struct mmc_host *host, > int mmc_send_csd(struct mmc_card *card, u32 *csd) > { > int ret, i; > - > + __be32 csd_buf[4]; > if (!mmc_host_is_spi(card->host)) > return mmc_send_cxd_native(card->host, card->rca << 16, > csd, MMC_SEND_CSD); what is up with this empty line removal. I would keep the empty line after the variable declaration. > for (i = 0;i < 4;i++) > - csd[i] = be32_to_cpu(csd[i]); > + csd[i] = be32_to_cpu(csd_buf[i]); While you are at it. Add the missing whitespace in the for statement :) Otherwise, looks good to me. Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/5] MMC: fix spares errors of sdhci.c 2008-06-30 23:53 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Tomas Winkler 2008-06-30 23:53 ` [PATCH 5/5] MMC: cleanup endianity conversions Tomas Winkler @ 2008-07-01 1:47 ` Marcel Holtmann 1 sibling, 0 replies; 11+ messages in thread From: Marcel Holtmann @ 2008-07-01 1:47 UTC (permalink / raw) To: Tomas Winkler; +Cc: drzeus-list, linux-kernel Hi Tomas, > if (host->flags & SDHCI_REQ_USE_DMA) { > - int count; > + int dma_cnt; > > - count = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, > + dma_cnt = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, > (data->flags & MMC_DATA_READ) ? > DMA_FROM_DEVICE : DMA_TO_DEVICE); > - WARN_ON(count != 1); > + WARN_ON(dma_cnt != 1); can you include what sparse error this is trying to fix. From the patch itself, I can't see it. Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/5] MMC: fix sdio_io sparse errors 2008-06-30 23:53 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Tomas Winkler 2008-06-30 23:53 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Tomas Winkler @ 2008-07-01 1:54 ` Marcel Holtmann 1 sibling, 0 replies; 11+ messages in thread From: Marcel Holtmann @ 2008-07-01 1:54 UTC (permalink / raw) To: Tomas Winkler; +Cc: drzeus-list, linux-kernel Hi Tomas, > if (blksz == 0) { > - blksz = min(min( > - func->max_blksize, > - func->card->host->max_blk_size), > - 512u); > + blksz = min(func->max_blksize, func->card->host->max_blk_size); > + blksz = min(blksz, 512u); > } I agree that your version is more readable, but I would be still interested in which sparse error this fixes. Other than that the patch looks good. Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable 2008-06-30 23:53 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Tomas Winkler 2008-06-30 23:53 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Tomas Winkler @ 2008-07-01 1:44 ` Marcel Holtmann 2008-07-05 22:38 ` Pierre Ossman 2 siblings, 0 replies; 11+ messages in thread From: Marcel Holtmann @ 2008-07-01 1:44 UTC (permalink / raw) To: Tomas Winkler; +Cc: drzeus-list, linux-kernel Hi Tomas, > This patch fix warning :shadowing dma variable > and made use of module_param_named instead of module_param > > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> looks good to me. Acked-by: Marcel Holtmann <marcel@holtmann.org> Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable 2008-06-30 23:53 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Tomas Winkler 2008-06-30 23:53 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Tomas Winkler 2008-07-01 1:44 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Marcel Holtmann @ 2008-07-05 22:38 ` Pierre Ossman 2 siblings, 0 replies; 11+ messages in thread From: Pierre Ossman @ 2008-07-05 22:38 UTC (permalink / raw) To: Tomas Winkler; +Cc: marcel, linux-kernel, Tomas Winkler [-- Attachment #1: Type: text/plain, Size: 699 bytes --] On Tue, 1 Jul 2008 02:53:01 +0300 Tomas Winkler <tomas.winkler@intel.com> wrote: > This patch fix warning :shadowing dma variable > and made use of module_param_named instead of module_param > > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> > --- Ooops. It should of course been this I applied. Redone with the right patch. :) -- -- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org rdesktop, core developer http://www.rdesktop.org WARNING: This correspondence is being monitored by the Swedish government. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value. 2008-06-30 23:53 [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value Tomas Winkler 2008-06-30 23:53 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Tomas Winkler @ 2008-07-01 1:45 ` Marcel Holtmann 1 sibling, 0 replies; 11+ messages in thread From: Marcel Holtmann @ 2008-07-01 1:45 UTC (permalink / raw) To: Tomas Winkler; +Cc: drzeus-list, linux-kernel, Benzi Zbit Hi Tomas, > This adds reading and using of enable_timeout from the CIS > > Signed-off-by: Benzi Zbit <Benzi.Zbit@intel.com> > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> looks good. Acked-by: Marcel Holtmann <marcel@holtmann.org> Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-07-05 22:38 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-06-30 23:53 [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value Tomas Winkler 2008-06-30 23:53 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Tomas Winkler 2008-06-30 23:53 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Tomas Winkler 2008-06-30 23:53 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Tomas Winkler 2008-06-30 23:53 ` [PATCH 5/5] MMC: cleanup endianity conversions Tomas Winkler 2008-07-01 1:51 ` Marcel Holtmann 2008-07-01 1:47 ` [PATCH 4/5] MMC: fix spares errors of sdhci.c Marcel Holtmann 2008-07-01 1:54 ` [PATCH 3/5] MMC: fix sdio_io sparse errors Marcel Holtmann 2008-07-01 1:44 ` [PATCH 2/5 V2] MMC: wbsd.c fix shadowing of 'dma' variable Marcel Holtmann 2008-07-05 22:38 ` Pierre Ossman 2008-07-01 1:45 ` [PATCH 1/5 V2] MMC: core - fix the use of hard coded timeout value Marcel Holtmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome