summaryrefslogtreecommitdiff
path: root/drivers/scsi/bfa/bfa_cb_ioim_macros.h
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-03-19 18:06:05 (GMT)
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 14:24:17 (GMT)
commit2eba0d4c000777ce43012d7fda806b075f6cf877 (patch)
treefdebad0f55465301bfcbd4f119311f63d358c353 /drivers/scsi/bfa/bfa_cb_ioim_macros.h
parentb504293fe9dc42917a919044f2b672fb361329d0 (diff)
downloadlinux-fsl-qoriq-2eba0d4c000777ce43012d7fda806b075f6cf877.tar.xz
[SCSI] bfa: fix the issue of not handling scsi_cmnd sg chaining case
Currently the driver doesn't take into consideraion of possible sg chaining when it walks through the sg list. This is fixed by using the sg_next() which automatically handles the chaining case. Obosolete code is removed as a result of this change. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_cb_ioim_macros.h')
-rw-r--r--drivers/scsi/bfa/bfa_cb_ioim_macros.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/scsi/bfa/bfa_cb_ioim_macros.h b/drivers/scsi/bfa/bfa_cb_ioim_macros.h
index 961fe43..53a616f 100644
--- a/drivers/scsi/bfa/bfa_cb_ioim_macros.h
+++ b/drivers/scsi/bfa/bfa_cb_ioim_macros.h
@@ -117,35 +117,6 @@ bfa_cb_ioim_get_timeout(struct bfad_ioim_s *dio)
}
/**
- * Get SG element for the I/O request given the SG element index
- */
-static inline union bfi_addr_u
-bfa_cb_ioim_get_sgaddr(struct bfad_ioim_s *dio, int sgeid)
-{
- struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
- struct scatterlist *sge;
- u64 addr;
-
- sge = (struct scatterlist *)scsi_sglist(cmnd) + sgeid;
- addr = (u64) sg_dma_address(sge);
-
- return *((union bfi_addr_u *) &addr);
-}
-
-static inline u32
-bfa_cb_ioim_get_sglen(struct bfad_ioim_s *dio, int sgeid)
-{
- struct scsi_cmnd *cmnd = (struct scsi_cmnd *)dio;
- struct scatterlist *sge;
- u32 len;
-
- sge = (struct scatterlist *)scsi_sglist(cmnd) + sgeid;
- len = sg_dma_len(sge);
-
- return len;
-}
-
-/**
* Get Command Reference Number for the I/O request. 0 if none.
*/
static inline u8