aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/csiostor/csio_hw.c
diff options
context:
space:
mode:
authorHariprasad Shenai <hariprasad@chelsio.com>2015-01-05 06:00:47 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-05 16:34:48 -0500
commit0d8043389bf3abc86016995bfe3d3314dd5b3db7 (patch)
treedebb2518945bbe8c781fc9e9acc36a614a2f9bee /drivers/scsi/csiostor/csio_hw.c
parent837e4a42bbb5c41ce555bcd544a9c24c28134e24 (diff)
cxgb4/cxgb4vf/csiostor: Cleanup PL, XGMAC, SF and MC related register defines
This patch cleanups all PL, XGMAC and SF related macros/register defines that are defined in t4_regs.h and the affected files Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/csiostor/csio_hw.c')
-rw-r--r--drivers/scsi/csiostor/csio_hw.c186
1 files changed, 91 insertions, 95 deletions
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index c641931d4ae1..660283528ada 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -421,17 +421,15 @@ csio_hw_sf1_read(struct csio_hw *hw, uint32_t byte_cnt, int32_t cont,
421 421
422 if (!byte_cnt || byte_cnt > 4) 422 if (!byte_cnt || byte_cnt > 4)
423 return -EINVAL; 423 return -EINVAL;
424 if (csio_rd_reg32(hw, SF_OP) & SF_BUSY) 424 if (csio_rd_reg32(hw, SF_OP_A) & SF_BUSY_F)
425 return -EBUSY; 425 return -EBUSY;
426 426
427 cont = cont ? SF_CONT : 0; 427 csio_wr_reg32(hw, SF_LOCK_V(lock) | SF_CONT_V(cont) |
428 lock = lock ? SF_LOCK : 0; 428 BYTECNT_V(byte_cnt - 1), SF_OP_A);
429 429 ret = csio_hw_wait_op_done_val(hw, SF_OP_A, SF_BUSY_F, 0, SF_ATTEMPTS,
430 csio_wr_reg32(hw, lock | cont | BYTECNT(byte_cnt - 1), SF_OP); 430 10, NULL);
431 ret = csio_hw_wait_op_done_val(hw, SF_OP, SF_BUSY, 0, SF_ATTEMPTS,
432 10, NULL);
433 if (!ret) 431 if (!ret)
434 *valp = csio_rd_reg32(hw, SF_DATA); 432 *valp = csio_rd_reg32(hw, SF_DATA_A);
435 return ret; 433 return ret;
436} 434}
437 435
@@ -453,16 +451,14 @@ csio_hw_sf1_write(struct csio_hw *hw, uint32_t byte_cnt, uint32_t cont,
453{ 451{
454 if (!byte_cnt || byte_cnt > 4) 452 if (!byte_cnt || byte_cnt > 4)
455 return -EINVAL; 453 return -EINVAL;
456 if (csio_rd_reg32(hw, SF_OP) & SF_BUSY) 454 if (csio_rd_reg32(hw, SF_OP_A) & SF_BUSY_F)
457 return -EBUSY; 455 return -EBUSY;
458 456
459 cont = cont ? SF_CONT : 0; 457 csio_wr_reg32(hw, val, SF_DATA_A);
460 lock = lock ? SF_LOCK : 0; 458 csio_wr_reg32(hw, SF_CONT_V(cont) | BYTECNT_V(byte_cnt - 1) |
461 459 OP_V(1) | SF_LOCK_V(lock), SF_OP_A);
462 csio_wr_reg32(hw, val, SF_DATA);
463 csio_wr_reg32(hw, cont | BYTECNT(byte_cnt - 1) | OP_WR | lock, SF_OP);
464 460
465 return csio_hw_wait_op_done_val(hw, SF_OP, SF_BUSY, 0, SF_ATTEMPTS, 461 return csio_hw_wait_op_done_val(hw, SF_OP_A, SF_BUSY_F, 0, SF_ATTEMPTS,
466 10, NULL); 462 10, NULL);
467} 463}
468 464
@@ -533,7 +529,7 @@ csio_hw_read_flash(struct csio_hw *hw, uint32_t addr, uint32_t nwords,
533 for ( ; nwords; nwords--, data++) { 529 for ( ; nwords; nwords--, data++) {
534 ret = csio_hw_sf1_read(hw, 4, nwords > 1, nwords == 1, data); 530 ret = csio_hw_sf1_read(hw, 4, nwords > 1, nwords == 1, data);
535 if (nwords == 1) 531 if (nwords == 1)
536 csio_wr_reg32(hw, 0, SF_OP); /* unlock SF */ 532 csio_wr_reg32(hw, 0, SF_OP_A); /* unlock SF */
537 if (ret) 533 if (ret)
538 return ret; 534 return ret;
539 if (byte_oriented) 535 if (byte_oriented)
@@ -586,7 +582,7 @@ csio_hw_write_flash(struct csio_hw *hw, uint32_t addr,
586 if (ret) 582 if (ret)
587 goto unlock; 583 goto unlock;
588 584
589 csio_wr_reg32(hw, 0, SF_OP); /* unlock SF */ 585 csio_wr_reg32(hw, 0, SF_OP_A); /* unlock SF */
590 586
591 /* Read the page to verify the write succeeded */ 587 /* Read the page to verify the write succeeded */
592 ret = csio_hw_read_flash(hw, addr & ~0xff, ARRAY_SIZE(buf), buf, 1); 588 ret = csio_hw_read_flash(hw, addr & ~0xff, ARRAY_SIZE(buf), buf, 1);
@@ -603,7 +599,7 @@ csio_hw_write_flash(struct csio_hw *hw, uint32_t addr,
603 return 0; 599 return 0;
604 600
605unlock: 601unlock:
606 csio_wr_reg32(hw, 0, SF_OP); /* unlock SF */ 602 csio_wr_reg32(hw, 0, SF_OP_A); /* unlock SF */
607 return ret; 603 return ret;
608} 604}
609 605
@@ -641,7 +637,7 @@ out:
641 if (ret) 637 if (ret)
642 csio_err(hw, "erase of flash sector %d failed, error %d\n", 638 csio_err(hw, "erase of flash sector %d failed, error %d\n",
643 start, ret); 639 start, ret);
644 csio_wr_reg32(hw, 0, SF_OP); /* unlock SF */ 640 csio_wr_reg32(hw, 0, SF_OP_A); /* unlock SF */
645 return 0; 641 return 0;
646} 642}
647 643
@@ -833,7 +829,7 @@ csio_hw_get_flash_params(struct csio_hw *hw)
833 ret = csio_hw_sf1_write(hw, 1, 1, 0, SF_RD_ID); 829 ret = csio_hw_sf1_write(hw, 1, 1, 0, SF_RD_ID);
834 if (!ret) 830 if (!ret)
835 ret = csio_hw_sf1_read(hw, 3, 0, 1, &info); 831 ret = csio_hw_sf1_read(hw, 3, 0, 1, &info);
836 csio_wr_reg32(hw, 0, SF_OP); /* unlock SF */ 832 csio_wr_reg32(hw, 0, SF_OP_A); /* unlock SF */
837 if (ret != 0) 833 if (ret != 0)
838 return ret; 834 return ret;
839 835
@@ -861,17 +857,17 @@ csio_hw_dev_ready(struct csio_hw *hw)
861 uint32_t reg; 857 uint32_t reg;
862 int cnt = 6; 858 int cnt = 6;
863 859
864 while (((reg = csio_rd_reg32(hw, PL_WHOAMI)) == 0xFFFFFFFF) && 860 while (((reg = csio_rd_reg32(hw, PL_WHOAMI_A)) == 0xFFFFFFFF) &&
865 (--cnt != 0)) 861 (--cnt != 0))
866 mdelay(100); 862 mdelay(100);
867 863
868 if ((cnt == 0) && (((int32_t)(SOURCEPF_GET(reg)) < 0) || 864 if ((cnt == 0) && (((int32_t)(SOURCEPF_G(reg)) < 0) ||
869 (SOURCEPF_GET(reg) >= CSIO_MAX_PFN))) { 865 (SOURCEPF_G(reg) >= CSIO_MAX_PFN))) {
870 csio_err(hw, "PL_WHOAMI returned 0x%x, cnt:%d\n", reg, cnt); 866 csio_err(hw, "PL_WHOAMI returned 0x%x, cnt:%d\n", reg, cnt);
871 return -EIO; 867 return -EIO;
872 } 868 }
873 869
874 hw->pfn = SOURCEPF_GET(reg); 870 hw->pfn = SOURCEPF_G(reg);
875 871
876 return 0; 872 return 0;
877} 873}
@@ -1078,7 +1074,7 @@ csio_do_reset(struct csio_hw *hw, bool fw_rst)
1078 1074
1079 if (!fw_rst) { 1075 if (!fw_rst) {
1080 /* PIO reset */ 1076 /* PIO reset */
1081 csio_wr_reg32(hw, PIORSTMODE | PIORST, PL_RST); 1077 csio_wr_reg32(hw, PIORSTMODE_F | PIORST_F, PL_RST_A);
1082 mdelay(2000); 1078 mdelay(2000);
1083 return 0; 1079 return 0;
1084 } 1080 }
@@ -1090,7 +1086,7 @@ csio_do_reset(struct csio_hw *hw, bool fw_rst)
1090 } 1086 }
1091 1087
1092 csio_mb_reset(hw, mbp, CSIO_MB_DEFAULT_TMO, 1088 csio_mb_reset(hw, mbp, CSIO_MB_DEFAULT_TMO,
1093 PIORSTMODE | PIORST, 0, NULL); 1089 PIORSTMODE_F | PIORST_F, 0, NULL);
1094 1090
1095 if (csio_mb_issue(hw, mbp)) { 1091 if (csio_mb_issue(hw, mbp)) {
1096 csio_err(hw, "Issue of RESET command failed.n"); 1092 csio_err(hw, "Issue of RESET command failed.n");
@@ -1166,7 +1162,7 @@ csio_hw_fw_halt(struct csio_hw *hw, uint32_t mbox, int32_t force)
1166 } 1162 }
1167 1163
1168 csio_mb_reset(hw, mbp, CSIO_MB_DEFAULT_TMO, 1164 csio_mb_reset(hw, mbp, CSIO_MB_DEFAULT_TMO,
1169 PIORSTMODE | PIORST, FW_RESET_CMD_HALT_F, 1165 PIORSTMODE_F | PIORST_F, FW_RESET_CMD_HALT_F,
1170 NULL); 1166 NULL);
1171 1167
1172 if (csio_mb_issue(hw, mbp)) { 1168 if (csio_mb_issue(hw, mbp)) {
@@ -1251,7 +1247,7 @@ csio_hw_fw_restart(struct csio_hw *hw, uint32_t mbox, int32_t reset)
1251 return 0; 1247 return 0;
1252 } 1248 }
1253 1249
1254 csio_wr_reg32(hw, PIORSTMODE | PIORST, PL_RST); 1250 csio_wr_reg32(hw, PIORSTMODE_F | PIORST_F, PL_RST_A);
1255 msleep(2000); 1251 msleep(2000);
1256 } else { 1252 } else {
1257 int ms; 1253 int ms;
@@ -2040,7 +2036,7 @@ csio_hw_configure(struct csio_hw *hw)
2040 } 2036 }
2041 2037
2042 /* HW version */ 2038 /* HW version */
2043 hw->chip_ver = (char)csio_rd_reg32(hw, PL_REV); 2039 hw->chip_ver = (char)csio_rd_reg32(hw, PL_REV_A);
2044 2040
2045 /* Needed for FW download */ 2041 /* Needed for FW download */
2046 rv = csio_hw_get_flash_params(hw); 2042 rv = csio_hw_get_flash_params(hw);
@@ -2218,7 +2214,7 @@ out:
2218 return; 2214 return;
2219} 2215}
2220 2216
2221#define PF_INTR_MASK (PFSW | PFCIM) 2217#define PF_INTR_MASK (PFSW_F | PFCIM_F)
2222 2218
2223/* 2219/*
2224 * csio_hw_intr_enable - Enable HW interrupts 2220 * csio_hw_intr_enable - Enable HW interrupts
@@ -2230,8 +2226,8 @@ static void
2230csio_hw_intr_enable(struct csio_hw *hw) 2226csio_hw_intr_enable(struct csio_hw *hw)
2231{ 2227{
2232 uint16_t vec = (uint16_t)csio_get_mb_intr_idx(csio_hw_to_mbm(hw)); 2228 uint16_t vec = (uint16_t)csio_get_mb_intr_idx(csio_hw_to_mbm(hw));
2233 uint32_t pf = SOURCEPF_GET(csio_rd_reg32(hw, PL_WHOAMI)); 2229 uint32_t pf = SOURCEPF_G(csio_rd_reg32(hw, PL_WHOAMI_A));
2234 uint32_t pl = csio_rd_reg32(hw, PL_INT_ENABLE); 2230 uint32_t pl = csio_rd_reg32(hw, PL_INT_ENABLE_A);
2235 2231
2236 /* 2232 /*
2237 * Set aivec for MSI/MSIX. PCIE_PF_CFG.INTXType is set up 2233 * Set aivec for MSI/MSIX. PCIE_PF_CFG.INTXType is set up
@@ -2244,7 +2240,7 @@ csio_hw_intr_enable(struct csio_hw *hw)
2244 csio_set_reg_field(hw, MYPF_REG(PCIE_PF_CFG_A), 2240 csio_set_reg_field(hw, MYPF_REG(PCIE_PF_CFG_A),
2245 AIVEC_V(AIVEC_M), 0); 2241 AIVEC_V(AIVEC_M), 0);
2246 2242
2247 csio_wr_reg32(hw, PF_INTR_MASK, MYPF_REG(PL_PF_INT_ENABLE)); 2243 csio_wr_reg32(hw, PF_INTR_MASK, MYPF_REG(PL_PF_INT_ENABLE_A));
2248 2244
2249 /* Turn on MB interrupts - this will internally flush PIO as well */ 2245 /* Turn on MB interrupts - this will internally flush PIO as well */
2250 csio_mb_intr_enable(hw); 2246 csio_mb_intr_enable(hw);
@@ -2254,8 +2250,8 @@ csio_hw_intr_enable(struct csio_hw *hw)
2254 /* 2250 /*
2255 * Disable the Serial FLASH interrupt, if enabled! 2251 * Disable the Serial FLASH interrupt, if enabled!
2256 */ 2252 */
2257 pl &= (~SF); 2253 pl &= (~SF_F);
2258 csio_wr_reg32(hw, pl, PL_INT_ENABLE); 2254 csio_wr_reg32(hw, pl, PL_INT_ENABLE_A);
2259 2255
2260 csio_wr_reg32(hw, ERR_CPL_EXCEED_IQE_SIZE_F | 2256 csio_wr_reg32(hw, ERR_CPL_EXCEED_IQE_SIZE_F |
2261 EGRESS_SIZE_ERR_F | ERR_INVALID_CIDX_INC_F | 2257 EGRESS_SIZE_ERR_F | ERR_INVALID_CIDX_INC_F |
@@ -2266,7 +2262,7 @@ csio_hw_intr_enable(struct csio_hw *hw)
2266 ERR_BAD_DB_PIDX0_F | ERR_ING_CTXT_PRIO_F | 2262 ERR_BAD_DB_PIDX0_F | ERR_ING_CTXT_PRIO_F |
2267 ERR_EGR_CTXT_PRIO_F | INGRESS_SIZE_ERR_F, 2263 ERR_EGR_CTXT_PRIO_F | INGRESS_SIZE_ERR_F,
2268 SGE_INT_ENABLE3_A); 2264 SGE_INT_ENABLE3_A);
2269 csio_set_reg_field(hw, PL_INT_MAP0, 0, 1 << pf); 2265 csio_set_reg_field(hw, PL_INT_MAP0_A, 0, 1 << pf);
2270 } 2266 }
2271 2267
2272 hw->flags |= CSIO_HWF_HW_INTR_ENABLED; 2268 hw->flags |= CSIO_HWF_HW_INTR_ENABLED;
@@ -2282,16 +2278,16 @@ csio_hw_intr_enable(struct csio_hw *hw)
2282void 2278void
2283csio_hw_intr_disable(struct csio_hw *hw) 2279csio_hw_intr_disable(struct csio_hw *hw)
2284{ 2280{
2285 uint32_t pf = SOURCEPF_GET(csio_rd_reg32(hw, PL_WHOAMI)); 2281 uint32_t pf = SOURCEPF_G(csio_rd_reg32(hw, PL_WHOAMI_A));
2286 2282
2287 if (!(hw->flags & CSIO_HWF_HW_INTR_ENABLED)) 2283 if (!(hw->flags & CSIO_HWF_HW_INTR_ENABLED))
2288 return; 2284 return;
2289 2285
2290 hw->flags &= ~CSIO_HWF_HW_INTR_ENABLED; 2286 hw->flags &= ~CSIO_HWF_HW_INTR_ENABLED;
2291 2287
2292 csio_wr_reg32(hw, 0, MYPF_REG(PL_PF_INT_ENABLE)); 2288 csio_wr_reg32(hw, 0, MYPF_REG(PL_PF_INT_ENABLE_A));
2293 if (csio_is_hw_master(hw)) 2289 if (csio_is_hw_master(hw))
2294 csio_set_reg_field(hw, PL_INT_MAP0, 1 << pf, 0); 2290 csio_set_reg_field(hw, PL_INT_MAP0_A, 1 << pf, 0);
2295 2291
2296 /* Turn off MB interrupts */ 2292 /* Turn off MB interrupts */
2297 csio_mb_intr_disable(hw); 2293 csio_mb_intr_disable(hw);
@@ -2595,7 +2591,7 @@ csio_hws_removing(struct csio_hw *hw, enum csio_hw_ev evt)
2595 * register directly. 2591 * register directly.
2596 */ 2592 */
2597 csio_err(hw, "Resetting HW and waiting 2 seconds...\n"); 2593 csio_err(hw, "Resetting HW and waiting 2 seconds...\n");
2598 csio_wr_reg32(hw, PIORSTMODE | PIORST, PL_RST); 2594 csio_wr_reg32(hw, PIORSTMODE_F | PIORST_F, PL_RST_A);
2599 mdelay(2000); 2595 mdelay(2000);
2600 break; 2596 break;
2601 2597
@@ -2814,7 +2810,7 @@ static void csio_ulprx_intr_handler(struct csio_hw *hw)
2814 { 0, NULL, 0, 0 } 2810 { 0, NULL, 0, 0 }
2815 }; 2811 };
2816 2812
2817 if (csio_handle_intr_status(hw, ULP_RX_INT_CAUSE, ulprx_intr_info)) 2813 if (csio_handle_intr_status(hw, ULP_RX_INT_CAUSE_A, ulprx_intr_info))
2818 csio_hw_fatal_err(hw); 2814 csio_hw_fatal_err(hw);
2819} 2815}
2820 2816
@@ -2889,16 +2885,16 @@ static void csio_pmrx_intr_handler(struct csio_hw *hw)
2889static void csio_cplsw_intr_handler(struct csio_hw *hw) 2885static void csio_cplsw_intr_handler(struct csio_hw *hw)
2890{ 2886{
2891 static struct intr_info cplsw_intr_info[] = { 2887 static struct intr_info cplsw_intr_info[] = {
2892 { CIM_OP_MAP_PERR, "CPLSW CIM op_map parity error", -1, 1 }, 2888 { CIM_OP_MAP_PERR_F, "CPLSW CIM op_map parity error", -1, 1 },
2893 { CIM_OVFL_ERROR, "CPLSW CIM overflow", -1, 1 }, 2889 { CIM_OVFL_ERROR_F, "CPLSW CIM overflow", -1, 1 },
2894 { TP_FRAMING_ERROR, "CPLSW TP framing error", -1, 1 }, 2890 { TP_FRAMING_ERROR_F, "CPLSW TP framing error", -1, 1 },
2895 { SGE_FRAMING_ERROR, "CPLSW SGE framing error", -1, 1 }, 2891 { SGE_FRAMING_ERROR_F, "CPLSW SGE framing error", -1, 1 },
2896 { CIM_FRAMING_ERROR, "CPLSW CIM framing error", -1, 1 }, 2892 { CIM_FRAMING_ERROR_F, "CPLSW CIM framing error", -1, 1 },
2897 { ZERO_SWITCH_ERROR, "CPLSW no-switch error", -1, 1 }, 2893 { ZERO_SWITCH_ERROR_F, "CPLSW no-switch error", -1, 1 },
2898 { 0, NULL, 0, 0 } 2894 { 0, NULL, 0, 0 }
2899 }; 2895 };
2900 2896
2901 if (csio_handle_intr_status(hw, CPL_INTR_CAUSE, cplsw_intr_info)) 2897 if (csio_handle_intr_status(hw, CPL_INTR_CAUSE_A, cplsw_intr_info))
2902 csio_hw_fatal_err(hw); 2898 csio_hw_fatal_err(hw);
2903} 2899}
2904 2900
@@ -2908,15 +2904,15 @@ static void csio_cplsw_intr_handler(struct csio_hw *hw)
2908static void csio_le_intr_handler(struct csio_hw *hw) 2904static void csio_le_intr_handler(struct csio_hw *hw)
2909{ 2905{
2910 static struct intr_info le_intr_info[] = { 2906 static struct intr_info le_intr_info[] = {
2911 { LIPMISS, "LE LIP miss", -1, 0 }, 2907 { LIPMISS_F, "LE LIP miss", -1, 0 },
2912 { LIP0, "LE 0 LIP error", -1, 0 }, 2908 { LIP0_F, "LE 0 LIP error", -1, 0 },
2913 { PARITYERR, "LE parity error", -1, 1 }, 2909 { PARITYERR_F, "LE parity error", -1, 1 },
2914 { UNKNOWNCMD, "LE unknown command", -1, 1 }, 2910 { UNKNOWNCMD_F, "LE unknown command", -1, 1 },
2915 { REQQPARERR, "LE request queue parity error", -1, 1 }, 2911 { REQQPARERR_F, "LE request queue parity error", -1, 1 },
2916 { 0, NULL, 0, 0 } 2912 { 0, NULL, 0, 0 }
2917 }; 2913 };
2918 2914
2919 if (csio_handle_intr_status(hw, LE_DB_INT_CAUSE, le_intr_info)) 2915 if (csio_handle_intr_status(hw, LE_DB_INT_CAUSE_A, le_intr_info))
2920 csio_hw_fatal_err(hw); 2916 csio_hw_fatal_err(hw);
2921} 2917}
2922 2918
@@ -3054,13 +3050,13 @@ static void csio_ma_intr_handler(struct csio_hw *hw)
3054static void csio_smb_intr_handler(struct csio_hw *hw) 3050static void csio_smb_intr_handler(struct csio_hw *hw)
3055{ 3051{
3056 static struct intr_info smb_intr_info[] = { 3052 static struct intr_info smb_intr_info[] = {
3057 { MSTTXFIFOPARINT, "SMB master Tx FIFO parity error", -1, 1 }, 3053 { MSTTXFIFOPARINT_F, "SMB master Tx FIFO parity error", -1, 1 },
3058 { MSTRXFIFOPARINT, "SMB master Rx FIFO parity error", -1, 1 }, 3054 { MSTRXFIFOPARINT_F, "SMB master Rx FIFO parity error", -1, 1 },
3059 { SLVFIFOPARINT, "SMB slave FIFO parity error", -1, 1 }, 3055 { SLVFIFOPARINT_F, "SMB slave FIFO parity error", -1, 1 },
3060 { 0, NULL, 0, 0 } 3056 { 0, NULL, 0, 0 }
3061 }; 3057 };
3062 3058
3063 if (csio_handle_intr_status(hw, SMB_INT_CAUSE, smb_intr_info)) 3059 if (csio_handle_intr_status(hw, SMB_INT_CAUSE_A, smb_intr_info))
3064 csio_hw_fatal_err(hw); 3060 csio_hw_fatal_err(hw);
3065} 3061}
3066 3062
@@ -3070,14 +3066,14 @@ static void csio_smb_intr_handler(struct csio_hw *hw)
3070static void csio_ncsi_intr_handler(struct csio_hw *hw) 3066static void csio_ncsi_intr_handler(struct csio_hw *hw)
3071{ 3067{
3072 static struct intr_info ncsi_intr_info[] = { 3068 static struct intr_info ncsi_intr_info[] = {
3073 { CIM_DM_PRTY_ERR, "NC-SI CIM parity error", -1, 1 }, 3069 { CIM_DM_PRTY_ERR_F, "NC-SI CIM parity error", -1, 1 },
3074 { MPS_DM_PRTY_ERR, "NC-SI MPS parity error", -1, 1 }, 3070 { MPS_DM_PRTY_ERR_F, "NC-SI MPS parity error", -1, 1 },
3075 { TXFIFO_PRTY_ERR, "NC-SI Tx FIFO parity error", -1, 1 }, 3071 { TXFIFO_PRTY_ERR_F, "NC-SI Tx FIFO parity error", -1, 1 },
3076 { RXFIFO_PRTY_ERR, "NC-SI Rx FIFO parity error", -1, 1 }, 3072 { RXFIFO_PRTY_ERR_F, "NC-SI Rx FIFO parity error", -1, 1 },
3077 { 0, NULL, 0, 0 } 3073 { 0, NULL, 0, 0 }
3078 }; 3074 };
3079 3075
3080 if (csio_handle_intr_status(hw, NCSI_INT_CAUSE, ncsi_intr_info)) 3076 if (csio_handle_intr_status(hw, NCSI_INT_CAUSE_A, ncsi_intr_info))
3081 csio_hw_fatal_err(hw); 3077 csio_hw_fatal_err(hw);
3082} 3078}
3083 3079
@@ -3088,13 +3084,13 @@ static void csio_xgmac_intr_handler(struct csio_hw *hw, int port)
3088{ 3084{
3089 uint32_t v = csio_rd_reg32(hw, CSIO_MAC_INT_CAUSE_REG(hw, port)); 3085 uint32_t v = csio_rd_reg32(hw, CSIO_MAC_INT_CAUSE_REG(hw, port));
3090 3086
3091 v &= TXFIFO_PRTY_ERR | RXFIFO_PRTY_ERR; 3087 v &= TXFIFO_PRTY_ERR_F | RXFIFO_PRTY_ERR_F;
3092 if (!v) 3088 if (!v)
3093 return; 3089 return;
3094 3090
3095 if (v & TXFIFO_PRTY_ERR) 3091 if (v & TXFIFO_PRTY_ERR_F)
3096 csio_fatal(hw, "XGMAC %d Tx FIFO parity error\n", port); 3092 csio_fatal(hw, "XGMAC %d Tx FIFO parity error\n", port);
3097 if (v & RXFIFO_PRTY_ERR) 3093 if (v & RXFIFO_PRTY_ERR_F)
3098 csio_fatal(hw, "XGMAC %d Rx FIFO parity error\n", port); 3094 csio_fatal(hw, "XGMAC %d Rx FIFO parity error\n", port);
3099 csio_wr_reg32(hw, v, CSIO_MAC_INT_CAUSE_REG(hw, port)); 3095 csio_wr_reg32(hw, v, CSIO_MAC_INT_CAUSE_REG(hw, port));
3100 csio_hw_fatal_err(hw); 3096 csio_hw_fatal_err(hw);
@@ -3106,12 +3102,12 @@ static void csio_xgmac_intr_handler(struct csio_hw *hw, int port)
3106static void csio_pl_intr_handler(struct csio_hw *hw) 3102static void csio_pl_intr_handler(struct csio_hw *hw)
3107{ 3103{
3108 static struct intr_info pl_intr_info[] = { 3104 static struct intr_info pl_intr_info[] = {
3109 { FATALPERR, "T4 fatal parity error", -1, 1 }, 3105 { FATALPERR_F, "T4 fatal parity error", -1, 1 },
3110 { PERRVFID, "PL VFID_MAP parity error", -1, 1 }, 3106 { PERRVFID_F, "PL VFID_MAP parity error", -1, 1 },
3111 { 0, NULL, 0, 0 } 3107 { 0, NULL, 0, 0 }
3112 }; 3108 };
3113 3109
3114 if (csio_handle_intr_status(hw, PL_PL_INT_CAUSE, pl_intr_info)) 3110 if (csio_handle_intr_status(hw, PL_PL_INT_CAUSE_A, pl_intr_info))
3115 csio_hw_fatal_err(hw); 3111 csio_hw_fatal_err(hw);
3116} 3112}
3117 3113
@@ -3126,7 +3122,7 @@ static void csio_pl_intr_handler(struct csio_hw *hw)
3126int 3122int
3127csio_hw_slow_intr_handler(struct csio_hw *hw) 3123csio_hw_slow_intr_handler(struct csio_hw *hw)
3128{ 3124{
3129 uint32_t cause = csio_rd_reg32(hw, PL_INT_CAUSE); 3125 uint32_t cause = csio_rd_reg32(hw, PL_INT_CAUSE_A);
3130 3126
3131 if (!(cause & CSIO_GLBL_INTR_MASK)) { 3127 if (!(cause & CSIO_GLBL_INTR_MASK)) {
3132 CSIO_INC_STATS(hw, n_plint_unexp); 3128 CSIO_INC_STATS(hw, n_plint_unexp);
@@ -3137,75 +3133,75 @@ csio_hw_slow_intr_handler(struct csio_hw *hw)
3137 3133
3138 CSIO_INC_STATS(hw, n_plint_cnt); 3134 CSIO_INC_STATS(hw, n_plint_cnt);
3139 3135
3140 if (cause & CIM) 3136 if (cause & CIM_F)
3141 csio_cim_intr_handler(hw); 3137 csio_cim_intr_handler(hw);
3142 3138
3143 if (cause & MPS) 3139 if (cause & MPS_F)
3144 csio_mps_intr_handler(hw); 3140 csio_mps_intr_handler(hw);
3145 3141
3146 if (cause & NCSI) 3142 if (cause & NCSI_F)
3147 csio_ncsi_intr_handler(hw); 3143 csio_ncsi_intr_handler(hw);
3148 3144
3149 if (cause & PL) 3145 if (cause & PL_F)
3150 csio_pl_intr_handler(hw); 3146 csio_pl_intr_handler(hw);
3151 3147
3152 if (cause & SMB) 3148 if (cause & SMB_F)
3153 csio_smb_intr_handler(hw); 3149 csio_smb_intr_handler(hw);
3154 3150
3155 if (cause & XGMAC0) 3151 if (cause & XGMAC0_F)
3156 csio_xgmac_intr_handler(hw, 0); 3152 csio_xgmac_intr_handler(hw, 0);
3157 3153
3158 if (cause & XGMAC1) 3154 if (cause & XGMAC1_F)
3159 csio_xgmac_intr_handler(hw, 1); 3155 csio_xgmac_intr_handler(hw, 1);
3160 3156
3161 if (cause & XGMAC_KR0) 3157 if (cause & XGMAC_KR0_F)
3162 csio_xgmac_intr_handler(hw, 2); 3158 csio_xgmac_intr_handler(hw, 2);
3163 3159
3164 if (cause & XGMAC_KR1) 3160 if (cause & XGMAC_KR1_F)
3165 csio_xgmac_intr_handler(hw, 3); 3161 csio_xgmac_intr_handler(hw, 3);
3166 3162
3167 if (cause & PCIE) 3163 if (cause & PCIE_F)
3168 hw->chip_ops->chip_pcie_intr_handler(hw); 3164 hw->chip_ops->chip_pcie_intr_handler(hw);
3169 3165
3170 if (cause & MC) 3166 if (cause & MC_F)
3171 csio_mem_intr_handler(hw, MEM_MC); 3167 csio_mem_intr_handler(hw, MEM_MC);
3172 3168
3173 if (cause & EDC0) 3169 if (cause & EDC0_F)
3174 csio_mem_intr_handler(hw, MEM_EDC0); 3170 csio_mem_intr_handler(hw, MEM_EDC0);
3175 3171
3176 if (cause & EDC1) 3172 if (cause & EDC1_F)
3177 csio_mem_intr_handler(hw, MEM_EDC1); 3173 csio_mem_intr_handler(hw, MEM_EDC1);
3178 3174
3179 if (cause & LE) 3175 if (cause & LE_F)
3180 csio_le_intr_handler(hw); 3176 csio_le_intr_handler(hw);
3181 3177
3182 if (cause & TP) 3178 if (cause & TP_F)
3183 csio_tp_intr_handler(hw); 3179 csio_tp_intr_handler(hw);
3184 3180
3185 if (cause & MA) 3181 if (cause & MA_F)
3186 csio_ma_intr_handler(hw); 3182 csio_ma_intr_handler(hw);
3187 3183
3188 if (cause & PM_TX) 3184 if (cause & PM_TX_F)
3189 csio_pmtx_intr_handler(hw); 3185 csio_pmtx_intr_handler(hw);
3190 3186
3191 if (cause & PM_RX) 3187 if (cause & PM_RX_F)
3192 csio_pmrx_intr_handler(hw); 3188 csio_pmrx_intr_handler(hw);
3193 3189
3194 if (cause & ULP_RX) 3190 if (cause & ULP_RX_F)
3195 csio_ulprx_intr_handler(hw); 3191 csio_ulprx_intr_handler(hw);
3196 3192
3197 if (cause & CPL_SWITCH) 3193 if (cause & CPL_SWITCH_F)
3198 csio_cplsw_intr_handler(hw); 3194 csio_cplsw_intr_handler(hw);
3199 3195
3200 if (cause & SGE) 3196 if (cause & SGE_F)
3201 csio_sge_intr_handler(hw); 3197 csio_sge_intr_handler(hw);
3202 3198
3203 if (cause & ULP_TX) 3199 if (cause & ULP_TX_F)
3204 csio_ulptx_intr_handler(hw); 3200 csio_ulptx_intr_handler(hw);
3205 3201
3206 /* Clear the interrupts just processed for which we are the master. */ 3202 /* Clear the interrupts just processed for which we are the master. */
3207 csio_wr_reg32(hw, cause & CSIO_GLBL_INTR_MASK, PL_INT_CAUSE); 3203 csio_wr_reg32(hw, cause & CSIO_GLBL_INTR_MASK, PL_INT_CAUSE_A);
3208 csio_rd_reg32(hw, PL_INT_CAUSE); /* flush */ 3204 csio_rd_reg32(hw, PL_INT_CAUSE_A); /* flush */
3209 3205
3210 return 1; 3206 return 1;
3211} 3207}