From: "Wagner Volanin" <fadinha.mail@terra.com.br>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: (Possible Fix) MS-PNR SCSI Card / NCR5380 SCSI Driver
Date: Tue, 16 Sep 2003 16:55:33 -0300 [thread overview]
Message-ID: <HLBOOL$9F22A6BA6BDFE9CEF6137FE62345D3D3@terra.com.br> (raw)
I have an old Genius Colorpage-SP2 SCSI scanner.
It is shipped with a MS-PNR 8bit ISA non-pnp proprietary SCSI
card from Microtek.
Although its chipset is a NCR53c400a, it wouldn't work with the
appropriate driver, always accusing timeout, whatever settings
I passed to it.
Today I messed a little with the NCR5380.c file in drivers/scsi
which is included by the g_NCR5380 driver and I couldn't understand
one thing:
Why the function NCR5380_poll_politely() returned the value 'r'
on success if this value should be '0' case everything went ok...
So I changed "return r;" to "return 0;" and after that my
scanner worked fine, and was easily detected by SANE, without
a single error message. :)
I have not the time to delve into the problem further, but I
wanted to report this. I couldn't find any counter-effects caused
by changing these return values.
- Wagner Volanin.
GCC: gcc 2.95 (Debian Stable)
Kernel: 2.6.0-test5 compiled for Pentium-MMX.
Computer: Pentium MMX with PCCHIPS Motherboard.
Distribution: Debian Unstable
Command issued:
modprobe g_NCR5380 ncr_53c400a=1 ncr_addr=0x280 ncr_irq=255
The diff for the file follows below:
(Apply it inside drivers/scsi directory)
--- NCR5380.c.orig 2003-09-16 18:24:00.000000000 +0000
+++ NCR5380.c 2003-09-16 18:53:59.000000000 +0000
@@ -371,18 +371,18 @@
while( n-- > 0)
{
r = NCR5380_read(reg);
if((r & bit) == val)
- return r;
+ return 0;
cpu_relax();
}
/* t time yet ? */
while(time_before(jiffies, end))
{
r = NCR5380_read(reg);
if((r & bit) == val)
- return r;
+ return 0;
if(!in_interrupt())
yield();
else
cpu_relax();
next reply other threads:[~2003-09-16 19:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-16 19:55 Wagner Volanin [this message]
2003-09-17 14:28 ` Alan Cox
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='HLBOOL$9F22A6BA6BDFE9CEF6137FE62345D3D3@terra.com.br' \
--to=fadinha.mail@terra.com.br \
--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
all inboxes | Powered by JetHome®