src/dpdk/drivers/net/cxgbe/base/t4_hw.c
int t4_get_chip_type(struct adapter *adap, int ver)
{
	enum chip_type chip = 0;
	u32 pl_rev = G_REV(t4_read_reg(adap, A_PL_REV));

	/* Retrieve adapter's device ID */
	switch (ver) {
	case CHELSIO_T5:
		chip |= CHELSIO_CHIP_CODE(CHELSIO_T5, pl_rev);
		break;
	case CHELSIO_T6:
		chip |= CHELSIO_CHIP_CODE(CHELSIO_T6, pl_rev);
		break;
	default:
		dev_err(adap, "Device %d is not supported\n",
			adap->params.pci.device_id);
		return -EINVAL;
	}

	return chip;
}
/**
 * t4_get_chip_type - Determine chip type from device ID
 * @adap: the adapter
 * @ver: adapter version
 */
Determine chip type from device ID
@adap: the adapter
@ver: adapter version
Determine chip type from device ID @adap : the adapter @ver : adapter version
int t4_get_chip_type(struct adapter *adap, int ver)
{
	enum chip_type chip = 0;
	u32 pl_rev = G_REV(t4_read_reg(adap, A_PL_REV));
	switch (ver) {
	case CHELSIO_T5:
		chip |= CHELSIO_CHIP_CODE(CHELSIO_T5, pl_rev);
		break;
	case CHELSIO_T6:
		chip |= CHELSIO_CHIP_CODE(CHELSIO_T6, pl_rev);
		break;
	default:
		dev_err(adap, "Device %d is not supported\n",
			adap->params.pci.device_id);
		return -EINVAL;
	}
	return chip;
}
int t4_get_chip_type ( struct adapter * adap , int ver ) { enum chip_type chip = 0 ; u32 pl_rev = G_REV ( t4_read_reg ( adap , A_PL_REV ) ) ; switch ( ver ) { case CHELSIO_T5 : chip |= CHELSIO_CHIP_CODE ( CHELSIO_T5 , pl_rev ) ; break ; case CHELSIO_T6 : chip |= CHELSIO_CHIP_CODE ( CHELSIO_T6 , pl_rev ) ; break ; default : dev_err ( adap , " \n " , adap -> params . pci . device_id ) ; return - EINVAL ; } return chip ; }
t4_get_chip_type - Determine chip type from device ID
 @adap: the adapter
 @ver: adapter version
t4_get_chip_type - Determine chip type from device ID @adap : the adapter @ver : adapter version
/* Retrieve adapter's device ID */