All of lore.kernel.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: David Miller <davem@davemloft.net>
Cc: joe@perches.com, p_gortmaker@yahoo.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org
Subject: [PATCH] mac8390: change an error return code and some cleanup, take 3
Date: Sat, 17 Apr 2010 13:16:04 +1000 (EST)	[thread overview]
Message-ID: <alpine.OSX.2.00.1004171258330.358@localhost> (raw)
In-Reply-To: <alpine.OSX.2.00.1004162347390.271@localhost>


Change an error return code from -EAGAIN to -EBUSY since the former is 
misleading.

Nubus slots are geographically addressed and their irqs are equally 
inflexible. -EAGAIN is misleading because retrying will not help fix 
whatever bug it was that made the irq unavailable.

Also promote the log message. Likewise some other KERN_INFO log messages.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>

--- a/drivers/net/mac8390.c	2010-04-16 13:31:04.000000000 +1000
+++ b/drivers/net/mac8390.c	2010-04-16 23:50:39.000000000 +1000
@@ -554,7 +554,7 @@
 	case MAC8390_APPLE:
 		switch (mac8390_testio(dev->mem_start)) {
 		case ACCESS_UNKNOWN:
-			pr_info("Don't know how to access card memory!\n");
+			pr_err("Don't know how to access card memory!\n");
 			return -ENODEV;
 			break;
 
@@ -643,8 +643,8 @@
 {
 	__ei_open(dev);
 	if (request_irq(dev->irq, __ei_interrupt, 0, "8390 Ethernet", dev)) {
-		pr_info("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
-		return -EAGAIN;
+		pr_err("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
+		return -EBUSY;
 	}
 	return 0;
 }
@@ -660,7 +660,7 @@
 {
 	ei_status.txing = 0;
 	if (ei_debug > 1)
-		pr_info("reset not supported\n");
+		printk(KERN_DEBUG pr_fmt("reset not supported\n"));
 	return;
 }
 
@@ -668,7 +668,7 @@
 {
 	unsigned char *target = nubus_slot_addr(IRQ2SLOT(dev->irq));
 	if (ei_debug > 1)
-		pr_info("Need to reset the NS8390 t=%lu...", jiffies);
+		printk(KERN_DEBUG pr_fmt("Need to reset the NS8390 t=%lu..."), jiffies);
 	ei_status.txing = 0;
 	target[0xC0000] = 0;
 	if (ei_debug > 1)
 

  reply	other threads:[~2010-04-17  3:16 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16  2:34 another cleanup patch gone wrong Finn Thain
2010-04-16  3:01 ` David Miller
2010-04-16  3:45   ` [PATCH] mac8390: fix pr_info() calls, was " Finn Thain
2010-04-16  3:54     ` Joe Perches
2010-04-16  3:59       ` Finn Thain
2010-04-16  4:21     ` [PATCH] mac8390: fix pr_info() calls and change return code Finn Thain
2010-04-16  4:34       ` Joe Perches
2010-04-16 13:57         ` Finn Thain
2010-04-16 20:28           ` David Miller
2010-04-17  2:28             ` Finn Thain
2010-04-16  5:53       ` David Miller
2010-04-16 14:14       ` [PATCH] mac8390: change an error return code and some cleanup Finn Thain
2010-04-17  3:16         ` Finn Thain [this message]
2010-04-21 23:30           ` [PATCH] mac8390: change an error return code and some cleanup, take 3 David Miller
2010-04-22  1:13             ` Finn Thain
2010-05-28 17:29             ` [PATCH] mac8390: change an error return code and some cleanup, take 4 Finn Thain
2010-05-31  7:19               ` David Miller
2010-05-31  9:21                 ` fthain
2010-05-31  9:58                   ` Geert Uytterhoeven
2010-05-31  9:58                     ` Geert Uytterhoeven
2010-05-31 11:07                     ` fthain
2010-05-31 11:30                       ` David Miller
2010-05-31 12:55                         ` Finn Thain
2010-05-31 13:02                           ` David Miller
2010-06-01 12:18                             ` [PATCH 1/2] mac8390: propagate error code from request_irq Finn Thain
2010-06-02 12:17                               ` David Miller
2010-06-01 12:18                             ` [PATCH 2/2] mac8390: raise error logging priority Finn Thain
2010-06-02 14:06                               ` David Miller
2010-06-02 15:36                                 ` Finn Thain
2010-05-31 15:08                     ` [PATCH] mac8390: change an error return code and some cleanup, take 4 Joe Perches
2010-05-31 15:14                       ` David Miller
2010-05-31 15:19                         ` Finn Thain
2010-05-31 11:27                   ` David Miller
2010-04-16  3:11 ` another cleanup patch gone wrong Joe Perches
2010-04-16  3:21   ` Finn Thain

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=alpine.OSX.2.00.1004171258330.358@localhost \
    --to=fthain@telegraphics.com.au \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p_gortmaker@yahoo.com \
    /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 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.