Page MenuHomeFreeBSD

Add isp(4) fwload_only loader tunable
AcceptedPublic

Authored by ken on Fri, Jun 21, 7:51 PM.
Tags
Referenced Files
Unknown Object (File)
Thu, Jun 27, 2:14 PM
Unknown Object (File)
Tue, Jun 25, 4:15 PM
Unknown Object (File)
Mon, Jun 24, 8:50 PM
Subscribers

Details

Summary

Add an isp(4) tunable to default to ispfw(4) firmware.

ispfw(4) recently gained firmware for Qlogic 27XX and 28XX FC controllers, and isp(4) now selects the newer of firmware in flash or in ispfw(4) to load for those controllers.

This differs from the previous behavior (which remains for older controllers), which was to always load the ispfw(4) firmware if it is available.

This adds a loader tunable, hint.isp.N.fwload_only to default to loading the ispfw(4) firmware, whether or not it is newer than the firmware in flash. This allows the user to always use the known firmware version included with the kernel.

Note that there is an existing fwload_disable tunable that tells the driver to always load the firmware from flash and ignore ispfw(4). If fwload_disable is set, fwload_only will be ignored. So users with existing fwload_disable tunables will have the same behavior.

If a user specifies both fwload_only and fwload_disable for the same controller, the isp(4) driver prints a warning message, and fwload_disable will be honored.

The user can see which firmware is active through the dev.isp.N.fw_version* sysctl variables.

Test Plan

Flash a 27XX or 28XX controller with firmware newer than the firmware available in ispfw(4). Set the fwload_only tunable, and see if the firmware in ispfw gets used.

Set both the fwload_only and fwload_disable tunables, and verify that the firmware in flash gets used.

Set neither tunable, and verify that the newer firmware gets used.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ken requested review of this revision.Fri, Jun 21, 7:51 PM
ken edited the summary of this revision. (Show Details)

It seems a good tunable, except I am not getting the meaning of "only" there. Why not "always", "force" or something like that?

In D45688#1042676, @mav wrote:

It seems a good tunable, except I am not getting the meaning of "only" there. Why not "always", "force" or something like that?

Good point, "force" may be a better way to put it. It will force loading older firmware from ispfw(4). Although you can still wind up loading firmware from flash if there is no ispfw(4). It just returns the behavior to what it is with the older boards.

I'll upload a new patch.

Change fwload_only to fwload_force.

This revision is now accepted and ready to land.Mon, Jun 24, 7:40 PM