Command sequence numbers - do they have to be sequential?

Dan Williams dcbw at redhat.com
Thu May 26 13:22:26 EDT 2011


On Mon, 2011-05-16 at 20:02 +0100, Daniel Drake wrote:
> On 14 May 2011 19:32, Daniel Drake <dsd at laptop.org> wrote:
> > Can someone see what the specs have to say about the sequence number
> > field in the cmd_header that is sent to the device with every command?
> > Does it have to go sequential, one greater than the previous command?
> >
> > We are still battling a libertas device hang during resume here:
> > http://dev.laptop.org/ticket/10748
> >
> > I have found a bug in the libertas driver where commands are sometimes
> > sent with sequence numbers out of order. The case that we have full
> > logs for shows that the device is hanging at a time when this has just
> > happened. Yet the logs also show other times when out-of-order
> > commands are sent and the device deals with it OK.
> 
> Fixing the command sequence doesn't solve our crash :(
> 
> Any interest in the patch anyway?

Yeah, send it along.  The command sequence numbers don't need to be
anything, I think the requirement is simply that they not overlap; but
in reality since firmware only accepts one command in flight at a time
this is more for host driver accounting than anything else.

I think the case where in the driver where this can happen is related to
command retries?

Dan





More information about the libertas-dev mailing list