OCS_FC(4)

okay bestie, sit down, hydrate, because today we're reading ocs_fc β€” that's section 4 of the Kernel Interfaces Manual, and it's the device driver for Emulex Fibre Channel Host Adapters πŸ’… yes the whole thing, no skimming, we're doing this together 🫢


✨ NAME ✨

ocs_fc β€” Device driver for Emulex Fibre Channel Host Adapters πŸ‘‘


🌸 SYNOPSIS 🌸

So you wanna compile this driver into the kernel? Add this line to the kernel configuration file, bestie:

device ocs_fc

Orrr if you'd rather load it as a module at boot time, go add this line to loader.conf(5):

ocs_fc_load="YES"

Pick your fighter. Both slay. ✨


πŸ’– DESCRIPTION πŸ’–

The ocs_fc driver provides access to Fibre Channel SCSI devices. that's the whole job, and it does it. πŸŽ€

It supports initiator and target modes, no cap. And it's cool with Arbitrated loops, Point-to-Point, and Fabric connections β€” all three, she's versatile like that. 🌈

Now, FC-Tape is highly recommended for connections to tape drives that support it β€” like, take the recommendation, okay? FC-Tape includes four elements from the T-10 FCP-4 specification:

  • Precise Delivery of Commands
  • Confirmed Completion of FCP I/O Operations
  • Retransmission of Unsuccessfully Transmitted IUs
  • Task Retry Identification

Together these features allow for link level error recovery with tape devices. And why do we care? Because without link level error recovery, an initiator literally cannot tell β€” for instance β€” whether a tape write command that has timed out resulted in all, part, or none of the data going to the tape drive. 😭 that's the nightmare scenario, no thanks.

Good news: FC-Tape is automatically enabled when both the controller and the target support it. it just happens. iconic behaviour honestly. πŸ¦‹


πŸ”₯ HARDWARE πŸ”₯

The ocs_fc driver supports these Fibre Channel adapters:

  • Emulex 16/8G FC GEN 5 HBAS
    • LPe15004 FC Host Bus Adapters
    • LPe160XX FC Host Bus Adapters
  • Emulex 32/16G FC GEN 6 HBAS
    • LPe3100X FC Host Bus Adapters
    • LPe3200X FC Host Bus Adapters

those are the ones, bestie. if yours isn't on the list, it's not on the list πŸ™ˆ


🧚 UPDATING FIRMWARE 🧚

First thing: adapter firmware updates are persistent. they stick around. πŸ’Ύ

Firmware can be updated by following these steps:

  1. Copy this code to a Makefile:
KMOD=ocsflash
FIRMWS=imagename.grp:ocsflash
.include <bsd.kmod.mk>
  1. Replace imagename with the name of the GRP file.
  2. Copy the Makefile and GRP file to a local directory
  3. Execute make and copy the generated ocsflash.ko file to /lib/modules
  4. sysctl dev.ocs_fc.<N>.fw_upgrade=ocsflash
  5. Check kernel messages regarding status of the operation
  6. Reboot the machine

seven steps, in order, don't freestyle it 🌸


πŸŽ€ BOOT OPTIONS πŸŽ€

Options are controlled by setting values in /boot/device.hints.

They are:

  • hint.ocs_fc.N.initiator β€” Enable initiator functionality. Default 1 (enabled), 0 to disable.
  • hint.ocs_fc.N.target β€” Enable target functionality. Default 1 (enabled), 0 to disable.
  • hint.ocs_fc.N.topology β€” Topology: 0 for Auto, 1 for NPort only, 2 for Loop only.
  • hint.ocs_fc.N.speed β€” Link speed in megabits per second. Possible values include: 0 Auto-speed negotiation (default), 4000 (4GFC), 8000 (8GFC), 16000 (16GFC).
psst β€” that N is the adapter number, iykyk πŸ’…

πŸ¦‹ SYSCTL OPTIONS πŸ¦‹

  • dev.ocs_fc.N.port_state β€” Port state (read/write). Valid values are online and offline.
  • dev.ocs_fc.N.wwpn β€” World Wide Port Name (read/write).
  • dev.ocs_fc.N.wwnn β€” World Wide Node Name (read/write).
  • dev.ocs_fc.N.fwrev β€” Firmware revision (read-only).
  • dev.ocs_fc.N.sn β€” Adapter serial number (read-only).
  • dev.ocs_fc.N.configured_speed β€” Configured Port Speed (read/write). Valid values are: 0 Auto-speed negotiation (default), 4000 (4GFC), 8000 (8GFC), 16000 (16GFC).
  • dev.ocs_fc.N.configured_topology β€” Configured Port Topology (read/write). Valid values are: 0-Auto; 1-NPort; 2-Loop.
  • dev.ocs_fc.N.current_speed β€” Current Port Speed (read-only).
  • dev.ocs_fc.N.current_topology β€” Current Port Topology (read-only).
notice how current_speed and current_topology are read-only while configured_* are read/write? yeah, that's the whole bit. you configure, it reports. πŸ’œ

πŸ’Œ SUPPORT πŸ’Œ

For general information and support, go to the Broadcom website at: http://www.broadcom.com/ or E-Mail at ocs-driver-team.pdl@broadcom.com.

they're literally waiting for you, bestie 🫢


πŸ‘€ SEE ALSO πŸ‘€

ifconfig(8)


πŸ’– AUTHORS πŸ’–

The ocs_fc driver was written by Broadcom. periodt. πŸ‘‘


and that's the whole page, we ate, no crumbs left πŸ“ this was the ocs_fc(4) page from the Debian crew, dated March 30, 2018 β€” go forth and fibre-channel responsibly, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from