Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753025AbYFRJTU (ORCPT ); Wed, 18 Jun 2008 05:19:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751966AbYFRJTN (ORCPT ); Wed, 18 Jun 2008 05:19:13 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:43419 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751945AbYFRJTM (ORCPT ); Wed, 18 Jun 2008 05:19:12 -0400 X-Envelope-From: stefanr@s5r6.in-berlin.de Message-ID: <4858D304.80907@s5r6.in-berlin.de> Date: Wed, 18 Jun 2008 11:19:00 +0200 From: Stefan Richter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080614 SeaMonkey/1.1.9 MIME-Version: 1.0 To: linux1394-devel@lists.sourceforge.net CC: linux-kernel@vger.kernel.org Subject: Re: [RFT patch, regression fix] firewire: deadline for PHY config transmission References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1199 Lines: 34 Stefan Richter wrote: > I briefly tested the patch with 7 different working controllers and the > packet callback seems to complete() always before the arbitrarily > chosen timeout of 10ms plus rounding. ... > void fw_send_phy_config(struct fw_card *card, > int node_id, int generation, int gap_count) > { > - struct fw_phy_packet p; > + struct fw_phy_packet *p; > + long timeout = DIV_ROUND_UP(HZ, 100); > u32 data = PHY_IDENTIFIER(PHY_PACKET_CONFIG) | ... > + card->driver->send_request(card, &p->packet); > + timeout = wait_for_completion_timeout(&p->done, timeout); > + kref_put(&p->kref, phy_packet_release); > > - card->driver->send_request(card, &p.packet); > - wait_for_completion(&p.done); > + /* will leak p if the callback is never executed */ > + WARN_ON(timeout == 0); > } The warning triggered on a VT6307 after cold boot. I will retry later today with HZ/10. -- Stefan Richter -=====-==--- -==- =--=- http://arcgraph.de/sr/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/