diff options
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 5d8411afcedb..ef0b9b419c27 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -1423,7 +1423,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) | |||
1423 | struct fw_device *device = fw_device(lu->tgt->unit->device.parent); | 1423 | struct fw_device *device = fw_device(lu->tgt->unit->device.parent); |
1424 | struct sbp2_command_orb *orb; | 1424 | struct sbp2_command_orb *orb; |
1425 | unsigned int max_payload; | 1425 | unsigned int max_payload; |
1426 | int retval = SCSI_MLQUEUE_HOST_BUSY; | 1426 | int generation, retval = SCSI_MLQUEUE_HOST_BUSY; |
1427 | 1427 | ||
1428 | /* | 1428 | /* |
1429 | * Bidirectional commands are not yet implemented, and unknown | 1429 | * Bidirectional commands are not yet implemented, and unknown |
@@ -1467,6 +1467,9 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) | |||
1467 | if (cmd->sc_data_direction == DMA_FROM_DEVICE) | 1467 | if (cmd->sc_data_direction == DMA_FROM_DEVICE) |
1468 | orb->request.misc |= cpu_to_be32(COMMAND_ORB_DIRECTION); | 1468 | orb->request.misc |= cpu_to_be32(COMMAND_ORB_DIRECTION); |
1469 | 1469 | ||
1470 | generation = device->generation; | ||
1471 | smp_rmb(); /* sbp2_map_scatterlist looks at tgt->address_high */ | ||
1472 | |||
1470 | if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0) | 1473 | if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0) |
1471 | goto out; | 1474 | goto out; |
1472 | 1475 | ||
@@ -1479,7 +1482,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) | |||
1479 | if (dma_mapping_error(device->card->device, orb->base.request_bus)) | 1482 | if (dma_mapping_error(device->card->device, orb->base.request_bus)) |
1480 | goto out; | 1483 | goto out; |
1481 | 1484 | ||
1482 | sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, lu->generation, | 1485 | sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, generation, |
1483 | lu->command_block_agent_address + SBP2_ORB_POINTER); | 1486 | lu->command_block_agent_address + SBP2_ORB_POINTER); |
1484 | retval = 0; | 1487 | retval = 0; |
1485 | out: | 1488 | out: |