Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9694
b: refs/heads/master
c: 4f50c3c
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 17, 2005
1 parent 95cfdda commit 23ec97c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: 33d015b9f24d143859bb40dbe7bbb4c7805cee7d
refs/heads/master: 4f50c3cbb4b608ae4d8ee73ce273d819d901a83f
17 changes: 6 additions & 11 deletions trunk/drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ struct sil24_cmd_block {
* here from the previous interrupt.
*/
struct sil24_port_priv {
void *port;
struct sil24_cmd_block *cmd_block; /* 32 cmd blocks */
dma_addr_t cmd_block_dma; /* DMA base addr for them */
};
Expand Down Expand Up @@ -414,10 +413,11 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc)
static int sil24_qc_issue(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
void *port = (void *)ap->ioaddr.cmd_addr;
struct sil24_port_priv *pp = ap->private_data;
dma_addr_t paddr = pp->cmd_block_dma + qc->tag * sizeof(*pp->cmd_block);

writel((u32)paddr, pp->port + PORT_CMD_ACTIVATE);
writel((u32)paddr, port + PORT_CMD_ACTIVATE);
return 0;
}

Expand All @@ -428,8 +428,7 @@ static void sil24_irq_clear(struct ata_port *ap)

static void sil24_reset_controller(struct ata_port *ap)
{
struct sil24_port_priv *pp = ap->private_data;
void *port = pp->port;
void *port = (void *)ap->ioaddr.cmd_addr;
int cnt;
u32 tmp;

Expand Down Expand Up @@ -480,8 +479,7 @@ static void sil24_eng_timeout(struct ata_port *ap)
static void sil24_error_intr(struct ata_port *ap, u32 slot_stat)
{
struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
struct sil24_port_priv *pp = ap->private_data;
void *port = pp->port;
void *port = (void *)ap->ioaddr.cmd_addr;
u32 irq_stat, cmd_err, sstatus, serror;

irq_stat = readl(port + PORT_IRQ_STAT);
Expand Down Expand Up @@ -509,8 +507,7 @@ static void sil24_error_intr(struct ata_port *ap, u32 slot_stat)
static inline void sil24_host_intr(struct ata_port *ap)
{
struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
struct sil24_port_priv *pp = ap->private_data;
void *port = pp->port;
void *port = (void *)ap->ioaddr.cmd_addr;
u32 slot_stat;

slot_stat = readl(port + PORT_SLOT_STAT);
Expand Down Expand Up @@ -561,7 +558,6 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs *
static int sil24_port_start(struct ata_port *ap)
{
struct device *dev = ap->host_set->dev;
struct sil24_host_priv *hpriv = ap->host_set->private_data;
struct sil24_port_priv *pp;
struct sil24_cmd_block *cb;
size_t cb_size = sizeof(*cb);
Expand All @@ -579,7 +575,6 @@ static int sil24_port_start(struct ata_port *ap)
}
memset(cb, 0, cb_size);

pp->port = hpriv->port_base + ap->port_no * PORT_REGS_SIZE;
pp->cmd_block = cb;
pp->cmd_block_dma = cb_dma;

Expand Down Expand Up @@ -700,7 +695,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
u32 tmp;
int cnt;

probe_ent->port[i].cmd_addr = portu;
probe_ent->port[i].cmd_addr = portu + PORT_PRB;
probe_ent->port[i].scr_addr = portu + PORT_SCONTROL;

ata_std_ports(&probe_ent->port[i]);
Expand Down

0 comments on commit 23ec97c

Please sign in to comment.