]> git.baikalelectronics.ru Git - kernel.git/commit
bus: ixp4xx: Don't touch bit 7 on IXP42x
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 22 Nov 2022 13:44:11 +0000 (14:44 +0100)
committerArnd Bergmann <arnd@arndb.de>
Tue, 22 Nov 2022 22:12:18 +0000 (23:12 +0100)
commitcfd9008778080eef99a82717013f7ce488c46276
treed6879de1c38f5e905e0453bf5ccac44edda8d1a4
parente1105b6bf834f5f8b74de34a987544b3cd136fa8
bus: ixp4xx: Don't touch bit 7 on IXP42x

We face some regressions on a few IXP42x systems when
accessing flash, the following unrelated error prints
appear from the PCI driver:

ixp4xx-pci c0000000.pci: PCI: abort_handler addr = 0xff9ffb5f,
   isr = 0x0, status = 0x22a0
ixp4xx-pci c0000000.pci: imprecise abort
(...)

It turns out that while bit 7 is masked "reserved" it is
not unused, so masking it off as zero is dangerous, and
breaks flash access on some systems such as the NSLU2.
Be more careful and avoid masking off any of the reserved
bits 7, 8, 9 or 30. Only keep masking EXP_WORD (bit 2)
on IXP43x which is necessary in some setups.

Fixes: b0ef2478ce4c ("bus: ixp4xx: Add a driver for IXP4xx expansion bus")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221122134411.2030372-1-linus.walleij@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/bus/intel-ixp4xx-eb.c