drivers/scsi/isci/unsolicited_frame_control.h

Source file repositories/reference/linux-study-clean/drivers/scsi/isci/unsolicited_frame_control.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/isci/unsolicited_frame_control.h
Extension
.h
Size
8577 bytes
Lines
283
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

struct scu_unsolicited_frame_header {
	/**
	 * This field indicates if there is an Initiator Index Table entry with
	 * which this header is associated.
	 */
	u32 iit_exists:1;

	/**
	 * This field simply indicates the protocol type (i.e. SSP, STP, SMP).
	 */
	u32 protocol_type:3;

	/**
	 * This field indicates if the frame is an address frame (IAF or OAF)
	 * or if it is a information unit frame.
	 */
	u32 is_address_frame:1;

	/**
	 * This field simply indicates the connection rate at which the frame
	 * was received.
	 */
	u32 connection_rate:4;

	u32 reserved:23;

	/**
	 * This field represents the actual header data received on the link.
	 */
	u32 data[SCU_UNSOLICITED_FRAME_HEADER_DATA_DWORDS];

};



/**
 * enum unsolicited_frame_state -
 *
 * This enumeration represents the current unsolicited frame state.  The
 * controller object can not updtate the hardware unsolicited frame put pointer
 * unless it has already processed the priror unsolicited frames.
 */
enum unsolicited_frame_state {
	/**
	 * This state is when the frame is empty and not in use.  It is
	 * different from the released state in that the hardware could DMA
	 * data to this frame buffer.
	 */
	UNSOLICITED_FRAME_EMPTY,

	/**
	 * This state is set when the frame buffer is in use by by some
	 * object in the system.
	 */
	UNSOLICITED_FRAME_IN_USE,

	/**
	 * This state is set when the frame is returned to the free pool
	 * but one or more frames prior to this one are still in use.
	 * Once all of the frame before this one are freed it will go to
	 * the empty state.
	 */
	UNSOLICITED_FRAME_RELEASED,

	UNSOLICITED_FRAME_MAX_STATES
};

/**
 * struct sci_unsolicited_frame -
 *
 * This is the unsolicited frame data structure it acts as the container for
 * the current frame state, frame header and frame buffer.
 */
struct sci_unsolicited_frame {
	/**
	 * This field contains the current frame state
	 */
	enum unsolicited_frame_state state;

	/**
	 * This field points to the frame header data.
	 */
	struct scu_unsolicited_frame_header *header;

	/**
	 * This field points to the frame buffer data.
	 */
	void *buffer;

};

Annotation

Implementation Notes