Fixing aix hba port erroneous error reporting

On an AIX system it is possible for garbage erroneous errors to be written to the error report.  Recently it was discovered that AIX was attempting to bring a HBA port up, then generating two errors.  The errors in question which are generated are similar to:

 FCA_ERR12
INFO: Adapter link in dead state during driver close

FCA_ERR4
Too many FABRIC_OPS failures (FLOGI fail)

You may receive slightly different information, but the important piece is the “FCA_ERR12 and FCA_ERR4”. These are hba port errors when AIX is attempting to bring the port up. In my specific case, there is no cable connected to fcs1/fcs3, so it shouldn’t even be attempting to bring it online, matter alone logging errors.

The fix is two part:
1) Put the device(s) in a Defined state with: (via command-line)
rmdev -l fscsiX -R

2) Turn off FC protocol driver (thus error logs)
chdev -l fscsiX -a autoconfig=defined

This also helps anytime the system bus is scanned with cfgmgr as AIX will leave the specific HBA adapters (fscsiX) devices in a Defined state.

If you wish to re-enable this (assuming you have now connected a hba cable to the port), you can re-enable it with:

1) Turn on FC Protocol driver (thus error logs)
chdev -l fscsiX -a autoconfig=available

2) Perform a cfgmgr on the system. This will then find those fscsiX devices, and bring them into an Available state.