Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/scatterlist.h>
#include <linux/err.h>
#include <linux/crc32.h>
#include <linux/slab.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/fc/fc_fc2.h>
#include <scsi/libfc.h>
#include <scsi/fc_encode.h>
#include "fc_libfc.h"
Go to the source code of this file.
Data Structures | |
struct | fc_fcp_internal |
Macros | |
#define | FC_SRB_FREE 0 /* cmd is free */ |
#define | FC_SRB_CMD_SENT (1 << 0) /* cmd has been sent */ |
#define | FC_SRB_RCV_STATUS (1 << 1) /* response has arrived */ |
#define | FC_SRB_ABORT_PENDING (1 << 2) /* cmd abort sent to device */ |
#define | FC_SRB_ABORTED (1 << 3) /* abort acknowledged */ |
#define | FC_SRB_DISCONTIG (1 << 4) /* non-sequential data recvd */ |
#define | FC_SRB_COMPL (1 << 5) /* fc_io_compl has been run */ |
#define | FC_SRB_FCP_PROCESSING_TMO (1 << 6) /* timer function processing */ |
#define | FC_SRB_READ (1 << 1) |
#define | FC_SRB_WRITE (1 << 0) |
#define | CMD_SP(Cmnd) ((struct fc_fcp_pkt *)(Cmnd)->SCp.ptr) |
#define | CMD_ENTRY_STATUS(Cmnd) ((Cmnd)->SCp.have_data_in) |
#define | CMD_COMPL_STATUS(Cmnd) ((Cmnd)->SCp.this_residual) |
#define | CMD_SCSI_STATUS(Cmnd) ((Cmnd)->SCp.Status) |
#define | CMD_RESID_LEN(Cmnd) ((Cmnd)->SCp.buffers_residual) |
#define | fc_get_scsi_internal(x) ((struct fc_fcp_internal *)(x)->scsi_priv) |
#define | FC_COMPLETE 0 |
#define | FC_CMD_ABORTED 1 |
#define | FC_CMD_RESET 2 |
#define | FC_CMD_PLOGO 3 |
#define | FC_SNS_RCV 4 |
#define | FC_TRANS_ERR 5 |
#define | FC_DATA_OVRRUN 6 |
#define | FC_DATA_UNDRUN 7 |
#define | FC_ERROR 8 |
#define | FC_HRD_ERROR 9 |
#define | FC_CRC_ERROR 10 |
#define | FC_TIMED_OUT 11 |
#define | FC_SCSI_TM_TOV (10 * HZ) |
#define | FC_HOST_RESET_TIMEOUT (30 * HZ) |
#define | FC_CAN_QUEUE_PERIOD (60 * HZ) |
#define | FC_MAX_ERROR_CNT 5 |
#define | FC_MAX_RECOV_RETRY 3 |
#define | FC_FCP_DFLT_QUEUE_DEPTH 32 |
Functions | |
void | fc_fcp_ddp_setup (struct fc_fcp_pkt *fsp, u16 xid) |
void | fc_fcp_ddp_done (struct fc_fcp_pkt *fsp) |
int | fc_queuecommand (struct Scsi_Host *shost, struct scsi_cmnd *sc_cmd) |
EXPORT_SYMBOL (fc_queuecommand) | |
int | fc_eh_abort (struct scsi_cmnd *sc_cmd) |
EXPORT_SYMBOL (fc_eh_abort) | |
int | fc_eh_device_reset (struct scsi_cmnd *sc_cmd) |
EXPORT_SYMBOL (fc_eh_device_reset) | |
int | fc_eh_host_reset (struct scsi_cmnd *sc_cmd) |
EXPORT_SYMBOL (fc_eh_host_reset) | |
int | fc_slave_alloc (struct scsi_device *sdev) |
EXPORT_SYMBOL (fc_slave_alloc) | |
int | fc_change_queue_depth (struct scsi_device *sdev, int qdepth, int reason) |
EXPORT_SYMBOL (fc_change_queue_depth) | |
int | fc_change_queue_type (struct scsi_device *sdev, int tag_type) |
EXPORT_SYMBOL (fc_change_queue_type) | |
void | fc_fcp_destroy (struct fc_lport *lport) |
EXPORT_SYMBOL (fc_fcp_destroy) | |
int | fc_setup_fcp (void) |
void | fc_destroy_fcp (void) |
int | fc_fcp_init (struct fc_lport *lport) |
EXPORT_SYMBOL (fc_fcp_init) | |
#define CMD_COMPL_STATUS | ( | Cmnd | ) | ((Cmnd)->SCp.this_residual) |
#define CMD_RESID_LEN | ( | Cmnd | ) | ((Cmnd)->SCp.buffers_residual) |
#define CMD_SCSI_STATUS | ( | Cmnd | ) | ((Cmnd)->SCp.Status) |
#define CMD_SP | ( | Cmnd | ) | ((struct fc_fcp_pkt *)(Cmnd)->SCp.ptr) |
#define fc_get_scsi_internal | ( | x | ) | ((struct fc_fcp_internal *)(x)->scsi_priv) |
#define FC_SRB_COMPL (1 << 5) /* fc_io_compl has been run */ |
#define FC_SRB_DISCONTIG (1 << 4) /* non-sequential data recvd */ |
#define FC_SRB_RCV_STATUS (1 << 1) /* response has arrived */ |
EXPORT_SYMBOL | ( | fc_queuecommand | ) |
EXPORT_SYMBOL | ( | fc_eh_abort | ) |
EXPORT_SYMBOL | ( | fc_eh_device_reset | ) |
EXPORT_SYMBOL | ( | fc_eh_host_reset | ) |
EXPORT_SYMBOL | ( | fc_slave_alloc | ) |
EXPORT_SYMBOL | ( | fc_change_queue_depth | ) |
EXPORT_SYMBOL | ( | fc_change_queue_type | ) |
EXPORT_SYMBOL | ( | fc_fcp_destroy | ) |
EXPORT_SYMBOL | ( | fc_fcp_init | ) |
int fc_change_queue_depth | ( | struct scsi_device * | sdev, |
int | qdepth, | ||
int | reason | ||
) |
int fc_change_queue_type | ( | struct scsi_device * | sdev, |
int | tag_type | ||
) |
fc_eh_device_reset() - Reset a single LUN : The SCSI command which identifies the device whose LUN is to be reset
Set from SCSI host template.
void fc_fcp_ddp_done | ( | struct fc_fcp_pkt * | fsp | ) |
fc_fcp_ddp_done() - Calls a LLD's ddp_done routine to release any DDP related resources for a fcp_pkt : The FCP packet that DDP had been used on
void fc_fcp_ddp_setup | ( | struct fc_fcp_pkt * | fsp, |
u16 | xid | ||
) |