From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Ri7i7-0000qt-1P for barebox@lists.infradead.org; Tue, 03 Jan 2012 16:59:41 +0000 Received: from localhost.localdomain (unknown [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP id 4B8044B0158 for ; Tue, 3 Jan 2012 17:59:33 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Tue, 3 Jan 2012 17:59:27 +0100 Message-Id: <1325609969-21471-2-git-send-email-eric@eukrea.com> In-Reply-To: <1325609969-21471-1-git-send-email-eric@eukrea.com> References: <1325609969-21471-1-git-send-email-eric@eukrea.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/4] dfu: fill bwPollTimeout and better handle detach To: barebox@lists.infradead.org LSBid1BvbGxUaW1lb3V0IGlzIHNldCB0byAxMCBtcywgZnJvbSB0aGUgREZVIHNwZWMsIHRoaXMK aXMgdGhlIG1pbmltdW0gdGltZSwgaW4gbWlsbGlzZWNvbmRzLCB0aGF0IHRoZSBob3N0IHNob3Vs ZAp3YWl0IGJlZm9yZSBzZW5kaW5nIGEgc3Vic2VxdWVudCBERlVfR0VUU1RBVFVTIHJlcXVlc3Qu CldpdGhvdXQgdGhpcywgSSBnZXQgMjUgc2Vjb25kcyB2YWx1ZSBhbmQgZGZ1LXV0aWwgd2FpdHMg dHdpY2UgMjVzCmR1cmluZyBkb3dubG9hZAotIHdoZW4gaW4gSURFTCBhbmQgcmVjZWl2aW5nIERF VEFDSCwgZmlyc3QgcmV0dXJuIDAgdG8gbWFrZQpkZnUtdXRpbCBoYXBweSwg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