RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23
Hi Uffe, Since Reliable Write depends on the CMD23. I think we need to disable Reliable Write if the card does not support CMD23(due to performance impact issue), so I add this patch. Do you think we still need to enable Reliable Write even if the card does not support CMD23? Thanks, Yong Li > Date: Thu, 27 Aug 2015 15:22:44 +0200 > Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does > not support CMD23 > From: ulf.hans...@linaro.org > To: sdliy...@gmail.com > CC: ch...@printf.net; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org > > On 25 August 2015 at 14:06, Ulf Hansson wrote: >> On 14 August 2015 at 09:30, wrote: >>> From: Yong Li >>> >>> Signed-off-by: Yong Li >>> --- >>> drivers/mmc/card/block.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c >>> index 452782b..d9e3c45 100644 >>> --- a/drivers/mmc/card/block.c >>> +++ b/drivers/mmc/card/block.c >>> @@ -1366,7 +1366,8 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req >>> *mqrq, >>> bool do_rel_wr = ((req->cmd_flags & REQ_FUA) || >>> (req->cmd_flags & REQ_META)) && >>> (rq_data_dir(req) == WRITE) && >>> - (md->flags & MMC_BLK_REL_WR); >>> + (md->flags & MMC_BLK_REL_WR) && >>> + !(card->quirks & MMC_QUIRK_BLK_NO_CMD23); >> >> Further down in mmc_blk_rw_rq_prep() we check for >> MMC_QUIRK_BLK_NO_CMD23. That check becomes redundant after this >> change, please remove that check as a part of this patch as well. >> >>> >>> memset(brq, 0, sizeof(struct mmc_blk_request)); >>> brq->mrq.cmd = &brq->cmd; >>> -- >>> 2.1.0 >>> >> > > Please ignore my previous answer. MMC_QUIRK_BLK_NO_CMD23 is intended > to indicate to the mmc block layer whether using CMD23 for regular > block IO request could have a performance impact for some cards. If > that's the case we don't use it - except when using reliable write! > > So this patch is just plain wrong. > > Kind regards > Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Test mail
N�Р骒r��yb�X�肚�v�^�)藓{.n�+�伐�{��赙zXФ�≤�}��财�z�&j:+v�����赙zZ+��+zf"�h���~i���z��wア�?�ㄨ��&�)撷f��^j谦y�m��@A�a囤� 0鹅h���i
[PATCH] cc2520: set the default fifo pin value from platform data
Without the device tree support, the fifo_pin is uninitialized, this Patch will set the fifo_pin value based on platform data Signed-off-by: Yong Li --- drivers/net/ieee802154/cc2520.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c index b6fc295..cd1e7ac 100644 --- a/drivers/net/ieee802154/cc2520.c +++ b/drivers/net/ieee802154/cc2520.c @@ -833,6 +833,7 @@ static int cc2520_get_platform_data(struct spi_device *spi, if (!spi_pdata) return -ENOENT; *pdata = *spi_pdata; + priv->fifo_pin = pdata->fifo; return 0; } -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23
Hi Uffe, The bool variable do_rel_wr is used on line 1408 and line 1436: if (brq->data.blocks> 1 || do_rel_wr) { /* SPI multiblock writes terminate using a special * token, not a STOP_TRANSMISSION request. */ if (do_rel_wr) mmc_apply_rel_rw(brq, card, req); If a card does not support CMD23, I think we need to set the do_rel_wr to false at the beginning of this mmc_blk_rw_rq_prep function Thanks, Yong Li > Date: Tue, 25 Aug 2015 14:06:43 +0200 > Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does > not support CMD23 > From: ulf.hans...@linaro.org > To: sdliy...@gmail.com > CC: ch...@printf.net; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org > > On 14 August 2015 at 09:30, wrote: >> From: Yong Li >> >> Signed-off-by: Yong Li >> --- >> drivers/mmc/card/block.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c >> index 452782b..d9e3c45 100644 >> --- a/drivers/mmc/card/block.c >> +++ b/drivers/mmc/card/block.c >> @@ -1366,7 +1366,8 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req >> *mqrq, >> bool do_rel_wr = ((req->cmd_flags & REQ_FUA) || >> (req->cmd_flags & REQ_META)) && >> (rq_data_dir(req) == WRITE) && >> - (md->flags & MMC_BLK_REL_WR); >> + (md->flags & MMC_BLK_REL_WR) && >> + !(card->quirks & MMC_QUIRK_BLK_NO_CMD23); > > Further down in mmc_blk_rw_rq_prep() we check for > MMC_QUIRK_BLK_NO_CMD23. That check becomes redundant after this > change, please remove that check as a part of this patch as well. > >> >> memset(brq, 0, sizeof(struct mmc_blk_request)); >> brq->mrq.cmd = &brq->cmd; >> -- >> 2.1.0 >> > > Kind regards > Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23
Thanks Shawn. I got your point. You mean we can remove the || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) at line 1468. But considering this case: The do_rel_wr = false and the card does support CMD23. do_rel_wr = false; !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) = true; At line 1468, do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) should be true; If re remove the || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23), it will be false It seems that we cannot modify the line 1468? Thanks, Yong Li > Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does > not support CMD23 > To: sdliy...@gmail.com; ulf.hans...@linaro.org > CC: shawn@rock-chips.com; ch...@printf.net; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org > From: shawn@rock-chips.com > Date: Wed, 26 Aug 2015 15:20:11 +0800 > > On 2015/8/26 14:15, LIYONG wrote: >> Hi Uffe, >> >> The bool variable do_rel_wr is used on line 1408 and line 1436: >> if (brq->data.blocks> 1 || do_rel_wr) { >> /* SPI multiblock writes terminate using a special >> * token, not a STOP_TRANSMISSION request. >> */ >> >> if (do_rel_wr) >> mmc_apply_rel_rw(brq, card, req); >> >> If a card does not support CMD23, I think we need to set the do_rel_wr to >> false at the beginning of this mmc_blk_rw_rq_prep function > > Hi Yong, > > You miss the point, Ulf means you should remove > "(do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23)" as well. > > No need to check card->quirks & MMC_QUIRK_BLK_NO_CMD23 twice, you have > did it while checking do_rel_wr, right? > > bool do_rel_wr = ((req->cmd_flags & REQ_FUA) || > (req->cmd_flags & REQ_META)) && > (rq_data_dir(req) == WRITE) && > - (md->flags & MMC_BLK_REL_WR); > + (md->flags & MMC_BLK_REL_WR) && > + !(card->quirks & MMC_QUIRK_BLK_NO_CMD23); > >> >> Thanks, >> Yong Li >> >>> Date: Tue, 25 Aug 2015 14:06:43 +0200 >>> Subject: Re: [PATCH] mmc: block: disable the reliable write If the card >>> does not support CMD23 >>> From: ulf.hans...@linaro.org >>> To: sdliy...@gmail.com >>> CC: ch...@printf.net; linux-...@vger.kernel.org; >>> linux-kernel@vger.kernel.org >>> >>> On 14 August 2015 at 09:30, wrote: >>>> From: Yong Li >>>> >>>> Signed-off-by: Yong Li >>>> --- >>>> drivers/mmc/card/block.c | 3 ++- >>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c >>>> index 452782b..d9e3c45 100644 >>>> --- a/drivers/mmc/card/block.c >>>> +++ b/drivers/mmc/card/block.c >>>> @@ -1366,7 +1366,8 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req >>>> *mqrq, >>>> bool do_rel_wr = ((req->cmd_flags & REQ_FUA) || >>>> (req->cmd_flags & REQ_META)) && >>>> (rq_data_dir(req) == WRITE) && >>>> - (md->flags & MMC_BLK_REL_WR); >>>> + (md->flags & MMC_BLK_REL_WR) && >>>> + !(card->quirks & MMC_QUIRK_BLK_NO_CMD23); >>> >>> Further down in mmc_blk_rw_rq_prep() we check for >>> MMC_QUIRK_BLK_NO_CMD23. That check becomes redundant after this >>> change, please remove that check as a part of this patch as well. >>> >>>> >>>> memset(brq, 0, sizeof(struct mmc_blk_request)); >>>> brq->mrq.cmd = &brq->cmd; >>>> -- >>>> 2.1.0 >>>> >>> >>> Kind regards >>> Uffe >> -- >> 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 >> >> >> > > > -- > Best Regards > Shawn Lin > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCHv1 bluetooth-next] cc2520: set the default fifo pin value from platform data
In case of the device tree support is disabled, the fifo_pin is uninitialized, this patch will set the fifo_pin value based on platform data Signed-off-by: Yong Li --- drivers/net/ieee802154/cc2520.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c index 613dae5..c5b54a1 100644 --- a/drivers/net/ieee802154/cc2520.c +++ b/drivers/net/ieee802154/cc2520.c @@ -833,6 +833,7 @@ static int cc2520_get_platform_data(struct spi_device *spi, if (!spi_pdata) return -ENOENT; *pdata = *spi_pdata; + priv->fifo_pin = pdata->fifo; return 0; } -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23
Thanks Shawn. Please help to check the below in the mmc_blk_rw_rq_prep: if (do_rel_wr) mmc_apply_rel_rw(brq, card, req); I think we need to set the do_rel_wr to false( at the beginning of this function) if the card does not support the CMD23. The above code is executed before the "if ((md->flags & MMC_BLK_CMD23)" code. Thanks, Yong Li > Subject: Re: [PATCH] mmc: block: disable the reliable write If the card does > not support CMD23 > To: sdliy...@gmail.com; ch...@printf.net; ulf.hans...@linaro.org; > linux-...@vger.kernel.org; linux-kernel@vger.kernel.org > CC: shawn@rock-chips.com > From: shawn@rock-chips.com > Date: Fri, 14 Aug 2015 16:13:02 +0800 > > 在 2015/8/14 15:30, sdliy...@gmail.com 写道: >> From: Yong Li >> >> Signed-off-by: Yong Li >> --- >> drivers/mmc/card/block.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c >> index 452782b..d9e3c45 100644 >> --- a/drivers/mmc/card/block.c >> +++ b/drivers/mmc/card/block.c >> @@ -1366,7 +1366,8 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req >> *mqrq, >> bool do_rel_wr = ((req->cmd_flags & REQ_FUA) || >> (req->cmd_flags & REQ_META)) && >> (rq_data_dir(req) == WRITE) && >> - (md->flags & MMC_BLK_REL_WR); >> + (md->flags & MMC_BLK_REL_WR) && >> + !(card->quirks & MMC_QUIRK_BLK_NO_CMD23); > > Hi Yong, > > pls check that code below. > > MMC_BLK_REL_WR will not be enabled if we know this card CANNOT support > CMD23 form SCR. AND, "card->quirks & MMC_QUIRK_BLK_NO_CMD23" would be > checked here as well. So I think your code is unnecessary. > > if ((md->flags & MMC_BLK_CMD23) && mmc_op_multi(brq->cmd.opcode) && > (do_rel_wr || !(card->quirks & MMC_QUIRK_BLK_NO_CMD23) || > do_data_tag)) { > brq->sbc.opcode = MMC_SET_BLOCK_COUNT; > brq->sbc.arg = brq->data.blocks | > (do_rel_wr ? (1 << 31) : 0) | > (do_data_tag ? (1 << 29) : 0); > brq->sbc.flags = MMC_RSP_R1 | MMC_CMD_AC; > brq->mrq.sbc = &brq->sbc; > } > > Thanks. > Shawn > >> >> memset(brq, 0, sizeof(struct mmc_blk_request)); >> brq->mrq.cmd = &brq->cmd; >> > > > -- > Shawn Lin > N�r��yb�X��ǧv�^�){.n�+{zX����ܨ}���Ơz�&j:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a��� 0��h���i
Re: [PATCH] ARM: OMAP2+: allow DEBUG_UNCOMPRESS for OMAP2+
no problem, let me submit another patch > 在 2016年2月20日,02:02,Tony Lindgren 写道: > > Hi, > > * Yong Li [151228 20:12]: >> Based on the below >> commit ae3c99a26c60 ("ARM: 7806/1: allow DEBUG_UNCOMPRESS for Tegra"), >> change the .data section to .text section, >> to enable DEBUG_UNCOMPRESS for OMAP2+ platforms >> Tested okay using BeagleBone Black > > Sorry for the delay, I just noticed this one while looking > through my inbox for pending patches. > > I think we should first simplify things by moving things over > to use the generic DEBUG_UART_8250 code where the addresses > need to be specified in the .config. It's been on my list of > things to do for quite a while but I keep getting interrupted. > > My guess is that if we do that, this patch is no longer > needed :) Yong, care to take a look at that? > > Regards, > > Tony > >> Signed-off-by: Yong Li >> --- >> arch/arm/Kconfig.debug | 2 +- >> arch/arm/include/debug/omap2plus.S | 13 ++--- >> 2 files changed, 11 insertions(+), 4 deletions(-) >> >> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug >> index 259c0ca..e5ae36a 100644 >> --- a/arch/arm/Kconfig.debug >> +++ b/arch/arm/Kconfig.debug >> @@ -1596,7 +1596,7 @@ config DEBUG_UART_8250_FLOW_CONTROL >> config DEBUG_UNCOMPRESS >>bool >>depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M >> -default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ >> +default y if DEBUG_LL && (!DEBUG_OMAP2PLUS_UART || !ZBOOT_ROM) && \ >> (!DEBUG_TEGRA_UART || !ZBOOT_ROM) >>help >> This option influences the normal decompressor output for >> diff --git a/arch/arm/include/debug/omap2plus.S >> b/arch/arm/include/debug/omap2plus.S >> index 6d867ae..12421f9 100644 >> --- a/arch/arm/include/debug/omap2plus.S >> +++ b/arch/arm/include/debug/omap2plus.S >> @@ -58,11 +58,18 @@ >> >> #define UART_OFFSET(addr)((addr) & 0x00ff) >> >> +#if defined(ZIMAGE) >> +omap_uart_phys:.word0 >> +omap_uart_virt:.word0 >> +omap_uart_lsr:.word0 >> +#else >> + >>.pushsection .data >> -omap_uart_phys:.word0 >> -omap_uart_virt:.word0 >> -omap_uart_lsr:.word0 >> +omap_uart_phys:.word0 >> +omap_uart_virt:.word0 >> +omap_uart_lsr:.word0 >>.popsection >> +#endif >> >>.macroaddruart, rp, rv, tmp >> >> -- >> 2.1.4 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in >> the body of a message to majord...@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >>
Re: [PATCH v1] staging: iio: hmc5843: Set iio name dynamically based on i2c name
thanks for your comments. let me submit another one 发自我的 iPhone > 在 2015年8月12日,16:28,Lars-Peter Clausen 写道: > >> On 08/12/2015 10:20 AM, sdliy...@gmail.com wrote: >> From: Yong Li >> >> Load the driver using the below command: >> echo hmc5983 0x1e > /sys/bus/i2c/devices/i2c-?/new_device >> >> In sysfs, the iio name is hmc5843, however the i2c name is hmc5983, >> they are inconsistent. >> >> With this patch, the iio name will be the same as the i2c device name >> >> Signed-off-by: Yong Li >> --- >> drivers/staging/iio/magnetometer/hmc5843_i2c.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/staging/iio/magnetometer/hmc5843_i2c.c >> b/drivers/staging/iio/magnetometer/hmc5843_i2c.c >> index ff08667..3b03644 100644 >> --- a/drivers/staging/iio/magnetometer/hmc5843_i2c.c >> +++ b/drivers/staging/iio/magnetometer/hmc5843_i2c.c >> @@ -59,6 +59,7 @@ static const struct regmap_config >> hmc5843_i2c_regmap_config = { >> static int hmc5843_i2c_probe(struct i2c_client *cli, >> const struct i2c_device_id *id) >> { >> +cli->dev.driver->name = id->name; > > You are overwriting a the name of the driver, which is a struct that is > shared between all instances of the device which specific data from one > device. That is most certainly not correct. > > Update hmc5843_common_probe() and add a parameter that takes the name for > the device and then pass the id->name when the function is called. > >>return hmc5843_common_probe(&cli->dev, >>devm_regmap_init_i2c(cli, &hmc5843_i2c_regmap_config), >>id->driver_data); >> >