drivers/scsi/fnic/fnic_res.h
Source file repositories/reference/linux-study-clean/drivers/scsi/fnic/fnic_res.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/fnic/fnic_res.h- Extension
.h- Size
- 8088 bytes
- Lines
- 238
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
wq_enet_desc.hrq_enet_desc.hvnic_wq.hvnic_rq.hfnic_io.hfcpio.hvnic_wq_copy.hvnic_cq_copy.h
Detected Declarations
struct fnicfunction fnic_queue_wq_descfunction fnic_queue_wq_eth_descfunction fnic_queue_wq_copy_desc_icmnd_16function fnic_queue_wq_copy_desc_itmffunction fnic_queue_wq_copy_desc_flogi_regfunction fnic_queue_wq_copy_desc_fip_regfunction fnic_queue_wq_copy_desc_fw_resetfunction fnic_queue_wq_copy_desc_lunmapfunction fnic_queue_rq_desc
Annotated Snippet
#ifndef _FNIC_RES_H_
#define _FNIC_RES_H_
#include "wq_enet_desc.h"
#include "rq_enet_desc.h"
#include "vnic_wq.h"
#include "vnic_rq.h"
#include "fnic_io.h"
#include "fcpio.h"
#include "vnic_wq_copy.h"
#include "vnic_cq_copy.h"
static inline void fnic_queue_wq_desc(struct vnic_wq *wq,
void *os_buf, dma_addr_t dma_addr,
unsigned int len, unsigned int fc_eof,
int vlan_tag_insert,
unsigned int vlan_tag,
int cq_entry, int sop, int eop)
{
struct wq_enet_desc *desc = vnic_wq_next_desc(wq);
wq_enet_desc_enc(desc,
(u64)dma_addr | VNIC_PADDR_TARGET,
(u16)len,
0, /* mss_or_csum_offset */
(u16)fc_eof,
0, /* offload_mode */
(u8)eop, (u8)cq_entry,
1, /* fcoe_encap */
(u8)vlan_tag_insert,
(u16)vlan_tag,
0 /* loopback */);
vnic_wq_post(wq, os_buf, dma_addr, len, sop, eop);
}
static inline void fnic_queue_wq_eth_desc(struct vnic_wq *wq,
void *os_buf, dma_addr_t dma_addr,
unsigned int len,
int vlan_tag_insert,
unsigned int vlan_tag,
int cq_entry)
{
struct wq_enet_desc *desc = vnic_wq_next_desc(wq);
wq_enet_desc_enc(desc,
(u64)dma_addr | VNIC_PADDR_TARGET,
(u16)len,
0, /* mss_or_csum_offset */
0, /* fc_eof */
0, /* offload_mode */
1, /* eop */
(u8)cq_entry,
0, /* fcoe_encap */
(u8)vlan_tag_insert,
(u16)vlan_tag,
0 /* loopback */);
vnic_wq_post(wq, os_buf, dma_addr, len, 1, 1);
}
static inline void fnic_queue_wq_copy_desc_icmnd_16(struct vnic_wq_copy *wq,
u32 req_id,
u32 lunmap_id, u8 spl_flags,
u32 sgl_cnt, u32 sense_len,
u64 sgl_addr, u64 sns_addr,
u8 crn, u8 pri_ta,
u8 flags, u8 *scsi_cdb,
u8 cdb_len,
u32 data_len, u8 *lun,
u32 d_id, u16 mss,
u32 ratov, u32 edtov)
{
struct fcpio_host_req *desc = vnic_wq_copy_next_desc(wq);
desc->hdr.type = FCPIO_ICMND_16; /* enum fcpio_type */
desc->hdr.status = 0; /* header status entry */
desc->hdr._resvd = 0; /* reserved */
desc->hdr.tag.u.req_id = req_id; /* id for this request */
desc->u.icmnd_16.lunmap_id = lunmap_id; /* index into lunmap table */
desc->u.icmnd_16.special_req_flags = spl_flags; /* exch req flags */
desc->u.icmnd_16._resvd0[0] = 0; /* reserved */
desc->u.icmnd_16._resvd0[1] = 0; /* reserved */
desc->u.icmnd_16._resvd0[2] = 0; /* reserved */
desc->u.icmnd_16.sgl_cnt = sgl_cnt; /* scatter-gather list count */
desc->u.icmnd_16.sense_len = sense_len; /* sense buffer length */
desc->u.icmnd_16.sgl_addr = sgl_addr; /* scatter-gather list addr */
desc->u.icmnd_16.sense_addr = sns_addr; /* sense buffer address */
desc->u.icmnd_16.crn = crn; /* SCSI Command Reference No.*/
Annotation
- Immediate include surface: `wq_enet_desc.h`, `rq_enet_desc.h`, `vnic_wq.h`, `vnic_rq.h`, `fnic_io.h`, `fcpio.h`, `vnic_wq_copy.h`, `vnic_cq_copy.h`.
- Detected declarations: `struct fnic`, `function fnic_queue_wq_desc`, `function fnic_queue_wq_eth_desc`, `function fnic_queue_wq_copy_desc_icmnd_16`, `function fnic_queue_wq_copy_desc_itmf`, `function fnic_queue_wq_copy_desc_flogi_reg`, `function fnic_queue_wq_copy_desc_fip_reg`, `function fnic_queue_wq_copy_desc_fw_reset`, `function fnic_queue_wq_copy_desc_lunmap`, `function fnic_queue_rq_desc`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.