Subject: Re: [PATCH net-next] cxgb4: don't hold RTNL during ethtool phys_id

From: Ben Hutchings <[email-masked]>
Date: Thu, 07 Apr 2011 01:35:23 +0100

On Wed, 2011-04-06 at 17:20 -0700, Casey Leedom wrote:
> | From: Stephen Hemminger <[email-masked]>
> | Date: Wednesday, April 06, 2011 05:09 pm
> | 
> | The Chelsio cxgb4 drivers implement blinking in a unique way by
> | waiting on the mailbox. This patch cleans it up slightly by no longer
> | holding the system wide network configuration lock during the process.
> | 
> | The patch also uses correct semantics for the time argument
> | which is supposed to be in seconds; and zero is supposed
> | to signify infinite blinking.
> | 
> | This is still a bad firmware interface design for this
> | since it means the board is basically hung while doing the blink.
> | But fixing it correctly would require hardware and firmware
> | documentation. With that information the device could be converted
> | to the new set_phys_id.
> | 
> | Compile tested only.
> | 
> | Signed-off-by: Stephen Hemminger <[email-masked]>
> 
>   Are you assuming that the firmware won't respond with a command completion 
> until the LED blinking is complete?  If so, that's a bad assumption.  The 
> firmware runs as an asynchronous real-time OS.  The LED blinking simply becomes 
> a thread of activity within the OS and the command completes immediately.
[...]

Stephen was assuming (as I did) that you actually implemented this
operation correctly.  You're supposed to blink the LED for the specified
time but let the user interrupt early.  If you just start the LED
blinking and then return, then it appears the user has no way to
interrupt it.

Is there a defined firmware command to stop blinking the LED?

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.