[Bug 281177] 13.2 works, 13.3 and 14.x installers panic on older qlogic isp card

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 14 Nov 2024 08:20:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281177

--- Comment #31 from Joerg Pulz <Joerg.Pulz@frm2.tum.de> ---
Sorry for the delay - here are my results:

Using 14.2-BETA2-memstick:
- 24xx based card: untested - no hardware
- 25xx based card: broken - panic
- 26xx based card: working
- 27xx based card: working
- 28xx based card: working

Situation for the 25xx based cards after cold boot:
During the initialization isp(4) tries to load isp_2500.ko firmware module.
This fails as firmware(9) is unable to load it without mounted root fs.
As fallback method the card is instructed to exec firmware from flash.
This returns without error.
Afterwards an "about firmware" command is sent to the card.
This command returns a timeout - no success message from card - what leads to a
device attach failure.
Don't know why this happens as nothing changed in the way how and what isp(4)
communicates with the card - don't know if some general PCI communication stuff
changed between 14.1 and 14.2.
Later in the boot process (right after root fs mount?) somehow a reprobing is
happening and isp(4) is trying to attach to the card again.
This time firmware(9) returns error 6 when trying to load isp_2500.ko and right
afterwards the panic occurs.

It panics in "firmware taskq"!!! This does not happen when cold booting from a
14.1-RELEASE-memstick and should be fixed in firmware(9).

Tried the same with "hint.isp.0.fwload_disable=1" set, so firmware(9) is
completely out of the game.
This time the system is booting without panic but isp(4) always failing with
the "about firmware" command timing out.
I see isp(4) trying to attach to the card 5 times (once during normal device
enumeration and 4 times after the root fs is mounted) and I don't know why it
is happening so many times.

Tried the same with preloading the firmware (either ispfw.ko or only
isp_2500.ko) and the system is booting and isp(4) attaching to the card - no
timeouts, everything working.

I did a lot of testing and made several changes to the isp(4) code the past
days to find out why device attach fails for 25xx based cards when cold booting
and using firmware from flash in 14.2+. Until now without success.

For now the best/easiest solution would be to include ispfw(4) into the kernel
(like isp(4) already is) or always load it by default (or at least load
isp_2500.ko by default).

Thoughts about binary firmware:
Please correct me if I'm wrong but as firmware(9) needs a mounted root fs to
either load binary or .ko firmware it would make no difference here.

-- 
You are receiving this mail because:
You are the assignee for the bug.