diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:09:16 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 13:09:16 -0400 |
| commit | 92d15c2ccbb3e31a3fc71ad28fdb55e1319383c0 (patch) | |
| tree | 8d83c0dc3c6b935d8367e331872f242b742f0a8a /drivers/scsi/qlogicpti.c | |
| parent | f20bf6125605acbbc7eb8c9420d7221c91aa83eb (diff) | |
| parent | 644bd2f048972d75eb1979b1fdca257d528ce687 (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block: (63 commits)
Fix memory leak in dm-crypt
SPARC64: sg chaining support
SPARC: sg chaining support
PPC: sg chaining support
PS3: sg chaining support
IA64: sg chaining support
x86-64: enable sg chaining
x86-64: update pci-gart iommu to sg helpers
x86-64: update nommu to sg helpers
x86-64: update calgary iommu to sg helpers
swiotlb: sg chaining support
i386: enable sg chaining
i386 dma_map_sg: convert to using sg helpers
mmc: need to zero sglist on init
Panic in blk_rq_map_sg() from CCISS driver
remove sglist_len
remove blk_queue_max_phys_segments in libata
revert sg segment size ifdefs
Fixup u14-34f ENABLE_SG_CHAINING
qla1280: enable use_sg_chaining option
...
Diffstat (limited to 'drivers/scsi/qlogicpti.c')
| -rw-r--r-- | drivers/scsi/qlogicpti.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index e93f80316a19..7a2e7986b038 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
| @@ -868,7 +868,7 @@ static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd, | |||
| 868 | struct qlogicpti *qpti, u_int in_ptr, u_int out_ptr) | 868 | struct qlogicpti *qpti, u_int in_ptr, u_int out_ptr) |
| 869 | { | 869 | { |
| 870 | struct dataseg *ds; | 870 | struct dataseg *ds; |
| 871 | struct scatterlist *sg; | 871 | struct scatterlist *sg, *s; |
| 872 | int i, n; | 872 | int i, n; |
| 873 | 873 | ||
| 874 | if (Cmnd->use_sg) { | 874 | if (Cmnd->use_sg) { |
| @@ -884,11 +884,12 @@ static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd, | |||
| 884 | n = sg_count; | 884 | n = sg_count; |
| 885 | if (n > 4) | 885 | if (n > 4) |
| 886 | n = 4; | 886 | n = 4; |
| 887 | for (i = 0; i < n; i++, sg++) { | 887 | for_each_sg(sg, s, n, i) { |
| 888 | ds[i].d_base = sg_dma_address(sg); | 888 | ds[i].d_base = sg_dma_address(s); |
| 889 | ds[i].d_count = sg_dma_len(sg); | 889 | ds[i].d_count = sg_dma_len(s); |
| 890 | } | 890 | } |
| 891 | sg_count -= 4; | 891 | sg_count -= 4; |
| 892 | sg = s; | ||
| 892 | while (sg_count > 0) { | 893 | while (sg_count > 0) { |
| 893 | struct Continuation_Entry *cont; | 894 | struct Continuation_Entry *cont; |
| 894 | 895 | ||
| @@ -907,9 +908,9 @@ static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd, | |||
| 907 | n = sg_count; | 908 | n = sg_count; |
| 908 | if (n > 7) | 909 | if (n > 7) |
| 909 | n = 7; | 910 | n = 7; |
| 910 | for (i = 0; i < n; i++, sg++) { | 911 | for_each_sg(sg, s, n, i) { |
| 911 | ds[i].d_base = sg_dma_address(sg); | 912 | ds[i].d_base = sg_dma_address(s); |
| 912 | ds[i].d_count = sg_dma_len(sg); | 913 | ds[i].d_count = sg_dma_len(s); |
| 913 | } | 914 | } |
| 914 | sg_count -= n; | 915 | sg_count -= n; |
| 915 | } | 916 | } |
