Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

From: Larry Finger
Date: Mon Jun 10 2019 - 14:49:16 EST

On 6/7/19 11:21 PM, Benjamin Herrenschmidt wrote:

Please try the attached patch. I'm not really pleased with it and I will
continue to determine why the fallback to a 30-bit mask fails, but at least this
one works for me.

Your patch only makes sense if the device is indeed capable of
addressing 31-bits.

So either the driver is buggy and asks for a too small mask in which
case your patch is ok, or it's not and you're just going to cause all
sort of interesting random problems including possible memory

Of course the driver may be buggy, but it asks for the correct mask.

This particular device is not capable of handling 32-bit DMA. The driver detects the 32-bit failure and falls back to 30 bits. It works on x86, and did on PPC32 until 5.1. As Christoph said, it should always be possible to use fewer bits than the maximum.

Similar devices that are new enough to use b43 rather than b43legacy work with new kernels; however, they have and use 32-bit DMA.