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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 22 Dec 2019 11:43:12 +0200
From:   Baruch Siach <>
To:     Vivien Didelot <>
Cc:     Andrew Lunn <>,
        Marek BehĂșn <>,,
        Denis Odintsov <>
Subject: Re: [PATCH] net: dsa: mv88e6xxx: force cmode write on 6141/6341

Hi Vivien,

On Fri, Dec 20 2019, Vivien Didelot wrote:
> On Thu, 19 Dec 2019 11:48:22 +0200, Baruch Siach <> wrote:
>> mv88e6xxx_port_set_cmode() relies on cmode stored in struct
>> mv88e6xxx_port to skip cmode update when the requested value matches the
>> cached value. It turns out that mv88e6xxx_port_hidden_write() might
>> change the port cmode setting as a side effect, so we can't rely on the
>> cached value to determine that cmode update in not necessary.
>> Force cmode update in mv88e6341_port_set_cmode(), to make
>> serdes configuration work again. Other mv88e6xxx_port_set_cmode()
>> callers keep the current behaviour.
>> This fixes serdes configuration of the 6141 switch on SolidRun Clearfog
>> GT-8K.
>> Fixes: 7a3007d22e8 ("net: dsa: mv88e6xxx: fully support SERDES on Topaz family")
>> Reported-by: Denis Odintsov <>
>> Signed-off-by: Baruch Siach <>
> Andrew,
> We tend to avoid caching values in the mv88e6xxx driver the more we can and
> query the hardware instead to avoid errors like this. We can consider calling a
> new mv88e6xxx_port_get_cmode() helper when needed (e.g. in higher level callers
> like mv88e6xxx_serdes_power() and mv88e6xxx_serdes_irq_thread_fn()) and pass
> the value down to the routines previously accessing chip->ports[port].cmode,
> as a new argument. I can prepare a patch doing this. What do you think?

I'm not sure that cmode read would always give a valid value. On 6141 I
see an invalid 0x6 value after mv88e6xxx_port_hidden_write().

As I understand, this cache elimination work would target v5.6+. Would
you ack this patch for v5.5-rc to fix currently broken setup?


--                  ~. .~   Tk Open Systems
   - - tel: +972.52.368.4656, -

Powered by blists - more mailing lists