NTB: Remove References of non-B2B BWD HW
authorJon Mason <jon.mason@intel.com>
Mon, 15 Jul 2013 22:33:18 +0000 (15:33 -0700)
committerJon Mason <jon.mason@intel.com>
Thu, 5 Sep 2013 18:07:59 +0000 (11:07 -0700)
NTB-RP is not a supported configuration on BWD hardware.  Remove the
code attempting to set it up.

Signed-off-by: Jon Mason <jon.mason@intel.com>
drivers/ntb/ntb_hw.c
drivers/ntb/ntb_regs.h

index 2f3ff73b1d1ba736a72ccdd14b9c0526a21fb01a..69cd834a8380fa613217a76feda5f4931244c4e2 100644 (file)
@@ -842,7 +842,7 @@ static int ntb_bwd_setup(struct ntb_device *ndev)
                break;
        case NTB_CONN_RP:
        default:
-               dev_err(&ndev->pdev->dev, "Only B2B supported at this time\n");
+               dev_err(&ndev->pdev->dev, "Unsupported NTB configuration\n");
                return -EINVAL;
        }
 
@@ -859,24 +859,16 @@ static int ntb_bwd_setup(struct ntb_device *ndev)
 
        ndev->reg_ofs.ldb = ndev->reg_base + BWD_PDOORBELL_OFFSET;
        ndev->reg_ofs.ldb_mask = ndev->reg_base + BWD_PDBMSK_OFFSET;
+       ndev->reg_ofs.rdb = ndev->reg_base + BWD_B2B_DOORBELL_OFFSET;
        ndev->reg_ofs.bar2_xlat = ndev->reg_base + BWD_SBAR2XLAT_OFFSET;
        ndev->reg_ofs.bar4_xlat = ndev->reg_base + BWD_SBAR4XLAT_OFFSET;
        ndev->reg_ofs.lnk_cntl = ndev->reg_base + BWD_NTBCNTL_OFFSET;
        ndev->reg_ofs.lnk_stat = ndev->reg_base + BWD_LINK_STATUS_OFFSET;
        ndev->reg_ofs.spad_read = ndev->reg_base + BWD_SPAD_OFFSET;
+       ndev->reg_ofs.spad_write = ndev->reg_base + BWD_B2B_SPAD_OFFSET;
        ndev->reg_ofs.spci_cmd = ndev->reg_base + BWD_PCICMD_OFFSET;
-
-       if (ndev->conn_type == NTB_CONN_B2B) {
-               ndev->reg_ofs.rdb = ndev->reg_base + BWD_B2B_DOORBELL_OFFSET;
-               ndev->reg_ofs.spad_write = ndev->reg_base + BWD_B2B_SPAD_OFFSET;
-               ndev->limits.max_spads = BWD_MAX_SPADS;
-       } else {
-               ndev->reg_ofs.rdb = ndev->reg_base + BWD_PDOORBELL_OFFSET;
-               ndev->reg_ofs.spad_write = ndev->reg_base + BWD_SPAD_OFFSET;
-               ndev->limits.max_spads = BWD_MAX_COMPAT_SPADS;
-       }
-
        ndev->limits.max_mw = BWD_MAX_MW;
+       ndev->limits.max_spads = BWD_MAX_SPADS;
        ndev->limits.max_db_bits = BWD_MAX_DB_BITS;
        ndev->limits.msix_cnt = BWD_MSIX_CNT;
        ndev->bits_per_vector = BWD_DB_BITS_PER_VEC;
index b4f4604f4ce5c19e60ae26d96632b9584bf8fde0..aa4bdd393c58ee2c4cf40105b1644afdcb19913c 100644 (file)
 
 #define BWD_MSIX_CNT           34
 #define BWD_MAX_SPADS          16
-#define BWD_MAX_COMPAT_SPADS   16
 #define BWD_MAX_DB_BITS                34
 #define BWD_DB_BITS_PER_VEC    1
 #define BWD_MAX_MW             2