tware.org>
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
Changes to Ondrej's version:
- Rebased.
---
drivers/scsi/g_NCR5380.c | 38 +++---
drivers/scsi/g_NCR5380.h |3 ++-
2 files changed, 33 insertions(+), 8 deletions(-)
Index: linux/driver
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 30 +++---
drivers/scsi/atari_NCR5380.c | 26 +-
2 files changed, 32 insertions(+), 24 deletions(-)
Index: linux/drivers/scsi/NCR
(Canon FG2-5202).
Signed-off-by: Ondrej Zary <li...@rainbow-software.org>
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/g_NCR5380.c |4
1 file changed, 4 insertions(+)
Index: linux/driver
Arbitration Lost test.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 14 +-
drivers/scsi/NCR5380.h |1 -
drivers/scsi/atari_NCR5380.c |9 -
drivers/scsi/dmx3191d.c |2 +-
drivers/scsi/g_NCR5380.c
Fix the array bounds check when transferring an extended message from the
target.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |3 ++-
drivers/scsi/atari_NCR5380.c |4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
Index: linux/d
of the TCR_LAST_BYTE_SENT bit.
Remove the old flags.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 68 +++
drivers/scsi/NCR5380.h |4 --
drivers/scsi/dtc.c |4 --
drivers/scsi/g_NCR5380.c |2 -
4
This refactoring removes two global Scsi_Host pointers. This
improves consistency with other ncr5380 drivers. Adopting the same
conventions as the other drivers makes them easier to read.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/atari_NCR5380.c |5 +-
d
is addressed in a subsequent patch.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 155 ++
drivers/scsi/atari_NCR5380.c | 157 ++-
2 files changed, 282 insertions(
to track the command in arbitration or selection phase.
Replace 'retain_dma_irq' with the new 'selecting' pointer, to bring
atari_NCR5380.c into line with NCR5380.c.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
NDEBUG_NO_DATAOUT should not disable DATA IN phases too. Fix this.
(This bug has long been fixed in atari_NCR5380.c.)
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/drivers/scsi/NCR
for debugging, the easiest way to fix the discrepancy is
simply remove this code.
The only remaining users of NCR5380_show_info() and NCR5380_write_info()
are drivers that define PSEUDO_DMA. The others have no use for the
.show_info method, so don't initialize it.
Signed-off-by: Finn Thain <
the information transfer state machine from
queuecommand because, according to Documentation/scsi/scsi_mid_low_api.txt
that could happen in soft irq context. Fix this.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.h |1
drivers/scsi/atari_NCR5380.c
Remove unused includes (stat.h, signal.h, proc_fs.h) and move includes
needed by the core drivers into the common header (delay.h etc).
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |2 --
drivers/scsi/NCR5380.h |4
drivers/sc
region() calls in dtc.c,
pas16.c and t128.c.
Fix these issues.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/arm/cumana_1.c |6 --
drivers/scsi/dtc.c |2 --
drivers/scsi/pas16.c|2 --
drivers/scsi/t128.c |2 --
4 files ch
[ef885ea0] [c0046870] worker_thread+0x14c/0x430
[ef885ed0] [c004e4f4] kthread+0xd8/0xec
[ef885f40] [c00124d4] ret_from_kernel_thread+0x5c/0x64
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |9 -
1 file changed, 8 insertions(+), 1 de
selection, don't interfere with the chip registers after a
reselection interrupt intervenes.
Clean up some trivial issues with code style, comments and printk.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
Use timeouts in do_abort() in atari_NCR5380.c instead of infinite loops.
Also fix the kernel-doc comment. Keep the two core driver forks in sync.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 26 +-
drivers/scsi/atari_N
Allow target selection to fail with a timeout instead of waiting in
infinite loops. This gets rid of the unused NCR_TIMEOUT macro, it is more
defensive and has proved helpful in debugging.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
things because then we
would have to handle the possibility of EH handler invocation during a
PDMA transfer.
The comments say that instead of using this macro, "you're going to be
better off twiddling with transfersize". I agree. Remove this stuff.
Signed-off-by: Finn
From: Hannes Reinecke <h...@suse.de>
Some old drivers partially implemented support for linked commands using
a "proposed" next_link pointer in struct scsi_cmnd that never actually
existed. Remove this code.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
This
nly be churn because the existing EH handlers don't work and get replaced
in a subsequent patch.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
Changed since v2:
- Fix NULL pointer dereference in NCR5380_reselect() when SUPPORT_TAGS is
enabled in the atari_NCR5380.c co
Each host instance now has it's own work queue so the main() work item can
sleep when necessary. That means we can use a simple work item rather than
a delayed work item. This brings NCR5380.c closer to atari_NCR5380.c.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
driver
eouts" and perhaps BUS FREE polling
was somehow helpful back in Linux v0.99.14u, when it was introduced.
The relevant timeout is presently 1 second (for bus arbitration).
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |7 ---
drivers/scsi/atari_
e not. Before clearing
the chip IRQ flag, clear all state that may cause it to be raised. That
means clearing the DMA Mode and Busy Monitor bits in the Mode Register
and clearing the host ID in the Select Enable register.
Also clean up some printk's and some comments. Keep atari_NCR5380.c and
NCR5380.c
Printing command pointers can be useful when debugging queues. Other than
that, the LIST and REMOVE macros are just clutter. These macros are
redundant now that NDEBUG_QUEUES causes pointers to be printed, so remove
them.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
driver
Add missing .module initializer. Use distinct .proc_name values for the
g_NCR5380 and g_NCR5380_mmio modules. Remove pointless CAN_QUEUE and
CMD_PER_LUN override macros. Cleanup whitespace and code style.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/atari_
of subsequent patches.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |9 ---
drivers/scsi/NCR5380.h |5 +++
drivers/scsi/atari_NCR5380.c | 54 +--
3 files changed, 38 insertions(+), 30 del
,
to eliminate the READ_OVERRUNS macro.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 28 +++-
1 file changed, 11 insertions(+), 17 deletions(-)
Index: linux/drivers/scsi/NCR
NCR5380_poll_politely() returns either 0 (success) or -ETIMEDOUT. However,
in do_abort(), the return value is incorrectly taken to be the status
register value. This means that the bus is put into DATA OUT phase instead
of MESSAGE OUT. Fix this.
Signed-off-by: Finn Thain <
SCSI bus protocol sometimes requires monitoring two related conditions
simultaneously. Enhance NCR5380_poll_politely() for this purpose, and
put it to use in the arbitration algorithm. It will also find use in
pseudo DMA.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
driver
NCR5380_poll_politely() never returns -1. That means do_abort() can fail
to handle a timeout after waiting for the target to negate REQ. Fix this
and cleanup other NCR5380_poll_politely() call sites.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
obsolete comments.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/atari_NCR5380.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
Index: linux/drivers/scsi/atari_NCR
ASM macro is never defined. rtrc in pas16.c is not used.
NCR5380_map_config, do_NCR5380_intr, do_t128_intr and do_pas16_intr
are unused. NCR_NOT_SET harms readability. Remove them.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <h...@suse.com>
kinds of
boards.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
Changed since v1:
- Don't set FLAG_NO_PSEUDO_DMA when !defined(PSEUDO_DMA). It's pointless.
---
drivers/scsi/NCR5380.c | 18 --
drivers/scsi
for that
purpose because the Scsi_Host struct has not yet been instantiated.
Moreover, these macros were removed from atari_NCR5380.c long ago and
now they constitute yet another discrepancy between the two core driver
forks.
Remove these "optimizations".
Signed-off-by: Finn
Replace {P,T,DTC}DEBUG_INIT with NDEBUG_INIT. Remove dead debugging
code, including code that's conditional upon *DEBUG_TRANSFER.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
drivers/scsi/dtc.c | 18 ++
The NVRAM location of this byte is 16, as documented in
http://toshyp.atari.org/en/004009.html
This was confirmed by Michael Schmitz, by setting the SCSI host ID
under EmuTOS and then checking the value in /proc/driver/nvram and
/dev/nvram under Linux.
Signed-off-by: Finn Thain <
MESSAGE REJECT does not imply DISCONNECT: the target is about to enter
MESSAGE IN or MESSAGE OUT phase.
This bug fix comes from atari_NCR5380.c. Unfortunately it never made it
into the original NCR5380.c core driver.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
driver
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
drivers/scsi/NCR5380.c |2 +-
drivers/scsi/dtc.c |4 ++--
drivers/scsi/g_NCR5380.c |4 ++--
drivers/scsi/pas16.c | 10 +-
drivers/scsi/sun3_s
for
this discrepancy. The timing seems to have no relation to the type of
adapter. Bizarrely, the timing in g_NCR5380 seems to relate only to one
particular type of target device. This patch attempts to solve the
problem for all NCR5380 drivers and all target devices.
Signed-off-by: Finn Tha
Allocate a work queue that will permit busy waiting and sleeping. This
means NCR5380_init() can potentially fail, so add this error path.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
In subsequent patches, the work function adopts this work queue so it
can sleep while p
bits in STATUS_REG so that NCR5380_transfer_pio() can
return the correct result. The return value is presently unused (perhaps
because of bugs like this) but this change at least fixes the caller's
phase variable, which is passed by reference.
Signed-off-by: Finn Thain <fth...@telegraphics.com
the important ones, to
facilitate reunification.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 155 +++--
1 file changed, 87 insertions(+), 68 deletions(-)
Index: linux/drivers/scsi/NCR
the important ones, to
facilitate reunification.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/atari_NCR5380.c | 108 +--
1 file changed, 64 insertions(+), 44 deletions(-)
Index: linux/drivers/scsi/atari_NCR
.c
This removes some unimportant discrepancies between the two core driver
forks so that 'diff' can be used to reveal the important ones, to
facilitate reunification.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
Remove the DEF_SCSI_QCMD macro (already removed from atari_NCR5380.c). The
lock provided by DEF_SCSI_QCMD is only needed for queue data structures.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 30 +++---
driver
.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 32 +---
drivers/scsi/arm/cumana_1.c |3 +++
drivers/scsi/arm/oak.c |2 ++
drivers/scsi/atari_NCR5380.c |8 +---
drivers/scsi/dtc.c
. We can sleep while polling now that we have a
suitable workqueue.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 74 ---
drivers/scsi/NCR5380.h |2 -
drivers/scsi/atari_NCR5380.c
;
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
Changes to Ondrej's versions:
- Omit a redundant comment.
- Throw an error if MMIO register locations are not known.
- Avoid 'if (...) { ... continue; } else { ... }'
- Fix "warning: 'port_idx' may be used uninitialized"
.@rainbow-software.org>
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.h | 13 --
drivers/scsi/g_NCR5380.c | 88 +--
drivers/scsi/g_NCR5380.h | 12 --
3 files changed, 49 insertions(+), 64 d
or lost
arbitration.
The "else break" clause in NCR5380_main() that gets removed here appears
to be a vestige of a long-gone loop that iterated over host instances.
See commit 491447e1fcff ("[PATCH] next NCR5380 updates") in
history/history.git.
Signed-off-by: Finn Thain <fth
5380 hardware implementations.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
Changed since v1:
- Don't rely on loops_per_jiffy to estimate register access speed, measure
it instead.
Changed since v2:
- As suggested by Geert Uytterhoeven: calibration now begins when jiffies
c
Like my previous work on the NCR5380 drivers, this patch series has bug
fixes, code cleanup and modernization. These drivers suffer from mistakes,
poor style and neglect and this long series addresses the worst of it,
covering all ten wrapper drivers and both of the core driver forks. The
On Tue, 22 Dec 2015, Hannes Reinecke wrote:
> On 12/22/2015 02:17 AM, Finn Thain wrote:
> > Linux 2.1.105 introduced the USLEEP_WAITLONG delay, apparently "needed for
> > Mustek scanners". It is intended to stall the issue queue for 5 seconds.
> >
On Tue, 22 Dec 2015, Hannes Reinecke wrote:
> On 12/22/2015 02:17 AM, Finn Thain wrote:
> > Allocate a work queue that will permit busy waiting and sleeping. This
> > means NCR5380_init() can potentially fail, so add this error path.
> >
> > Signed-off-by: Finn Thain
On Tue, 22 Dec 2015, One Thousand Gnomes wrote:
> On Tue, 22 Dec 2015 12:18:44 +1100 Finn Thain
> <fth...@telegraphics.com.au> wrote:
>
> > Because of the rudimentary design of the chip, it is necessary to poll
> > the SCSI bus signals during PIO and this tends to h
On Tue, 24 Nov 2015, Ondrej Zary wrote:
> On Tuesday 24 November 2015 10:13:17 Finn Thain wrote:
> >
> > On Tue, 24 Nov 2015, Ondrej Zary wrote:
> >
> > > On Tuesday 24 November 2015, Finn Thain wrote:
> > > >
> > > > On Mon, 23 Nov 2015,
On Tue, 24 Nov 2015, Ondrej Zary wrote:
> On Wednesday 18 November 2015 09:35:17 Finn Thain wrote:
> > Linux v2.1.105 changed the algorithm for polling for the BSY signal
> > in NCR5380_select() and NCR5380_main().
> >
> > Presently, this code has a bug. Back then, NC
On Thu, 26 Nov 2015, Ondrej Zary wrote:
>
> [ 156.014234] scsi host2: Generic NCR5380/NCR53C400 SCSI, io_port 0x0,
> n_io_port 0, base 0xd8000, irq 0, can_queue 16, cmd_per_lun 2, sg_tablesize
> 128, this_id 7, flags { NO_DMA_FIXUP }, options { AUTOPROBE_IRQ PSEUDO_DMA }
> [ 156.020369]
On Sun, 29 Nov 2015, Ondrej Zary wrote:
> > [...] I think that this should solve the problem:
>
> Yes, it does!
>
> [ 48.119367] scsi host2: Generic NCR5380/NCR53C400 SCSI, io_port 0x0,
> n_io_port 0, base 0xd8000, irq 0, can_queue 16, cmd_per_lun 2, sg_tablesize
> 128, this_id 7, flags {
On Sun, 29 Nov 2015, Geert Uytterhoeven wrote:
> This still heavily depends on the processing time spent in
> NCR5380_read(). You should never use a value derived from
> loops_per_jiffy for a non-empty loop,
Sure but the time-out condition isn't supposed to be precise.
Plus/minus a jiffy is
On Wed, 25 Nov 2015, Ondrej Zary wrote:
> On Wednesday 25 November 2015, Finn Thain wrote:
> >
> > On Tue, 24 Nov 2015, Ondrej Zary wrote:
> >
> > > Instead of fixing split transfers, simply forced everything
> > > non-modulo-128 to PIO:
> >
&
On Sun, 29 Nov 2015, Geert Uytterhoeven wrote:
> If an ISA access takes 8 us, while the CPU runs at 1 GHz, i.e. 500M
> loops/s, the difference will be huge.
Ondrej showed that an ISA access can take about 1.6 us. I don't know what
to make of the "8 uS" comment in the mainline driver. Maybe it
On Sun, 29 Nov 2015, Ondrej Zary wrote:
> The FLAG_DTC3181E is used to activate a work-around for arbitration lost
> condition that these chips see when ICR is written during arbitration.
>
> Move the ICR write (to set SEL and BSY) after the arbitration loss check
> and remove FLAG_DTC3181E.
On Sun, 29 Nov 2015, Ondrej Zary wrote:
> Add I/O register mapping for NCR53C400A and enable PDMA mode to
> improve performance and fix non-working IRQ.
>
> Tested with HP C2502 (and user-space enabler).
>
> Signed-off-by: Ondrej Zary
> ---
>
On Sun, 29 Nov 2015, Ondrej Zary wrote:
> Add I/O register mapping for NCR53C400A and enable PDMA mode to
> improve performance and fix non-working IRQ.
>
Is CONFIG_SCSI_GENERIC_NCR53C400 is still needed? Can the driver be fully
configured at runtime now?
> Tested with HP C2502 (and
On Sun, 29 Nov 2015, Ondrej Zary wrote:
> Convert compile-time C400_ register mapping to runtime mapping.
> This removes the weird negative register offsets and allows adding
> additional mappings.
>
> Signed-off-by: Ondrej Zary
> ---
> drivers/scsi/NCR5380.h |
On Wed, 25 Nov 2015, Ondrej Zary wrote:
> On Wednesday 25 November 2015 04:17:09 Finn Thain wrote:
> >
> > On Tue, 24 Nov 2015, Ondrej Zary wrote:
> >
> > >
> > > Bisecting slow module initialization pointed to this commit.
> > >
> >
for
this discrepancy. The timing seems to have no relation to the type of
adapter. Bizarrely, the timing in g_NCR5380 seems to relate only to one
particular type of target device. This patch attempts to solve the
problem for all NCR5380 drivers and all target devices.
Signed-off-by: Finn Tha
region() calls in dtc.c,
pas16.c and t128.c.
Fix these issues.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/arm/cumana_1.c |6 --
drivers/scsi/dtc.c |2 --
drivers/scsi/pas16.c|2 --
drivers/scsi/t128.c |2 --
4 files ch
Remove the DEF_SCSI_QCMD macro (already removed from atari_NCR5380.c). The
lock provided by DEF_SCSI_QCMD is only needed for queue data structures.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 30 +++---
driver
When in process context, sleep during polling if doing so won't add
significant latency. In interrupt context or if the lock is held, poll
briefly then give up. Keep both core drivers in sync.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |2 +-
drivers/scsi/dtc.c |4 ++--
drivers/scsi/g_NCR5380.c |4 ++--
drivers/scsi/pas16.c | 10 +-
drivers/scsi/sun3_scsi.c |8
drivers/scsi/t128.c |4 +
nly be churn because the existing EH handlers don't work and get replaced
in a subsequent patch.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 214 +---
drivers/scsi/NCR5380.h | 16 ++
drivers/scsi/arm/cumana_1.
Make use of the shost_priv() helper. Remove HOSTDATA and SETUP_HOSTDATA
macros because they harm readability.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 23 ++-
drivers/scsi/atari_NCR5380.c | 20 +++-
2
of subsequent patches.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 11 +---
drivers/scsi/NCR5380.h |5 +++
drivers/scsi/atari_NCR5380.c | 57 +--
3 files changed, 40 insertions(+), 33 del
Implement a 'complete_cmd' function to complete commands. This is needed
by the following patch; the new function provides a site for the logic
needed to correctly handle REQUEST SENSE commands.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
or lost
arbitration.
The "else break" clause in NCR5380_main() that gets removed here appears
to be a vestige of a long-gone loop that iterated over host instances.
See commit 491447e1fcff ("[PATCH] next NCR5380 updates") in
history/history.git.
Signed-off-by: Finn Thain <fth
issue queue. Clarify this logic.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
Good code style would be,
if (this) {
/* do stuff */
}
rather than,
if (!this) {
} else {
/* do stuff */
}
But I've used the
o a
target that doesn't assert BSY. We need to handle these two cases
differently; the latter case can be left to the SCSI ML.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 13 -
drivers/scsi/NCR5380.h |6 --
drivers/scsi/atari_
Remove the duplicate write to the Select Enable Register that appeared
in v1.1.38.
Also remove the redundant write to Initiator Command Register prior to
calling do_abort().
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c |2 --
driver
. They are indispensible. Keep
the two implementations in sync.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 33 +++-
drivers/scsi/atari_NCR5380.c | 113 +++
2 files changed, 134 insertions(+), 12 del
The "failed" label in NCR5380_select() is not helpful. Some failures
return 0, others -1. Use return instead of goto to improve clarity and
brevity, like atari_NCR5380.c does. Fix the relevant comments.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
driver
is addressed in a subsequent patch.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 155 ++
drivers/scsi/atari_NCR5380.c | 157 ++-
2 files changed, 282 insertions(
Remove the HOSTNO macro that is peculiar to atari_NCR5380.c and
contributes to the problem of divergence of the NCR5380 core drivers.
Keep NCR5380.c in sync.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 17 +
driver
.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 32 +---
drivers/scsi/arm/cumana_1.c |3 +++
drivers/scsi/arm/oak.c |2 ++
drivers/scsi/atari_NCR5380.c |8 +---
drivers/scsi/dtc.c
,
to eliminate the READ_OVERRUNS macro.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 28 +++-
1 file changed, 11 insertions(+), 17 deletions(-)
Index: linux/drivers/scsi/NCR
selection, don't interfere with the chip registers after a
reselection interrupt intervenes.
Clean up some trivial issues with code style, comments and printk.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
NCR5380.c is not compliant with the SCSI-2 standard (at least, not with
the draft revision 10L that I have to refer to). The selection algorithm
in atari_NCR5380.c is correct, so use that.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
The NCR 5380 Family datasheet has a flow
ck should be
uncontested even when the SCSI bus is contested.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 83 -
drivers/scsi/NCR5380.h |1
drivers/scsi/atari_NCR5380.c | 139 +
the important ones, to
facilitate reunification.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/atari_NCR5380.c | 108 +--
1 file changed, 64 insertions(+), 44 deletions(-)
Index: linux/drivers/scsi/atari_NCR
The hostdata struct is now protected by a spin lock so the volatile
qualifiers are redundant. Remove them.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.h | 12 ++--
drivers/scsi/atari_NCR5380.c |2 +-
2 files changed, 7 insertions
Allocate a work queue that will permit busy waiting and sleeping. This
means NCR5380_init() can potentially fail, so add this error path.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
In subsequent patches, the work function adopts this work queue so it
can sleep while p
. We can sleep while polling now that we have a
suitable workqueue.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 74 ---
drivers/scsi/NCR5380.h |2 -
drivers/scsi/atari_NCR5380.c
the important ones, to
facilitate reunification.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 157 +++--
1 file changed, 89 insertions(+), 68 deletions(-)
Index: linux/drivers/scsi/NCR
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c | 30 +++---
drivers/scsi/atari_NCR5380.c | 26 +-
2 files changed, 32 insertions(+), 24 deletions(-)
Index: linux/drivers/scsi/NCR
Allow target selection to fail with a timeout instead of waiting in
infinite loops. This gets rid of the unused NCR_TIMEOUT macro, it is more
defensive and has proved helpful in debugging.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.c
the information transfer state machine from
queuecommand because, according to Documentation/scsi/scsi_mid_low_api.txt
that could happen in soft irq context. Fix this.
Signed-off-by: Finn Thain <fth...@telegraphics.com.au>
---
drivers/scsi/NCR5380.h |1
drivers/scsi/atari_NCR5380.c
e not. Before clearing
the chip IRQ flag, clear all state that may cause it to be raised. That
means clearing the DMA Mode and Busy Monitor bits in the Mode Register
and clearing the host ID in the Select Enable register.
Also clean up some printk's and some comments. Keep atari_NCR5380.c and
NCR5380.c
bits in STATUS_REG so that NCR5380_transfer_pio() can
return the correct result. The return value is presently unused (perhaps
because of bugs like this) but this change at least fixes the caller's
phase variable, which is passed by reference.
Signed-off-by: Finn Thain <fth...@telegraphics.com
401 - 500 of 875 matches
Mail list logo