HomeFreeBSD

Fix probing FC targets with hard addressing turned on.

Description

Fix probing FC targets with hard addressing turned on.

This largely reverts FreeBSD SVN change 289937 from October 25th, 2015.

The intent of that change was to keep loop IDs persistent across
chip reinits.

The problem is that the change turned on the PREVLOOP /
PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the
Qlogic chip to not participate in the loop if it can't get the
requested loop address. It also turned off soft addressing on 2400
(4Gb) and newer controllers.

The isp(4) driver defaults to loop address 0, and the tape drives
I have tested default to loop address 0 if hard addressing is turned
on. So when hard loop addressing is turned on on the drive, the isp(4)
driver just refuses to participate in the loop.

The solution is to largely revert that change. I left some elements
in place that are related to virtual ports, since they were new.

This does work with IBM tape drives with hard and soft addressing
turned on. I have tested it with 4Gb, 8Gb, and 16Gb controllers.

sys/dev/isp.c:
Largely revert FreeBSD SVN change 289937. I left the
ispmbox.h changes in place.

Don't use the PREV_ADDRESS bit on initialization. It tells
the chip to not participate if it can't get the requested
loop ID.

Do use soft addressing on 2400 and newer chips.

Use hard addressing when the user has requested a specific
initiator ID. (hint.isp.X.iid=N in /boot/loader.conf)

Leave some of the virtual port options from that change in
place, but don't turn on the PREV_ADDRESS bit.

Reviewed by: mav
MFC after: 3 days
Sponsored by: Spectra Logic

Details

Provenance
kenAuthored on
Reviewer
mav
Parents
rS321621: Always set the receive mask in loader.efi. Some UEFI implementations set
Branches
Unknown
Tags
Unknown