On Wed, Aug 12, 2015 at 02:00:51PM +0300, Dan Carpenter wrote:
> Hello Michał Mirosław,
>
> The patch 5f5bac8272be: "mmc: Driver for CB710/720 memory card reader
> (MMC part)" from May 22, 2009, leads to the following static checker
> warning:
>
> d
you could move cb710_mmc_suspend() (or whatever you'll call it) to one
ifdef block with cb710_mmc_dev_pm_ops.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at htt
> use of the deprecated APIs.
>
> Cc: Michał Mirosław
> Signed-off-by: Ulf Hansson
Patch looks consistent with commit message. I can't test it on HW, though.
Acked-by: Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a me
platform_set_drvdata(pdev, mmc);
>
> /* harmless (maybe) magic */
> pci_read_config_dword(chip->pdev, 0x48, &val);
You missed the counterpart - cb710_slot_to_mmc() in cb710-mmc.h.
After the fix:
Acked-by: Michał Mirosław
[for cb710]
Best Regards,
Michał Mirosław
--
To uns
Reported-by: Julia Lawall
Signed-off-by: Michał Mirosław
---
drivers/misc/cb710/core.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
index efec413..68cd05b 100644
--- a/drivers/misc/cb710/core.c
+++ b/drivers
_buffer(struct
> sg_mapping_iter *miter)
>
> static inline bool needs_unaligned_copy(const void *ptr)
> {
> -#ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS
> +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
> return false;
> #else
> return ((ptr - NULL) & 3) != 0;
A
sdio_enable_hs() routine too.
Hi,
You sent similar problem report some time ago. I assumed you will follow
on with a patch fixing mmc_card_sd() and friends (the functions you point
out in this mail should use that).
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the lin
On Wed, May 04, 2011 at 10:06:20PM +0530, Prashanth Bhat wrote:
> On Wednesday 04 May 2011 04:53 PM, Michał Mirosław wrote:
> >On Tue, May 03, 2011 at 05:00:03PM +0530, Prashanth Bhat wrote:
> >>To be more specific, I would think that the code change required in
> >>
n sdio_release_irq():
card->sdio_irq_func = NULL;
card->func->irq_handler = ...
sdio_card_irq_put();
if (host->sdio_irqs == 1)
sdio_single_irq_set(func->card);
in struct mmc_card:
struct sdio_func *sdio_irq_func;
Best Regards,
Michał Mirosław
--
To unsub
e == MMC_TYPE_SD_COMBO)
You can actually use (c->type & MMC_TYPE_SD) and (c->type & MMC_TYPE_SDIO).
Unless there will be more types of SD cards (unlikely) this way
will generate less code on average.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "uns
W dniu 21 kwietnia 2011 14:39 użytkownik Arnd Bergmann napisał:
> On Thursday 21 April 2011, Michał Mirosław wrote:
>> W dniu 21 kwietnia 2011 13:15 użytkownik Arnd Bergmann
>> napisał:
>
>> static int mmc_blk_compat_ioctl(struct block_device *bdev, fmode_t mode,
W dniu 21 kwietnia 2011 13:15 użytkownik Arnd Bergmann napisał:
> On Thursday 21 April 2011, Michał Mirosław wrote:
>> Subject: Re: [PATCH v4] mmc: Add ioctl to let userspace apps send ACMDs
>> Date: Wed, 13 Apr 2011 01:00:39 +0200
>> Message-Id: <201104130100.39810.a..
W dniu 21 kwietnia 2011 07:11 użytkownik Arnd Bergmann napisał:
> On Wednesday 20 April 2011 21:46:04 Michał Mirosław wrote:
>> 2011/4/20 Arnd Bergmann :
>> > No, please don't try to invent random new ways of doing this.
>> > Your example relies on the assumption t
2011/4/20 Arnd Bergmann :
> On Wednesday 20 April 2011 21:06:49 John Calixto wrote:
>> On Wed, 20 Apr 2011, Michał Mirosław wrote:
>> > Hmm. This might be even better:
>> >
>> > static int mmc_blk_ioctl(struct block_device *bdev, fmode_t mode,
>
W dniu 20 kwietnia 2011 19:31 użytkownik Michał Mirosław
napisał:
> 2011/4/14 John Calixto :
> [...]
>
>> + /* DAT buffer */
>> + __u32 data_ptr_size; /* size of the *pointer* */
>> + __u64 data_ptr;
>
> So... again... What's the problem w
W dniu 20 kwietnia 2011 19:38 użytkownik John Calixto
napisał:
> Hi Michal,
>
> On Wed, 20 Apr 2011, Michał Mirosław wrote:
>>
>> So... again... What's the problem with anonymous union of pointer and u64?
>>
>
> As Arnd pointed out, this would not wor
a_ptr = compat_ptr(*(__u32 *)&blk.data_ptr);
return mmc_blk_ioctl_cmd(bdev, &blk);
}
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
unsigned int cmd_timeout_ms;
> + __u64 data_ptr; /* DAT buffer */
This will be more natural if you have an anonymous union here:
union {
__u64 data_ptr_l;
void *data_ptr;
};
> +};
> +#define MMC_IOC_ACMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd)
> +#endif /* _MMC_IO
Fixes a cosmetic bug that affects printk() for SD-combo cards.
Noticed-by: Prashanth Bhat
Signed-off-by: Michał Mirosław
---
drivers/mmc/core/bus.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 63667a8..d6d62fd
W dniu 6 kwietnia 2011 19:37 użytkownik John Calixto
napisał:
> On Wed, 6 Apr 2011, Michał Mirosław wrote:
>> 2011/4/5 John Calixto :
>> > +#ifdef CONFIG_COMPAT
>> > +struct sd_ioc_cmd32 {
>> > + u32 write_flag;
>> > + u32 opcode;
>
device (or even implements
application specific API).
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
t; + if (cmd == SD_IOC_ACMD)
> + ret = mmc_blk_ioctl_acmd(bdev, (struct sd_ioc_cmd __user
> *)arg);
> + mutex_unlock(&block_mutex);
> + return ret;
> +}
> +
> +#ifdef CONFIG_COMPAT
> +struct sd_ioc_cmd32 {
> + u32 write_flag;
&g
W dniu 22 marca 2011 23:31 użytkownik John Calixto
napisał:
> On Tue, 22 Mar 2011, Michał Mirosław wrote:
>> >> It is not that unusual on "normal systems" to give write access to
>> >> some partition or device to unprivileged users. Database volumes are
&g
W dniu 21 marca 2011 19:37 użytkownik John Calixto
napisał:
> On Sat, 19 Mar 2011, Michał Mirosław wrote:
>> W dniu 18 marca 2011 20:26 użytkownik Arnd Bergmann napisał:
>> > On Friday 18 March 2011 18:56:53 Michał Mirosław wrote:
>> >> If that's going
claiming the host myself and you'll have a head start! :)
This idea is scary. ;-) Just think what would happen if userspace made
this sequence:
1. fd = open(dev)
2. ioctl(fd, claim host)
3. read(fd, ...)
(if 3. is not convincing, replace it with any access to mounted
filesystem from the same card.)
W dniu 18 marca 2011 20:26 użytkownik Arnd Bergmann napisał:
> On Friday 18 March 2011 18:56:53 Michał Mirosław wrote:
>> If that's going to be used by possibly unprivileged userspace process,
>> then this passthrough should filter and validate all commands it
>> passes
to be used by possibly unprivileged userspace process,
then this passthrough should filter and validate all commands it
passes to hardware. If there is a possibility of some command sequence
to generate undefined or otherwise unwanted results, then you need
state tracker that will disallow t
d cb710_mmc_set_transfer_size(struct cb710_slot *slot,
This patch is good. This part is not completely demystified though, and some
parts of the code don't care about this function's return value.
Acked-by: Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
's in undefined state, so a reset is
the only way to get it back to known state. Since in SD/MMC there's no
reset signal - only power cycle can reset the card.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a
@@ -317,5 +317,10 @@ static inline int mmc_card_is_removable(struct mmc_host
> *host)
> return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable;
> }
>
> +static inline int mmc_card_is_powered_resumed(struct mmc_host *host)
> +{
> + return host->pm_flags & MMC_PM_KEEP_POWER;
> +}
> +
> #endif
>
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
out */
> #define SRBSYTO_29 ((1 << 11) | (1 << 10) | \
> (1 << 9) | (1 << 8)) /* resp busy timeout */
[...]
Maybe zero is a valid value here meaning CLKDIV = 2.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
tristate "ENE CB710 MMC/SD Interface support"
> depends on PCI
> + select MISC_DEVICES
> select CB710_CORE
> help
> This option enables support for MMC/SD part of ENE CB710/720 Flash
Acked-by: Michał Mirosław
It would be better, thoughm if
Is this really necessary? MISC_DEVICES is only a submenu enabler, not
a real dependency.
Maybe just select MISC_DEVICES instead? User/developer should not have
to know that for this specific MMC controller he has to first enable some
other device burried somewhere in the config tree.
Best Regards,
Michał M
Signed-off-by: Michał Mirosław
---
drivers/mmc/host/cb710-mmc.c |2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 2299afc..66b4ce5 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710
This series consists of some updates for CB710 MMC host driver.
Michał Mirosław (5):
mmc: cb710: partially demystify clock selection
mmc: cb710: implement get_cd() callback
mmc: cb710: remove unnecessary msleep()
mmc: cb710: clear irq handler on init() error path
mmc: cb710: remove
Signed-off-by: Michał Mirosław
---
drivers/mmc/host/cb710-mmc.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 7a176b4..5374b6b 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
Signed-off-by: Michał Mirosław
---
drivers/mmc/host/cb710-mmc.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 5374b6b..2299afc 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
Clock divider selection in partially verified, so document known facts
in code.
Signed-off-by: Michał Mirosław
---
drivers/mmc/host/cb710-mmc.c | 19 ---
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
Signed-off-by: Michał Mirosław
---
drivers/mmc/host/cb710-mmc.c | 33 +
1 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index ad61c4c..7a176b4 100644
--- a/drivers/mmc/host/cb710-mmc.c
W dniu 15 września 2010 10:25 użytkownik Russell King - ARM Linux
napisał:
> On Mon, Sep 06, 2010 at 09:42:41PM +0200, Michał Mirosław wrote:
>> W dniu 6 września 2010 14:07 użytkownik Russell King - ARM Linux
>> napisał:
>> > On Sat, Sep 04, 2010 at 02:23:19PM +020
W dniu 6 września 2010 14:07 użytkownik Russell King - ARM Linux
napisał:
> On Sat, Sep 04, 2010 at 02:23:19PM +0200, Michał Mirosław wrote:
>> 2010/9/1 Ohad Ben-Cohen :
>> > Add a simple mechanism to pass platform data to the
>> > SDIO instances of wl12xx.
[cut patch]
_platform_data);
> diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
> index 137ac89..3e33ae1 100644
> --- a/include/linux/wl12xx.h
> +++ b/include/linux/wl12xx.h
> @@ -31,4 +31,7 @@ struct wl12xx_platform_data {
> bool use_eeprom;
> };
>
> +int wl12xx_se
ng soon) - it's
all there already.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
in sd.c. I'll
send a fix after I get my dev machine up, unless someone beats me to
it.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
tting CMD52 nor power cycle is issued) then reinitialization
should be entirely skipped on resume unless the power was lost between
suspend and resume (or card was temporarily removed from the slot).
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe lin
e two registers are combined into single 32-bit
write?
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
alizing an SDIO card check for a combo card by using the
> memory present bit in the R4 response to IO_SEND_OP_COND (CMD5). This
> avoids the call to mmc_sd_get_cid() on an SDIO-only card.
>
> Cc: Michał Mirosław
> Signed-off-by: David Vrabel
> ---
> Andrew, this is a regress
ne SDHCI_CLOCK_CONTROL 0x2C
> #define SDHCI_DIVIDER_SHIFT 8
> +#define SDHCI_DIVIDER_SHIFT_HI 6
> +#define SDHCI_DIV_MASK 0xFF
> +#define SDHCI_DIV_HI_MASK 0x300
> #define SDHCI_CLOCK_CARD_EN 0x0004
> #define SDHCI_CLOCK_INT_STABLE 0x0002
can use:
if (card->cccr.high_speed)
mmc_sd_go_highspeed(card);
> +
> + goto finish;
> + }
> +
> /*
> * Read the common registers.
> */
[...]
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
d address */
Just a cosmetic hint: I suggest SDHCI_QUIRK_MULTIBLOCK_READ_AUTO_CMD12
or something for the quirk name, because ACMD12 part might be confused
with MMC/SD App CMD 12 (CMD55+CMD12 combo) if/whenever that gets used.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubsc
Please ignore this series. My patch sending script got confused too much
with mbox 'From ' line. I've resent the series with fixed headers.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to
Signed-off-by: MichaÅ MirosÅaw
---
drivers/mmc/core/bus.c |9 +++
drivers/mmc/core/core.c | 12 -
drivers/mmc/core/sdio.c | 135 ++---
include/linux/mmc/card.h |1 +
4 files changed, 134 insertions(+), 23 deletions(-)
diff --git a/driv
Prepare for SD-combo (IO+mem) support by splitting SD memory
card init and related functions.
Signed-off-by: MichaÅ MirosÅaw
---
drivers/mmc/core/sd.c | 249 +++
drivers/mmc/core/sd.h | 17 +++
drivers/mmc/core/sdio.c | 39 +---
3 files
This adds support for SD combo cards to MMC/SD driver stack.
SD combo consists of SD memory and SDIO parts in one package. Since
the parts have a separate SD command sets, after initialization, they
can be treated as independent cards on one bus.
Changes are divided into two patches. First is jus
>From 4b79c6ed22da18382748f578f9b4beb2d51afef3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?=
Date: Fri, 4 Jun 2010 21:37:00 +0200
Subject: [PATCH 1/2] mmc: split mmc_sd_init_card()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
P
>From 46eda5101dd303feac7f8353023f78bf4f7fd2fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?=
Date: Sat, 5 Jun 2010 19:03:40 +0200
Subject: [PATCH 2/2] mmc: implement SD-combo (IO+mem) support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encodi
>From 46eda5101dd303feac7f8353023f78bf4f7fd2fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?=
Date: Sat, 5 Jun 2010 19:04:01 +0200
Subject: [PATCH 0/2] mmc: Add support for SD combo cards
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8
can coexist in one card (provided some additional constraints are
met). The SDIO specification covers the details.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
patches.
I would like for this to get tested by other people first, but it looks
like not many kernel developers use SD combo cards.
I'll resend the patches after applying your suggestions from the other
mail.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "
---
drivers/mmc/core/bus.c |9 +++
drivers/mmc/core/core.c | 12 +++-
drivers/mmc/core/sdio.c | 178 -
include/linux/mmc/card.h |1 +
4 files changed, 162 insertions(+), 38 deletions(-)
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/co
This is needed to avoid code duplication in SD-combo support.
---
drivers/mmc/core/sd.c | 256
drivers/mmc/core/sd.h | 17
2 files changed, 166 insertions(+), 107 deletions(-)
create mode 100644 drivers/mmc/core/sd.h
diff --git a/drivers/m
This is a rough patch to support SD Combo cards. Based on simplified
SDIO spec v.2.0 and some experimentation. Real changes are in sdio.c.
Most of sd.c diff is moving code around to factor out some common
functions.
Signed-off-by: Michał Mirosław
diff -urN linux-2.6.34-br1/drivers/mmc/core
age_t's (as they won't be passed by the PM subsystem any more)
> just to appease the mmc suspend interface.
>
> We might as well just delete the unused paramter.
>
> Signed-off-by: Matt Fleming
Acked-by: Michał Mirosław
(For cb710-mmc part.)
--
To unsubscribe from this
tore(&host->lock, flags);
>>
>> The other places where MMC_REG_INT_CNTR is touched should be protected
>> by this spinlock aswell.
> Hmm, all other place don't do a read/modify/write cycle, so I'd say the
> don't need protection?
If you miss spin
W dniu 31 marca 2010 11:08 użytkownik Daniel Mack napisał:
> On Wed, Mar 31, 2010 at 11:07:06AM +0200, Michał Mirosław wrote:
>> 2010/3/30 Daniel Mack :
>> [...]
>> > @@ -1022,6 +1025,27 @@ static int if_sdio_probe(struct sdio_func *func,
>> > if (ret)
CCCR_IF, &ret);
> + if (ret)
> + goto release_int;
> +
> + func->num = num;
> + }
> +
> card->ioport = sdio_readb(func, IF_SDIO_IOPORT, &ret);
> if (ret)
> goto release_int;
You should probably jus
66 matches
Mail list logo