From: Alexander Duyck Date: Thu, 2 Jun 2011 04:28:39 +0000 (+0000) Subject: ixgbe: Make certain to initialize the fdir_perfect_lock in all cases X-Git-Tag: v2.6.39-400.9.0~619^2~11 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4696809ac93c6957e85276b94e2ea0fc4a8d4306;p=users%2Fjedix%2Flinux-maple.git ixgbe: Make certain to initialize the fdir_perfect_lock in all cases This fix makes it so that the fdir_perfect_lock is initialized in all cases. This is necessary as the fdir_filter_exit routine will always attempt to take the lock before inspecting the filter table. Reported-by: Ben Greear Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher (cherry picked from commit 1fc5f0386461dcb3fcbda7a8bcac87f7a822bc56) Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index a75001608bc60..24475b93af53f 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -5211,8 +5211,6 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED; if (hw->device_id == IXGBE_DEV_ID_82599_T3_LOM) adapter->flags2 |= IXGBE_FLAG2_TEMP_SENSOR_CAPABLE; - /* n-tuple support exists, always init our spinlock */ - spin_lock_init(&adapter->fdir_perfect_lock); /* Flow Director hash filters enabled */ adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; adapter->atr_sample_rate = 20; @@ -5234,6 +5232,9 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter) break; } + /* n-tuple support exists, always init our spinlock */ + spin_lock_init(&adapter->fdir_perfect_lock); + #ifdef CONFIG_IXGBE_DCB /* Configure DCB traffic classes */ for (j = 0; j < MAX_TRAFFIC_CLASS; j++) {