From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758509AbYAYRRl (ORCPT ); Fri, 25 Jan 2008 12:17:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756834AbYAYRRF (ORCPT ); Fri, 25 Jan 2008 12:17:05 -0500 Received: from mx1.redhat.com ([66.187.233.31]:47599 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756341AbYAYRRE (ORCPT ); Fri, 25 Jan 2008 12:17:04 -0500 From: Jarod Wilson Organization: Red Hat, Inc. To: Stefan Richter Subject: Re: [PATCH 4/4 update] firewire: fw-core: react on bus resets while the config ROM is being fetched Date: Fri, 25 Jan 2008 12:16:35 -0500 User-Agent: KMail/1.9.6 (enterprise 0.20071204.744707) Cc: Kristian =?iso-8859-1?q?H=F8gsberg?= , Nick Piggin , linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <4798E664.2040405@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801251216.35291.jwilson@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 25 January 2008 11:53:49 am Stefan Richter wrote: > read_rom() obtained a fresh new fw_device.generation for each read > transaction. Hence it was able to continue reading in the middle of the > ROM even if a bus reset happened. However the device may have modified > the ROM during the reset. We would end up with a corrupt fetched ROM > image then. > > Although all of this is quite unlikely, it is not impossible. > Therefore we now restart reading the ROM if the bus generation changed. > > Note, the memory barrier in read_rom() is still necessary according to > tests by Jarod Wilson, despite of the ->generation access being moved up > in the call chain. > > Signed-off-by: Stefan Richter > --- > > First posted on 2007-11-01. Update: Barrier stays. This is essentially what I've been beating on locally, and I've yet to hit another config rom read failure with it. Signed-off-by: Jarod Wilson -- Jarod Wilson jwilson@redhat.com