src/dpdk/drivers/net/cxgbe/cxgbe_main.c
void t4_os_portmod_changed(const struct adapter *adap, int port_id)
{
	static const char * const mod_str[] = {
		NULL, "LR", "SR", "ER", "passive DA", "active DA", "LRM"
	};

	const struct port_info *pi = adap2pinfo(adap, port_id);

	if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_NONE)
		dev_info(adap, "Port%d: port module unplugged\n", pi->port_id);
	else if (pi->link_cfg.mod_type < ARRAY_SIZE(mod_str))
		dev_info(adap, "Port%d: %s port module inserted\n", pi->port_id,
			 mod_str[pi->link_cfg.mod_type]);
	else if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_NOTSUPPORTED)
		dev_info(adap, "Port%d: unsupported port module inserted\n",
			 pi->port_id);
	else if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_UNKNOWN)
		dev_info(adap, "Port%d: unknown port module inserted\n",
			 pi->port_id);
	else if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_ERROR)
		dev_info(adap, "Port%d: transceiver module error\n",
			 pi->port_id);
	else
		dev_info(adap, "Port%d: unknown module type %d inserted\n",
			 pi->port_id, pi->link_cfg.mod_type);
}
/**
 * t4_os_portmod_changed - handle port module changes
 * @adap: the adapter associated with the module change
 * @port_id: the port index whose module status has changed
 *
 * This is the OS-dependent handler for port module changes.  It is
 * invoked when a port module is removed or inserted for any OS-specific
 * processing.
 */
handle port module changes
@adap: the adapter associated with the module change
@port_id: the port index whose module status has changed

This is the OS-dependent handler for port module changes.  It is
invoked when a port module is removed or inserted for any OS-specific
processing.
handle port module changes @adap : the adapter associated with the module change @port_id : the port index whose module status has changed This is the OS - dependent handler for port module changes . It is invoked when a port module is removed or inserted for any OS - specific processing .
void t4_os_portmod_changed(const struct adapter *adap, int port_id)
{
	static const char * const mod_str[] = {
		NULL, "LR", "SR", "ER", "passive DA", "active DA", "LRM"
	};
	const struct port_info *pi = adap2pinfo(adap, port_id);
	if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_NONE)
		dev_info(adap, "Port%d: port module unplugged\n", pi->port_id);
	else if (pi->link_cfg.mod_type < ARRAY_SIZE(mod_str))
		dev_info(adap, "Port%d: %s port module inserted\n", pi->port_id,
			 mod_str[pi->link_cfg.mod_type]);
	else if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_NOTSUPPORTED)
		dev_info(adap, "Port%d: unsupported port module inserted\n",
			 pi->port_id);
	else if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_UNKNOWN)
		dev_info(adap, "Port%d: unknown port module inserted\n",
			 pi->port_id);
	else if (pi->link_cfg.mod_type == FW_PORT_MOD_TYPE_ERROR)
		dev_info(adap, "Port%d: transceiver module error\n",
			 pi->port_id);
	else
		dev_info(adap, "Port%d: unknown module type %d inserted\n",
			 pi->port_id, pi->link_cfg.mod_type);
}
void t4_os_portmod_changed ( const struct adapter * adap , int port_id ) { static const char * const mod_str [ ] = { NULL , " " , " " , " " , " " , " " , " " } ; const struct port_info * pi = adap2pinfo ( adap , port_id ) ; if ( pi -> link_cfg . mod_type == FW_PORT_MOD_TYPE_NONE ) dev_info ( adap , " \n " , pi -> port_id ) ; else if ( pi -> link_cfg . mod_type < ARRAY_SIZE ( mod_str ) ) dev_info ( adap , " \n " , pi -> port_id , mod_str [ pi -> link_cfg . mod_type ] ) ; else if ( pi -> link_cfg . mod_type == FW_PORT_MOD_TYPE_NOTSUPPORTED ) dev_info ( adap , " \n " , pi -> port_id ) ; else if ( pi -> link_cfg . mod_type == FW_PORT_MOD_TYPE_UNKNOWN ) dev_info ( adap , " \n " , pi -> port_id ) ; else if ( pi -> link_cfg . mod_type == FW_PORT_MOD_TYPE_ERROR ) dev_info ( adap , " \n " , pi -> port_id ) ; else dev_info ( adap , " \n " , pi -> port_id , pi -> link_cfg . mod_type ) ; }
t4_os_portmod_changed - handle port module changes
 @adap: the adapter associated with the module change
 @port_id: the port index whose module status has changed
t4_os_portmod_changed - handle port module changes @adap : the adapter associated with the module change @port_id : the port index whose module status has changed