* libata-core error handling
@ 2006-05-10 18:45 jarkap
0 siblings, 0 replies; only message in thread
From: jarkap @ 2006-05-10 18:45 UTC (permalink / raw)
To: jgarzik; +Cc: linux-ide
Hello!
I'd like to suggest some minor changes to improve error reporting
in libata_core.c function ata_device_add().
I had terrible time to find the reason of kernel oops after
enabling in config ACPI without X86_LOCAL_APIC (by the way -
I don't understand why acpi irq routing is used then).
As it turned out messages from libata are very misleading,
because it tries to unregister too much and they cover on the
screen real reasons (bad irq request). No need to tell this
messages aren't added to logs.
I enclose this small diff, which was prepared with kernel
version 2.6.15.4, but it applied to 2.6.16-6 and 2.6.17-rc3
as well.
Best regards from Poland,
Jarek P.
--- libata-core.c- 2006-02-10 02:22:48.000000000 -0500
+++ libata-core.c 2006-04-23 22:30:14.000000000 -0400
@@ -4357,8 +4357,11 @@
/* obtain irq, that is shared between channels */
if (request_irq(ent->irq, ent->port_ops->irq_handler, ent->irq_flags,
- DRV_NAME, host_set))
+ DRV_NAME, host_set)) {
+ printk(KERN_ERR "ata: unable to allocate irq %lu\n",
+ ent->irq);
goto err_out;
+ }
/* perform each probe synchronously */
DPRINTK("probe begin\n");
@@ -4406,9 +4409,14 @@
VPRINTK("EXIT, returning %u\n", ent->n_ports);
return ent->n_ports; /* success */
+/* FIXME: goto after scsi_add_host
+ * err_out_remove:
+ * for (i = 0; i < count; i++) {
+ * ata_host_remove(host_set->ports[i], 1);
+ * }
+ */
err_out:
for (i = 0; i < count; i++) {
- ata_host_remove(host_set->ports[i], 1);
scsi_host_put(host_set->ports[i]->host);
}
err_free_ret:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-10 12:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10 18:45 libata-core error handling jarkap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.