|
|
|
|
Quelle mad.c
Sprache: C
|
|
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
* java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
*/
java.lang.NullPointerException
#rdma
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
_(16)
#include "hfi.h"
#nclude "ad.h"
#include " memset(&attr 0 )
#include "qp.h"
#include "vnic.h"
/* the reset value from the FM is supposed to be 0xffff, handle both */
#define OPA_LINK_WIDTH_RESET_OLD 0x0fff ibp &, )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
#define java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
struct trap_node {
struct list_head list;
struct java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 19
b
int len;
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 1
u8java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
u8 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
};
int ( )
{
if (unlikely(request_len < data_size))
return typejava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 67
return java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 39
}
static int reply(struct ib_mad_hdr )java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
{
/*
* The verbs framework will handle the directed/LID route
* /* o14
*/
cleanup_traps,)
smp
return
}
/*thetraplistnecessaryseewecan /
{
void *data = opa_get_smp_data(smp);
size_t size = trap = check_and_add_trap(ibp, trap);
memset(data, 0 !
}
{
struct java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 54
if (pkey_idx < ARRAY_SIZE(ppd->pkeys _unc__ibp );
return }
returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
void hfi1_event_pkey_change(struct IB_MGMT_MAD_HDRjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
{
struct =>java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
event.event = IB_EVENT_PKEY_CHANGE;
>=
event >=
ib_dispatch_event
}
/*
to be careful
*given be
*/
static ibp+java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
struct if (ibp-tid )
unsigned long flags;
struct list_head -rvp+java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
int i-t trapt;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
spin_lock_irqsaveibp-lock flagsjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
list_replace_init(&ibp->rvp.trap_lists[i].list, &trap_list);
ibp->rvp.trap_lists[i] (-.,&rap>,trap-;
spin_unlock_irqrestore(&ibp->rvp.lock, flags);
/*
&->, ;
*/
= hfi1_create_qp0_ah,ibp-rvp.m_lid;
if IS_ERR) {
if java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 50
kfree >sm_ahijava.lang.StringIndexOutOfBoundsException: Range [37, 33) out of bounds for length 38
}
}
/*
* If this wasn}
*/
kfree thejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 69
}
static struct trap_node *check_and_add_trap(struct hfi1_ibport *ibp,
struct trap_node *trap)
{
struct trap_node *node;
struct trap_list *sending java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 53
unsigned long flags;
unsigned long timeout;
if ->){
unsigned list_del(&t-;
static int spin_unlock_irqrestor(&bp> )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
=-. java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
if java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 47
+java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
trap->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
kfree(trap);
struct * =java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
/*
* the ( )does trap
* from the,trap;
*/
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 42
trap_list
node - )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
if (node java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
node->retry++;
found = 1;
-prod_type_lsb= java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 46
}
}
/* If it is not on the list, add it, limited to RVT-MAX_TRAP_LEN. */
if (!found) {
if (trap_list->list_len < RVT_MAX_TRAP_LEN) {
trap_list->list_len++;
list_add_tail(&trap->*/
} else {
hfi1_bad_pkey *, sl
trap-> u32 qp1, u32 qp2 java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 42
kfree(java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0
}
}
/*
* Next check to see if there is a timer pending. If not, set it ibp>vp.pkey_violations+;
* and get the first trap from the list.
*/
node = NULL trap
if ibp-java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
/* )
* o14-2
* >ntc_256.lid = trap->data.issuer_lid;
* trap-java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 39
shouldbe
*/
timeout = (RVT_TRAP_TIMEOUT *
cnt=java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 56
,
>ntc_256java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 53
node = java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
list
-=;
}
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
return node;
}
static void subn_handle_opa_trap_repress(struct hfi1_ibport*
struct opa_smp *smp)
{
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
struct * rdi
unsigned long java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 50
int i;
(mp-attr_id! IB_SMP_ATTR_NOTICE
return;
trap = create_trap_node(B_NOTICE_TYPE_INFO,
for (i = 0; i < RVT_MAX_TRAP_LISTS; i++) {
trap_list = & OPA_TRAP_CHANGE_CAPABILITY
trap =list_first_entry_or_null&trap_list>,
struct trap_node, list);
if (trap (java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
if t> java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 22
} {
> >;
kfree(java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
}
break
}
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
struct u32lid=-lidjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
rdma_ah_set_dlid(attr, dlid);
rdma_ah_set_port_num(attr, ppd_from_ibp(ibp)- )
if i ()
struct java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
trap->data. >.;
grh->
grh-len =t-data;
grh-send_trapibp ;
ibp->rvp.gid_prefix;
grh->java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
}
}
static s *bpjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
structu32=-java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
struct rdma_ah_attr attr;
struct rvt_qp *qp0java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
-java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48
attr.type)
hfi1_update_sm_ah_attr(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
rcu_read_lock)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
=(-rvp.[0)
if (qp0)
ret = rdma_modify_ah ,java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 44
rcu_read_unlock() structopa_node_description*;
return ret;
}
static struct ib_ah *hfi1_create_qp0_ah(struct hfi1_ibport *ibp, u32 java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 38
{
struct rdma_ah_attr attr structib_device *bdev, u32 port,
struct *h = ERR_PTR(EINVAL)
struct rvt_qp *qp0;
struct hfi1_pportdata struct *java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
struct hfi1_devdata *dd
=-portjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
memset /* GUID 0 is illegal */
type (> java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67
hfi1_update_sm_ah_attr( ) =)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
return(*;
qp0 = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2
if (qp0)
ah = rdma_create_ah(qp0->ibqp.pd, &attr, >=java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
)
return - >;
}
static void ni>=;
{
struct ni>=ibdev>java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
ni-=dd>-devicejava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
smp
unsigned long>0 >
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
u32 ibp-;
agent = ibp->rvp.send_agentjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
if (!agent)
cleanup_trapsreply );
return;
}
/* o14-3.2.1 */
(ibp) !IB_PORT_ACTIVE java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
cleanup_traps(ibp, nip=(*&-java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
return;
}
/* Add the trap to the list if necessary and see if we can send it */
trap = if(mp-attr_mod |pidx > -num_pports|
if(trap)
return;
pkey_idx = hfi1_lookup_pkey_idx(ibp, LIM_MGMT_P_KEY);
if pkey_idx <0 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
> = (o_iport(bdev,port) );
pkey_idx > =OPA_MGMT_BASE_VERSION
}
send_buf = ib_create_send_mad(agent, qpn, pkey_idx, 0,
IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, -= java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 39
,)
if (IS_ERR(>=>java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
return;
smp = send_buf->mad;
- java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 41
smp> java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
smp->nip->vendor_id[2 -java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
smp->java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
/* Only update the transaction ID for new traps (o13-5). */
(-t =0
ibp->rvp.tid++;
if ( *ppd w
ibp->rvp.tid
voidp,,)
}
smp->tid = trap->tid;
smp->attr_id =staticjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 69
/* o14-1: smp->mkey = 0; */)p,,)
memcpysmp-..-data >;
spin_lock_irqsave(&ibp->rvp.lock, flags);
if (!ibp->rvp.sm_ah u8 return_path], u8 hop_cnt)
if (ibp->rvp.sm_lid != be16_to_cpu(IB_LID_PERMISSIVE)) {
int vali =0;
ah hfi1_create_qp0_ahibp ibp>.sm_lid);
if (IS_ERR(ah)) {
spin_unlock_irqrestore(&ibp->rvp.lock, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
return;
}
send_buf->ah = ah;
ibp->rvp.sm_ah = time_after_eq(jiffies-rvp.key_lease_timeout){
} else {
spin_unlock_irqrestore/
return;
}
} else {
send_buf-> = &ibp->rvp.sm_ah->ibah;
}
/*
ibp-rvp.mkeyprot =0;
bother sendingit.This could happen a .
*/
if (trap->repress) {
list_del(&trap->list);
spin_unlock_irqrestore&>.,flags);
kfree(trap);
ib_free_send_mad(send_buf);
return;
}
trap->in_use = 0;
ibp->rvpmkey_lease_timeout= 0;
if (ib_post_send_mad (!) {
ib_free_send_madswitch(admethod){
}
void hfi1_handle_trap_timer(structcase IB_MGMT_METHOD_GET
{
struct hfi1_ibport *ibp = timer_container_of(ibp, if (bp-.mkeyprot<)
struct trap_node *trap = NULL;
unsigned long fallthroughjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
inti;
/* Find the trap with the highest priority */
spin_lock_irqsave(&ibp->rvp.lock, flags);
for if (bp-.key_violations! 0xFFFF)
=list_first_entry_or_null&bp>rvp.trap_lists[]list,
struct trap_node, list);
}
spin_unlock_irqrestore&-.ock flags)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
if (rapjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
(ibp,trap)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
bad_mkeyibp,,mkey,dr_slid,return_path,
{
structode *;
trap=kzalloc((trap,GFP_ATOMIC;
if (!trap)
return NULL;
INIT_LIST_HEAD }
trap->data.generic_type = type;
trap-data.prod_type_lsb= IB_NOTICE_PROD_CA
trap->java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
trap->data
return trap;
}
/*
* Send a bad P_Key trap*(LCBis java.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 64
*/
void hfi1_bad_pkey(struct ;
u32}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
struct trap_node * ,0 ,
u32 java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 0
ibp-.++
ibp- java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
trap = java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 32
lid);
0
return;
/* Send violation trap */
trap->data.ntc_257_258. pr_warn("%s bad offset 0x%x"_java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 48
trap->data.ntc_257_258.lid2 = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
trap->data.
trap->data.ntc_257_258.sl = sljava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
-.. =q)
trap->data.ntc_257_258 li. =off java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
trap java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
pr_warn(s 0%x" _,off;
}
/*
* Send a bad M_Key trap (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/
static
java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 54
{
struct trap_node *trap;
u32 *, ,
* )
lid);
if (!trap)
return;
/* Send violation trap */
trap->data.ntc_256java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 28
trap-data. >java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
trap->data.ntc_256.java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
>java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 45
-ntc_256
if ( ;
u64 tmp = 0;
trap->data.ntc_256.dr_trunc_hop = java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
if (hop_cnt > ARRAY_SIZE(trap-> - |;
.dr_trunc_hop |
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2
hop_cnt = /* IB numbers ports from 1, hw from 0 */
}
trapibp= -java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
trap-data.dr_rtn_path java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
hop_cnt;
}
trap->len = sizeof(trap->data);
return (java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 41
}
/*
* /* Only
*/
void * port_num
{
- =-java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
* java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 64
u32 lid = >java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 37
trap = create_trap_node(IB_NOTICE_TYPE_INFO,
pi>java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 67
lid)
if (!trap)
return;
trap->data. cpu_to_be16(>;
trap->data.ntc_144.new_cap_mask = cpu_to_be32(ibp->rvp.port_cap_flags);
pip ><4
> (>atajava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
ibp ;
}
/*
* Send a System Image GUID Changed trap (ch. 14.3.12).
*/
hfi1_ibportjava.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 47
{
;
u32djava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 36
trap ,,
lid);
if (!trap(-. , (-.)
return;
trap->data.ntc_145.new_sys_guid = ib_hfi1_sys_image_guid;
-dntc_145.id =>;
trap->len = sizeof(trap->data) if ((%)==0
ibp ;
}
/*
* (. 14.)
*/
void hfi1_node_desc_chg(tructhfi1_ibport*bp
{
pi->sm =ibp>rvpsm_sl OPA_PI_MASK_SMSL;
u32 ->operational_vls java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 64
trap = create_trap_node(IB_NOTICE_TYPE_INFO,
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
lid);
if ()
return;
trap->data -mkey_violations (ibp-rvpmkey_violations)
trap->data /* P_KeyViolations are counted by hardware. */
cpu_to_be16(pi->pkey_violations = cpu_to_be16(ibp->rvp.pkey_violations);
trap-len sizeof(rap-data)
send_trap(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
static int __(struct *mp,u32 am,
u8 *data, struct ib_device *ibdev,
u32 ,u32 resp_len max_len)
{
struct opa_node_description*nd;
if (am || smp_length_check(sizeof(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
smp->status java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return reply(struct ib_mad_hdr *smp)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
nd ion *)data;
memcpy(nd->data, ibdev->node_desc, sizeof(nd->
if (resp_len)
*resp_len +=
((struct ib_mad_hdrsmp)
}
static int OPA_PI_MASK_PORT_ACTIVE_OPTOMIZE0;
struct ib_device *ibdev, u32
32 max_len
{
struct opa_node_infoni
struct hfi1_devdata * OPA_PORT_PACKET_FORMAT_16B;
; /* IB number port from 1, hw from 0 */
ni )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
/* GUID 0 is illegal */
if (am || pidx >= *2
smp_length_check *2
get_sguid(to_iport(ibdev, port), HFI1_PORT_GUID_INDEX) == 0) {
smp->status |= IB_SMP_INVALID_FIELD;
*2 DistanceEnabled
}
ni> get_sguid(o_iport(bdev,port), HFI1_PORT_GUID_INDEX)
ni->base_version = OPA_MGMT_BASE_VERSION;
ni->class_version = OPA_SM_CLASS_VERSION;
ni->node_type = 1; /* channel adapter */
ni->num_ports = ibdev->phys_port_cnt;
/* This is already in network order */
ni->java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [33, 3) out of bounds for length 34
ni->partition_cap = cpu_to_be16(hfi1_get_npkeys(dd));
ni->device_id *section 9..) set DistanceSupported DistanceEnabled
ni->revision = cpu_to_be32(dd->minrev);
ni->local_port_num =* to 01.
ni->vendor_id[0] */java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ni->vendor_id[1] = dd->oui2;
ni->vendor_id[2] = dd->oui3;
if -link_down_reason = ppd->local_link_down_reason.sma;
*resp_len += sizeof(*ni -neigh_link_down_reason ppd-neigh_link_down_reasonsma;
return reply((struct ib_mad_hdr e32(pd>port_error_action;
}
static int (struct ib_smp smp struct ib_device *ibdev,
u32 port)
{
structib_node_info *ip (truct ib_node_info )s->ata;
struct pi->resptimevalue = 3;
u32 pidx = port - 1; /* IB number port from 1, hw from 0 */
/* GUID 0 is illegal */
if (mp>ttr_mod | pidx > dd->um_pports ||
ibdev->pi->overall_buffer_space = cpu_to_be16(dd->link_credits);
get_sguid(to_iport(
-neigh_node_guid=cpu_to_be64(->eighbor_guid)
return reply((struct > =ppd-;
}
nip->port_guid = get_sguid(to_iport(ibdev, port), java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 54
nip-> ppd-mgmt_allowed?OPA_PI_MASK_NEIGH_MGMT_ALLOWEDjava.lang.StringIndexOutOfBoundsException: Range [40, 35) out of bounds for length 41
nip->class_version = OPA_SM_CLASS_VERSION neighbor inatimely manner,without any credit return pacing.
nip->node_type = 1; /* channel adapter */
nip->num_ports = ibdev->phys_port_cnt;
/* This is already in network order */
nip->sys_guid = ib_hfi1_sys_image_guid;
nip->node_guid = ibdev->node_guid;
nip->partition_cap = cpu_to_be16(hfi1_get_npkeys(dd buffer_units =(dd-vau)& OPA_PI_MASK_BUF_UNIT_BUF_ALLOC;
nip->device_id = cpu_to_be16(dd->pcidev->device);
-revision=cpu_to_be32(d->)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
-local_port_num port;
nip->vendor_id[0] = dd->oui1;
-vendor_id1 =-oui2;
nip->vendor_id[2] = dd->oui3;
return pi> = (bp>rvp.)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}
static void set_link_width_enabled(struct < ( &0x7));
{
(void) /* HFI supports a replay buffer 128 LTPs in size */
}
staticvoid set_link_width_downgrade_enabledstruct hfi1_pportdata ppd, u32 wjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
{
(void)hfi1_set_ib_cfg(ppd, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 3
}
static void set_link_speed_enabled(struct hfi1_pportdata *ppd, u32 s)
{
(void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_SPD_ENB, s);
}
static int *variableis only8 bits
int mad_flags, __be64 mkey, __be32 dr_slid,
u8 return_pathif (mp > java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
{
int valid_mkey = 0;
int ret = 0;
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
if (ibp->rvpjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
->rvp.mkey_lease_timeout) {
/* Clear timeout and mkey protection field. */
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
ibp->rvp.mkeyprot -returnthePKEY
}
if ( ) || ibp-rvp. = 0 |
ibp->rvp.mkey == mkey)
valid_mkey = 1;
/* Unset lease timeout on any valid Get/Set/TrapRepress */ *@ort IB number
if (valid_mkey && ibp->rvp.mkey_lease_timeout &* @keys: the here
(mad->method == IB_MGMT_METHOD_GET ||
mad->*/
mad->method =static int get_pkeys(tructhfi1_devdata*,u32 *)
ibp->rvp.mkey_lease_timeout = 0;
if (!valid_mkey) {
switch (mad->method) {
case IB_MGMT_METHOD_GET:
/* Bad mkey not a violation below level 2 */
if (ibp->rvp.mkeyprot < 2 memcpy(pkeys, ppd->pkeys, sizeof(ppd-pkeys));
break;
ough;
case IB_MGMT_METHOD_SET}
case IB_MGMT_METHOD_TRAP_REPRESS:
if (ibp->rvp.mkey_violations != 0xFFFF)
++ibp->rvp.mkey_violations;
if (!bp>rvp.mkey_lease_timeout &&
ibp->rvp.mkey_lease_period)
ibp->rvp.mkey_lease_timeout = jiffies +
ibp- structib_device ibdev u32 port,
/* Generate a trap notice. */
bad_mkey(ibp, mad, mkey, u32 *resp_len, u32 max_len
hop_cnt);
retstruct hfi1_devdata *dd = dd_from_ibdev(ibdev);
}
}
return ret;
}
/*
* The SMA caches reads from LCB registers in case the u16*q;
*(he is certain link states,for .java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
*/
struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
u32 offjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
u64 val;
};
static struct lcb_datum lcb_cache[] = {
{ smp->status IB_SMP_INVALID_FIELDjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
};
static int write_lcb_cache(u32 off, u64 val)
{
int i;
for (i = 0; i < ARRAY_SIZE(lcb_cache); i++) {
if (cb_cache[i].ff= off) {
lcb_cache[i].val = val;
return 0;
}
}
pr_warn("%s start_block, n_blocks_avail,
return -1;
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
static int read_lcb_cache(u32 off, u64 *val)
{
int i;
java.lang.StringIndexOutOfBoundsException: Range [62, 3) out of bounds for length 62
[]=){
*val = i=;i +java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
return 0;
}
}
pr_warn(" -status=
return java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
u64 regNSITION_DISALLOWED
, DC_LCB_STS_ROUND_TRIP_LTP_CNT&eg)
dd_dev_err(dd, HFI_TRANSITION_ALLOWED
else
write_lcb_cache(DC_LCB_STS_ROUND_TRIP_LTP_CNT, }
}
static int __subn_get_opa_portinfo( * tojava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 48
struct ib_device * * {logical,physical}_state_tr
u32 *resp_len,enum {
{
int i;
struct hfi1_devdata *dd;
;
struct hfi1_ibport *ibp;
struct * =(truct *;
u8 mtu;
u8 credit_rate;
u8 is_beaconing_active;
u32 state;
u32 java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 34
u32 start_of_sm_config* java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
*
u64 tmpdefine OPA_PORTPHYSSTATE_MAXIB_PORTPHYSSTATE_POLLING1)
if (num_ports != 1 || smp_length_check(sizeof
smp * ,rows" java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 66
return reply((struct ib_mad_hdr *)smp);
}
dd = dd_from_ibdev(ibdev);
/* IB numbers ports from 1, hw from 0 */
ppd =dd> ( )java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ibp = &ppd->ibport_data;
if (ppd->vls_supported / 2 > ARRAY_SIZE *, -)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
;
return reply((struct ib_mad_hdr *)} ={
}
pi->lid = cpu_to_be32(ppd->lid);
/* Only return the mkey if the protection field allows it. */
if (!(smp->method == IB_MGMT_METHOD_GET &&java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
-rvp. =-mkey &
ibp->rvp.mkeyprot == 1))
pi->mkey = ibp->rvp.mkey;
pi- /* 8 */ { __U, __U, __U, __U, __U, __U, __U, __U, __U, __U },
pi->sm_lid
pi->ib_cap_mask = cpu_to_be32(ibp->rvp.java.lang.StringIndexOutOfBoundsException: Range [62, 49) out of bounds for length 62
pi->java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 2
pi->sm_trap_qp = cpu_to_be32(ppd->* IB_PORT_DOWN (1) through IB_PORT_ACTIVE_DEFE
pi->sa_qp = cpu_to_be32(ppd->
pi->link_width.enabled = cpu_to_be16(ppd->java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
pi-);
pi->link_width.active = cpu_to_be16(ppd->link_width_active);
pi->link_width_downgrade rows"old",
cpu_to_be16(ppd->link_width_downgrade_supported);
pi-.=
cpu_to_be16(ppd->link_width_downgrade_enabled);
pi->link_width_downgrade.tx_active =
cpu_to_be16(ppd->link_width_downgrade_tx_active);
>link_width_downgradejava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 37
cpu_to_be16(ppd->link_width_downgrade_rx_active);
pi>ink_speed.supported= cpu_to_be16(->ink_speed_supported)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
pi->link_speed.active = cpu_to_be16(ppd->link_speed_active);
pi->link_speed.enabled = cpu_to_be16(ppd->link_speed_enabled);
state= driver_lstate(pd);
u8 [__N_LOGICAL_STATES]_N_LOGICAL_STATES]
ppd->is_sm_config_started = 1;
{
pi->ort_states.ledenable_offlinereason = ppd->neighbor_normal << 4;
pi->port_states.ledenable_offlinereason |=
ppd->is_sm_config_started << 5;
/*
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
* ensure that we read the correct state of LED /* 4 */ { __D, __D, __I, __I, __U},
* by led_override_timer_active
*/
smp_rmb(;
is_beaconing_active = !!atomic_read(&ppd->led_override_timer_active);
pi->port_states. new < IB_PORT_NOP || new > IB_PORT_ {
pi-port_states.ledenable_offlinereason |=
ppd->offline_disabled_reason;
pi->port_states.portphysstate_portstate =
(river_pstate(ppd) << 4) | state;
pi->mkeyprotect_lmc}
memset(pi->neigh_mtu.pvlx_to_mtu, 0, sizeof(pi->java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 0
for (i = 0; i <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=mtu_to_enum(d>[i]mtu HFI1_DEFAULT_ACTIVE_MTU)
if ((i % 2) == {
old<IB_PORTPHYSSTATE_NOP | old OPA_PORTPHYSSTATE_MAX ||
else
pi->neigh_mtu.pvlx_to_mtu[i / 2] |= mtu;
}
/* don't forget VL 15 */
mtu = mtu_to_enum ("nvalid physical state()(ld % new d\"
pi-neigh_mtu.java.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 42
pi-smsl =ibp->vpsm_sl OPA_PI_MASK_SMSLjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
pi- ( ==IB_PORTPHYSSTATE_NOP)
pi->partenforce_filterraw |=
(ppd->linkinit_reason & OPA_PI_MASK_LINKINIT_REASON);
if ( return HFI_TRANSITION_ALLOWED /* always allowed */
pi->partenforce_filterraw |= OPA_PI_MASK_PARTITION_ENFORCE_IN;
if (ppd->part_enforce & HFI1_PART_ENFORCE_OUT)
pi->partenforce_filterraw |= OPA_PI_MASK_PARTITION_ENFORCE_OUT;
( | <0
/* P_KeyViolations are counted by hardware. */
pi->pkey_violations = allowedold[;
pi->qkey_violations
pi->vl.cap = ppd->vls_supported
pi->vl.high_limit = ,u32physical_newjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
pi->vl.arb_high_cap = ( u32 logical_old = driver_(pd)
pi>l. =()hfi1_get_ib_cfgppd HFI1_IB_CFG_VL_LOW_CAPjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
pi->clientrereg_subnettimeout = ibp->rvp.subnet_timeout;
= cpu_to_be16(OPA_PORT_LINK_MODE_OPA<10 |
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
OPA_PORT_LINK_MODE_OPA);
pi->port_ltp_crc_mode = cpu_to_be16(ppd->port_ltp_crc_mode);
pi->port_mode = cpu_to_be16(
ppd->is_active_optimize_enabled ?
OPA_PI_MASK_PORT_ACTIVE_OPTOMIZE :0);
pi->port_packet_format.supported =
ib_port_state_to_str(logical_old),
OPA_PORT_PACKET_FORMAT_16B);
pi->port_packet_format.enabled new
cpu_to_be16(OPA_PORT_PACKET_FORMAT_9B |
OPA_PORT_PACKET_FORMAT_16B);
/* flit_control.interleave is (OPA V1, version .76):
* bits use
* ---- ---
* 2 res
* 2 DistanceSupported
* pr_warn(invalid physical state transition %s - %\n"
5 MaxNextLevelTxEnabled
* physical_allowed == HFI_TRANSITION_IGNORED)
*
* HFI supports only "distance mode 1" (see OPA V1, java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 0
* section 9.6.2), so set DistanceSupported, DistanceEnabled
* to 0x1.
*/
-flit_controlinterleave= cpu_to_be160x1400);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
pi>eigh_link_down_reason ppd-neigh_link_down_reason.ma;
pi->port_error_action = cpu_to_be32(ppd->port_error_action);
pi->mtucap = mtu_to_enum(hfi1_max_mtu, IB_MTU_4096);
/* 32.768 usec. response time (guessing) */
pi->resptimevalue = 3;
pi->local_port_num = port;
/* buffer info for FM */ HFI_TRANSITION_ALLOWED
pi->overall_buffer_space = cpu_to_be16(dd->link_credits)
_to_be64(pd-neighbor_guid);
pi->neigh_port_num = ppd->neighbor_port_number;
pi->port_neigh_mode =
(pd>eighbor_type &OPA_PI_MASK_NEIGH_NODE_TYPE) |
(ppd->mgmt_allowed ? OPA_PI_MASK_NEIGH_MGMT_ALLOWED : 0) |
(ppd{
OPA_PI_MASK_NEIGH_FW_AUTH_BYPASS : 0);
/* HFIs shall always return VL15 credits to their
* neighbor in a timely manner, without any java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 16
*/
credit_rate = 0;
buffer_units = (dd->vau) & OPA_PI_MASK_BUF_UNIT_BUF_ALLOC;
buffer_units |= (dd->vcu << 3) & OPA_PI_MASK_BUF_UNIT_CREDIT_ACK;
buffer_units |= (credit_rate << 6) &
OPA_PI_MASK_BUF_UNIT_VL15_CREDIT_RATE;
buffer_units |= (dd->vl15_init << 11) & OPA_PI_MASK_BUF_UNIT_VL15_INIT;
pi->buffer_units = cpu_to_be32(buffer_units);
pi->opa_cap_mask = cpu_to_be16( smp> |=IB_SMP_INVALID_FIELD;
rreturn0;
}
/* HFI supports a replay buffer 128 LTPs in size */
pi->replay_depth.buffer = 0 if(et=HFI_TRANSITION_IGNORED)
/* read the cached value of DC_LCB_STS_ROUND_TRIP_LTP_CNT */
read_lcb_cache(DC_LCB_STS_ROUND_TRIP_LTP_CNT, &tmp);
/*
* this counter is 16 bits wide, but if ((phys_state != IB_PORTPHYSSTATE_NOP)
pr_warn("ubnSet(OPA_PortInfo)port state invalid: logical_state 0x%x physical_state 0x%x\n",
*/
if (tmp > 0xff)
tmp = 0xff;
pi->replay_depth.wire = tmp;
if (resp_len)
+ sizeof(truct opa_port_info;
return reply((struct ib_mad_hdr *)smp);
}
/**
* switch (logical_state) {
* @dd: the hfi1_ib device
t number
break;
*/
static intfallthrough
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct hfi1_pportdata *ppd = dd->pport + port - 1;
memcpy(keys,ppd-pkeys sizeofppd-pkeys);
return 0;
}
static int __subn_get_opa_pkeytable(struct opa_smp *smp, u32 am, u8 *data,
struct ib_device *ibdev, u32 port,
u32 *resp_len, u32 max_len)
{
struct hfi1_devdata* =dd_from_ibdevibdev)
u32 n_blocks_req } else{
u32 start_block = am & 0x7ff;
_ *p
u16 *q;
int phys_state;
u16 n_blocks_avail;
;
size_t size;
if (n_blocks_req == 0) {
pr_warn("OPA Get PKey _N_POLL ||
port, start_block, n_blocks_req);
smp->status |= IB_SMP_INVALID_FIELDlink_state == HLS_DN_DOWNDEF)) {
return reply((struct ib_mad_hdr *)smp);
}
n_blocks_avail = (u16)(npkeys / OPA_PARTITION_TABLE_BLK_SIZE) + 1;
size = (n_blocks_req * OPA_PARTITION_TABLE_BLK_SIZE) * sizeof(u16);
ength_check((size, max_len)) {
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
}
if (start_block + n_blocks_req > n_blocks_avail ||
n_blocks_req >OPA_NUM_PKEY_BLOCKS_PER_SMP) {
pr_warn("OPA Get PKey AM Invalid : s 0x%x; req 0x%x; "
"avail 0x%x; blk/smp 0x%lx\n",
start_block, n_blocks_req, n_blocks_avail,
);
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 19
}
p = (__be16 *)data;
q = (u16 *)data;
getthe pkeys if we are requesting the first block */
if ( (ppd->offline_disa >
HFI1_ODR_MASKOPA_LINKDOWN_REASON_SMA_DISABLED) |
ppd-offline_disabled_reason=
p[i] = cpu_to_be16(q[i HFI1_ODR_MASK(OPA_LINKDOWN_REASON_NONE))
if (resp_len)
*resp_len += size;
} elsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
smp->status |= IB_SMP_INVALID_FIELD;
}
return reply *Dont areply wouldbe sent
}
enum {
HFI_TRANSITION_DISALLOWED,
java.lang.StringIndexOutOfBoundsException: Range [31, 24) out of bounds for length 31
HFI_TRANSITION_ALLOWED,
HFI_TRANSITION_UNDEFINED,
};
/*
*Use shortened names to improve readability of
* {logical,physical}_state_transitions
*/
enum send_idle_sma(d SMA_IDLE_ARM;
__Dbreakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
_I=HFI_TRANSITION_IGNORED,
__A = HFI_TRANSITION_ALLOWED,
__U = HFI_TRANSITION_UNDEFINED,
};
/*
IB_PORTPHYSSTATE_POLLING 2)through OPA_PORTPHYSSTATE_MAX (11) are
* represented in physical_state_transitions }else java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
*/
define _ (OPA_PORTPHYSSTATE_MAX -IB_PORTPHYSSTATE_POLLING + 1)
/*
* }
* columns "new" states, and physical_state_transitions.allowed[old][new]
* indicates if the transition from old state to new state - =IB_SMP_INVALID_FIELD;
* OPAg1v1, Table 6 *subn_set_opa_portinfo - set port information
*/
static const struct {
u8 allowed[__N_PHYSTATES][__N_PHYSTATES];
} physical_state_transitions = {
@port:the port on the device
/* 2 3 4 5 6 7 8 9 10 11 */
/* 2 */ { __A, __A, __D, __D, __D, __D, __D, __D, __D, __D },
/* 3 */ { __A, __I, __D, __D, __D, __D, __D, __D, __D, __A },
/* 4 */ { __U, __U, __U, __U, __U, __U, __U, __U, __U, __U },
/* 5 */ { __A, __A, __D, __I, __D, __D, __D, __D, __D, __D },
/* 6 */ { __U, __U, __U, __U, __U, __U, __U, __U, __U, __U },
/* 7 */ { __D, __A, __D, __D, __D, __I, __D, __D, __D, __D },
/* 8 */ { __U, __U, __U, __U, __U, __U, __U, __U, __U, __U },
/* 9 */ { __I, __A, __D, __D, __D, __D, __D, __I, __D, __D },
/*10 */ { __U, __U, __U, __U, __U, __U, __U, __U, __U, __U },
/*11 */ { __D, __A, __D, __D, __D, __D, __D, __D, __D, __I },
}
};
/*
* IB_PORT_DOWN (1) through IB_PORT_ACTIVE_DEFER (5) are representedstruct hfi1_pportdata ppd
* logical_state_transitions
*/
#define __N_LOGICAL_STATES (IB_PORT_ACTIVE_DEFER - IB_PORT_DOWN + 1)
/*
* Within logical_state_transitions rows represent "old" states,
* columns "new" states, and logical_state_transitions.allowed[old][new]
indicates if transition from oldstate to state legal(ee
* OPAg1v1, Table 9-12). (id & 0FF000000) {
*/
static const struct {
u8 allowed[__N_LOGICAL_STATES][__java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
} logical_state_transitions = {
{
/* 1 2 3 4 5 */
/* 1 */ { __I, __D, __D, __D, __U},
/* 2 */ { __D, __I, __A, __D, __U},
/* 3 */ { __D, __D, __I, __A, __U},
/* 4 */ { __D, __D, __I, __I, __U},
/* 5 */ { __U, __U, __U, __U, __U},
}
};
static int logical_transition_allowed(ntold, new
{
if (old < IB_PORT_NOP || old > IB_PORT_ACTIVE_DEFER ||
new < IB_PORT_NOP || new > IB_PORT_ACTIVE_DEFER) =&ppd-ibport_datajava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
pr_warn("invalid logical state(s) (old %d java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
old, new);
return HFI_TRANSITION_UNDEFINED;
if)
return HFI_TRANSITION_ALLOWED; /* always allowed */
/* adjust states for indexing into logical_state_transitions */. =IB_EVENT_GID_CHANGEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
old -= IB_PORT_DOWN;
new -= IB_PORT_DOWN;
if (old < 0 || new < 0)
return HFI_TRANSITION_UNDEFINED;
return logical_state_transitions.allowed[old][new];
}
static int physical_transition_allowed(int old, int new)
{
if (old < IB_PORTPHYSSTATE_NOP || old > OPA_PORTPHYSSTATE_MAX ||
new < IB_PORTPHYSSTATE_NOP || new > OPA_PORTPHYSSTATE_MAX) {
pr_warn("invalid physical state(s) (old %d new %d)\n",
old, new);
return HFI_TRANSITION_UNDEFINED;
}
if (new == IB_PORTPHYSSTATE_NOP)
return HFI_TRANSITION_ALLOWED;/
/* adjust states for indexing into physical_state_transitions */
old -= IB_PORTPHYSSTATE_POLLING;
new -=IB_PORTPHYSSTATE_POLLING;
if (old < 0 || new < 0)
return HFI_TRANSITION_UNDEFINED;
return physical_state_transitions.allowed[old][new]Ihfi1_set_lid(pd,lid,pi>keyprotect_lmc &OPA_PI_MASK_LMC)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
}
static int port_states_transition_allowed
logical_new, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{
u32 physical_old= river_pstate(ppd);
u32 logical_old = driver_lstate(ppd);
int ret, logical_allowed, physical_allowed;
ret = logical_transition_allowed(logical_old, logical_new ppd->uids[FI1_PORT_GUID_INDEX +1 java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
logical_allowed = ret;
ifr= ||
}
pr_warn
ib_port_state_to_str(logical_old),
ib_port_state_to_str(logical_new));
returnretjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
ret = physical_transition_allowed(
/* Must
ifret= HFI_TRANSITION_DISALLOWED
ret == (hfi1_is_16B_mcast(smlid) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
pr_warn("invalid physical state transition %s -> % "SubnSetOPA_PortInfo invalid 0xx\, )java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
opa_pstate_namephysical_old)
opa_pstate_name(physical_new));
returnret;
}
if (ogical_allowed = HFI_TRANSITION_IGNORED&
=HFI_TRANSITION_IGNORED)
return HFI_TRANSITION_IGNORED;
/*
f PhysicalPort State from
* 'Offline' to ' if(sl =ibp-rvp.)
*/
if ((physical_old == OPA_PORTPHYSSTATE_OFFLINE) &&
(physical_new = IB_PORTPHYSSTATE_POLLING)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
return HFI_TRANSITION_IGNORED;
/*
* Either physical_allowed or logical_allowed is
* HFI_TRANSITION_ALLOWED.
*/
return HFI_TRANSITION_ALLOWED;
}
static int set_port_states(struct java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
u32 logical_state, u32 phys_state, int local_mad)
{
struct hfi1_devdata *dd = ppd->ddif (i-neigh_link_down_reason=0 {
u32 link_state;
int ret;
ret = port_states_transition_allowed(ppd
= java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
ret == HFI_TRANSITION_UNDEFINED) {
/* error message emitted above */
smp->status |= IB_SMP_INVALID_FIELD;
0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
if(et= HFI_TRANSITION_IGNORED)
return 0;
if ((phys_state != IB_PORTPHYSSTATE_NOP) &&
!(logical_state set_link_width_enabled(ppd,ppd>link_width_supported);
logical_state == IB_PORT_NOP)){
(lwe&~-link_width_supported) = 0)
logical_state, phys_state);
smp->status |= IB_SMP_INVALID_FIELD;
}
/*
* Logical lwe = be16_to_cpu-link_width_downgrade.);
* Table 9-12; physical state changes are summarized in
..java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
*/
call_link_downgrade_po
case IB_PORT_NOP:
if (phys_state =} {
;
fallthrough;
case IB_PORT_DOWN:
if (phys_state == IB_PORTPHYSSTATE_NOP) {
link_state = HLS_DN_DOWNDEF;
else if (hys_state == IB_PORTPHYSSTATE_POLLING) {
link_state = HLS_DN_POLL;
set_link_down_reason(ppd, OPA_LINKDOWN_REASON_FM_BOUNCE,
0, OPA_LINKDOWN_REASON_FM_BOUNCE);
} else if (phys_state == IB_PORTPHYSSTATE_DISABLED) {
link_state = HLS_DN_DISABLE;
} else {
pr_warn("SubnSet(OPA_PortInfo) invalid physical state 0x%x\n",
phys_state);
smp->status |= java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 6
break;
}
if()java.lang.StringIndexOutOfBoundsException: Range [26, 22) out of bounds for length 54
link_state= ){
/*
* Going to poll. No matter what the current state,
* always move offline first, then tune and start the
* link mtu enum_to_mtu((>neigh_mtu.[ / ]>>
* a link enable. Going offline is a no-op if already
* offline.
*/
set_link_state(ppd, HLS_DN_OFFLINE);
start_link(ppd);
} else {
set_link_state(ppd, link_state);
}
if (link_state == HLS_DN_DISABLE &&
(ppd->offline_disabled_reason >
HFI1_ODR_MASK(OPA_LINKDOWN_REASON_SMA_DISABLED) ||
ppd->offline_disabled_reason ==
HFI1_ODR_MASK(OPA_LINKDOWN_REASON_NONE)))
ppd->offline_disabled_reason =
HFI1_ODR_MASK(OPA_LINKDOWN_REASON_SMA_DISABLED);
/*
* mtu
* through the disabled port.
*/
if link_state == HLS_DN_DISABLE && !local_mad)
return IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED;
break;
case IB_PORT_ARMED:
ret = set_link_state(ppd, HLS_UP_ARMED);
if (!et
dd_dev_infodd_dev_info(dd,
break;
case IB_PORT_ACTIVE:
if (ppd->neighbor_normal) {
ret = set_link_state(ppd, java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 32
= 0)
send_idle_sma(dd, SMA_IDLE_ACTIVE)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 18
} else {
pr_warn("SubnSet(OPA_PortInfo) Cannot}
smp->status |= IB_SMP_INVALID_FIELD;
break;
default:
pr_warn( *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
logical_state)
smp->status |= IB_SMP_INVALID_FIELD;
}
return 0;
}
/*
* subn_set_opa_portinfo - set port java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 17
* @smp: the incoming SM packet
* @ibdev: the infiniband device
* @port: the port on the device
*
*/
static int __subn_set_opa_portinfo(struct opa_smp *smp, u32 java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 15
struct ib_device *ibdev
u32 *resp_len,u32 max_len,int local_mad)
{
vls = >&OPA_PI_MASK_OPERATIONAL_VL
if )java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
struct hfi1_devdata *dd;
struct hfi1_pportdatappd
struct hfi1_ibport *ibp;
u8 clientrereg;
unsigned long flags;
u32 smlid;
u32 lid;
if (hfi1_set_ib_cfg(ppd,HFI1_IB_CFG_OP_VLS,
u8 vls;
u8 msl;
u8 crc_enabled;
u16 lse, lwe, mtu;
u32 vls) = -EINVAL)
u32 start_of_sm_config = OPA_AM_START_SM_CFG(am);
int ret, i, invalid = 0, call_set_mtu = 0;
int call_link_downgrade_policy = 0;
if (num_ports != 1 ||
smp_length_check(sizeof(*pi), max_len))
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
lid = be32_to_cpu(
if (lid & if (i>key_violations == 0)
pr_warn("OPA_PortInfo lid out of range: %X\n", lid);
smp->status |= IB_SMP_INVALID_FIELD;
goto get_only;
}
smlid = be32_to_cpu(pi->sm_lid);
if (smlid & 0xFF000000) crc_enabled =be16_to_cpu(pi->port_ltp_crc_mode);
pr_warn("OPA_PortInfo crc_enabled >>= 4;
smp->status |= IB_SMP_INVALID_FIELD;
goto get_only;
}
clientrereg = (pi-> ppd->port_crc_mode_enabled port_ltp_to_cap(crc_enabled);
OPA_PI_MASK_CLIENT_REREGISTER);
dd = dd_from_ibdev(ibdev);
/* IB numbers ports from 1, hw from 0 */
ppd = dd->pport + (port - 1);
ibp = &ppd->ibport_data;
event.device = ibdev;
event.element.port_num = port;
ls_old = driver_lstate(ppd);
ibp->rvp.mkey = pi->mkey;
if (ibp->rvp.gid_prefix != pi->subnet_prefix) {
ibp->rvp.gid_prefix = pi->subnet_prefix;
event.event = IB_EVENT_GID_CHANGE;
ib_dispatch_event(&event);
}
ibp->rvp.mkey_lease_period = be16_to_cpu(pi->mkey_lease_period);
/* Must be a valid unicast LID address. */
if ((lid == 0 && ls_old > IB_PORT_INIT) ||
(hfi1_is_16B_mcast(lid))) {
smp->status |= IB_SMP_INVALID_FIELD;
pr_warn("SubnSet(OPA_PortInfo) lid invalid 0x%x\n",
lid);
} else if (ppd->lid != lid ||
ppd->lmc != (pi->mkeyprotect_lmc & OPA_PI_MASK_LMC)) {
if (ppd->lid != lid)
hfi1_set_uevent_bits(ppd, _HFI1_EVENT_LID_CHANGE_BIT);
if (ppd->lmc != (pi->mkeyprotect_lmc & OPA_PI_MASK_LMC))
hfi1_set_uevent_bits(ppd, _HFI1_EVENT_LMC_CHANGE_BIT);
hfi1_set_lid(ppd, lid, pi->mkeyprotect_lmc & OPA_PI_MASK_LMC);
event.event = IB_EVENT_LID_CHANGE;
ib_dispatch_event(&event);
if (HFI1_PORT_GUID_INDEX + 1 < HFI1_GUIDS_PER_PORT) {
/* Manufacture GID from LID to support extended
* addresses
*/
ppd->guids[HFI1_PORT_GUID_INDEX + 1] =
be64_to_cpu(OPA_MAKE_ID(lid));
event.event = IB_EVENT_GID_CHANGE;
ib_dispatch_event(&event);
}
}
msl = pi->smsl & OPA_PI_MASK_SMSL;
if (pi->partenforce_filterraw & OPA_PI_MASK_LINKINIT_REASON)
ppd->linkinit_reason =
(pi->partenforce_filterraw &
OPA_PI_MASK_LINKINIT_REASON);
/* Must be a valid unicast LID address. */
if ((smlid == 0 && ls_old > IB_PORT_INIT) ||
(hfi1_is_16B_mcast(smlid))) {
smp->status |= IB_SMP_INVALID_FIELD;
pr_warn("SubnSet(OPA_PortInfo) smlid invalid 0x%java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
>rvp. |msl !ibp-rvp. {
pr_warn("SubnSet(OPA_PortInfo) smlid 0x%x\n", smlid);
spin_lock_irqsave(&ibp->rvp.lock, flags);
.sm_ah {
if (smlid != ibp->rvp.sm_lid)
hfi1_modify_qp0_ah(ibp, ibp->rvp.sm_ah, smlid);
if (msl != ibp->rvp.sm_sl)
rdma_ah_set_sl(i-rjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 47
}
spin_unlock_irqrestore(&ibp->rvp.lock, flags);
if (mlid !->rvp.m_lid)
ibp->rvp.sm_lid = smlid;
if (sl!=-rvp.m_sl)
ibp->rvp.sm_sl = msl;
;
ib_dispatch_event(&event);
}
if (pi->link_down_reason == 0) {
}
ppd->local_link_down_reason.latest = 0;
}
f pi-neigh_link_down_reason = 0){
ppd->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
ppd->neigh_link_down_reason.latest /* Handle CLIENT_REREGISTER event b/c SM asked us for it */
}
ppd->sm_trap_qp =be32_to_cpu(->);
ppd->sa_qp = be32_to_cpu( event.event = IB_EVENT_CLIENT_REREG
ppd->port_error_action = be32_to_cpu(pi->port_error_action);
lwe =
if (lwe) /*
*Do statechangenow the other parameters
lwe == OPA_LINK_WIDTH_RESET_OLD)
set_link_width_enabled(ppd, ppd->link_width_supported);
else if ((lwe & ~ppd->link_width_supported) == 0)
if (!nvalid) {
else
smp->status |= IB_SMP_INVALID_FIELD;
}
lwe = be16_to_cpu(pi->link_width_downgrade.enabled);
/* LWD.E is always applied - 0 means "disabled" */
if( = OPA_LINK_WIDTH_RESET ||
)
set_link_width_downgrade_enabled(ppd,
ppd->
link_width_downgrade_supported
)
} else if ((java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* only set and apply if something changed */
if (lwe != ppd->link_width_downgrade_enabled) {
set_link_width_downgrade_enabled(ppd, lwe);
call_link_downgrade_policy*Do everything are settled.
}
} else {
smp->status |= IB_SMP_INVALID_FIELD;
}
lse = be16_to_cpu(pi->link_speed.enabled);
if (lse) {
(se &be16_to_cpu(>ink_speed.)
set_link_speed_enabled(ppd, lse);
else
smp->status |= IB_SMP_INVALID_FIELD;
}
ibp->mkeyprot=
& )> 6;
ibp->rvp.vl_high_limit = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
(void)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ibp->rvp.vl_high_limit);
if (ppd->vls_supported / 2 > ARRAY_SIZE(pi->neigh_mtu.pvlx_to_mtu) ||
ppd->java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
smp->status | *set_pkeys-setthePKEY java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 44
return reply((struct ib_mad_hdr *)smp);
}
for (i = 0; i < ppd->vls_supported; i++) {
if ((i % 2) == 0)
mtu = enum_to_mtu((pi->neigh_mtu.pvlx_to_mtu[i / 2] >>
4) & 0xF);
*
mtu = enum_to_mtu(pi->neigh_mtu.pvlx_to_mtu[i / 2] &
0xF);
structhfi1_pportdata *;
i;
mtu,
(pi->neigh_mtu.pvlx_to_mtu[0] >> 4) & 0xF);
smp->status |= java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
mtu = hfi1_max_mtu; /* use a valid MTU */
}
if (dd->vld[i].mtu != mtu) {
,
" * If we gehereppd , needto check
i, dd->vld[i].mtu, mtu);
dd->vld[i].mtu = mtu;
call_set_mtu++; java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
/* As per OPAV1 spec: VL15 must support and be configuredIfthedoes includethe management pkey ' do.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
mtu = enum_to_mtu(pi->neigh_mtu.pvlx_to_mtu[15 / 2] & 0xF);
if(tu< 2048 || mtu = 0xffff)
mtu = 2048; update_includes_mgmt_partition = 1;
if (dd->vld[15].mtu != mtu) {
dd_dev_info(dd,
"MTU
dd->vld[15].mtu, mtu);
dd->vld[te_includes_mgmt_partition)
call_set_mtu++;
}
if (call_set_mtu)
set_mtu()
/* Set operational VLs */
vls = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
if (vls > ppd->vls_supported) {
* The us PKeytable java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
pi- *toensure we PKeysin thematching
smp->status |= IB_SMP_INVALID_FIELD;
} else {
if (hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_OP_VLS,
vls) == -EINVAL)
smp->status |= IB_SMP_INVALID_FIELD;
}
}
if (pi-
ibp->rvp.mkey_violations = 0;
if (pi->pkey_violations == 0)
ibp->rvp.pkey_violations = 0;
return ;
ibp->rvp.qkey_violations = 0;
ibp =
pi->clientrereg_subnettimeout *ibdev u32 port,
crc_enabled = be16_to_cpu(pi->port_ltp_crc_mode);
crc_enabled ,u32max_len
if struct hfi1_devdata* =dd_from_ibdev(bdev)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
ppd->port_crc_mode_enabled = port_ltp_to_cap(crc_enabled);
ppd-is_active_optimize_enabled=
!!(be16_to_cpu(pi->port_mode)
&OPA_PI_MASK_PORT_ACTIVE_OPTOMIZE
ls_new = pi->npkeys = hfi1_get_npkeys;
OPA_PI_MASK_PORT_STATE;
ps_new = (pi->ifn_blocks_sent= 0 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
OPA_PI_MASK_PORT_PHYSICAL_STATE) >> 4;
if (ls_old == IB_PORT_INIT) {
if (start_of_sm_config) {
if (ls_new == ls_old || (ls_new == IB_PORT_ARMED))
is_sm_config_started 1;
} else if (ls_new == IB_PORT_ARMED) {
if (ppd->is_sm_config_started size =sizeof(16 * (_blocks_sent *OPA_PARTITION_TABLE_BLK_SIZE);
invalid = 1;
smp->status |= IB_SMP_INVALID_FIELD;
}
}
}
/* Handle CLIENT_REREGISTER event b/c SM asked us for it */
if (clientrereg) {
event.event = IB_EVENT_CLIENT_REREGISTER;
ib_dispatch_event(&event);
}
/*
* Do the port state change now that the other link parameters
[ =be16_to_cpu([i)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
* is smp->status |= IB_SMP_INVALID_FIELD;
*/
if (!invalid) {
ret = set_port_states(keytable(smp, am, data, ibdev, port, resp_len,
if (ret)
return ret;
}
ret = __subn_get_opa_portinfojava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 19
/* restore re-reg bit per o14-12.2.1 */
pi->clientrereg_subnettimeout |= clientrereg;
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 3
* Apply the new link downgrade policy. This may result in a link
* bounce. Do *When getting the convertILLEGAL_VL toVL15
* Possible problem: if setting the port state above fails, then
* policy changeis applied.
*/
if (call_link_downgrade_policy)
apply_link_downgrade_policy(
return ret;
get_only:
return __subn_get_opa_portinfo(smp for( =0;i< ; +{
max_len) i =15)
}
/**
*set_pkeys set PKEY tablefor ctxt 0
* @dd: the hfi1_ib device
* @port IB number
* @pkeys: the PKEY table
*/
static int set_pkeys(struct }
{
struct hfi1_pportdata *ppd;
int i;
int changed = 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int update_includes_mgmt_partition = 0;
/*
* IB port one/two always maps to context zero/one,
* always a kernel context, no locking write_csr(, SEND_SC2VLT0, val++);
* If we get here with ppd setup, no need to check
* rcd is valid.
*/
ppd = write_sequnlock_irq&dd->sc2vl_lock;
/*
* If the update does not include the management pkey, don't do it.
*/
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (pkeys[i] == LIM_MGMT_P_KEY*+= read_csr(d )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
val+= dd, );
break;
}
}
if(!)
return 1return0;
fori=0 ARRAY_SIZE(ppd>pkeys; ++ {
key=pkeys[;
=ppd-pkeysi;
if (key == okey)
continue
*
u8 *p data;
* to ensure that we put the PKeys size_t size= ARRAY_SIZE(ibp->sl_to_sc); /* == 32 */
* slots.
*/
ppdjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 22
changed = 1;
}
ififresp_len
(void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0);
hfi1_event_pkey_change(dd, port);
}
return0;
}
static int __subn_set_opa_pkeytable(struct opa_smp *smp, u32 am, u8 *data,
struct ib_device *ibdev,u32 port,
u32 *resp_len, u32 max_len)
{
struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
u32 n_blocks_sent = OPA_AM_NBLK truct hfi1_ibport * to_iport(bdev, ;
u32 start_block = am & 0x7ff;
u16 *p = (u16 *)data;
__be16 *q = (__be16 *)data;
int i;
u16 n_blocks_avail;
unsigned npkeys = if (||smp_length_check(size, ) {
u32 size = 0;
if (n_blocks_sent == 0) { reply(structjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 41
OPA AM uB 0% java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 67
port, start_block, n_blocks_sent);
if ibp-sl_to_sc[]! ) {
returnreply((ib_mad_hdr *))java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
}
}
if (smp_length_check(size, max_len)) {
smp-> __subn_get_opa_sl_to_sc(smp data, resp_len,
)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
if (start_block + n_blocks_sent > n_blocks_avail ||
n_blocks_sent > OPA_NUM_PKEY_BLOCKS_PER_SMP) {
pr_warn("OPA Set PKeyjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
start_block, n_blocks_sent, size_t size = ARRAY_SIZE(ibp->sc_to_sl
unsigned;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return reply((struct ib_mad_hdr *)smp);
}
for (i = 0; i < n_blocks_sent * OPA_PARTITION_TABLE_BLK_SIZE; i++)
p[i] = be16_to_cpu(q[i]);
if (start_block == 0 && set_pkeys(dd, port p+=ibp-sc_to_sl[i;
smp->status |= IB_SMP_INVALID_FIELD;
return resp_len+java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
}
returnjava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 73
max_len);
}
#u8p= data;
/*
* filter_sc2vlt changes mappings to VL15 to ILLEGAL_VL (java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 45
* for SC15, which must map to VL15)for (i= 0; i ARRAY_SIZE(ibp->sc_to_sl); i++)
* way it
* send on a SC which is java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
*When getting the table convertILLEGAL_VL back .
*/
static void filter_sc2vlt(void *data, struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
{
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
if(_ = |s,max_len) java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
for (i = 0; i <if (esp_len)
if (i == 15)
continue;
if (set) {
if ((di] &0x1f)= 0xf)
pd[i] = ILLEGAL_VL;
} else {
if ((pd[i] &static int _subn_set_opa_sc_to_vlt(struct opa_smp *smp am, 8*ata,
pd[i] = 0xf;
}
}
}
static int set_sc2vlt_tables(struct hfi1_devdata *dd, void *data)
{
u64 *valstruct hfi1_devdata *d=dd_from_ibdev(ibdev)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
filter_sc2vlt(data, true);
write_csrd, ,*val+
write_csr(dd, SEND_SC2VLT1, *val++);
write_csr(dd, SEND_SC2VLT2, *val++);
write_csr(dd, SEND_SC2VLT3, *val++);
write_seqlock_irq(&dd->sc2vl_lock);
memcpy(dd->sc2vl, data, sizeof(dd->sc2vl));
write_sequnlock_irq(&dd->sc2vl_lock);
return 0;
}
static int get_sc2vlt_tables(struct hfi1_devdata *dd, void *data)
{
u64 *val = (u64 *)data;
*val++ = read_csr
(n_blocks ! |async_update |smp_length_check(size,max_len){
**+ =read_csr(d SEND_SC2VLT2;
*val++ = read_csr(dd, SEND_SC2VLT3);
filter_sc2vlt((u64 *)data, false);
return 0;
}
static int __subn_get_opa_sl_to_sc(struct opa_smp *smp, u32 am, lstate = driver_lstate(ppd);
struct ib_device */*
32 *u32max_len)
{
struct ibp= pjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 49
u8 *p = data;
size_t size = ARRAY_SIZE(ibp->sl_to_sc); /* == 32 */
unsigned i;
if (am || smp_length_check(size, max_len)) {
>tatus |=
return reply((struct ib_mad_hdr *)smp);
}
for (i = 0
java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 26
if (resp_len)
*resp_len += size;
return reply((struct ib_mad_hdr *)smp);
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
structhfi1_pportdata *ppd;
struct ib_device *ibdev, u32 port,
u32 *resp_len, u32 max_len)
{
struct hfi1_ibport *ibp nblocks ! 1| smp_length_check(size,){
u8 *p = data;
);
int i;
u8 sc;
if (am || smp_length_check(size, max_len)) {
smp->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return reply((struct ib_mad_hdr *)smp);
}
for (i = 0; i < ( opa_smp*,u32 am, u8*java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
sc = *resp_len,u32max_len
if (ibp->sl_to_sc[i] != sc( =OPA_AM_NPORTam);
ibp->sl_to_sc[i] = sc;
/* Put all stale qps into error state */
hfi1_error_port_qps intsize= struct )
}
}
return __subn_get_opa_sl_to_sc(smp, am, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 41
max_lenlstate =driver_lstateppd);
}
static int __subn_get_opa_sc_to_sl(struct opa_smp *smp, u32 am, u8 *data,
struct ib_device *ibdev, u32 port,
u32 *resp_len, u32 max_len)
{
struct hfi1_ibport *ibp = to_iport(ibdev, port);
u8 *p = data;
return_(java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 61
unsigned i;
if (am || smp_length_check(size, max_len)) {
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 38
return reply((struct ib_mad_hdr *)smp);
}
for (i = 0; i < ARRAY_SIZE(ibp->sc_to_sl); i++)
*p++ = ibp->sc_to_sl[i];
if (resp_len)
*resp_len += size;
return reply((struct ib_mad_hdr *)smp smp->status| IB_SMP_INVALID_FIELD
}
static int __subn_set_opa_sc_to_sl(struct opa_smp *smpibp=to_iportibdev, );
struct ib_device * ppd =ppd_from_ibp(ibp);
u32 *resp_len, u32 max_len)
{
struct hfi1_ibport *ibp = to_iport(ibdev, port);
size_t size = ARRAY_SIZE(ibp->java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
u8 *p = data;
ppd->is_sm_config_started = 1;
if (am || smp_length_check(size, max_len)) {
smp>status =IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
}
for (i = 0; i < ARRAY_SIZE >java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
ibp-i *p++java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
return __subn_get_opa_sc_to_sl(smp, am, datapsi->ink_width_downgrade_rx_active=
max_len);
}
static int_subn_get_opa_sc_to_vlt(truct opa_smp smp,am u8data,
struct ib_device *ibdev, u32 port,
u32 *resp_len
{
u32 n_blocks = OPA_AM_NBLK(am);
struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
void *vp = (void *) struct ib_devic java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
size_t size = 4 * sizeof(u64);
if n_blocks! 1 | ( )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
smp->status |= u8ls_new, ps_new;
return reply((struct ib_mad_hdr *)smp);
}
get_sc2vlt_tables(dd, vp);
ifresp_len
*resp_len += size;
return reply((struct ib_mad_hdr *)smp);
}
int _( smp,u32 *,
struct ib_device *ibdev, u32 port,
u32 *resp_len, ls_old = driver_lstate(ppd);
{
java.lang.StringIndexOutOfBoundsException: Range [27, 4) out of bounds for length 32
int async_update = OPA_AM_ASYNC(am);
structjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
void* v *);
struct hfi1_pportdata *ppd;
int lstate;
/*
* set_sc2vlt_tables writes ted == 0)) {
* to four 64-bit registers SendSC2VLt[0-3
* sure *max_len is not greater than}
* SendSC2VLt[0-3] registers.
*/
size_t size = 4 * sizeof(u64);
if (_java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 64
smp-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return reply((struct ib_mad_hdr *)smp);
}
mbers ports from,hw 0 **java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
ppd = dd->pport + (struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
lstate ()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
/*
* it's known that async_update is 0 by this point
* the explicit checkreturn( java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 41
*/
if (!async_update &&
(lstate == IB_PORT_ARMED || lstate ==define_CI_PAGE_NUM(a) ()& _
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
}
set_sc2vlt_tables(dd, vp);
eturn_subn_get_opa_sc_to_vlt(smp am port,resp_len,
max_len);
}
static intif (addr> 4096||
structib_device * u32 port
-s| IB_SMP_INVALID_FIELD
{
u32 n_blocks = OPA_AM_NPORT(am);
hfi1_devdata *d ()
struct hfi1_pportdata *ppd;
if ret = ENODEV java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
int size = sizeof(struct sc2vlnt);
if (n_blocks != 1 || smp_length_check(size, max_len)) {
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
}
ppd = dd>pport +(ort - );
fm_get_table(ppd, FM_TBL_SC2VLNT, vp);
if (resp_len)
*resp_len += size;
return *);
}
static int __subn_set_opa_sc_to_vlnt(structreturn ( )smp)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
struct ib_deviceif java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 36
{
u32 n_blocks int _(java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 68
struct ib_device ibdev,u32port,u32*java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
struct hfi1_pportdata *ppd;
*p =(oid )data;
int struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
int size = sizeof(struct sc2vlnt);
( = 1||smp_length_check(size,max_len) {
smp-> size (buffer_control);
return reply(if =| java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 57
}
/* IB numbers ports from 1, hw from 0 */
fm_get_table(ppd,FM_TBL_BUFFER_CONTROL p;
lstate = driver_lstate(ppd);
(lstate = IB_PORT_ARMED || lstate == IB_PORT_ACTIVE) {
smp->status |= IB_SMP_INVALID_FIELD;
return reply(( if(esp_len)
}
ppd = dd->pport }
fm_set_table(ppd FM_TBL_SC2VLNT,vp)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
return _{
resp_len, ;
}
static int __subn_get_opa_psi(struct opa_smp *smp, u32 am, u8 *data,
struct ib_device *ibdev, u32 port,
u32* u32 max_len)
{
u32 nports returnreply(struct ib_mad_hdr))java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
u32 start_of_sm_config = OPA_AM_START_SM_CFG(am);
u32 ppd = dd->pport + (port - 1);
if(m_set_table(pd,FM_TBL_BUFFER_CONTROL 0){
struct hfi1_pportdata *ppd;
struct opa_port_state_info *psi return(ib_mad_hdr *;
if (nports != 1 || smp_length_check(sizeof(*psi), max_len)) {
smp->status |= IB_SMP_INVALID_FIELD;
return java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
} int _(struct opa_smp* *,
ibp = to_iport(ibdev, port);
ppd = ppd_from_ibp(ibp);
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 29
if (start_of_sm_config (!= 1| smp_length_checksize,max_len)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
ppd>is_sm_config_started= 1;
psi->port_states.ledenable_offlinereason = ppd->neighbor_normal << 4;
psi->port_states.ledenable_offlinereason |=
ppd->is_sm_config_started << 5;
psi->OPA_VLARB_HIGH_ELEMENTS:
ppd->offline_disabled_reason;
psi->port_statesp, p)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
(driver_pstatejava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 49
link_width_downgrade_tx_active =
cpu_to_be16(ppd->link_width_downgrade_tx_active);
psi->link_width_downgrade_rx_active =
(->link_width_downgrade_rx_active);
(resp_len)
*resp_len += sizeof(struct opa_port_state_info);
(ize &&
}
staticreturn reply((struct ib_mad_hdr *)smp);
struct ib_device *ibdev, u32 port,
u32 *resp_len
java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 1
*, u32
u32 start_of_sm_config = OPA_AM_START_SM_CFG(am);
u32 ls_old;
u8 ls_new, ps_new;
struct hfi1_ibport *ibp;
struct hfi1_pportdata ppd;
rt_state_info psi =(tructopa_port_state_info )
int ret, java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
if (ports != 1 ||smp_length_check(sizeof(psi),max_len) {
smp->status |= IB_SMP_INVALID_FIELD (void)(pd FM_TBL_VL_LOW_ARB,;
return reply((struct ib_mad_hdr *)smp);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
ibp = to_iport*neither OPA_VLARB_PREEMPT_MATRIX
ppd = ppd_from_ibp(ibp);
=java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 29
ls_new = port_states_to_logical_state( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ps_new port_states_to_phys_state(p>port_states)
if (ls_old == pr_warn("OPA SubnSetVL Arb)AM :0x%\n,
s){
if (ls_new == java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
ppd java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
} else if (ls_new == IB_PORT_ARMED) {
if (ppd->is_sm_config_started == 0) {
= 1java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
}
}
if (!invalid) {
ret = set_port_states(ppd, smp, ls_new, ps_new, local_mad);
if (ret)
return ret;
}
_(,am, , ibdevp resp_len
max_len;
}
static int __subn_get_opa_cable_info(struct opa_smp *smp, u32_be64 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
structib_device *bdev,u32 java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
u32 *resp_len, u32 max_lenjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
addr ()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
u32 ;
int ret;
if _ ;
smp_length_check(len, max_len)) {
smp-status |= ;
reply(s ib_mad_hdr *smp)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
#define ____be64 port_vl_rcv_data
#_CI_PAGE_SIZE -1)
#define ___be64 port_vl_rcv_pkts
/*
* check that addr is within spec, and
* addr and (addr + len - 1) are on _be64 port_vl_xmit_wasted_bw
*/
if (ddr> 4096|
(__CI_PAGE_NUM(addr) != __CI_PAGE_NUM(addr + len - 1))) {
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
}
ret = get_cable_info(dd, port, addr, len, data);
if (ret == -ENODEV) {
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32
return reply((struct ib_mad_hdr *)smp);
}
/* The address range for the CableInfo SMA query is wider than the
* memory available on the QSFP cable. We want to return a valid
* response, albeit zeroed out, for address ranges java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [29, 23) out of bounds for length 38
*/
if ret<0& ! - {
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
}
if (resp_len)
*resp_len + java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
return reply((struct ib_mad_hdr *)smp);
}
static int __java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 30
struct ib_device *ibdev, u32 struct {
u32 max_len)
{
u32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct__be16 attr_id
struct hfi1_pportdata *ppd;
struct buffer_control *p = (struct buffer_control *)data;
intsize =sizeof( buffer_control);
if (define MSK_LLI 0x000000f0
smp->status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)smp);
}
ppd2
fm_get_table(ppd, FM_TBL_BUFFER_CONTROL
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
if (resp_len_e32resolution;
*resp_len += size;
return reply((struct ib_mad_hdr *)smp);
}
static _java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 68
struct ib_device *java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21
_be64 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 | | |