summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_device.c
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-01-16 16:57:08 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2012-01-18 08:35:58 +0000
commit4949314c7283ea4f9ade182ca599583b89f7edd6 (patch)
treebbd2316996bc2f19c1b3a8c24f8591f12d2330fa /drivers/target/target_core_device.c
parente8904dc5008ef92f0f62391d6557f03f921eeb32 (diff)
downloadlinux-4949314c7283ea4f9ade182ca599583b89f7edd6.tar.gz
linux-4949314c7283ea4f9ade182ca599583b89f7edd6.tar.xz
linux-4949314c7283ea4f9ade182ca599583b89f7edd6.zip
target: Allow control CDBs with data > 1 page
We need to handle >1 page control cdbs, so extend the code to do a vmap if bigger than 1 page. It seems like kmap() is still preferable if just a page, fewer TLB shootdowns(?), so keep using that when possible. Rename function pair for their new scope. Signed-off-by: Andy Grover <agrover@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r--drivers/target/target_core_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index de5f4fea7f62..edbcabbf85f7 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -657,7 +657,7 @@ int target_report_luns(struct se_task *se_task)
unsigned char *buf;
u32 cdb_offset = 0, lun_count = 0, offset = 8, i;
- buf = transport_kmap_first_data_page(se_cmd);
+ buf = (unsigned char *) transport_kmap_data_sg(se_cmd);
/*
* If no struct se_session pointer is present, this struct se_cmd is
@@ -695,7 +695,7 @@ int target_report_luns(struct se_task *se_task)
* See SPC3 r07, page 159.
*/
done:
- transport_kunmap_first_data_page(se_cmd);
+ transport_kunmap_data_sg(se_cmd);
lun_count *= 8;
buf[0] = ((lun_count >> 24) & 0xff);
buf[1] = ((lun_count >> 16) & 0xff);