diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 12:47:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 12:47:02 -0800 |
commit | da40d036fd716f0efb2917076220814b1e927ae1 (patch) | |
tree | 567893573a48e2954d82421e77606034d3b32f84 /drivers/scsi/bfa/bfa_cb_ioim.h | |
parent | aa58abc20fa85328a9f048e2626c0893691ff284 (diff) | |
parent | c32e061fa19893ce4acf95d97d5613a161f0f1b7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (147 commits)
[SCSI] arcmsr: fix write to device check
[SCSI] lpfc: lower stack use in lpfc_fc_frame_check
[SCSI] eliminate an unnecessary local variable from scsi_remove_target()
[SCSI] libiscsi: use bh locking instead of irq with session lock
[SCSI] libiscsi: do not take host lock in queuecommand
[SCSI] be2iscsi: fix null ptr when accessing task hdr
[SCSI] be2iscsi: fix gfp use in alloc_pdu
[SCSI] libiscsi: add more informative failure message during iscsi scsi eh
[SCSI] gdth: Add missing call to gdth_ioctl_free
[SCSI] bfa: remove unused defintions and misc cleanups
[SCSI] bfa: remove inactive functions
[SCSI] bfa: replace bfa_assert with WARN_ON
[SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.
[SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout.
[SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.
[SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts.
[SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails on CNAs.
[SCSI] qla2xxx: Remove redundant module parameter permission bits
[SCSI] qla2xxx: Add sysfs node for displaying board temperature.
[SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.
...
Diffstat (limited to 'drivers/scsi/bfa/bfa_cb_ioim.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_cb_ioim.h | 169 |
1 files changed, 0 insertions, 169 deletions
diff --git a/drivers/scsi/bfa/bfa_cb_ioim.h b/drivers/scsi/bfa/bfa_cb_ioim.h deleted file mode 100644 index 6f021015f1f..00000000000 --- a/drivers/scsi/bfa/bfa_cb_ioim.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2005-2010 Brocade Communications Systems, Inc. - * All rights reserved - * www.brocade.com - * - * Linux driver for Brocade Fibre Channel Host Bus Adapter. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License (GPL) Version 2 as - * published by the Free Software Foundation - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - */ - -#ifndef __BFA_HCB_IOIM_H__ -#define __BFA_HCB_IOIM_H__ - -#include "bfa_os_inc.h" -/* - * task attribute values in FCP-2 FCP_CMND IU - */ -#define SIMPLE_Q 0 -#define HEAD_OF_Q 1 -#define ORDERED_Q 2 -#define ACA_Q 4 -#define UNTAGGED 5 - -static inline lun_t -bfad_int_to_lun(u32 luno) -{ - union { - u16 scsi_lun[4]; - lun_t bfa_lun; - } lun; - - lun.bfa_lun = 0; - lun.scsi_lun[0] = cpu_to_be16(luno); - - return lun.bfa_lun; -} - -/* - * Get LUN for the I/O request - */ -#define bfa_cb_ioim_get_lun(__dio) \ - bfad_int_to_lun(((struct scsi_cmnd *)__dio)->device->lun) - -/* - * Get CDB for the I/O request - */ -static inline u8 * -bfa_cb_ioim_get_cdb(struct bfad_ioim_s *dio) -{ - struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; - - return (u8 *) cmnd->cmnd; -} - -/* - * Get I/O direction (read/write) for the I/O request - */ -static inline enum fcp_iodir -bfa_cb_ioim_get_iodir(struct bfad_ioim_s *dio) -{ - struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; - enum dma_data_direction dmadir; - - dmadir = cmnd->sc_data_direction; - if (dmadir == DMA_TO_DEVICE) - return FCP_IODIR_WRITE; - else if (dmadir == DMA_FROM_DEVICE) - return FCP_IODIR_READ; - else - return FCP_IODIR_NONE; -} - -/* - * Get IO size in bytes for the I/O request - */ -static inline u32 -bfa_cb_ioim_get_size(struct bfad_ioim_s *dio) -{ - struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; - - return scsi_bufflen(cmnd); -} - -/* - * Get timeout for the I/O request - */ -static inline u8 -bfa_cb_ioim_get_timeout(struct bfad_ioim_s *dio) -{ - struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; - /* - * TBD: need a timeout for scsi passthru - */ - if (cmnd->device->host == NULL) - return 4; - - return 0; -} - -/* - * Get Command Reference Number for the I/O request. 0 if none. - */ -static inline u8 -bfa_cb_ioim_get_crn(struct bfad_ioim_s *dio) -{ - return 0; -} - -/* - * Get SAM-3 priority for the I/O request. 0 is default. - */ -static inline u8 -bfa_cb_ioim_get_priority(struct bfad_ioim_s *dio) -{ - return 0; -} - -/* - * Get task attributes for the I/O request. Default is FCP_TASK_ATTR_SIMPLE(0). - */ -static inline u8 -bfa_cb_ioim_get_taskattr(struct bfad_ioim_s *dio) -{ - struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; - u8 task_attr = UNTAGGED; - - if (cmnd->device->tagged_supported) { - switch (cmnd->tag) { - case HEAD_OF_QUEUE_TAG: - task_attr = HEAD_OF_Q; - break; - case ORDERED_QUEUE_TAG: - task_attr = ORDERED_Q; - break; - default: - task_attr = SIMPLE_Q; - break; - } - } - - return task_attr; -} - -/* - * Get CDB length in bytes for the I/O request. Default is FCP_CMND_CDB_LEN(16). - */ -static inline u8 -bfa_cb_ioim_get_cdblen(struct bfad_ioim_s *dio) -{ - struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio; - - return cmnd->cmd_len; -} - -/* - * Assign queue to be used for the I/O request. This value depends on whether - * the driver wants to use the queues via any specific algorithm. Currently, - * this is not supported. - */ -#define bfa_cb_ioim_get_reqq(__dio) BFA_FALSE - -#endif /* __BFA_HCB_IOIM_H__ */ |