This could potentially lead to situations where it is not
possible to upgrade firmware.
Also make all QP creation fail in limited mode, otherwise
someone might create one and try to run traffic on it.
In particular any use of PQPs will lead to kernel null pointer
exceptions as they have not been initialized.
Signed-off-by: Knut Omang <knut.omang@oracle.com>
u32 max_sge;
int min_tso_inline;
+ /* In limited mode QPs are not usable and possibly hazardous as nothing is set up
+ * avoid any creation of any such:
+ */
+ if (unlikely(sdev->limited_mode)) {
+ sif_log(sdev, SIF_INFO, "limited mode does not support QP creation!");
+ return ERR_PTR(-ENODEV);
+ }
+
if (init_attr->send_cq)
send_cq = to_scq(init_attr->send_cq);
if (init_attr->recv_cq)
int ret;
bool dne_qp_alloc = false;
+ if (sdev->limited_mode)
+ return 0;
+
if (eps_fw_version_lt(&sdev->es[sdev->mbox_epsc], 0, 58)) {
ret = sif_hw_allocate_dne_qp(sdev);
if (ret)