aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/ich8lan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e/ich8lan.c')
-rw-r--r--drivers/net/e1000e/ich8lan.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index f2a5963b5a95..e415e81ecd3e 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -390,7 +390,8 @@ 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 = -1; 393static pid_t nvm_owner_pid = -1;
394static char nvm_owner_name[TASK_COMM_LEN] = "";
394 395
395/** 396/**
396 * e1000_acquire_swflag_ich8lan - Acquire software control flag 397 * e1000_acquire_swflag_ich8lan - Acquire software control flag
@@ -408,11 +409,15 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
408 might_sleep(); 409 might_sleep();
409 410
410 if (!mutex_trylock(&nvm_mutex)) { 411 if (!mutex_trylock(&nvm_mutex)) {
411 WARN(1, KERN_ERR "e1000e mutex contention. Owned by pid %d\n", 412 WARN(1, KERN_ERR "e1000e mutex contention. Owned by process "
412 nvm_owner); 413 "%s (pid %d), required by process %s (pid %d)\n",
414 nvm_owner_name, nvm_owner_pid,
415 current->comm, current->pid);
416
413 mutex_lock(&nvm_mutex); 417 mutex_lock(&nvm_mutex);
414 } 418 }
415 nvm_owner = current->pid; 419 nvm_owner_pid = current->pid;
420 strncpy(nvm_owner_name, current->comm, TASK_COMM_LEN);
416 421
417 while (timeout) { 422 while (timeout) {
418 extcnf_ctrl = er32(EXTCNF_CTRL); 423 extcnf_ctrl = er32(EXTCNF_CTRL);
@@ -430,7 +435,8 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
430 hw_dbg(hw, "FW or HW has locked the resource for too long.\n"); 435 hw_dbg(hw, "FW or HW has locked the resource for too long.\n");
431 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; 436 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
432 ew32(EXTCNF_CTRL, extcnf_ctrl); 437 ew32(EXTCNF_CTRL, extcnf_ctrl);
433 nvm_owner = -1; 438 nvm_owner_pid = -1;
439 strcpy(nvm_owner_name, "");
434 mutex_unlock(&nvm_mutex); 440 mutex_unlock(&nvm_mutex);
435 return -E1000_ERR_CONFIG; 441 return -E1000_ERR_CONFIG;
436 } 442 }
@@ -454,7 +460,8 @@ static void e1000_release_swflag_ich8lan(struct e1000_hw *hw)
454 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; 460 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
455 ew32(EXTCNF_CTRL, extcnf_ctrl); 461 ew32(EXTCNF_CTRL, extcnf_ctrl);
456 462
457 nvm_owner = -1; 463 nvm_owner_pid = -1;
464 strcpy(nvm_owner_name, "");
458 mutex_unlock(&nvm_mutex); 465 mutex_unlock(&nvm_mutex);
459} 466}
460 467