ncr5380: Fix NCR5380_transfer_pio() result
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 3 Jan 2016 05:05:27 +0000 (16:05 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Jan 2016 02:42:57 +0000 (21:42 -0500)
commita2edc4a63b4f89016053fe5da3fdac3798f3e2ae
tree9dc473baef6c61e8cf4e8093d068bc21298a58bf
parent686f3990e6a9111f97f2d385f4d1c1a5b0628c15
ncr5380: Fix NCR5380_transfer_pio() result

According to the SCSI-2 draft revision 10L, atari_NCR5380.c is correct
when it says that the phase lines are valid up until ACK is negated
following the transmission of the last byte in MESSAGE IN phase. This is
true for all information transfer phases, from target to initiator.

Sample the phase 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 <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/NCR5380.c
drivers/scsi/atari_NCR5380.c