diff options
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index f777d37d8e66..dd66f8816b2f 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -409,25 +409,21 @@ e1000_release_hw_control(struct e1000_adapter *adapter) | |||
409 | { | 409 | { |
410 | uint32_t ctrl_ext; | 410 | uint32_t ctrl_ext; |
411 | uint32_t swsm; | 411 | uint32_t swsm; |
412 | uint32_t extcnf; | ||
413 | 412 | ||
414 | /* Let firmware taken over control of h/w */ | 413 | /* Let firmware taken over control of h/w */ |
415 | switch (adapter->hw.mac_type) { | 414 | switch (adapter->hw.mac_type) { |
416 | case e1000_82571: | ||
417 | case e1000_82572: | ||
418 | case e1000_80003es2lan: | ||
419 | ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT); | ||
420 | E1000_WRITE_REG(&adapter->hw, CTRL_EXT, | ||
421 | ctrl_ext & ~E1000_CTRL_EXT_DRV_LOAD); | ||
422 | break; | ||
423 | case e1000_82573: | 415 | case e1000_82573: |
424 | swsm = E1000_READ_REG(&adapter->hw, SWSM); | 416 | swsm = E1000_READ_REG(&adapter->hw, SWSM); |
425 | E1000_WRITE_REG(&adapter->hw, SWSM, | 417 | E1000_WRITE_REG(&adapter->hw, SWSM, |
426 | swsm & ~E1000_SWSM_DRV_LOAD); | 418 | swsm & ~E1000_SWSM_DRV_LOAD); |
419 | break; | ||
420 | case e1000_82571: | ||
421 | case e1000_82572: | ||
422 | case e1000_80003es2lan: | ||
427 | case e1000_ich8lan: | 423 | case e1000_ich8lan: |
428 | extcnf = E1000_READ_REG(&adapter->hw, CTRL_EXT); | 424 | ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT); |
429 | E1000_WRITE_REG(&adapter->hw, CTRL_EXT, | 425 | E1000_WRITE_REG(&adapter->hw, CTRL_EXT, |
430 | extcnf & ~E1000_CTRL_EXT_DRV_LOAD); | 426 | ctrl_ext & ~E1000_CTRL_EXT_DRV_LOAD); |
431 | break; | 427 | break; |
432 | default: | 428 | default: |
433 | break; | 429 | break; |
@@ -450,26 +446,21 @@ e1000_get_hw_control(struct e1000_adapter *adapter) | |||
450 | { | 446 | { |
451 | uint32_t ctrl_ext; | 447 | uint32_t ctrl_ext; |
452 | uint32_t swsm; | 448 | uint32_t swsm; |
453 | uint32_t extcnf; | ||
454 | 449 | ||
455 | /* Let firmware know the driver has taken over */ | 450 | /* Let firmware know the driver has taken over */ |
456 | switch (adapter->hw.mac_type) { | 451 | switch (adapter->hw.mac_type) { |
457 | case e1000_82571: | ||
458 | case e1000_82572: | ||
459 | case e1000_80003es2lan: | ||
460 | ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT); | ||
461 | E1000_WRITE_REG(&adapter->hw, CTRL_EXT, | ||
462 | ctrl_ext | E1000_CTRL_EXT_DRV_LOAD); | ||
463 | break; | ||
464 | case e1000_82573: | 452 | case e1000_82573: |
465 | swsm = E1000_READ_REG(&adapter->hw, SWSM); | 453 | swsm = E1000_READ_REG(&adapter->hw, SWSM); |
466 | E1000_WRITE_REG(&adapter->hw, SWSM, | 454 | E1000_WRITE_REG(&adapter->hw, SWSM, |
467 | swsm | E1000_SWSM_DRV_LOAD); | 455 | swsm | E1000_SWSM_DRV_LOAD); |
468 | break; | 456 | break; |
457 | case e1000_82571: | ||
458 | case e1000_82572: | ||
459 | case e1000_80003es2lan: | ||
469 | case e1000_ich8lan: | 460 | case e1000_ich8lan: |
470 | extcnf = E1000_READ_REG(&adapter->hw, EXTCNF_CTRL); | 461 | ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT); |
471 | E1000_WRITE_REG(&adapter->hw, EXTCNF_CTRL, | 462 | E1000_WRITE_REG(&adapter->hw, CTRL_EXT, |
472 | extcnf | E1000_EXTCNF_CTRL_SWFLAG); | 463 | ctrl_ext | E1000_CTRL_EXT_DRV_LOAD); |
473 | break; | 464 | break; |
474 | default: | 465 | default: |
475 | break; | 466 | break; |