Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137168
b: refs/heads/master
c: f671865
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Dec 11, 2008
1 parent d29db43 commit 81762e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 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: 9e28d7e8c5422a47db886c4104221ea165595de0
refs/heads/master: f6718653361e8f8a6aac9946822aa2090edf4f37
13 changes: 1 addition & 12 deletions trunk/drivers/ata/pata_icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ struct pata_icside_state {
u8 disabled;
unsigned int speed[ATA_MAX_DEVICES];
} port[2];
struct scatterlist sg[PATA_ICSIDE_MAX_SG];
};

struct pata_icside_info {
Expand Down Expand Up @@ -222,31 +221,21 @@ static void pata_icside_bmdma_setup(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
struct pata_icside_state *state = ap->host->private_data;
struct scatterlist *sg, *rsg = state->sg;
unsigned int write = qc->tf.flags & ATA_TFLAG_WRITE;
unsigned int si;

/*
* We are simplex; BUG if we try to fiddle with DMA
* while it's active.
*/
BUG_ON(dma_channel_active(state->dma));

/*
* Copy ATAs scattered sg list into a contiguous array of sg
*/
for_each_sg(qc->sg, sg, qc->n_elem, si) {
memcpy(rsg, sg, sizeof(*sg));
rsg++;
}

/*
* Route the DMA signals to the correct interface
*/
writeb(state->port[ap->port_no].port_sel, state->ioc_base);

set_dma_speed(state->dma, state->port[ap->port_no].speed[qc->dev->devno]);
set_dma_sg(state->dma, state->sg, rsg - state->sg);
set_dma_sg(state->dma, qc->sg, qc->n_elem);
set_dma_mode(state->dma, write ? DMA_MODE_WRITE : DMA_MODE_READ);

/* issue r/w command */
Expand Down

0 comments on commit 81762e9

Please sign in to comment.