diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-02-22 09:11:04 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-02-22 18:20:59 -0500 |
commit | c9872fe1add5709fffd42249e6ca1080999aa06a (patch) | |
tree | 8ee1278a998220785a3eaf1ae7c3fd4ba54ced22 /drivers/scsi/st.c | |
parent | 26106e3ca379e30790c41d8835e79395437152ec (diff) |
[SCSI] stex: stex_internal_copy should be called with sg_count in struct st_ccb
stex_internal_copy copies an in-kernel buffer to a sg list by using
scsi_kmap_atomic_sg. Some functions calls stex_internal_copy with
sg_count in struct st_ccb, which is the value that dma_map_sg
returned. However it might be shorter than the actual number of sg
entries (if the IOMMU merged the sg entries).
scsi_kmap_atomic_sg doesn't see sg->dma_length so stex_internal_copy
should be called with the actual number of sg entries
(i.e. scsi_sg_count), because if the sg entries were merged,
stex_direct_copy wrongly think that the data length in the sg list is
shorter than the actual length.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/st.c')
0 files changed, 0 insertions, 0 deletions