Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42086
b: refs/heads/master
c: 90088bb
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Dec 2, 2006
1 parent ef200da commit 3aed003
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 32 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: d1adc1bbd6dde3e05a91e2d3e6ab42d202ea61d5
refs/heads/master: 90088bb41200b4da962282dfd45db82544adac3b
29 changes: 29 additions & 0 deletions trunk/drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,35 @@

#include "libata.h"

/**
* ata_irq_on - Enable interrupts on a port.
* @ap: Port on which interrupts are enabled.
*
* Enable interrupts on a legacy IDE device using MMIO or PIO,
* wait for idle, clear any pending interrupts.
*
* LOCKING:
* Inherited from caller.
*/
u8 ata_irq_on(struct ata_port *ap)
{
struct ata_ioports *ioaddr = &ap->ioaddr;
u8 tmp;

ap->ctl &= ~ATA_NIEN;
ap->last_ctl = ap->ctl;

if (ap->flags & ATA_FLAG_MMIO)
writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr);
else
outb(ap->ctl, ioaddr->ctl_addr);
tmp = ata_wait_idle(ap);

ap->ops->irq_clear(ap);

return tmp;
}

/**
* ata_tf_load_pio - send taskfile registers to host controller
* @ap: Port to which output is sent
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/ata/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,7 @@ extern void ata_scsi_error(struct Scsi_Host *host);
extern void ata_port_wait_eh(struct ata_port *ap);
extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);

/* libata-sff.c */
extern u8 ata_irq_on(struct ata_port *ap);

#endif /* __LIBATA_H__ */
31 changes: 0 additions & 31 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -1149,37 +1149,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
qc->result_tf.feature = 0;
}

/**
* ata_irq_on - Enable interrupts on a port.
* @ap: Port on which interrupts are enabled.
*
* Enable interrupts on a legacy IDE device using MMIO or PIO,
* wait for idle, clear any pending interrupts.
*
* LOCKING:
* Inherited from caller.
*/

static inline u8 ata_irq_on(struct ata_port *ap)
{
struct ata_ioports *ioaddr = &ap->ioaddr;
u8 tmp;

ap->ctl &= ~ATA_NIEN;
ap->last_ctl = ap->ctl;

if (ap->flags & ATA_FLAG_MMIO)
writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr);
else
outb(ap->ctl, ioaddr->ctl_addr);
tmp = ata_wait_idle(ap);

ap->ops->irq_clear(ap);

return tmp;
}


/**
* ata_irq_ack - Acknowledge a device interrupt.
* @ap: Port on which interrupts are enabled.
Expand Down

0 comments on commit 3aed003

Please sign in to comment.