Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146965
b: refs/heads/master
c: 29d1a43
h: refs/heads/master
i:
  146963: d6b37ca
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Apr 28, 2009
1 parent 237aae8 commit 0a96426
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 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: 4344d07fb8dbf0cbfec1f7d7c1afeccaceaaa120
refs/heads/master: 29d1a4371035e01b0d079bc5aa88b50f5af7a566
17 changes: 4 additions & 13 deletions trunk/drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,8 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
drive->name, rq_data_dir(pc->rq)
? "write" : "read");
pc->flags |= PC_FLAG_DMA_ERROR;
} else {
} else
pc->xferred = pc->req_xfer;
if (drive->pc_update_buffers)
drive->pc_update_buffers(drive, pc);
}
debug_log("%s: DMA finished\n", drive->name);
}

Expand Down Expand Up @@ -463,16 +460,11 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
return ide_do_reset(drive);
}

if (drive->media == ide_tape && pc->bh)
done = drive->pc_io_buffers(drive, pc, bcount, write);
else {
done = min_t(unsigned int, bcount, cmd->nleft);
ide_pio_bytes(drive, cmd, write, done);
}
done = min_t(unsigned int, bcount, cmd->nleft);
ide_pio_bytes(drive, cmd, write, done);

/* Update the current position */
/* Update transferred byte count */
pc->xferred += done;
pc->cur_pos += done;

bcount -= done;

Expand Down Expand Up @@ -650,7 +642,6 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)

/* We haven't transferred any data yet */
pc->xferred = 0;
pc->cur_pos = pc->buf;

valid_tf = IDE_VALID_DEVICE;
bcount = ((drive->media == ide_tape) ?
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,6 @@ static void ide_tape_create_rw_cmd(idetape_tape_t *tape,
ide_init_pc(pc);
put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]);
pc->c[1] = 1;
pc->bh = NULL;
pc->buf = NULL;
pc->buf_size = length * tape->blk_size;
pc->req_xfer = pc->buf_size;
Expand Down
12 changes: 0 additions & 12 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,7 @@ struct ide_atapi_pc {

/* data buffer */
u8 *buf;
/* current buffer position */
u8 *cur_pos;
int buf_size;
/* missing/available data on the current buffer */
int b_count;

/* the corresponding request */
struct request *rq;
Expand All @@ -379,10 +375,6 @@ struct ide_atapi_pc {
*/
u8 pc_buf[IDE_PC_BUFFER_SIZE];

/* idetape only */
struct idetape_bh *bh;
char *b_data;

unsigned long timeout;
};

Expand Down Expand Up @@ -595,10 +587,6 @@ struct ide_drive_s {
/* callback for packet commands */
int (*pc_callback)(struct ide_drive_s *, int);

void (*pc_update_buffers)(struct ide_drive_s *, struct ide_atapi_pc *);
int (*pc_io_buffers)(struct ide_drive_s *, struct ide_atapi_pc *,
unsigned int, int);

ide_startstop_t (*irq_handler)(struct ide_drive_s *);

unsigned long atapi_flags;
Expand Down

0 comments on commit 0a96426

Please sign in to comment.