ide: add hwif->ack_intr hook

* Add hwif->ack_intr hook and use it instead of hwif->hw.ack_intr.

* Add missing brackets to cris-v32 and powerpc ide_ack_intr() macros.

Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 86f3a492
...@@ -737,6 +737,7 @@ int ide_register_hw(hw_regs_t *hw, void (*fixup)(ide_hwif_t *), ...@@ -737,6 +737,7 @@ int ide_register_hw(hw_regs_t *hw, void (*fixup)(ide_hwif_t *),
hwif->fixup = fixup; hwif->fixup = fixup;
hwif->chipset = hw->chipset; hwif->chipset = hw->chipset;
hwif->gendev.parent = hw->dev; hwif->gendev.parent = hw->dev;
hwif->ack_intr = hw->ack_intr;
if (initializing == 0) { if (initializing == 0) {
u8 idx[4] = { index, 0xff, 0xff, 0xff }; u8 idx[4] = { index, 0xff, 0xff, 0xff };
......
...@@ -316,8 +316,8 @@ m8xx_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port, ...@@ -316,8 +316,8 @@ m8xx_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_hwifs[data_port].pio_mask = ATA_PIO4; ide_hwifs[data_port].pio_mask = ATA_PIO4;
ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode;
ide_hwifs[data_port].ack_intr = (ide_ack_intr_t *)ide_interrupt_ack;
hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
/* Enable Harddisk Interrupt, /* Enable Harddisk Interrupt,
* and make it edge sensitive * and make it edge sensitive
*/ */
...@@ -402,8 +402,8 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw, ...@@ -402,8 +402,8 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw,
ide_hwifs[data_port].pio_mask = ATA_PIO4; ide_hwifs[data_port].pio_mask = ATA_PIO4;
ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode;
ide_hwifs[data_port].ack_intr = (ide_ack_intr_t *)ide_interrupt_ack;
hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack;
/* Enable Harddisk Interrupt, /* Enable Harddisk Interrupt,
* and make it edge sensitive * and make it edge sensitive
*/ */
......
...@@ -54,7 +54,7 @@ static inline unsigned long ide_default_io_base(int index) ...@@ -54,7 +54,7 @@ static inline unsigned long ide_default_io_base(int index)
#define SUPPORT_VLB_SYNC 0 #define SUPPORT_VLB_SYNC 0
#define IDE_ARCH_ACK_INTR #define IDE_ARCH_ACK_INTR
#define ide_ack_intr(hwif) (hwif)->hw.ack_intr(hwif) #define ide_ack_intr(hwif) ((hwif)->ack_intr(hwif))
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -137,7 +137,7 @@ ide_get_lock(irq_handler_t handler, void *data) ...@@ -137,7 +137,7 @@ ide_get_lock(irq_handler_t handler, void *data)
#endif /* CONFIG_BLK_DEV_FALCON_IDE */ #endif /* CONFIG_BLK_DEV_FALCON_IDE */
#define IDE_ARCH_ACK_INTR #define IDE_ARCH_ACK_INTR
#define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _M68K_IDE_H */ #endif /* _M68K_IDE_H */
...@@ -69,7 +69,7 @@ static __inline__ unsigned long ide_default_io_base(int index) ...@@ -69,7 +69,7 @@ static __inline__ unsigned long ide_default_io_base(int index)
#ifdef CONFIG_BLK_DEV_MPC8xx_IDE #ifdef CONFIG_BLK_DEV_MPC8xx_IDE
#define IDE_ARCH_ACK_INTR 1 #define IDE_ARCH_ACK_INTR 1
#define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
#endif #endif
#endif /* __powerpc64__ */ #endif /* __powerpc64__ */
......
...@@ -683,6 +683,8 @@ typedef struct hwif_s { ...@@ -683,6 +683,8 @@ typedef struct hwif_s {
struct pci_dev *pci_dev; /* for pci chipsets */ struct pci_dev *pci_dev; /* for pci chipsets */
struct ide_pci_device_s *cds; /* chipset device struct */ struct ide_pci_device_s *cds; /* chipset device struct */
ide_ack_intr_t *ack_intr;
void (*rw_disk)(ide_drive_t *, struct request *); void (*rw_disk)(ide_drive_t *, struct request *);
#if 0 #if 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment