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] [day] [month] [year] [list]
Date:	Tue, 17 Aug 2010 18:03:03 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Tejun Heo <tj@...nel.org>
CC:	mingo@...e.hu, tglx@...utronix.de, bphilips@...e.de,
	yinghai@...nel.org, akpm@...ux-foundation.org,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-ide@...r.kernel.org, stern@...land.harvard.edu,
	gregkh@...e.de, khali@...ux-fr.org,
	Ashish Kalra <ashish.kalra@...escale.com>,
	Saeed Bishara <saeed@...vell.com>, Mark Lord <liml@....ca>,
	Robert Hancock <hancockr@...w.ca>
Subject: Re: [PATCH 2/2 #upstream] libata: always use ata_qc_complete_multiple()
 for NCQ command completions

On 06/25/2010 09:03 AM, Tejun Heo wrote:
> Currently, sata_fsl, mv and nv call ata_qc_complete() multiple times
> from their interrupt handlers to indicate completion of NCQ commands.
> This limits the visibility the libata core layer has into how commands
> are being executed and completed, which is necessary to support IRQ
> expecting in generic way.  libata already has an interface to complete
> multiple commands at once - ata_qc_complete_multiple() which ahci and
> sata_sil24 already use.
>
> This patch updates the three drivers to use ata_qc_complete_multiple()
> too and updates comments on ata_qc_complete[_multiple]() regarding
> their usages with NCQ completions.  This change not only provides
> better visibility into command execution to the core layer but also
> simplifies low level drivers.
>
> * sata_fsl: It already builds done_mask.  Conversion is straight
>    forward.
>
> * sata_mv: mv_process_crpb_response() no longer checks for illegal
>    completions, it just returns whether the tag is completed or not.
>    mv_process_crpb_entries() builds done_mask from it and passes it to
>    ata_qc_complete_multiple() which will check for illegal completions.
>
> * sata_nv adma: Similar to sata_mv.  nv_adma_check_cpb() now just
>    returns the tag status and nv_adma_interrupt() builds done_mask from
>    it and passes it to ata_qc_complete_multiple().
>
> * sata_nv swncq: It already builds done_mask.  Drop unnecessary
>    illegal transition checks and call ata_qc_complete_multiple().
>
> In the long run, it might be a good idea to make ata_qc_complete()
> whine if called when multiple NCQ commands are in flight.
>
> Signed-off-by: Tejun Heo<tj@...nel.org>
> Cc: Ashish Kalra<ashish.kalra@...escale.com>
> Cc: Saeed Bishara<saeed@...vell.com>
> Cc: Mark Lord<liml@....ca>
> Cc: Robert Hancock<hancockr@...w.ca>
> ---
>   drivers/ata/libata-core.c |   13 ++++++++--
>   drivers/ata/sata_fsl.c    |    8 +-----
>   drivers/ata/sata_mv.c     |   25 +++++++++-----------
>   drivers/ata/sata_nv.c     |   57 ++++++++++------------------------------------
>   4 files changed, 38 insertions(+), 65 deletions(-)

I was getting really inconsistent results on sata_mv 6081 last week. 
Just booted it up again, to try and resolve this, and it started 
spitting out a bunch of PCI errors.  That sounds like the root cause to 
me...  pushing this into #upstream.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ