 memset(hs, 0, sizeof (struct fc_host_statistics)); 
lpfc_get_stats(struct Scsi_Host *shost){	struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata[0];	struct lpfc_sli *psli = &phba->sli;	struct fc_host_statistics *hs =			(struct fc_host_statistics *)phba->link_stats;	LPFC_MBOXQ_t *pmboxq;	MAILBOX_t *pmb;	int rc=0;	pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);	if (!pmboxq)		return NULL;	memset(pmboxq, 0, sizeof (LPFC_MBOXQ_t));	pmb = &pmboxq->mb;	pmb->mbxCommand = MBX_READ_STATUS;	pmb->mbxOwner = OWN_HOST;	pmboxq->context1 = NULL;	if ((phba->fc_flag & FC_OFFLINE_MODE) ||	    (!(psli->sli_flag & LPFC_SLI2_ACTIVE))){		rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL);	} else		rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);	if (rc != MBX_SUCCESS) {		if (pmboxq) {			if (rc == MBX_TIMEOUT)				pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl;			else				mempool_free( pmboxq, phba->mbox_mem_pool);		}		return NULL;	}	hs->tx_frames = pmb->un.varRdStatus.xmitFrameCnt;	hs->tx_words = (pmb->un.varRdStatus.xmitByteCnt * 256);	hs->rx_frames = pmb->un.varRdStatus.rcvFrameCnt;	hs->rx_words = (pmb->un.varRdStatus.rcvByteCnt * 256);	memset((void *)pmboxq, 0, sizeof (LPFC_MBOXQ_t));	pmb->mbxCommand = MBX_READ_LNK_STAT;	pmb->mbxOwner = OWN_HOST;	pmboxq->context1 = NULL;	if ((phba->fc_flag & FC_OFFLINE_MODE) ||	    (!(psli->sli_flag & LPFC_SLI2_ACTIVE))) {		rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL);	} else		rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);	if (rc != MBX_SUCCESS) {		if (pmboxq) {			if (rc == MBX_TIMEOUT)				pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl;			else				mempool_free( pmboxq, phba->mbox_mem_pool);		}		return NULL;	}	hs->link_failure_count = pmb->un.varRdLnk.linkFailureCnt;	hs->loss_of_sync_count = pmb->un.varRdLnk.lossSyncCnt;	hs->loss_of_signal_count = pmb->un.varRdLnk.lossSignalCnt;	hs->prim_seq_protocol_err_count = pmb->un.varRdLnk.primSeqErrCnt;	hs->invalid_tx_word_count = pmb->un.varRdLnk.invalidXmitWord;	hs->invalid_crc_count = pmb->un.varRdLnk.crcCnt;	hs->error_frames = pmb->un.varRdLnk.crcCnt;	if (phba->fc_topology == TOPOLOGY_LOOP) {		hs->lip_count = (phba->fc_eventTag >> 1);		hs->nos_count = -1;	} else {		hs->lip_count = -1;		hs->nos_count = (phba->fc_eventTag >> 1);	}	hs->dumped_frames = -1;/* FIX ME */	/*hs->SecondsSinceLastReset = (jiffies - lpfc_loadtime) / HZ;*/	return hs;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f888ba3ce77c66bece3d804caf7d559838209a4a/lpfc_attr.c/buggy/drivers/scsi/lpfc/lpfc_attr.c