drivers/scsi/libfc/fc_libfc.h

Source file repositories/reference/linux-study-clean/drivers/scsi/libfc/fc_libfc.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/libfc/fc_libfc.h
Extension
.h
Size
3831 bytes
Lines
128
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.

Dependency Surface

Detected Declarations

Annotated Snippet

if ((pkt)->seq_ptr) {					\
			struct fc_exch *_ep = NULL;			\
			_ep = fc_seq_exch((pkt)->seq_ptr);		\
			pr_info("host%u: fcp: %6.6x: "			\
				"xid %04x-%04x: " fmt,			\
				(pkt)->lp->host->host_no,		\
				(pkt)->rport->port_id,			\
				(_ep)->oxid, (_ep)->rxid, ##args);	\
		} else {						\
			pr_info("host%u: fcp: %6.6x: " fmt,		\
				(pkt)->lp->host->host_no,		\
				(pkt)->rport->port_id, ##args);		\
		}							\
	})

#define FC_EXCH_DBG(exch, fmt, args...)					\
	FC_CHECK_LOGGING(FC_EXCH_LOGGING,				\
			 pr_info("host%u: xid %4x: " fmt,		\
				 (exch)->lp->host->host_no,		\
				 exch->xid, ##args))

#define FC_SCSI_DBG(lport, fmt, args...)				\
	FC_CHECK_LOGGING(FC_SCSI_LOGGING,				\
			 pr_info("host%u: scsi: " fmt,			\
				 (lport)->host->host_no, ##args))

/*
 * FC-4 Providers.
 */
extern struct fc4_prov *fc_active_prov[];	/* providers without recv */
extern struct fc4_prov *fc_passive_prov[];	/* providers with recv */
extern struct mutex fc_prov_mutex;		/* lock over table changes */

extern struct fc4_prov fc_rport_t0_prov;	/* type 0 provider */
extern struct fc4_prov fc_lport_els_prov;	/* ELS provider */
extern struct fc4_prov fc_rport_fcp_init;	/* FCP initiator provider */

/*
 * Set up direct-data placement for this I/O request
 */
void fc_fcp_ddp_setup(struct fc_fcp_pkt *fsp, u16 xid);
void fc_fcp_ddp_done(struct fc_fcp_pkt *fsp);

/*
 * Module setup functions
 */
int fc_setup_exch_mgr(void);
void fc_destroy_exch_mgr(void);
int fc_setup_rport(void);
void fc_destroy_rport(void);
int fc_setup_fcp(void);
void fc_destroy_fcp(void);

/*
 * Internal libfc functions
 */
const char *fc_els_resp_type(struct fc_frame *);
extern void fc_fc4_add_lport(struct fc_lport *);
extern void fc_fc4_del_lport(struct fc_lport *);
extern void fc_fc4_conf_lport_params(struct fc_lport *, enum fc_fh_type);

/*
 * Copies a buffer into an sg list
 */
u32 fc_copy_buffer_to_sglist(void *buf, size_t len,
			     struct scatterlist *sg,
			     u32 *nents, size_t *offset,
			     u32 *crc);

#endif /* _FC_LIBFC_H_ */

Annotation

Implementation Notes