From nick@cecomputing.co.uk Sun Sep 27 13:52:37 2009
Received: from moutng.kundenserver.de ([212.227.126.187])
	by stoneboat.aleph1.co.uk with esmtp (Exim 4.69)
	(envelope-from <nick@cecomputing.co.uk>) id 1MrtEu-0003SU-Eq
	for balloon@balloonboard.org; Sun, 27 Sep 2009 13:52:37 +0100
Received: from localhost (host81-130-93-71.in-addr.btopenworld.com
	[81.130.93.71])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0LzWb8-1MMb3Q2yry-014j2k; Sun, 27 Sep 2009 14:52:26 +0200
Received: from a64.local ([192.168.40.40]) by localhost with esmtp (Exim 4.69)
	(envelope-from <nick@cecomputing.co.uk>) id 1MrtEn-0002Vt-Qx
	for balloon@balloonboard.org; Sun, 27 Sep 2009 13:52:25 +0100
Message-ID: <4ABF5FEC.1070906@cecomputing.co.uk>
Date: Sun, 27 Sep 2009 13:51:56 +0100
From: Nick Bane <nick@cecomputing.co.uk>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: "balloon@balloonboard.org" <balloon@balloonboard.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V01U2FsdGVkX18BDlDuqInwbuZvQ+hWwPUwyFWN/pqc+OezXDn
	+SCox2b59hWFE6h1herphpawm7N6sAT/nFfJIVYlxaN0FrgBiD
	OoDSm8+oo0IdZ2ZfPTxwQ==
X-SA-Exim-Connect-IP: 212.227.126.187
X-SA-Exim-Mail-From: nick@cecomputing.co.uk
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=4.5 tests=AWL,BAYES_20,SPF_HELO_PASS
	autolearn=no version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: [Balloon] udc updates
X-BeenThere: balloon@balloonboard.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: Balloon List <balloon.balloonboard.org>
List-Unsubscribe: <http://balloonboard.org/mailman/options/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=unsubscribe>
List-Archive: <http://balloonboard.org/lurker/list/balloon.html>
List-Post: <mailto:balloon@balloonboard.org>
List-Help: <mailto:balloon-request@balloonboard.org?subject=help>
List-Subscribe: <http://balloonboard.org/mailman/listinfo/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Sep 2009 12:52:37 -0000

I just updated the udc support for g_ether gadget.

This is in 2 parts and I thought it needed some explanation.

Firstly ether gadget support for suspend is added and implemented for the 
cdc_subset driver. Suspend in pxa270-speak is where the gadget loses its 
host connection for 3ms or more. As the balloon3 has no hardware detection 
for cable plug/unplug, this is one reliable way of detecting the cable 
being unplugged and thus notifying the ethernet link layer that no more 
traffic is possible.

The second part is a horrible hack on the back of the first part. I failed 
to get ifpugd to monitor the state of the interface even when ethtool link 
detection was routed to netif_carrier. Maybe that could be persuaded to 
work and would be a better solution that what follows. I added a usermode 
helper that explicitly (yes it should be via an installable proxy but time 
etc) calls ifup/down when the carrier is said to come and go. Note that 
this will happen in interrupt context so we must defer processing till 
later. Also note that there is whole slew if carrier present/absent calls 
during connect/disconnect so I run a cumulative timeout to only request one 
ifup/down per flurry of activity and then schedule the helper function.

And it seems to work ok too.

Nick Bane



