Hi all,
I am trying to work out a UMAX 1220S scanner on a cheap SCSI card
based on DTC3181LE (as seen on the chipset),
with LINUX-2.2.14 (debianised -5) kernel on a PC pentium, and
moduled for g_NCR5380 (dtc_3181e=1 ncr_addr=0xffff).
It worked with some success, but I had to hack
the code a little, and I have still one left to sort out!
Anyway,
not using USLEEP, nor NCR_TIMEOUT,
in the makefile I put,
CFLAGS_g_NCR5380.o = -DNDEBUG=(NDEBUG_RESTART_SELECT | NDEBUG_ABORT | NDEBUG_LI
STS | NDEBUG_MAIN | NDEBUG_INTR | NDEBUG_QUEUES | NDEBUG_ARBITRATION | NDEBUG_S
ELECTION)
#-DNCR_TIMEOUT=10 -DUSLEEP
in the SELECTION PHASE:at the last before statement in NCR5380_main()
after a "won arbitration" in the (second) return of
NCR5380_select(), the spin_lock_irq(&io_request_lock) hangs
(it looks like a dead lock), and so does the system (too bad).
Does someone knows why? Could it be because the TARGET/board runs with
no IRQ allocated?
I try the first remedy: remove lock requests on io_request_lock
variable. But what if I have a "race condition"? Surely I want to
freeze any requests.
but, by leaving dangerously, and after removing the lock system in
_main(), it worked better (could do nice thing with the scanner).
Yet the dangers appeared :
the PC hangs sometimes, when the scanner and some
IDE devices work together (not in harmony obviously).
Any hints in the scsi-linux-community to this kind of
spin_lock/semaphores problem ? Shall I try the kernel 2.3 for better results?
I have already done some IRQ/clear,enable structuring on this
main/select/transfer, but this was surely done without knowledge of the
traps you guys had on it some months ago!
Is it right to freeze the interrupts for time
critical functions, for reading and inserting queues elements of instances and
commands? Please is there any advises on this?
and what is the best semaphore to use in order to avoid dead-locks and
races conditions?
Thanks,
Christian.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]