Skip to content

Commit cad4fb0

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-03-21 (iavf, i40e) This series contains updates to iavf and i40e drivers. Stefan Assmann adds check, and return, if driver has already gone through remove to prevent hang for iavf. Radoslaw adds zero initialization to ensure Flow Director packets are populated with correct values for i40e. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: fix flow director packet filter programming iavf: fix hang on reboot with ice ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 407b508 + c672297 commit cad4fb0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

drivers/net/ethernet/intel/i40e/i40e_txrx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ static char *i40e_create_dummy_packet(u8 *dummy_packet, bool ipv4, u8 l4proto,
171171
struct i40e_fdir_filter *data)
172172
{
173173
bool is_vlan = !!data->vlan_tag;
174-
struct vlan_hdr vlan;
175-
struct ipv6hdr ipv6;
176-
struct ethhdr eth;
177-
struct iphdr ip;
174+
struct vlan_hdr vlan = {};
175+
struct ipv6hdr ipv6 = {};
176+
struct ethhdr eth = {};
177+
struct iphdr ip = {};
178178
u8 *tmp;
179179

180180
if (ipv4) {

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5074,6 +5074,11 @@ static void iavf_remove(struct pci_dev *pdev)
50745074
mutex_unlock(&adapter->crit_lock);
50755075
break;
50765076
}
5077+
/* Simply return if we already went through iavf_shutdown */
5078+
if (adapter->state == __IAVF_REMOVE) {
5079+
mutex_unlock(&adapter->crit_lock);
5080+
return;
5081+
}
50775082

50785083
mutex_unlock(&adapter->crit_lock);
50795084
usleep_range(500, 1000);

0 commit comments

Comments
 (0)