YueHaibing
5e2ea7801f
net: txgbe: Fix unsigned comparison to zero in txgbe_calc_eeprom_checksum()
...
The error checks on checksum for a negative error return always fails because
it is unsigned and can never be negative.
Fixes: 049fe53653 ("net: txgbe: Add operations to interact with firmware")
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2022-11-07 20:00:10 -08:00
YueHaibing
a068d33e54
net: txgbe: Fix memleak in txgbe_calc_eeprom_checksum()
...
eeprom_ptrs should be freed before returned.
Fixes: 049fe53653 ("net: txgbe: Add operations to interact with firmware")
Signed-off-by: YueHaibing <yuehaibing@huawei.com >
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2022-11-07 20:00:09 -08:00
Jiawen Wu
049fe53653
net: txgbe: Add operations to interact with firmware
...
Add firmware interaction to get EEPROM information.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2022-11-02 12:31:23 +00:00
Jiawen Wu
d21d2c7f58
net: txgbe: Set MAC address and register netdev
...
Add MAC address related operations, and register netdev.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2022-10-28 11:25:53 +01:00
Jiawen Wu
b08012568e
net: txgbe: Reset hardware
...
Reset and initialize the hardware by configuring the MAC layer.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2022-10-28 11:25:53 +01:00
Jiawen Wu
a34b3e6ed8
net: txgbe: Store PCI info
...
Get PCI config space info, set LAN id and check flash status.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2022-10-28 11:25:53 +01:00
Christophe JAILLET
2e8f205d91
net: txgbe: Fix an error handling path in txgbe_probe()
...
A pci_enable_pcie_error_reporting() should be balanced by a corresponding
pci_disable_pcie_error_reporting() call in the error handling path, as
already done in the remove function.
Fixes: 3ce7547e5b ("net: txgbe: Add build support for txgbe")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com >
Link: https://lore.kernel.org/r/082003d00be1f05578c9c6434272ceb314609b8e.1659285240.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2022-08-01 12:27:12 -07:00
Jiawen Wu
3ce7547e5b
net: txgbe: Add build support for txgbe
...
Add doc build infrastructure for txgbe driver.
Initialize PCI memory space for WangXun 10 Gigabit Ethernet devices.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com >
Link: https://lore.kernel.org/r/20220628095530.889344-1-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2022-06-29 20:57:06 -07:00