node-drivers/base-driver/drivers/vca/plx87xx/plx_main.c
static bool plx_check_node_link_state(struct plx_device *xdev)
{
	uint reg_val = plx_mmio_read(&xdev->mmio, xdev->reg_base + PLX_LINK_STATUS_AND_CONTROL_REGISTER);
	dev_dbg(&xdev->pdev->dev, "Status reg=0x%0x\n", reg_val);

	if (!(reg_val & PLX_LINK_WIDTH_BITMASK)) {
		dev_dbg(&xdev->pdev->dev, "Link down\n");
		return false;
	}

	if ((reg_val & PLX_LINK_GEN_BITMASK) != 
	    (PLX_LINK_GEN3_VALUE << PLX_LINK_GEN_OFFSET) ) {
		dev_dbg(&xdev->pdev->dev, "Link degragaded\n");
		return false;
	}

	dev_dbg(&xdev->pdev->dev, "Link up\n");
	return true;
}
/**
 * plx_check_node_link_state - check if PCIe link to node is in expected state
 * (established Gen 3);
 * @xdev: plx device structure
 * return: true if link established, otherwise return false
 */
check if PCIe link to node is in expected state
(established Gen 3);
@xdev: plx device structure
return: true if link established, otherwise return false
check if PCIe link to node is in expected state ( established Gen 3 ) ; @xdev : plx device structure return : true if link established otherwise return false
static bool plx_check_node_link_state(struct plx_device *xdev)
{
	uint reg_val = plx_mmio_read(&xdev->mmio, xdev->reg_base + PLX_LINK_STATUS_AND_CONTROL_REGISTER);
	dev_dbg(&xdev->pdev->dev, "Status reg=0x%0x\n", reg_val);
	if (!(reg_val & PLX_LINK_WIDTH_BITMASK)) {
		dev_dbg(&xdev->pdev->dev, "Link down\n");
		return false;
	}
	if ((reg_val & PLX_LINK_GEN_BITMASK) != 
	    (PLX_LINK_GEN3_VALUE << PLX_LINK_GEN_OFFSET) ) {
		dev_dbg(&xdev->pdev->dev, "Link degragaded\n");
		return false;
	}
	dev_dbg(&xdev->pdev->dev, "Link up\n");
	return true;
}
static bool plx_check_node_link_state ( struct plx_device * xdev ) { uint reg_val = plx_mmio_read ( & xdev -> mmio , xdev -> reg_base + PLX_LINK_STATUS_AND_CONTROL_REGISTER ) ; dev_dbg ( & xdev -> pdev -> dev , " \n " , reg_val ) ; if ( ! ( reg_val & PLX_LINK_WIDTH_BITMASK ) ) { dev_dbg ( & xdev -> pdev -> dev , " \n " ) ; return false ; } if ( ( reg_val & PLX_LINK_GEN_BITMASK ) != ( PLX_LINK_GEN3_VALUE << PLX_LINK_GEN_OFFSET ) ) { dev_dbg ( & xdev -> pdev -> dev , " \n " ) ; return false ; } dev_dbg ( & xdev -> pdev -> dev , " \n " ) ; return true ; }
plx_check_node_link_state - check if PCIe link to node is in expected state
 (established Gen 3);
 @xdev: plx device structure
 return: true if link established, otherwise return false
plx_check_node_link_state - check if PCIe link to node is in expected state ( established Gen 3 ) ; @xdev : plx device structure return : true if link established otherwise return false