lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210424123034.11755-1-linkmauve@linkmauve.fr>
Date:   Sat, 24 Apr 2021 14:30:29 +0200
From:   Emmanuel Gil Peyrot <linkmauve@...kmauve.fr>
To:     Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Cc:     Emmanuel Gil Peyrot <linkmauve@...kmauve.fr>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        Rob Herring <robh+dt@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Aswath Govindraju <a-govindraju@...com>,
        Vadym Kochan <vadym.kochan@...ision.eu>,
        devicetree@...r.kernel.org
Subject: [PATCH 0/4] eeprom-93xx46: Add support for Atmel AT93C56 and AT93C66

These two devices differ from the AT93C46 by their storage size,
respectively 2 Kib and 4 Kib, while the AT93C46 contains 1 Kib.

The driver was currently hardcoding that addrlen == 7 means 8-bit words,
and anything else means 16-bit words.  This is obviously not going to
work with more storage and thus more bits spent on the address (for
instance on the AT93C66 in 8-bit words mode, addrlen == 9 since there
are 512 bytes to address), so I’m now doing those checks based on the
word size specified in the device tree.

It might make sense to rename this driver now that it supports all three
sizes, but I don’t know what would be a good name, eeprom_93xxx6 doesn’t
sound very nice.

I have tested this series on a Nintendo Wii U, on the downstream
linux-wiiu kernel based on 4.19, and thus only with a AT93C66.  You can
find this work here if you want to test it:
https://gitlab.com/linux-wiiu/linux-wiiu/-/merge_requests/16

Emmanuel Gil Peyrot (4):
  misc: eeprom_93xx46: Add new at93c56 and at93c66 compatible strings
  misc: eeprom_93xx46: set size and addrlen according to the dts
  misc: eeprom_93xx46: Compute bits based on addrlen
  misc: eeprom_93xx46: Switch based on word size, not addrlen

 .../bindings/misc/eeprom-93xx46.txt           |  3 +
 drivers/misc/eeprom/eeprom_93xx46.c           | 85 ++++++++++++++-----
 include/linux/eeprom_93xx46.h                 |  3 +
 3 files changed, 68 insertions(+), 23 deletions(-)

-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ