Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
net: stmmac: fix 'ethtool -P' return -EBUSY
I want to get permanent MAC address when the card is down. And I think it is more convenient to get statistics in the down state by 'ethtool -S'. But current all of the ethool command return -EBUSY. I don't think we should detect that the network card is up in '. Begin', which will cause that all the ethtool commands can't be used when the network card is down. If some ethtool commands can only be used in the up state, check it in the corresponding ethool OPS function is better. This is too rude and unreasonable. I have checked the '. Begin' implementation of other drivers, most of which support the submission of NIC driver for the first time. They are too old to know why '. Begin' is implemented. I suspect that they have not noticed the usage of '. Begin'. Fixes: 47dd7a5 ("net: add support for STMicroelectronics Ethernet controllers.") Compile-tested on arm64. Tested on an arm64 system with an on-board STMMAC chip. Changes v5 ... v6: - The 4.19.90 kernel not support pm_runtime, so implemente '.begin' and '.complete' again. Add return value check of pm_runtime function. Changes v4 ... v5: - test the '.begin' will return -13 error on my machine based on 4.19.90 kernel. The platform driver does not supported pm_runtime. So remove the implementation of '.begin' and '.complete'. Changes v3 ... v4: - implement '.complete' ethtool OPS. Changes v2 ... v3: - add linux/pm_runtime.h head file. Changes v1 ... v2: - fix spell error of dev. Signed-off-by: Hao Chen <chenhaoa@uniontech.com>
- Loading branch information