* HP C2502 SCSI card (NCR 53C400A based) not working
@ 2004-10-31 12:22 Ondrej Zary
2004-10-31 15:23 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Ondrej Zary @ 2004-10-31 12:22 UTC (permalink / raw)
To: ingmar; +Cc: linux-kernel
Hello,
I have an old ISA SCSI card that came with HP ScanJet IIP scanner. It's
HP C2502 card based on NCR 53C400A chip. I was unable to get it working
with g_NCR5380 driver so I tried loading the official MINI400I.SYS
driver in DOSemu. I was surprised that the values sent to the ports are
not the same as in the g_NCR5380 driver.
The g_NCR5380 driver uses these "magic outbs" to configure the card
(this sequence disables the card):
outb(0x59, 0x779);
outb(0xb9, 0x379);
outb(0xc5, 0x379);
outb(0xae, 0x379);
outb(0xa6, 0x379);
outb(0x00, 0x379);
This is the output from DOSemu:
779 < f
379 < 22
379 < f0
379 < 20
379 < 80
379 < 00
The magic numbers are different - so I have a card that is not supported
by the driver. I've changed the numbers in the driver to match my card
but I'm still unable to get it working.
The g_NCR5380 driver uses this to check if the card is present at a
particular base address:
outb(0xc0, ports[i] + 9);
if (inb(ports[i] + 9) != 0x80)
continue;
The MINI400I.SYS uses something different:
(this is failed presence test at base address 0x280)
28e < 25
28f < a5
28f > ff
(this looks like a successful test at base address 0x350)
35e < 25
35f < a5
35f > a5
35f < 5a
35f > 5a
35e < 0
35f < 0
359 < 80
359 < 10
351 < 0
352 < 0
353 < 0
354 < 0
357 > ff
359 < 80
359 < 10
351 < 0
352 < 0
353 < 0
354 < 0
357 > ff
351 < 80
351 < 0
357 > ff
According to this, I think that my card has the 53C400A chip registers
mapped to different addresses (offsets) but I'm unable to determine what
the mapping is. I was also unable to find the 53C400A datasheet which
might help a bit.
--
Ondrej Zary
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: HP C2502 SCSI card (NCR 53C400A based) not working
2004-10-31 12:22 HP C2502 SCSI card (NCR 53C400A based) not working Ondrej Zary
@ 2004-10-31 15:23 ` Alan Cox
2004-10-31 17:13 ` Ondrej Zary
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2004-10-31 15:23 UTC (permalink / raw)
To: Ondrej Zary; +Cc: ingmar, Linux Kernel Mailing List
On Sul, 2004-10-31 at 12:22, Ondrej Zary wrote:
> Hello,
> I have an old ISA SCSI card that came with HP ScanJet IIP scanner. It's
> HP C2502 card based on NCR 53C400A chip. I was unable to get it working
> with g_NCR5380 driver so I tried loading the official MINI400I.SYS
> driver in DOSemu. I was surprised that the values sent to the ports are
> not the same as in the g_NCR5380 driver.
It should work in 2.4 providing you use the loading options for
ncr53c400a and set a port and no IRQ (read mine did). What options are
you trying ?
> According to this, I think that my card has the 53C400A chip registers
> mapped to different addresses (offsets) but I'm unable to determine what
> the mapping is. I was also unable to find the 53C400A datasheet which
> might help a bit.
The 53c400a can be programming to an address by software - either by
magic sequences or I believe according to pin strapping by ISAPnP.
Its been a long time since I touched such junk however and if you want
to do anything useful with your computer while scanning (like waving the
mouse point around) get something else!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: HP C2502 SCSI card (NCR 53C400A based) not working
2004-10-31 15:23 ` Alan Cox
@ 2004-10-31 17:13 ` Ondrej Zary
2004-10-31 17:29 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Ondrej Zary @ 2004-10-31 17:13 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux Kernel Mailing List
Alan Cox wrote:
> On Sul, 2004-10-31 at 12:22, Ondrej Zary wrote:
>
>>Hello,
>>I have an old ISA SCSI card that came with HP ScanJet IIP scanner. It's
>>HP C2502 card based on NCR 53C400A chip. I was unable to get it working
>>with g_NCR5380 driver so I tried loading the official MINI400I.SYS
>>driver in DOSemu. I was surprised that the values sent to the ports are
>>not the same as in the g_NCR5380 driver.
>
>
> It should work in 2.4 providing you use the loading options for
> ncr53c400a and set a port and no IRQ (read mine did). What options are
> you trying ?
I forgot to say that I'm trying this in 2.6.9. I've tried options like this:
ncr_53c400a=1 ncr_addr=0x350 ncr_irq=255
also tried ncr_53c400=1 (without the 'a'), various addresses and IRQs.
It never worked. I always get "scsi0: bus busy, attempting abort", etc.
and even Oops sometimes.
>>According to this, I think that my card has the 53C400A chip registers
>>mapped to different addresses (offsets) but I'm unable to determine what
>>the mapping is. I was also unable to find the 53C400A datasheet which
>>might help a bit.
>
>
> The 53c400a can be programming to an address by software - either by
> magic sequences or I believe according to pin strapping by ISAPnP.
My card has no jumpers - only solder points for two 3-pin jumpers and it
doesn't look like it can do ISAPnP.
I've made a simple test program in pascal to test the magic sequences in
DOS. The card ignores the magic sequences that the g_NCR5380 driver
uses. When I use the sequences obtained from MINI400I.SYS using DOSemu,
it "works" - I can read/write the card's registers at the configured
base address. The IRQ (2,3,4,5 and 7) can be configured by the magic
sequence too (by setting the high-order bits in the last number in the
sequence).
So I know how to configure my card, maybe I should try to add it to the
driver (e.g. by adding ncr_53c400a_hp=1 parameter). If I only could get
the register mapping correctly (I think that this is the problem now).
The g_NCR5380 driver moves the base address by +8 bytes for 53C400 chips
(but not for 53C400A) and defines the 53C400 specifis register offsets
negative. This looks weird to me - either the 53C400A does not have
these additional registers or the driver is broken and is trying to
access these registers outside the I/O range on 53C400A.
> Its been a long time since I touched such junk however and if you want
> to do anything useful with your computer while scanning (like waving the
> mouse point around) get something else!
I know it's old, cheap and bad - I just want to make it work. I remember
that it worked in DOS/Windows 3.1. I was not successful in Windows 98 -
although there is an official driver from HP.
P.S. I've removed the Ingmar Baumgart's e-mail address from CC as it
does not work.
--
Ondrej Zary
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: HP C2502 SCSI card (NCR 53C400A based) not working
2004-10-31 17:13 ` Ondrej Zary
@ 2004-10-31 17:29 ` Alan Cox
0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2004-10-31 17:29 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Linux Kernel Mailing List
On Sul, 2004-10-31 at 17:13, Ondrej Zary wrote:
> I forgot to say that I'm trying this in 2.6.9. I've tried options like this:
> ncr_53c400a=1 ncr_addr=0x350 ncr_irq=255
> also tried ncr_53c400=1 (without the 'a'), various addresses and IRQs.
> It never worked. I always get "scsi0: bus busy, attempting abort", etc.
> and even Oops sometimes.
The driver hasn't been updated fully to 2.6 so thats not suprising (it
ought to be marked && BROKEN I guess)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-31 18:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-31 12:22 HP C2502 SCSI card (NCR 53C400A based) not working Ondrej Zary
2004-10-31 15:23 ` Alan Cox
2004-10-31 17:13 ` Ondrej Zary
2004-10-31 17:29 ` Alan Cox
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).