Re: [PATCH] mmc: renesas_sdhi: fix WP detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-03-06 17:53 GMT+09:00 Wolfram Sang <wsa@xxxxxxxxxxxxx>:
> On Tue, Mar 06, 2018 at 12:48:19PM +0900, Masahiro Yamada wrote:
>> 2018-03-06 5:48 GMT+09:00 Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>:
>> > Commit "mmc: renesas_sdhi: use MMC_CAP2_NO_WRITE_PROTECT instead of
>> > TMIO own flag" activated MMC_CAP2_NO_WRITE_PROTECT for Renesas SDHI
>> > which incorrectly disabled WP altogether instead of only disabling the
>> > internal mechanism.
>>
>>
>> I am not opposed to this patch,
>> but I have a question.
>>
>> Is this is a real problem in the upstream kernel?
>
> Not upstream, but mmc/next. The patch I mentioned in the above commit
> message is in mmc/next only. Yes, it is a real problem. As I said below,
> "more testing revealed this" on Gen3, at least.

Seems already upstream.


>> (If so, how do renesas boards set-up WP GPIOs?)
>
> Quite the standard way, I'd think:
>
> $ grep 'wp-gpios' arch/arm64/boot/dts/renesas/*
> arch/arm64/boot/dts/renesas/salvator-common.dtsi:       wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
> arch/arm64/boot/dts/renesas/salvator-common.dtsi:       wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
>
> $ grep 'wp-gpios' arch/arm/boot/dts/r8a*
> arch/arm/boot/dts/r8a7778-bockw.dts:    wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
> arch/arm/boot/dts/r8a7791-koelsch.dts:  wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> arch/arm/boot/dts/r8a7791-koelsch.dts:  wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
> arch/arm/boot/dts/r8a7791-porter.dts:   wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> arch/arm/boot/dts/r8a7793-gose.dts:     wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> arch/arm/boot/dts/r8a7793-gose.dts:     wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
> arch/arm/boot/dts/r8a7794-alt.dts:      wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
> arch/arm/boot/dts/r8a7794-alt.dts:      wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;

Ugh.


>> When I wrote the addressed patch,
>> I checked all renesas drivers and device trees,
>> and confirmed no one set WP-GPIOs.
>
> Yes, I saw this in the commit message and was confused, too. I seem to also
> have overlooked it in my review. I can't really tell what changed or otherwise
> went wrong, but fact is that Gen3 can't check RO currently im mmc/next and
> after my patch it can. Well, this is why we do apply through testing, I
> guess...
>

You are right.

Sorry, this is my mistake, I do not know why it happened.

I would tedious to coping with git-history.
So, I think this can go in as a separate fix-up patch.


Reviewed-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>





-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux