lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Dec 2015 08:36:29 +0100
From:	Hannes Reinecke <hare@...e.de>
To:	Finn Thain <fthain@...egraphics.com.au>,
	"James E.J. Bottomley" <JBottomley@...n.com>,
	Michael Schmitz <schmitzmic@...il.com>,
	linux-m68k@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v3 39/77] ncr5380: Standardize interrupt handling

On 12/22/2015 02:18 AM, Finn Thain wrote:
> Because interrupt handling is crucial to the core driver(s), all wrapper
> drivers need to agree on this code. This patch removes discrepancies.
>
> NCR5380_intr() in NCR5380.c has the following pointless loop that differs
> from the code in atari_NCR5380.c.
>
> 	done = 1;
> 	do {
> 		/* ... */
> 	} while (!done);
>
> The 'done' flag gets cleared when a reconnected command is to be processed
> from the work queue. But in NCR5380.c, the flag is also used to cause the
> interrupt conditions to be re-examined. Perhaps this was because
> NCR5380_reselect() was expected to cause another interrupt, or perhaps
> the remaining present interrupt conditions need to be handled after the
> NCR5380_reselect() call?
>
> Actually, both possibilities are bogus, as is the loop itself. It seems
> have been overlooked in the hit-and-miss removal of scsi host instance
> list iteration many years ago; see history/history.git commit 491447e1fcff
> ("[PATCH] next NCR5380 updates") and commit 69e1a9482e57 ("[PATCH] fix up
> NCR5380 private data"). See also my earlier patch, "Always retry
> arbitration and selection".
>
> The datasheet says, "IRQ can be reset simply by reading the Reset
> Parity/Interrupt Register". So don't treat the chip IRQ like a
> level-triggered interrupt. Of the conditions that set the IRQ flag,
> some are level-triggered and some are edge-triggered, which means IRQ
> itself must be edge-triggered.
>
> Some interrupt conditions are latched and some are 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 in agreement.
>
> Signed-off-by: Finn Thain <fthain@...egraphics.com.au>
>
> ---
>   drivers/scsi/NCR5380.c       |  187 +++++++++++++++++++++++--------------------
>   drivers/scsi/atari_NCR5380.c |  156 +++++++++++++++++------------------
>   drivers/scsi/dtc.c           |    8 -
>   drivers/scsi/g_NCR5380.c     |    2
>   4 files changed, 180 insertions(+), 173 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@...e.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists