[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190413182439.GS17901@lunn.ch>
Date: Sat, 13 Apr 2019 20:24:39 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Igor Russkikh <Igor.Russkikh@...antia.com>
Cc: "David S . Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Nikita Danilov <Nikita.Danilov@...antia.com>,
Dmitry Bogdanov <Dmitry.Bogdanov@...antia.com>
Subject: Re: [PATCH netnext 12/16] net: aquantia: wrap fw ops by mutex
On Sat, Apr 13, 2019 at 12:32:11PM +0000, Igor Russkikh wrote:
> From: Nikita Danilov <ndanilov@...antia.com>
>
> Since fw ops may be invoked from different threads all its invocation
> must be wrapped by mutex.
Do all fw ops go through hw_atl_utils_fw_rpc_wait()?
My experience with the mv88e6xxx driver is that you forget a lock
somewhere. So we added code in the low level register access to check
the lock has been taken:
if (unlikely(!mutex_is_locked(&chip->reg_lock))) {
dev_err(chip->dev, "Switch registers lock not held!\n");
dump_stack();
}
Andrew
Powered by blists - more mailing lists