From: Jan Dittmer <j.dittmer@portrix.net>
To: kraxel@bytesex.org
Cc: linux-kernel@vger.kernel.org
Subject: Improve error handling for msp3400.c
Date: Sat, 12 Jul 2003 23:47:03 +0200 [thread overview]
Message-ID: <3F1081D7.9090209@portrix.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
Hi,
on read/send failure the msp3400 driver is trying three times to recover and
is printing a message each time. On a unloaded system this happens at a rate
of about 1/min while watching tv and is quite annoying, while non critical.
This patchs gets rid of it and instead raises the final error message to
KERN_ERR if indeed the communication failed three times in a row.
Thanks,
Jan
--
Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686
[-- Attachment #2: msp3400.remove.warning --]
[-- Type: text/plain, Size: 1183 bytes --]
--- linux-bk/drivers/media/video/msp3400.c Fri May 30 20:29:35 2003
+++ 2.5.75-bk1-jd2/drivers/media/video/msp3400.c Sat Jul 12 23:41:19 2003
@@ -192,13 +192,11 @@
if (2 == i2c_transfer(client->adapter,msgs,2))
break;
err++;
- printk(KERN_WARNING "msp34xx: I/O error #%d (read 0x%02x/0x%02x)\n",
- err, dev, addr);
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ/10);
}
if (3 == err) {
- printk(KERN_WARNING "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
+ printk(KERN_ERR "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
msp3400c_reset(client);
return -1;
}
@@ -221,13 +219,11 @@
if (5 == i2c_master_send(client, buffer, 5))
break;
err++;
- printk(KERN_WARNING "msp34xx: I/O error #%d (write 0x%02x/0x%02x)\n",
- err, dev, addr);
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ/10);
}
if (3 == err) {
- printk(KERN_WARNING "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
+ printk(KERN_ERR "msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|\n");
msp3400c_reset(client);
return -1;
}
reply other threads:[~2003-07-12 21:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3F1081D7.9090209@portrix.net \
--to=j.dittmer@portrix.net \
--cc=kraxel@bytesex.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