request.c (c79dd80d73017a88a2c2ae46e7d5303cba6a32e0) request.c (abec912d71c44bbd642ce12ad98aab76f5a53163)
1/*
2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
4 *
5 * GPL LICENSE SUMMARY
6 *
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
8 *

--- 78 unchanged lines hidden (view full) ---

87static dma_addr_t to_sgl_element_pair_dma(struct isci_host *ihost,
88 struct isci_request *ireq, u32 idx)
89{
90 u32 offset;
91
92 if (idx == 0) {
93 offset = (void *) &ireq->tc->sgl_pair_ab -
94 (void *) &ihost->task_context_table[0];
1/*
2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
4 *
5 * GPL LICENSE SUMMARY
6 *
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
8 *

--- 78 unchanged lines hidden (view full) ---

87static dma_addr_t to_sgl_element_pair_dma(struct isci_host *ihost,
88 struct isci_request *ireq, u32 idx)
89{
90 u32 offset;
91
92 if (idx == 0) {
93 offset = (void *) &ireq->tc->sgl_pair_ab -
94 (void *) &ihost->task_context_table[0];
95 return ihost->task_context_dma + offset;
95 return ihost->tc_dma + offset;
96 } else if (idx == 1) {
97 offset = (void *) &ireq->tc->sgl_pair_cd -
98 (void *) &ihost->task_context_table[0];
96 } else if (idx == 1) {
97 offset = (void *) &ireq->tc->sgl_pair_cd -
98 (void *) &ihost->task_context_table[0];
99 return ihost->task_context_dma + offset;
99 return ihost->tc_dma + offset;
100 }
101
102 return sci_io_request_get_dma_addr(ireq, &ireq->sg_table[idx - 2]);
103}
104
105static void init_sgl_element(struct scu_sgl_element *e, struct scatterlist *sg)
106{
107 e->length = sg_dma_len(sg);

--- 3523 unchanged lines hidden ---
100 }
101
102 return sci_io_request_get_dma_addr(ireq, &ireq->sg_table[idx - 2]);
103}
104
105static void init_sgl_element(struct scu_sgl_element *e, struct scatterlist *sg)
106{
107 e->length = sg_dma_len(sg);

--- 3523 unchanged lines hidden ---