From: "Bryan O'Sullivan" Secret changes. Signed-off-by: Bryan O'Sullivan Cc: Dave Olson Cc: Eric W. Biederman Cc: Andi Kleen Cc: Bryan O'Sullivan Cc: Roland Dreier Signed-off-by: Andrew Morton --- drivers/pci/htirq.c | 21 ++++++++++----------- include/linux/htirq.h | 3 ++- 2 files changed, 12 insertions(+), 12 deletions(-) diff -puN drivers/pci/htirq.c~htirq-allow-buggy-drivers-of-buggy-hardware-to-write-the-registers-update drivers/pci/htirq.c --- a/drivers/pci/htirq.c~htirq-allow-buggy-drivers-of-buggy-hardware-to-write-the-registers-update +++ a/drivers/pci/htirq.c @@ -38,17 +38,16 @@ void write_ht_irq_msg(unsigned int irq, struct ht_irq_cfg *cfg = get_irq_data(irq); unsigned long flags; spin_lock_irqsave(&ht_irq_lock, flags); - if (!likely(cfg->update)) { - if (cfg->msg.address_lo != msg->address_lo) { - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx); - pci_write_config_dword(cfg->dev, cfg->pos + 4, msg->address_lo); - } - if (cfg->msg.address_hi != msg->address_hi) { - pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx + 1); - pci_write_config_dword(cfg->dev, cfg->pos + 4, msg->address_hi); - } - } else - cfg->update(irq, msg); + if (cfg->msg.address_lo != msg->address_lo) { + pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx); + pci_write_config_dword(cfg->dev, cfg->pos + 4, msg->address_lo); + } + if (cfg->msg.address_hi != msg->address_hi) { + pci_write_config_byte(cfg->dev, cfg->pos + 2, cfg->idx + 1); + pci_write_config_dword(cfg->dev, cfg->pos + 4, msg->address_hi); + } + if (cfg->update) + cfg->update(cfg->dev, irq, msg); spin_unlock_irqrestore(&ht_irq_lock, flags); cfg->msg = *msg; } diff -puN include/linux/htirq.h~htirq-allow-buggy-drivers-of-buggy-hardware-to-write-the-registers-update include/linux/htirq.h --- a/include/linux/htirq.h~htirq-allow-buggy-drivers-of-buggy-hardware-to-write-the-registers-update +++ a/include/linux/htirq.h @@ -16,7 +16,8 @@ void unmask_ht_irq(unsigned int irq); int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev); /* For drivers of buggy hardware */ -typedef void (ht_irq_update_t)(int irq, struct ht_irq_msg *); +typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq, + struct ht_irq_msg *msg); int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update); #endif /* LINUX_HTIRQ_H */ _