Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101255
b: refs/heads/master
c: 4cc1968
h: refs/heads/master
i:
  101253: f0b2528
  101251: 3e66250
  101247: f8eb2d6
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 15, 2008
1 parent dccb7bf commit efff371
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 594c16d8dd54cd7b1c5ef1ec3ac0f6bf34301dad
refs/heads/master: 4cc196897de9e6c02cf86debc5b9f7cf1b69a214
16 changes: 10 additions & 6 deletions trunk/drivers/scsi/ide-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,16 +514,16 @@ static ide_startstop_t idescsi_issue_pc(ide_drive_t *drive,
/* Request to transfer the entire buffer at once */
bcount = min(pc->req_xfer, 63 * 1024);

if (drive->using_dma && !idescsi_map_sg(drive, pc)) {
if ((pc->flags & PC_FLAG_DMA_OK) && drive->using_dma) {
hwif->sg_mapped = 1;
dma = !hwif->dma_ops->dma_setup(drive);
hwif->sg_mapped = 0;
}

ide_pktcmd_tf_load(drive, 0, bcount, dma);
if (!dma)
pc->flags &= ~PC_FLAG_DMA_OK;

if (dma)
pc->flags |= PC_FLAG_DMA_OK;
ide_pktcmd_tf_load(drive, 0, bcount, dma);

if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) {
ide_execute_command(drive, WIN_PACKETCMD, &idescsi_transfer_pc,
Expand All @@ -547,8 +547,12 @@ static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *r
rq->sector, rq->nr_sectors, rq->current_nr_sectors);

if (blk_sense_request(rq) || blk_special_request(rq)) {
return idescsi_issue_pc(drive,
(struct ide_atapi_pc *) rq->special);
struct ide_atapi_pc *pc = (struct ide_atapi_pc *)rq->special;

if (drive->using_dma && !idescsi_map_sg(drive, pc))
pc->flags |= PC_FLAG_DMA_OK;

return idescsi_issue_pc(drive, pc);
}
blk_dump_rq_flags(rq, "ide-scsi: unsup command");
idescsi_end_request (drive, 0, 0);
Expand Down

0 comments on commit efff371

Please sign in to comment.