Linux Kernel
3.7.1
|
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/export.h>
#include <linux/delay.h>
#include <asm/unaligned.h>
#include <scsi/scsi.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport_fc.h>
#include "lpfc_version.h"
#include "lpfc_hw4.h"
#include "lpfc_hw.h"
#include "lpfc_sli.h"
#include "lpfc_sli4.h"
#include "lpfc_nl.h"
#include "lpfc_disc.h"
#include "lpfc.h"
#include "lpfc_scsi.h"
#include "lpfc_logmsg.h"
#include "lpfc_crtn.h"
#include "lpfc_vport.h"
Go to the source code of this file.
Data Structures | |
struct | scsi_dif_tuple |
Macros | |
#define | LPFC_RESET_WAIT 2 |
#define | LPFC_ABORT_WAIT 2 |
Functions | |
int | lpfc_change_queue_depth (struct scsi_device *sdev, int qdepth, int reason) |
void | lpfc_rampdown_queue_depth (struct lpfc_hba *phba) |
void | lpfc_ramp_down_queue_handler (struct lpfc_hba *phba) |
void | lpfc_ramp_up_queue_handler (struct lpfc_hba *phba) |
void | lpfc_scsi_dev_block (struct lpfc_hba *phba) |
void | lpfc_sli4_vport_delete_fcp_xri_aborted (struct lpfc_vport *vport) |
void | lpfc_sli4_fcp_xri_aborted (struct lpfc_hba *phba, struct sli4_wcqe_xri_aborted *axri) |
int | lpfc_sli4_post_scsi_sgl_list (struct lpfc_hba *phba, struct list_head *post_sblist, int sb_count) |
int | lpfc_sli4_repost_scsi_sgl_list (struct lpfc_hba *phba) |
int | lpfc_scsi_api_table_setup (struct lpfc_hba *phba, uint8_t dev_grp) |
const char * | lpfc_info (struct Scsi_Host *host) |
void | lpfc_poll_start_timer (struct lpfc_hba *phba) |
void | lpfc_poll_timeout (unsigned long ptr) |
Variables | |
int | _dump_buf_done |
struct scsi_host_template | lpfc_template |
struct scsi_host_template | lpfc_vport_template |
#define LPFC_ABORT_WAIT 2 |
Definition at line 49 of file lpfc_scsi.c.
#define LPFC_RESET_WAIT 2 |
Definition at line 48 of file lpfc_scsi.c.
int lpfc_change_queue_depth | ( | struct scsi_device * | sdev, |
int | qdepth, | ||
int | reason | ||
) |
lpfc_change_queue_depth - Alter scsi device queue depth : Pointer the scsi device on which to change the queue depth. : New queue depth to set the sdev to. : The reason for the queue depth change.
This function is called by the midlayer and the LLD to alter the queue depth for a scsi device. This function sets the queue depth to the new value and sends an event out to log the queue depth change.
Definition at line 271 of file lpfc_scsi.c.
lpfc_info - Info entry point of scsi_host_template data structure : The scsi host for which this call is being executed.
This routine provides module information about hba.
Reutrn code: Pointer to char - Success.
Definition at line 4162 of file lpfc_scsi.c.
lpfc_poll_start_timer - Routine to start fcp_poll_timer of HBA : The Hba for which this call is being executed.
This routine starts the fcp_poll_timer of .
Definition at line 4226 of file lpfc_scsi.c.
lpfc_poll_timeout - Restart polling timer : Map to lpfc_hba data structure pointer.
This routine restarts fcp_poll timer, when FCP ring polling is enable and FCP Ring interrupt is disable.
Definition at line 4239 of file lpfc_scsi.c.
lpfc_ramp_down_queue_handler - WORKER_RAMP_DOWN_QUEUE event handler : The Hba for which this call is being executed.
This routine is called to process WORKER_RAMP_DOWN_QUEUE event for worker thread.This routine reduces queue depth for all scsi device on each vport associated with .
Definition at line 384 of file lpfc_scsi.c.
lpfc_ramp_up_queue_handler - WORKER_RAMP_UP_QUEUE event handler : The Hba for which this call is being executed.
This routine is called to process WORKER_RAMP_UP_QUEUE event for worker thread.This routine increases queue depth for all scsi device on each vport associated with by 1. This routine also sets num_rsrc_err and num_cmd_success to zero.
Definition at line 436 of file lpfc_scsi.c.
lpfc_rampdown_queue_depth - Post RAMP_DOWN_QUEUE event to worker thread : The Hba for which this call is being executed.
This routine is called when there is resource error in driver or firmware. This routine posts WORKER_RAMP_DOWN_QUEUE event for . This routine posts at most 1 event each second. This routine wakes up worker thread of to process WORKER_RAM_DOWN_EVENT event.
This routine should be called with no lock held.
Definition at line 302 of file lpfc_scsi.c.
lpfc_scsi_api_table_setup - Set up scsi api function jump table : The hba struct for which this call is being executed. : The HBA PCI-Device group number.
This routine sets up the SCSI interface API function jump table in struct. Returns: 0 - success, -ENODEV - failure.
Definition at line 4098 of file lpfc_scsi.c.
lpfc_scsi_dev_block - set all scsi hosts to block state : Pointer to HBA context object.
This function walks vport list and set each SCSI host to block state by invoking fc_remote_port_delete() routine. This function is invoked with EEH when device's PCI slot has been permanently disabled.
Definition at line 470 of file lpfc_scsi.c.
void lpfc_sli4_fcp_xri_aborted | ( | struct lpfc_hba * | phba, |
struct sli4_wcqe_xri_aborted * | axri | ||
) |
int lpfc_sli4_post_scsi_sgl_list | ( | struct lpfc_hba * | phba, |
struct list_head * | post_sblist, | ||
int | sb_count | ||
) |
lpfc_sli4_post_scsi_sgl_list - Psot blocks of scsi buffer sgls from a list : pointer to lpfc hba data structure. : pointer to the scsi buffer list.
This routine walks a list of scsi buffers that was passed in. It attempts to construct blocks of scsi buffer sgls which contains contiguous xris and uses the non-embedded SGL block post mailbox commands to post to the port. For single SCSI buffer sgl with non-contiguous xri, if any, it shall use embedded SGL post mailbox command for posting. The passed in must be local list, thus no lock is needed when manipulate the list.
Returns: 0 = failure, non-zero number of successfully posted buffers.
Definition at line 738 of file lpfc_scsi.c.
lpfc_sli4_repost_scsi_sgl_list - Repsot all the allocated scsi buffer sgls : pointer to lpfc hba data structure.
This routine walks the list of scsi buffers that have been allocated and repost them to the port by using SGL block post. This is needed after a pci_function_reset/warm_start or start. The lpfc_hba_down_post_s4 routine is responsible for moving all scsi buffers on the lpfc_abts_scsi_sgl_list to the lpfc_scsi_buf_list. If the repost fails, reject all scsi buffers.
Returns: 0 = success, non-zero failure.
Definition at line 862 of file lpfc_scsi.c.
void lpfc_sli4_vport_delete_fcp_xri_aborted | ( | struct lpfc_vport * | vport | ) |
lpfc_sli4_vport_delete_fcp_xri_aborted -Remove all ndlp references for vport : pointer to lpfc vport data structure.
This routine is invoked by the vport cleanup for deletions and the cleanup for an ndlp on removal.
Definition at line 635 of file lpfc_scsi.c.
int _dump_buf_done |
Definition at line 51 of file lpfc_scsi.c.
struct scsi_host_template lpfc_template |
Definition at line 5114 of file lpfc_scsi.c.
struct scsi_host_template lpfc_vport_template |
Definition at line 5138 of file lpfc_scsi.c.