pr_debug("yukon phy intr istat=%x phy_stat=%x\n", istatus, phystat); 
 if (netif_msg_intr(skge)) printk(KERN_DEBUG PFX "%s: phy interrupt status 0x%x 0x%x\n", skge->netdev->name, istatus, phystat); 
static void yukon_phy_intr(struct skge_port *skge){	struct skge_hw *hw = skge->hw;	int port = skge->port;	const char *reason = NULL;	u16 istatus, phystat;	istatus = gm_phy_read(hw, port, PHY_MARV_INT_STAT);	phystat = gm_phy_read(hw, port, PHY_MARV_PHY_STAT);	pr_debug("yukon phy intr istat=%x phy_stat=%x\n", istatus, phystat);	if (istatus & PHY_M_IS_AN_COMPL) {		if (gm_phy_read(hw, port, PHY_MARV_AUNE_LP)		    & PHY_M_AN_RF) {			reason = "remote fault";			goto failed;		}		if (gm_phy_read(hw, port, PHY_MARV_1000T_STAT) & PHY_B_1000S_MSF) {			reason = "master/slave fault";			goto failed;		}		if (!(phystat & PHY_M_PS_SPDUP_RES)) {			reason = "speed/duplex";			goto failed;		}		skge->duplex = (phystat & PHY_M_PS_FULL_DUP)			? DUPLEX_FULL : DUPLEX_HALF;		skge->speed = yukon_speed(hw, phystat);		/* We are using IEEE 802.3z/D5.0 Table 37-4 */		switch (phystat & PHY_M_PS_PAUSE_MSK) {		case PHY_M_PS_PAUSE_MSK:			skge->flow_control = FLOW_MODE_SYMMETRIC;			break;		case PHY_M_PS_RX_P_EN:			skge->flow_control = FLOW_MODE_REM_SEND;			break;		case PHY_M_PS_TX_P_EN:			skge->flow_control = FLOW_MODE_LOC_SEND;			break;		default:			skge->flow_control = FLOW_MODE_NONE;		}		if (skge->flow_control == FLOW_MODE_NONE ||		    (skge->speed < SPEED_1000 && skge->duplex == DUPLEX_HALF))			skge_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF);		else			skge_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_ON);		yukon_link_up(skge);		return;	}	if (istatus & PHY_M_IS_LSP_CHANGE)		skge->speed = yukon_speed(hw, phystat);	if (istatus & PHY_M_IS_DUP_CHANGE)		skge->duplex = (phystat & PHY_M_PS_FULL_DUP) ? DUPLEX_FULL : DUPLEX_HALF;	if (istatus & PHY_M_IS_LST_CHANGE) {		if (phystat & PHY_M_PS_LINK_UP)			yukon_link_up(skge);		else			yukon_link_down(skge);	}	return; failed:	printk(KERN_ERR PFX "%s: autonegotiation failed (%s)\n",	       skge->netdev->name, reason);	/* XXX restart autonegotiation? */}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/7e676d9136d89d0cdf661de4b9a5f8955af94e03/skge.c/buggy/drivers/net/skge.c