lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Aug 2017 21:57:16 +0200
From:   Javier Martinez Canillas <>
To:     Wolfram Sang <>
Cc:     Linux Kernel <>,
        Rob Herring <>, Florian Larysch <>,
        David Lechner <>,
        Rob Herring <>,
        Andy Shevchenko <>,
        Catalin Marinas <>,
        Sören Brinkmann <>,
        Simon Horman <>,
        Michal Simek <>,
        Dinh Nguyen <>,
        Russell King <>,
        Will Deacon <>,
        "" <>,
        Sekhar Nori <>, Scott Wood <>,
        Benjamin Herrenschmidt <>,
        Joachim Eastwood <>,
        Mark Rutland <>,
        Masahiro Yamada <>,
        Michael Ellerman <>,
        Santosh Shilimkar <>,
        Linux-Renesas <>,
        Paul Mackerras <>,
        Magnus Damm <>,
        linuxppc-dev <>,
        Uwe Kleine-König <>,
        Linux I2C <>
Subject: Re: [RESEND PATCH v5 00/16] eeprom: at24: Add OF device ID table

> I think we should talk about the same case: Let me repeat what I did:
> 1) I added your patch "eeprom: at24: Add OF device ID table"
> 2) I added an EEPROM node to an I2C
> +       eeprom@50 {
> +               compatible = "renesas,24c01";
> +               reg = <0x50>;
> +       };
> -> no at24 binding to the device
> 3) I revert your patch
> -> at24 binding to the device

I've tested this and you are right, it fails...

The problem is that the patch also changes how the driver obtains the
EEPROM parameters (the magic value in the entry's data field).

So even when module autoload and device / driver matching works, the
driver probe function fails because if (client->dev.of_node) the
driver attempts to get the entry data using
of_device_get_match_data(), which is obviously wrong since the
compatible string in the dev node isn't present in the OF table.

The id->driver_data from the I2C table should be used instead since
that's the table that matches in this case.

One option is to fallback to id->driver_data if
of_device_get_match_data() fails, but that's just an (ugly)
workaround. So I agree with you that the best option is to wait for
the DTS patches to land first.

It worked for me on my previous tests because the tested drivers
didn't use a table entry data, I'm so sorry for missing this :(

Best regards,

Powered by blists - more mailing lists