aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/ich8lan.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index e415e81ecd3e..6d1aab6316ba 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -390,8 +390,6 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter)
390} 390}
391 391
392static DEFINE_MUTEX(nvm_mutex); 392static DEFINE_MUTEX(nvm_mutex);
393static pid_t nvm_owner_pid = -1;
394static char nvm_owner_name[TASK_COMM_LEN] = "";
395 393
396/** 394/**
397 * e1000_acquire_swflag_ich8lan - Acquire software control flag 395 * e1000_acquire_swflag_ich8lan - Acquire software control flag
@@ -408,16 +406,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
408 406
409 might_sleep(); 407 might_sleep();
410 408
411 if (!mutex_trylock(&nvm_mutex)) { 409 mutex_lock(&nvm_mutex);
412 WARN(1, KERN_ERR "e1000e mutex contention. Owned by process "
413 "%s (pid %d), required by process %s (pid %d)\n",
414 nvm_owner_name, nvm_owner_pid,
415 current->comm, current->pid);
416
417 mutex_lock(&nvm_mutex);
418 }
419 nvm_owner_pid = current->pid;
420 strncpy(nvm_owner_name, current->comm, TASK_COMM_LEN);
421 410
422 while (timeout) { 411 while (timeout) {
423 extcnf_ctrl = er32(EXTCNF_CTRL); 412 extcnf_ctrl = er32(EXTCNF_CTRL);
@@ -435,8 +424,6 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
435 hw_dbg(hw, "FW or HW has locked the resource for too long.\n"); 424 hw_dbg(hw, "FW or HW has locked the resource for too long.\n");
436 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; 425 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
437 ew32(EXTCNF_CTRL, extcnf_ctrl); 426 ew32(EXTCNF_CTRL, extcnf_ctrl);
438 nvm_owner_pid = -1;
439 strcpy(nvm_owner_name, "");
440 mutex_unlock(&nvm_mutex); 427 mutex_unlock(&nvm_mutex);
441 return -E1000_ERR_CONFIG; 428 return -E1000_ERR_CONFIG;
442 } 429 }
@@ -460,8 +447,6 @@ static void e1000_release_swflag_ich8lan(struct e1000_hw *hw)
460 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; 447 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
461 ew32(EXTCNF_CTRL, extcnf_ctrl); 448 ew32(EXTCNF_CTRL, extcnf_ctrl);
462 449
463 nvm_owner_pid = -1;
464 strcpy(nvm_owner_name, "");
465 mutex_unlock(&nvm_mutex); 450 mutex_unlock(&nvm_mutex);
466} 451}
467 452