Other How to check the loaded driver and firmware version of Qlogic HBA

Hi Team,

I have a Qlogic QLe2562 HBA installed on a FreeBSD 11.3 system. I have mapped a few SAN devices and created zpools on the same with multipathing enabled.

I have a few queries .
1. How do I check the loaded driver and firmware version of the HBA
2. I have 4 paths to each lun. Only one is ACTIVE and other 3 are seen as PASSIVE. Is this the default behavior? Can this be altered?
Code:
 # uname -a
FreeBSD xxxx 11.3-RELEASE FreeBSD 11.3-RELEASE #0 r349754: Fri Jul  5 04:45:24 UTC 2019     [email]root@releng2.nyi.freebsd.org[/email]:/usr/obj/usr/src/sys/GENERIC  amd64
Code:
# pciconf -lv
isp0@pci0:130:0:0:      class=0x0c0400 card=0x015d1077 chip=0x25321077 rev=0x02 hdr=0x00
    vendor     = 'QLogic Corp.'
    device     = 'ISP2532-based 8Gb Fibre Channel to PCI Express HBA'
    class      = serial bus
    subclass   = Fibre Channel
isp1@pci0:130:0:1:      class=0x0c0400 card=0x015d1077 chip=0x25321077 rev=0x02 hdr=0x00
    vendor     = 'QLogic Corp.'
    device     = 'ISP2532-based 8Gb Fibre Channel to PCI Express HBA'
    class      = serial bus
    subclass   = Fibre Channel

Code:
# apropos qlogic
bce, if_bce(4) - QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver
bxe, if_bxe(4) - QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver
esp(4) - Emulex ESP, NCR 53C9x and QLogic FAS families based SCSI controllers
isp(4) - Qlogic based SPI and FibreChannel SCSI Host Adapters
ispfw(4) - Firmware for Qlogic based SPI and FibreChannel SCSI Host Adapters
qlxgb, if_qlxgb(4) - QLogic 10 Gigabit Ethernet & CNA Adapter Driver
qlxgbe, if_qlxgbe(4) - QLogic 10 Gigabit Ethernet & CNA Adapter Driver
qlxge, if_qlxge(4) - QLogic 8100 Series 10 Gigabit Ethernet Adapter Driver

Code:
 # gmultipath list lun00
Geom name: lun00
Type: AUTOMATIC
Mode: Active/Passive
UUID: 72c68259-1425-11ea-a00a-901b0e3230d8
State: OPTIMAL
Providers:
1. Name: multipath/lun00
   Mediasize: 10737417728 (10G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   State: OPTIMAL
Consumers:
1. Name: da0
   Mediasize: 10737418240 (10G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e2
   State: PASSIVE
2. Name: da1
   Mediasize: 10737418240 (10G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e2
   State: ACTIVE
3. Name: da10
   Mediasize: 10737418240 (10G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e2
   State: PASSIVE
4. Name: da11
   Mediasize: 10737418240 (10G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r2w2e2
   State: PASSIVE
Code:
# camcontrol devlist|grep lun\ 1
<NETAPP LUN C-Mode 9500>           at scbus12 target 0 lun 1 (da3,pass6)
<NETAPP LUN C-Mode 9500>           at scbus12 target 1 lun 1 (da13,pass16)
<NETAPP LUN C-Mode 9500>           at scbus13 target 0 lun 1 (da2,pass5)
<NETAPP LUN C-Mode 9500>           at scbus13 target 1 lun 1 (da12,pass15)

Kindly help.

Thanks,
Dinil
 
Updating a few more command o/p here. Please help on this query.
Code:
# sysctl -a | grep dev.isp
dev.isp.1.use_gff_id: 1
dev.isp.1.use_gft_id: 1
dev.isp.1.topo: 3
dev.isp.1.loopstate: 10
dev.isp.1.fwstate: 3
dev.isp.1.linkstate: 1
dev.isp.1.speed: 8
dev.isp.1.role: 2
dev.isp.1.gone_device_time: 30
dev.isp.1.loop_down_limit: 60
dev.isp.1.wwpn: 2377900762151885075
dev.isp.1.wwnn: 2305843168113957139
dev.isp.1.%domain: 1
dev.isp.1.%parent: pci11
dev.isp.1.%pnpinfo: vendor=0x1077 device=0x2532 subvendor=0x1077 subdevice=0x015d class=0x0c0400
dev.isp.1.%location: slot=0 function=1 dbsf=pci0:130:0:1 handle=\_SB_.PCI1.QR3A.H001
dev.isp.1.%driver: isp
dev.isp.1.%desc: Qlogic ISP 2532 PCI FC-AL Adapter
dev.isp.0.use_gff_id: 1
dev.isp.0.use_gft_id: 1
dev.isp.0.topo: 3
dev.isp.0.loopstate: 10
dev.isp.0.fwstate: 3
dev.isp.0.linkstate: 1
dev.isp.0.speed: 8
dev.isp.0.role: 2
dev.isp.0.gone_device_time: 30
dev.isp.0.loop_down_limit: 60
dev.isp.0.wwpn: 2377900762151885074
dev.isp.0.wwnn: 2305843168113957138
dev.isp.0.%domain: 1
dev.isp.0.%parent: pci11
dev.isp.0.%pnpinfo: vendor=0x1077 device=0x2532 subvendor=0x1077 subdevice=0x015d class=0x0c0400
dev.isp.0.%location: slot=0 function=0 dbsf=pci0:130:0:0 handle=\_SB_.PCI1.QR3A.H000
dev.isp.0.%driver: isp
dev.isp.0.%desc: Qlogic ISP 2532 PCI FC-AL Adapter
dev.isp.%parent:
You have new mail.
 
LSI based cards and drivers have specific utilities to get that information, mfiutil(8) for example, or more generic sysutils/megacli. I've tried searching for something similar for isp(4) but haven't been able to find anything.
 
Please help on this query.
The last time I used QLogic HBAs was in the early 2000s (probably 2002 and 2003). At the time, getting anything to work with unusual operating systems (such as Linux, which at the time was a toy operating system used by college kids, real computers ran Windows, a commercial Unix, or a good operating system) required significant help from QLogic technical support. We spent weeks dealing with configuration issues, and firmware upgrades on our QLogic cards, Brocade switches, arbitrated loop hubs and so on.

I suggest that you either switch to more common and better supported hardware, or engage vendor technical support.

I have 4 paths to each lun. Only one is ACTIVE and other 3 are seen as PASSIVE. Is this the default behavior?
Yes, that's how multipath works in most cases. Having multiple active connections to one target creates complex multi-initiator problems, and is rarely done.
 
To check for version look at dmesg output when firmware and driver is loaded.
Barring that I always use the source code as a guide.
For the firmware:
/usr/src/sys/dev/ispfw/
Look inside the *.h file for the version.
For example:
Firmware Version 8.07.00 (2017)
Located inside asm_2500.h on FreeBSD 11.3. Newer versions of FreeBSD may have a newer firmware.

To find the driver version checkout this directory:
/usr/src/sys/dev/isp/
There is some good information in Hardware.txt
 
The firmware is probably flashed into the card, not loaded by the OS.

Most likely the best way to find out what it is: When booting, in the BIOS enter the management menu for that card. Most HBAs have dedicated management menus. Probably requires hitting a specific key (different HBAs have different keys). That management menu then will have configuration options, and probably a status display.

Or: Download hardware-specific management tools; LSI Logic HBAs have a whole family of mpt-something utilities. I don't know whether those exist for Linux or FreeBSD though; when I used QLogic cards in those days, we always kept a DOS boot disk ready for the computer, with the management tool installed on that. I bet this has changed though.
 
To check for version look at dmesg output when firmware and driver is loaded.
Barring that I always use the source code as a guide.
For the firmware:
/usr/src/sys/dev/ispfw/
Look inside the *.h file for the version.
For example:

Located inside asm_2500.h on FreeBSD 11.3. Newer versions of FreeBSD may have a newer firmware.

To find the driver version checkout this directory:
/usr/src/sys/dev/isp/
There is some good information in Hardware.txt

Unfortunately, there isnt anything under this path.

# ls -l /usr/src/
total 0
 
The firmware is probably flashed into the card, not loaded by the OS.

Most likely the best way to find out what it is: When booting, in the BIOS enter the management menu for that card. Most HBAs have dedicated management menus. Probably requires hitting a specific key (different HBAs have different keys). That management menu then will have configuration options, and probably a status display.

Or: Download hardware-specific management tools; LSI Logic HBAs have a whole family of mpt-something utilities. I don't know whether those exist for Linux or FreeBSD though; when I used QLogic cards in those days, we always kept a DOS boot disk ready for the computer, with the management tool installed on that. I bet this has changed though.
Thanks for the response. I was able to identify the firmware from the HBA BIOS. I presume, freeBSD uses flash firmware. However, wondering how to get the driver information from the OS.
 
The term "driver information" makes little sense in FreeBSD. For the most part, drivers are part of the kernel (either compiled in or loaded as kernel modules), and their version matches the kernel. There may be after-market drivers for FreeBSD, but that's uncommon. This is very different from Windows.
 
The term "driver information" makes little sense in FreeBSD. For the most part, drivers are part of the kernel (either compiled in or loaded as kernel modules), and their version matches the kernel. There may be after-market drivers for FreeBSD, but that's uncommon. This is very different from Windows.
thank you. I haven't loaded any async drivers on these systems. So, what I have is inbox or kernel loaded. Was checking if there is a way out to find it using OS native commands.
 
Back
Top