/* * Our neighbor has indicated that we are allowed to act as a fabric * manager, so place the full management partition key in the second * (0-based) pkey array position. Note that we should already have * the limited management partition key in array element 1, and also * that the port is not yet up when add_full_mgmt_pkey() is invoked.
*/ staticvoid add_full_mgmt_pkey(struct hfi1_pportdata *ppd)
{ struct hfi1_devdata *dd = ppd->dd;
/* Sanity check - ppd->pkeys[2] should be 0, or already initialized */ if (!((ppd->pkeys[2] == 0) || (ppd->pkeys[2] == FULL_MGMT_P_KEY)))
dd_dev_warn(dd, "%s pkey[2] already set to 0x%x, resetting it to 0x%x\n",
__func__, ppd->pkeys[2], FULL_MGMT_P_KEY);
ppd->pkeys[2] = FULL_MGMT_P_KEY;
(void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0);
hfi1_event_pkey_change(ppd->dd, ppd->port);
}
/* * Only call ib_dispatch_event() if the IB device has been * registered. HFI1_INITED is set iff the driver has successfully * registered with the IB core.
*/ if (!(dd->flags & HFI1_INITTED)) return;
event.device = &dd->verbs_dev.rdi.ibdev;
event.element.port_num = ppd->port;
event.event = ev;
ib_dispatch_event(&event);
}
/** * handle_linkup_change - finish linkup/down state changes * @dd: valid device * @linkup: link state information * * Handle a linkup or link down notification. * The HW needs time to finish its link up state change. Give it that chance. * * This is called outside an interrupt. *
*/ void handle_linkup_change(struct hfi1_devdata *dd, u32 linkup)
{ struct hfi1_pportdata *ppd = &dd->pport[0]; enum ib_event_type ev;
if (!(ppd->linkup ^ !!linkup)) return; /* no change, nothing to do */
if (linkup) { /* * Quick linkup and all link up on the simulator does not * trigger or implement: * - VerifyCap interrupt * - VerifyCap frames * But rather moves directly to LinkUp. * * Do the work of the VerifyCap interrupt handler, * handle_verify_cap(), but do not try moving the state to * LinkUp as we are already there. * * NOTE: This uses this device's vAU, vCU, and vl15_init for * the remote values. Both sides must be using the values.
*/ if (quick_linkup || dd->icode == ICODE_FUNCTIONAL_SIMULATOR) {
set_up_vau(dd, dd->vau);
set_up_vl15(dd, dd->vl15_init);
assign_remote_cm_au_table(dd, dd->vcu);
}
/* if we are down, the neighbor is down */
ppd->neighbor_normal = 0;
/* notify IB of the link change */
signal_ib_event(ppd, ev);
}
}
/* * Handle receive or urgent interrupts for user contexts. This means a user * process was waiting for a packet to arrive, and didn't want to poll.
*/ void handle_user_interrupt(struct hfi1_ctxtdata *rcd)
{ struct hfi1_devdata *dd = rcd->dd; unsignedlong flags;
spin_lock_irqsave(&dd->uctxt_lock, flags); if (bitmap_empty(rcd->in_use_ctxts, HFI1_MAX_SHARED_CTXTS)) goto done;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.