diff options
| -rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 50 |
2 files changed, 50 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h index 92bc8ce9b287..a52819303d1b 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h | |||
| @@ -407,7 +407,9 @@ enum { | |||
| 407 | #define QLCNIC_CRB_SRE QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_SRE) | 407 | #define QLCNIC_CRB_SRE QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_SRE) |
| 408 | #define QLCNIC_CRB_ROMUSB \ | 408 | #define QLCNIC_CRB_ROMUSB \ |
| 409 | QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_ROMUSB) | 409 | QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_ROMUSB) |
| 410 | #define QLCNIC_CRB_EPG QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_EG) | ||
| 410 | #define QLCNIC_CRB_I2Q QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_I2Q) | 411 | #define QLCNIC_CRB_I2Q QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_I2Q) |
| 412 | #define QLCNIC_CRB_TIMER QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_TIMR) | ||
| 411 | #define QLCNIC_CRB_I2C0 QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_I2C0) | 413 | #define QLCNIC_CRB_I2C0 QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_I2C0) |
| 412 | #define QLCNIC_CRB_SMB QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_SMB) | 414 | #define QLCNIC_CRB_SMB QLCNIC_PCI_CRB_WINDOW(QLCNIC_HW_PX_MAP_CRB_SMB) |
| 413 | #define QLCNIC_CRB_MAX QLCNIC_PCI_CRB_WINDOW(64) | 415 | #define QLCNIC_CRB_MAX QLCNIC_PCI_CRB_WINDOW(64) |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c index 312c1c37889d..38669583840c 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | |||
| @@ -422,9 +422,53 @@ int qlcnic_pinit_from_rom(struct qlcnic_adapter *adapter) | |||
| 422 | QLCWR32(adapter, CRB_CMDPEG_STATE, 0); | 422 | QLCWR32(adapter, CRB_CMDPEG_STATE, 0); |
| 423 | QLCWR32(adapter, CRB_RCVPEG_STATE, 0); | 423 | QLCWR32(adapter, CRB_RCVPEG_STATE, 0); |
| 424 | 424 | ||
| 425 | qlcnic_rom_lock(adapter); | 425 | /* Halt all the indiviual PEGs and other blocks */ |
| 426 | QLCWR32(adapter, QLCNIC_ROMUSB_GLB_SW_RESET, 0xfeffffff); | 426 | /* disable all I2Q */ |
| 427 | QLCWR32(adapter, QLCNIC_CRB_I2Q + 0x10, 0x0); | ||
| 428 | QLCWR32(adapter, QLCNIC_CRB_I2Q + 0x14, 0x0); | ||
| 429 | QLCWR32(adapter, QLCNIC_CRB_I2Q + 0x18, 0x0); | ||
| 430 | QLCWR32(adapter, QLCNIC_CRB_I2Q + 0x1c, 0x0); | ||
| 431 | QLCWR32(adapter, QLCNIC_CRB_I2Q + 0x20, 0x0); | ||
| 432 | QLCWR32(adapter, QLCNIC_CRB_I2Q + 0x24, 0x0); | ||
| 433 | |||
| 434 | /* disable all niu interrupts */ | ||
| 435 | QLCWR32(adapter, QLCNIC_CRB_NIU + 0x40, 0xff); | ||
| 436 | /* disable xge rx/tx */ | ||
| 437 | QLCWR32(adapter, QLCNIC_CRB_NIU + 0x70000, 0x00); | ||
| 438 | /* disable xg1 rx/tx */ | ||
| 439 | QLCWR32(adapter, QLCNIC_CRB_NIU + 0x80000, 0x00); | ||
| 440 | /* disable sideband mac */ | ||
| 441 | QLCWR32(adapter, QLCNIC_CRB_NIU + 0x90000, 0x00); | ||
| 442 | /* disable ap0 mac */ | ||
| 443 | QLCWR32(adapter, QLCNIC_CRB_NIU + 0xa0000, 0x00); | ||
| 444 | /* disable ap1 mac */ | ||
| 445 | QLCWR32(adapter, QLCNIC_CRB_NIU + 0xb0000, 0x00); | ||
| 446 | |||
| 447 | /* halt sre */ | ||
| 448 | val = QLCRD32(adapter, QLCNIC_CRB_SRE + 0x1000); | ||
| 449 | QLCWR32(adapter, QLCNIC_CRB_SRE + 0x1000, val & (~(0x1))); | ||
| 450 | |||
| 451 | /* halt epg */ | ||
| 452 | QLCWR32(adapter, QLCNIC_CRB_EPG + 0x1300, 0x1); | ||
| 453 | |||
| 454 | /* halt timers */ | ||
| 455 | QLCWR32(adapter, QLCNIC_CRB_TIMER + 0x0, 0x0); | ||
| 456 | QLCWR32(adapter, QLCNIC_CRB_TIMER + 0x8, 0x0); | ||
| 457 | QLCWR32(adapter, QLCNIC_CRB_TIMER + 0x10, 0x0); | ||
| 458 | QLCWR32(adapter, QLCNIC_CRB_TIMER + 0x18, 0x0); | ||
| 459 | QLCWR32(adapter, QLCNIC_CRB_TIMER + 0x100, 0x0); | ||
| 460 | QLCWR32(adapter, QLCNIC_CRB_TIMER + 0x200, 0x0); | ||
| 461 | /* halt pegs */ | ||
| 462 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_0 + 0x3c, 1); | ||
| 463 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_1 + 0x3c, 1); | ||
| 464 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_2 + 0x3c, 1); | ||
| 465 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_3 + 0x3c, 1); | ||
| 466 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_4 + 0x3c, 1); | ||
| 467 | msleep(20); | ||
| 468 | |||
| 427 | qlcnic_rom_unlock(adapter); | 469 | qlcnic_rom_unlock(adapter); |
| 470 | /* big hammer don't reset CAM block on reset */ | ||
| 471 | QLCWR32(adapter, QLCNIC_ROMUSB_GLB_SW_RESET, 0xfeffffff); | ||
| 428 | 472 | ||
| 429 | /* Init HW CRB block */ | 473 | /* Init HW CRB block */ |
| 430 | if (qlcnic_rom_fast_read(adapter, 0, &n) != 0 || (n != 0xcafecafe) || | 474 | if (qlcnic_rom_fast_read(adapter, 0, &n) != 0 || (n != 0xcafecafe) || |
| @@ -522,8 +566,10 @@ int qlcnic_pinit_from_rom(struct qlcnic_adapter *adapter) | |||
| 522 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_4 + 0x8, 0); | 566 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_4 + 0x8, 0); |
| 523 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_4 + 0xc, 0); | 567 | QLCWR32(adapter, QLCNIC_CRB_PEG_NET_4 + 0xc, 0); |
| 524 | msleep(1); | 568 | msleep(1); |
| 569 | |||
| 525 | QLCWR32(adapter, QLCNIC_PEG_HALT_STATUS1, 0); | 570 | QLCWR32(adapter, QLCNIC_PEG_HALT_STATUS1, 0); |
| 526 | QLCWR32(adapter, QLCNIC_PEG_HALT_STATUS2, 0); | 571 | QLCWR32(adapter, QLCNIC_PEG_HALT_STATUS2, 0); |
| 572 | |||
| 527 | return 0; | 573 | return 0; |
| 528 | } | 574 | } |
| 529 | 575 | ||
