[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190820.140511.46557475142867394.davem@davemloft.net>
Date: Tue, 20 Aug 2019 14:05:11 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: uli+renesas@...nd.eu
Cc: linux-renesas-soc@...r.kernel.org, netdev@...r.kernel.org,
sergei.shtylyov@...entembedded.com, niklas.soderlund@...natech.se,
wsa@...-dreams.de, horms@...ge.net.au, magnus.damm@...il.com,
geert@...der.be
Subject: Re: [PATCH v3] ravb: implement MTU change while device is up
From: Ulrich Hecht <uli+renesas@...nd.eu>
Date: Tue, 20 Aug 2019 21:01:26 +0200
> This revision reverts the MTU change if re-opening the device fails.
But you leave the device closed if this happens.
You have to implement this properly, with a full prepare/commit sequence.
First allocate all of the necessary resources, such that you can guarantee
success. If you cannot allocate these resources you must fail the operation
and leave the device _UP_ with the original MTU value.
If you can allocate the resource, you can fully commit to the MTU change
and return success.
You must not fail the operation in such a way that the device is left
inoperable. But that is precisely what your patch currently does.
Powered by blists - more mailing lists