diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 16:30:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 16:30:44 -0400 |
commit | 4f7a307dc6e4d8bfeb56f7cf7231b08cb845687c (patch) | |
tree | 3bf90522c87fcb32373cb2a5ff25b1ead33405f5 /drivers/scsi/libsrp.c | |
parent | fabb5c4e4a474ff0f7d6c1d3466a1b79bbce5f49 (diff) | |
parent | 7297824581755593535fc97d2c8b6c47e2dc2db6 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (87 commits)
[SCSI] fusion: fix domain validation loops
[SCSI] qla2xxx: fix regression on sparc64
[SCSI] modalias for scsi devices
[SCSI] sg: cap reserved_size values at max_sectors
[SCSI] BusLogic: stop using check_region
[SCSI] tgt: fix rdma transfer bugs
[SCSI] aacraid: fix aacraid not finding device
[SCSI] aacraid: Correct SMC products in aacraid.txt
[SCSI] scsi_error.c: Add EH Start Unit retry
[SCSI] aacraid: [Fastboot] Panics for AACRAID driver during 'insmod' for kexec test.
[SCSI] ipr: Driver version to 2.3.2
[SCSI] ipr: Faster sg list fetch
[SCSI] ipr: Return better qc_issue errors
[SCSI] ipr: Disrupt device error
[SCSI] ipr: Improve async error logging level control
[SCSI] ipr: PCI unblock config access fix
[SCSI] ipr: Fix for oops following SATA request sense
[SCSI] ipr: Log error for SAS dual path switch
[SCSI] ipr: Enable logging of debug error data for all devices
[SCSI] ipr: Add new PCI-E IDs to device table
...
Diffstat (limited to 'drivers/scsi/libsrp.c')
-rw-r--r-- | drivers/scsi/libsrp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/libsrp.c b/drivers/scsi/libsrp.c index 6335830df810..5631c199a8eb 100644 --- a/drivers/scsi/libsrp.c +++ b/drivers/scsi/libsrp.c | |||
@@ -224,8 +224,7 @@ static int srp_indirect_data(struct scsi_cmnd *sc, struct srp_cmd *cmd, | |||
224 | struct srp_direct_buf *md = NULL; | 224 | struct srp_direct_buf *md = NULL; |
225 | struct scatterlist dummy, *sg = NULL; | 225 | struct scatterlist dummy, *sg = NULL; |
226 | dma_addr_t token = 0; | 226 | dma_addr_t token = 0; |
227 | long err; | 227 | int err = 0; |
228 | unsigned int done = 0; | ||
229 | int nmd, nsg = 0, len; | 228 | int nmd, nsg = 0, len; |
230 | 229 | ||
231 | if (dma_map || ext_desc) { | 230 | if (dma_map || ext_desc) { |
@@ -257,8 +256,8 @@ static int srp_indirect_data(struct scsi_cmnd *sc, struct srp_cmd *cmd, | |||
257 | sg_dma_address(&dummy) = token; | 256 | sg_dma_address(&dummy) = token; |
258 | err = rdma_io(sc, &dummy, 1, &id->table_desc, 1, DMA_TO_DEVICE, | 257 | err = rdma_io(sc, &dummy, 1, &id->table_desc, 1, DMA_TO_DEVICE, |
259 | id->table_desc.len); | 258 | id->table_desc.len); |
260 | if (err < 0) { | 259 | if (err) { |
261 | eprintk("Error copying indirect table %ld\n", err); | 260 | eprintk("Error copying indirect table %d\n", err); |
262 | goto free_mem; | 261 | goto free_mem; |
263 | } | 262 | } |
264 | } else { | 263 | } else { |
@@ -271,6 +270,7 @@ rdma: | |||
271 | nsg = dma_map_sg(iue->target->dev, sg, sc->use_sg, DMA_BIDIRECTIONAL); | 270 | nsg = dma_map_sg(iue->target->dev, sg, sc->use_sg, DMA_BIDIRECTIONAL); |
272 | if (!nsg) { | 271 | if (!nsg) { |
273 | eprintk("fail to map %p %d\n", iue, sc->use_sg); | 272 | eprintk("fail to map %p %d\n", iue, sc->use_sg); |
273 | err = -EIO; | ||
274 | goto free_mem; | 274 | goto free_mem; |
275 | } | 275 | } |
276 | len = min(sc->request_bufflen, id->len); | 276 | len = min(sc->request_bufflen, id->len); |
@@ -286,7 +286,7 @@ free_mem: | |||
286 | if (token && dma_map) | 286 | if (token && dma_map) |
287 | dma_free_coherent(iue->target->dev, id->table_desc.len, md, token); | 287 | dma_free_coherent(iue->target->dev, id->table_desc.len, md, token); |
288 | 288 | ||
289 | return done; | 289 | return err; |
290 | } | 290 | } |
291 | 291 | ||
292 | static int data_out_desc_size(struct srp_cmd *cmd) | 292 | static int data_out_desc_size(struct srp_cmd *cmd) |
@@ -351,7 +351,7 @@ int srp_transfer_data(struct scsi_cmnd *sc, struct srp_cmd *cmd, | |||
351 | break; | 351 | break; |
352 | default: | 352 | default: |
353 | eprintk("Unknown format %d %x\n", dir, format); | 353 | eprintk("Unknown format %d %x\n", dir, format); |
354 | break; | 354 | err = -EINVAL; |
355 | } | 355 | } |
356 | 356 | ||
357 | return err; | 357 | return err; |