1 /*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for *
3 * Enterprise Fibre Channel Host Bus Adapters. *
4 * Refer to the README file included with this package for *
5 * driver version and adapter support. *
6 * Copyright (C) 2004 Emulex Corporation. *
9 * This program is free software; you can redistribute it and/or *
10 * modify it under the terms of the GNU General Public License *
11 * as published by the Free Software Foundation; either version 2 *
12 * of the License, or (at your option) any later version. *
14 * This program is distributed in the hope that it will be useful, *
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17 * GNU General Public License for more details, a copy of which *
18 * can be found in the file COPYING included with this package. *
19 *******************************************************************/
22 * $Id: lpfc_scsi.h 1.68 2004/11/10 11:40:43EST sf_support Exp $
28 #include "lpfc_disc.h"
36 struct lpfc_nodelist *pnode; /* Pointer to the node structure. */
42 #if defined(FC_TRANS_VER1) || defined(FC_TRANS_265_BLKPATCH)
46 struct scsi_target *starget; /* Pointer to midlayer target
49 #if defined(FC_TRANS_265_BLKPATCH)
50 struct timer_list dev_loss_timer;
54 struct lpfc_scsi_buf {
55 struct scsi_cmnd *pCmd;
56 struct lpfc_hba *scsi_hba;
57 struct lpfc_target *target;
61 uint16_t status; /* From IOCB Word 7- ulpStatus */
62 uint32_t result; /* From IOCB Word 4. */
64 uint32_t seg_cnt; /* Number of scatter-gather segments returned by
65 * dma_map_sg. The driver needs this for calls
67 dma_addr_t nonsg_phys; /* Non scatter-gather physical address. */
69 /* dma_ext has both virt, phys to dma-able buffer
70 * which contains fcp_cmd, fcp_rsp and scatter gather list fro upto
71 * 68 (LPFC_SCSI_BPL_SIZE) BDE entries,
72 * xfer length, cdb, data direction....
74 struct lpfc_dmabuf dma_ext;
75 struct fcp_cmnd *fcp_cmnd;
76 struct fcp_rsp *fcp_rsp;
77 struct ulp_bde64 *fcp_bpl;
79 /* cur_iocbq has phys of the dma-able buffer.
82 struct lpfc_iocbq cur_iocbq;
85 #define LPFC_SCSI_INITIAL_BPL_SIZE 4 /* Number of scsi buf BDEs in fcp_bpl */
87 #define LPFC_SCSI_DMA_EXT_SIZE 264
88 #define LPFC_BPL_SIZE 1024
90 #define MDAC_DIRECT_CMD 0x22
92 #endif /* _H_LPFC_SCSI */