From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 10/12] ide: remove no longer needed IRQ fallback code from hwif_init()
Date: Mon, 19 Jan 2009 15:14:57 +0100 [thread overview]
Message-ID: <20090119141457.27613.26363.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090119141330.27613.34546.sendpatchset@localhost.localdomain>
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: remove no longer needed IRQ fallback code from hwif_init()
Then remove no longer used __ide_default_irq().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide-probe.c | 30 ++++--------------------------
include/linux/ide.h | 15 ---------------
2 files changed, 4 insertions(+), 41 deletions(-)
Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1056,14 +1056,9 @@ static void drive_release_dev (struct de
static int hwif_init(ide_hwif_t *hwif)
{
- int old_irq;
-
if (!hwif->irq) {
- hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
- if (!hwif->irq) {
- printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name);
- return 0;
- }
+ printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name);
+ return 0;
}
if (register_blkdev(hwif->major, hwif->name))
@@ -1081,29 +1076,12 @@ static int hwif_init(ide_hwif_t *hwif)
sg_init_table(hwif->sg_table, hwif->sg_max_nents);
- if (init_irq(hwif) == 0)
- goto done;
-
- old_irq = hwif->irq;
- /*
- * It failed to initialise. Find the default IRQ for
- * this port and try that.
- */
- hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
- if (!hwif->irq) {
- printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n",
- hwif->name, old_irq);
- goto out;
- }
if (init_irq(hwif)) {
- printk(KERN_ERR "%s: probed IRQ %d and default IRQ %d failed\n",
- hwif->name, old_irq, hwif->irq);
+ printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n",
+ hwif->name, hwif->irq);
goto out;
}
- printk(KERN_WARNING "%s: probed IRQ %d failed, using default\n",
- hwif->name, hwif->irq);
-done:
blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS,
THIS_MODULE, ata_probe, ata_lock, hwif);
return 1;
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -193,21 +193,6 @@ static inline void ide_std_init_ports(hw
hw->io_ports.ctl_addr = ctl_addr;
}
-/* for IDE PCI controllers in legacy mode, temporary */
-static inline int __ide_default_irq(unsigned long base)
-{
- switch (base) {
-#ifdef CONFIG_IA64
- case 0x1f0: return isa_irq_to_vector(14);
- case 0x170: return isa_irq_to_vector(15);
-#else
- case 0x1f0: return 14;
- case 0x170: return 15;
-#endif
- }
- return 0;
-}
-
#if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \
defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \
|| defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64)
next prev parent reply other threads:[~2009-01-19 14:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 14:13 [PATCH 00/12] ide: IRQ setup fixes/sanitizations Bartlomiej Zolnierkiewicz
2009-01-19 14:13 ` [PATCH 01/12] amd74xx: use ide_pci_is_in_compatibility_mode() Bartlomiej Zolnierkiewicz
2009-01-19 14:13 ` [PATCH 02/12] ns87415: use pci_get_legacy_ide_irq() Bartlomiej Zolnierkiewicz
2009-01-19 14:13 ` [PATCH 03/12] ns87415: small ->init_hwif cleanup Bartlomiej Zolnierkiewicz
2009-01-19 14:13 ` [PATCH 04/12] trm290: " Bartlomiej Zolnierkiewicz
2009-01-19 14:14 ` [PATCH 05/12] ide: handle IDE_HFLAG[_FORCE]_LEGACY_IRQS in ide_pci_init_{one,two}() Bartlomiej Zolnierkiewicz
2009-01-19 14:14 ` [PATCH 06/12] ide: use pci_get_legacy_ide_irq() " Bartlomiej Zolnierkiewicz
2009-01-19 14:14 ` [PATCH 07/12] ide: use ide_pci_is_in_compatibility_mode() " Bartlomiej Zolnierkiewicz
2009-01-19 14:14 ` [PATCH 08/12] ide: remove no longer needed IDE_HFLAG[_FORCE]_LEGACY_IRQS Bartlomiej Zolnierkiewicz
2009-01-19 14:36 ` Borislav Petkov
2009-01-19 14:41 ` Bartlomiej Zolnierkiewicz
2009-01-19 14:14 ` [PATCH 09/12] amd74xx: remove no longer needed ->init_hwif method Bartlomiej Zolnierkiewicz
2009-01-19 14:14 ` Bartlomiej Zolnierkiewicz [this message]
2009-01-19 14:15 ` [PATCH 11/12] ide: remove no longer needed IRQ auto-probing from try_to_identify() Bartlomiej Zolnierkiewicz
2009-01-19 14:15 ` [PATCH 12/12] ide: remove try_to_identify() wrapper Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090119141457.27613.26363.sendpatchset@localhost.localdomain \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).