From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFT patch, regression fix] firewire: deadline for PHY config transmission
Date: Wed, 18 Jun 2008 11:19:00 +0200 [thread overview]
Message-ID: <4858D304.80907@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.230a7a03785f244f@s5r6.in-berlin.de>
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/
next prev parent reply other threads:[~2008-06-18 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 18:13 [RFT patch, regression fix] firewire: deadline for PHY config transmission Stefan Richter
2008-06-18 9:19 ` Stefan Richter [this message]
2008-06-18 16:20 ` [PATCH update] " Stefan Richter
2008-06-26 17:52 ` Stefan Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4858D304.80907@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox