/* * Checks whether the FRU is a Morpheus FPC */ boolean fpc_is_morpheus (fru_t *fru) { u_int16_t i2c_id; if (!

fru || fru->fru_ideeprom.i2c_data.data_valid == 0) { return FALSE; } i2c_id = (fru->fru_ideeprom.i2cj_get_id((i2c_id_t *)&fru->fru_ideeprom)); switch(i2c_id) { case I2C_ID_EX8200_MLC_48XSO: case I2C_ID_EX8200_MLC_12LQO: case I2C_ID_EX8200_MLC_2CF: return TRUE; default: return FALSE; } } /* * Returns the child pic data structure assosciated with the FPC and PIC slot */ fru_t * fpc_get_child_generic (fru_t *fru, fru_type_t type __unused, slot_t slot) { pic_t *pic; if (!fru || (fru->fru_type != FRU_FPC)) { return NULL; } if (slot >= CH_MAX_PICS) { return NULL; } pic = ((fpc_t *)fru)->fpc_pics[slot]; if (!pic || pic->pic_fru_state == CHASSIS_STATE_EMPTY) { return NULL; } return (fru_t *)pic; }

Sign up to vote on this title
UsefulNot useful