skge               94 drivers/net/ethernet/marvell/skge.c static void skge_phy_reset(struct skge_port *skge);
skge               98 drivers/net/ethernet/marvell/skge.c static void genesis_get_stats(struct skge_port *skge, u64 *data);
skge               99 drivers/net/ethernet/marvell/skge.c static void yukon_get_stats(struct skge_port *skge, u64 *data);
skge              102 drivers/net/ethernet/marvell/skge.c static void genesis_link_up(struct skge_port *skge);
skge              136 drivers/net/ethernet/marvell/skge.c 	const struct skge_port *skge = netdev_priv(dev);
skge              137 drivers/net/ethernet/marvell/skge.c 	const void __iomem *io = skge->hw->regs;
skge              161 drivers/net/ethernet/marvell/skge.c static void skge_wol_init(struct skge_port *skge)
skge              163 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge              164 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge              213 drivers/net/ethernet/marvell/skge.c 		    skge->netdev->dev_addr, ETH_ALEN);
skge              218 drivers/net/ethernet/marvell/skge.c 	if (skge->wol & WAKE_PHY)
skge              223 drivers/net/ethernet/marvell/skge.c 	if (skge->wol & WAKE_MAGIC)
skge              237 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              239 drivers/net/ethernet/marvell/skge.c 	wol->supported = wol_supported(skge->hw);
skge              240 drivers/net/ethernet/marvell/skge.c 	wol->wolopts = skge->wol;
skge              245 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              246 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge              252 drivers/net/ethernet/marvell/skge.c 	skge->wol = wol->wolopts;
skge              254 drivers/net/ethernet/marvell/skge.c 	device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
skge              296 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              297 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge              308 drivers/net/ethernet/marvell/skge.c 	advertising = skge->advertising;
skge              309 drivers/net/ethernet/marvell/skge.c 	cmd->base.autoneg = skge->autoneg;
skge              310 drivers/net/ethernet/marvell/skge.c 	cmd->base.speed = skge->speed;
skge              311 drivers/net/ethernet/marvell/skge.c 	cmd->base.duplex = skge->duplex;
skge              324 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              325 drivers/net/ethernet/marvell/skge.c 	const struct skge_hw *hw = skge->hw;
skge              335 drivers/net/ethernet/marvell/skge.c 		skge->duplex = -1;
skge              336 drivers/net/ethernet/marvell/skge.c 		skge->speed = -1;
skge              374 drivers/net/ethernet/marvell/skge.c 		skge->speed = speed;
skge              375 drivers/net/ethernet/marvell/skge.c 		skge->duplex = cmd->base.duplex;
skge              378 drivers/net/ethernet/marvell/skge.c 	skge->autoneg = cmd->base.autoneg;
skge              379 drivers/net/ethernet/marvell/skge.c 	skge->advertising = advertising;
skge              396 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              400 drivers/net/ethernet/marvell/skge.c 	strlcpy(info->bus_info, pci_name(skge->hw->pdev),
skge              448 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              450 drivers/net/ethernet/marvell/skge.c 	if (is_genesis(skge->hw))
skge              451 drivers/net/ethernet/marvell/skge.c 		genesis_get_stats(skge, data);
skge              453 drivers/net/ethernet/marvell/skge.c 		yukon_get_stats(skge, data);
skge              462 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              465 drivers/net/ethernet/marvell/skge.c 	if (is_genesis(skge->hw))
skge              466 drivers/net/ethernet/marvell/skge.c 		genesis_get_stats(skge, data);
skge              468 drivers/net/ethernet/marvell/skge.c 		yukon_get_stats(skge, data);
skge              497 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              502 drivers/net/ethernet/marvell/skge.c 	p->rx_pending = skge->rx_ring.count;
skge              503 drivers/net/ethernet/marvell/skge.c 	p->tx_pending = skge->tx_ring.count;
skge              509 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              516 drivers/net/ethernet/marvell/skge.c 	skge->rx_ring.count = p->rx_pending;
skge              517 drivers/net/ethernet/marvell/skge.c 	skge->tx_ring.count = p->tx_pending;
skge              531 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(netdev);
skge              532 drivers/net/ethernet/marvell/skge.c 	return skge->msg_enable;
skge              537 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(netdev);
skge              538 drivers/net/ethernet/marvell/skge.c 	skge->msg_enable = value;
skge              543 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              545 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg != AUTONEG_ENABLE || !netif_running(dev))
skge              548 drivers/net/ethernet/marvell/skge.c 	skge_phy_reset(skge);
skge              555 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              557 drivers/net/ethernet/marvell/skge.c 	ecmd->rx_pause = ((skge->flow_control == FLOW_MODE_SYMMETRIC) ||
skge              558 drivers/net/ethernet/marvell/skge.c 			  (skge->flow_control == FLOW_MODE_SYM_OR_REM));
skge              560 drivers/net/ethernet/marvell/skge.c 			  (skge->flow_control == FLOW_MODE_LOC_SEND));
skge              568 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              575 drivers/net/ethernet/marvell/skge.c 		skge->flow_control = ecmd->autoneg ? FLOW_MODE_NONE : FLOW_MODE_SYMMETRIC;
skge              578 drivers/net/ethernet/marvell/skge.c 			skge->flow_control = FLOW_MODE_SYMMETRIC;
skge              580 drivers/net/ethernet/marvell/skge.c 			skge->flow_control = FLOW_MODE_SYM_OR_REM;
skge              582 drivers/net/ethernet/marvell/skge.c 			skge->flow_control = FLOW_MODE_LOC_SEND;
skge              584 drivers/net/ethernet/marvell/skge.c 			skge->flow_control = FLOW_MODE_NONE;
skge              620 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              621 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge              622 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge              644 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              645 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge              646 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge              681 drivers/net/ethernet/marvell/skge.c static void skge_led(struct skge_port *skge, enum led_mode mode)
skge              683 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge              684 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge              744 drivers/net/ethernet/marvell/skge.c 				     (skge->speed == SPEED_100 ?
skge              764 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              771 drivers/net/ethernet/marvell/skge.c 		skge_led(skge, LED_MODE_TST);
skge              775 drivers/net/ethernet/marvell/skge.c 		skge_led(skge, LED_MODE_OFF);
skge              780 drivers/net/ethernet/marvell/skge.c 		skge_led(skge, netif_running(dev) ? LED_MODE_ON : LED_MODE_OFF);
skge              788 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              791 drivers/net/ethernet/marvell/skge.c 	pci_read_config_dword(skge->hw->pdev, PCI_DEV_REG2, &reg2);
skge              823 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              824 drivers/net/ethernet/marvell/skge.c 	struct pci_dev *pdev = skge->hw->pdev;
skge              849 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge              850 drivers/net/ethernet/marvell/skge.c 	struct pci_dev *pdev = skge->hw->pdev;
skge              935 drivers/net/ethernet/marvell/skge.c static int skge_rx_setup(struct skge_port *skge, struct skge_element *e,
skge              941 drivers/net/ethernet/marvell/skge.c 	map = pci_map_single(skge->hw->pdev, skb->data, bufsize,
skge              944 drivers/net/ethernet/marvell/skge.c 	if (pci_dma_mapping_error(skge->hw->pdev, map))
skge              981 drivers/net/ethernet/marvell/skge.c static void skge_rx_clean(struct skge_port *skge)
skge              983 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge              984 drivers/net/ethernet/marvell/skge.c 	struct skge_ring *ring = &skge->rx_ring;
skge             1008 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             1009 drivers/net/ethernet/marvell/skge.c 	struct skge_ring *ring = &skge->rx_ring;
skge             1016 drivers/net/ethernet/marvell/skge.c 		skb = __netdev_alloc_skb(dev, skge->rx_buf_size + NET_IP_ALIGN,
skge             1022 drivers/net/ethernet/marvell/skge.c 		if (skge_rx_setup(skge, e, skb, skge->rx_buf_size) < 0) {
skge             1049 drivers/net/ethernet/marvell/skge.c static void skge_link_up(struct skge_port *skge)
skge             1051 drivers/net/ethernet/marvell/skge.c 	skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG),
skge             1054 drivers/net/ethernet/marvell/skge.c 	netif_carrier_on(skge->netdev);
skge             1055 drivers/net/ethernet/marvell/skge.c 	netif_wake_queue(skge->netdev);
skge             1057 drivers/net/ethernet/marvell/skge.c 	netif_info(skge, link, skge->netdev,
skge             1059 drivers/net/ethernet/marvell/skge.c 		   skge->speed,
skge             1060 drivers/net/ethernet/marvell/skge.c 		   skge->duplex == DUPLEX_FULL ? "full" : "half",
skge             1061 drivers/net/ethernet/marvell/skge.c 		   skge_pause(skge->flow_status));
skge             1064 drivers/net/ethernet/marvell/skge.c static void skge_link_down(struct skge_port *skge)
skge             1066 drivers/net/ethernet/marvell/skge.c 	skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG), LED_REG_OFF);
skge             1067 drivers/net/ethernet/marvell/skge.c 	netif_carrier_off(skge->netdev);
skge             1068 drivers/net/ethernet/marvell/skge.c 	netif_stop_queue(skge->netdev);
skge             1070 drivers/net/ethernet/marvell/skge.c 	netif_info(skge, link, skge->netdev, "Link is down\n");
skge             1076 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             1081 drivers/net/ethernet/marvell/skge.c 		skge_link_down(skge);
skge             1212 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             1224 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_ENABLE) {
skge             1241 drivers/net/ethernet/marvell/skge.c 			skge->duplex = DUPLEX_FULL;
skge             1244 drivers/net/ethernet/marvell/skge.c 			skge->duplex = DUPLEX_HALF;
skge             1254 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_SYMMETRIC;
skge             1257 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_REM_SEND;
skge             1260 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_LOC_SEND;
skge             1263 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_NONE;
skge             1265 drivers/net/ethernet/marvell/skge.c 		skge->speed = SPEED_1000;
skge             1269 drivers/net/ethernet/marvell/skge.c 		genesis_link_up(skge);
skge             1275 drivers/net/ethernet/marvell/skge.c static void bcom_phy_init(struct skge_port *skge)
skge             1277 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1278 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1340 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_ENABLE) {
skge             1347 drivers/net/ethernet/marvell/skge.c 		if (skge->advertising & ADVERTISED_1000baseT_Half)
skge             1349 drivers/net/ethernet/marvell/skge.c 		if (skge->advertising & ADVERTISED_1000baseT_Full)
skge             1355 drivers/net/ethernet/marvell/skge.c 		if (skge->duplex == DUPLEX_FULL)
skge             1363 drivers/net/ethernet/marvell/skge.c 		     phy_pause_map[skge->flow_control] | PHY_AN_CSMA);
skge             1381 drivers/net/ethernet/marvell/skge.c static void xm_phy_init(struct skge_port *skge)
skge             1383 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1384 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1387 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_ENABLE) {
skge             1388 drivers/net/ethernet/marvell/skge.c 		if (skge->advertising & ADVERTISED_1000baseT_Half)
skge             1390 drivers/net/ethernet/marvell/skge.c 		if (skge->advertising & ADVERTISED_1000baseT_Full)
skge             1393 drivers/net/ethernet/marvell/skge.c 		ctrl |= fiber_pause_map[skge->flow_control];
skge             1401 drivers/net/ethernet/marvell/skge.c 		if (skge->duplex == DUPLEX_FULL)
skge             1412 drivers/net/ethernet/marvell/skge.c 	mod_timer(&skge->link_timer, jiffies + LINK_HZ);
skge             1417 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             1418 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1419 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1431 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_ENABLE) {
skge             1448 drivers/net/ethernet/marvell/skge.c 			skge->duplex = DUPLEX_FULL;
skge             1451 drivers/net/ethernet/marvell/skge.c 			skge->duplex = DUPLEX_HALF;
skge             1459 drivers/net/ethernet/marvell/skge.c 		if ((skge->flow_control == FLOW_MODE_SYMMETRIC ||
skge             1460 drivers/net/ethernet/marvell/skge.c 		     skge->flow_control == FLOW_MODE_SYM_OR_REM) &&
skge             1462 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_SYMMETRIC;
skge             1463 drivers/net/ethernet/marvell/skge.c 		else if (skge->flow_control == FLOW_MODE_SYM_OR_REM &&
skge             1466 drivers/net/ethernet/marvell/skge.c 			skge->flow_status  = FLOW_STAT_REM_SEND;
skge             1467 drivers/net/ethernet/marvell/skge.c 		else if (skge->flow_control == FLOW_MODE_LOC_SEND &&
skge             1470 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_LOC_SEND;
skge             1472 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_NONE;
skge             1474 drivers/net/ethernet/marvell/skge.c 		skge->speed = SPEED_1000;
skge             1478 drivers/net/ethernet/marvell/skge.c 		genesis_link_up(skge);
skge             1490 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = from_timer(skge, t, link_timer);
skge             1491 drivers/net/ethernet/marvell/skge.c 	struct net_device *dev = skge->netdev;
skge             1492 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1493 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1519 drivers/net/ethernet/marvell/skge.c 		mod_timer(&skge->link_timer,
skge             1528 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             1570 drivers/net/ethernet/marvell/skge.c 		xm_phy_init(skge);
skge             1573 drivers/net/ethernet/marvell/skge.c 		bcom_phy_init(skge);
skge             1599 drivers/net/ethernet/marvell/skge.c 	if (skge->duplex == DUPLEX_HALF) {
skge             1683 drivers/net/ethernet/marvell/skge.c static void genesis_stop(struct skge_port *skge)
skge             1685 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1686 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1731 drivers/net/ethernet/marvell/skge.c static void genesis_get_stats(struct skge_port *skge, u64 *data)
skge             1733 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1734 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1762 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             1765 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, intr, KERN_DEBUG, skge->netdev,
skge             1770 drivers/net/ethernet/marvell/skge.c 		mod_timer(&skge->link_timer, jiffies + 1);
skge             1779 drivers/net/ethernet/marvell/skge.c static void genesis_link_up(struct skge_port *skge)
skge             1781 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1782 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1792 drivers/net/ethernet/marvell/skge.c 	if (skge->flow_status == FLOW_STAT_NONE ||
skge             1793 drivers/net/ethernet/marvell/skge.c 	    skge->flow_status == FLOW_STAT_LOC_SEND)
skge             1803 drivers/net/ethernet/marvell/skge.c 	if (skge->flow_status == FLOW_STAT_SYMMETRIC ||
skge             1804 drivers/net/ethernet/marvell/skge.c 	    skge->flow_status == FLOW_STAT_LOC_SEND) {
skge             1842 drivers/net/ethernet/marvell/skge.c 	if (hw->phy_type != SK_PHY_XMAC && skge->duplex == DUPLEX_FULL)
skge             1859 drivers/net/ethernet/marvell/skge.c 	skge_link_up(skge);
skge             1863 drivers/net/ethernet/marvell/skge.c static inline void bcom_phy_intr(struct skge_port *skge)
skge             1865 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             1866 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             1870 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, intr, KERN_DEBUG, skge->netdev,
skge             1942 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(hw->dev[port]);
skge             1945 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_ENABLE) {
skge             1958 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_DISABLE)
skge             1968 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_ENABLE) {
skge             1970 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_1000baseT_Full)
skge             1972 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_1000baseT_Half)
skge             1974 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_100baseT_Full)
skge             1976 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_100baseT_Half)
skge             1978 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_10baseT_Full)
skge             1980 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_10baseT_Half)
skge             1984 drivers/net/ethernet/marvell/skge.c 			adv |= phy_pause_map[skge->flow_control];
skge             1986 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_1000baseT_Full)
skge             1988 drivers/net/ethernet/marvell/skge.c 			if (skge->advertising & ADVERTISED_1000baseT_Half)
skge             1991 drivers/net/ethernet/marvell/skge.c 			adv |= fiber_pause_map[skge->flow_control];
skge             2000 drivers/net/ethernet/marvell/skge.c 		if (skge->duplex == DUPLEX_FULL)
skge             2003 drivers/net/ethernet/marvell/skge.c 		switch (skge->speed) {
skge             2021 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_ENABLE)
skge             2058 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(hw->dev[port]);
skge             2094 drivers/net/ethernet/marvell/skge.c 	if (skge->autoneg == AUTONEG_DISABLE) {
skge             2099 drivers/net/ethernet/marvell/skge.c 		switch (skge->speed) {
skge             2113 drivers/net/ethernet/marvell/skge.c 		if (skge->duplex == DUPLEX_FULL)
skge             2118 drivers/net/ethernet/marvell/skge.c 	switch (skge->flow_control) {
skge             2225 drivers/net/ethernet/marvell/skge.c static void yukon_stop(struct skge_port *skge)
skge             2227 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2228 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2245 drivers/net/ethernet/marvell/skge.c static void yukon_get_stats(struct skge_port *skge, u64 *data)
skge             2247 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2248 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2264 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2267 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, intr, KERN_DEBUG, skge->netdev,
skge             2294 drivers/net/ethernet/marvell/skge.c static void yukon_link_up(struct skge_port *skge)
skge             2296 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2297 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2304 drivers/net/ethernet/marvell/skge.c 	if (skge->duplex == DUPLEX_FULL || skge->autoneg == AUTONEG_ENABLE)
skge             2312 drivers/net/ethernet/marvell/skge.c 	skge_link_up(skge);
skge             2315 drivers/net/ethernet/marvell/skge.c static void yukon_link_down(struct skge_port *skge)
skge             2317 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2318 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2325 drivers/net/ethernet/marvell/skge.c 	if (skge->flow_status == FLOW_STAT_REM_SEND) {
skge             2332 drivers/net/ethernet/marvell/skge.c 	skge_link_down(skge);
skge             2337 drivers/net/ethernet/marvell/skge.c static void yukon_phy_intr(struct skge_port *skge)
skge             2339 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2340 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2347 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, intr, KERN_DEBUG, skge->netdev,
skge             2367 drivers/net/ethernet/marvell/skge.c 		skge->duplex = (phystat & PHY_M_PS_FULL_DUP)
skge             2369 drivers/net/ethernet/marvell/skge.c 		skge->speed = yukon_speed(hw, phystat);
skge             2374 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_SYMMETRIC;
skge             2377 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_REM_SEND;
skge             2380 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_LOC_SEND;
skge             2383 drivers/net/ethernet/marvell/skge.c 			skge->flow_status = FLOW_STAT_NONE;
skge             2386 drivers/net/ethernet/marvell/skge.c 		if (skge->flow_status == FLOW_STAT_NONE ||
skge             2387 drivers/net/ethernet/marvell/skge.c 		    (skge->speed < SPEED_1000 && skge->duplex == DUPLEX_HALF))
skge             2391 drivers/net/ethernet/marvell/skge.c 		yukon_link_up(skge);
skge             2396 drivers/net/ethernet/marvell/skge.c 		skge->speed = yukon_speed(hw, phystat);
skge             2399 drivers/net/ethernet/marvell/skge.c 		skge->duplex = (phystat & PHY_M_PS_FULL_DUP) ? DUPLEX_FULL : DUPLEX_HALF;
skge             2402 drivers/net/ethernet/marvell/skge.c 			yukon_link_up(skge);
skge             2404 drivers/net/ethernet/marvell/skge.c 			yukon_link_down(skge);
skge             2408 drivers/net/ethernet/marvell/skge.c 	pr_err("%s: autonegotiation failed (%s)\n", skge->netdev->name, reason);
skge             2413 drivers/net/ethernet/marvell/skge.c static void skge_phy_reset(struct skge_port *skge)
skge             2415 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2416 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2419 drivers/net/ethernet/marvell/skge.c 	netif_stop_queue(skge->netdev);
skge             2420 drivers/net/ethernet/marvell/skge.c 	netif_carrier_off(skge->netdev);
skge             2439 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2440 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2456 drivers/net/ethernet/marvell/skge.c 			err = __xm_phy_read(hw, skge->port, data->reg_num & 0x1f, &val);
skge             2458 drivers/net/ethernet/marvell/skge.c 			err = __gm_phy_read(hw, skge->port, data->reg_num & 0x1f, &val);
skge             2467 drivers/net/ethernet/marvell/skge.c 			err = xm_phy_write(hw, skge->port, data->reg_num & 0x1f,
skge             2470 drivers/net/ethernet/marvell/skge.c 			err = gm_phy_write(hw, skge->port, data->reg_num & 0x1f,
skge             2509 drivers/net/ethernet/marvell/skge.c static void skge_qset(struct skge_port *skge, u16 q,
skge             2512 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2514 drivers/net/ethernet/marvell/skge.c 	u64 base = skge->dma + (e->desc - skge->mem);
skge             2528 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2529 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2530 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2538 drivers/net/ethernet/marvell/skge.c 	netif_info(skge, ifup, skge->netdev, "enabling interface\n");
skge             2541 drivers/net/ethernet/marvell/skge.c 		skge->rx_buf_size = dev->mtu + ETH_HLEN;
skge             2543 drivers/net/ethernet/marvell/skge.c 		skge->rx_buf_size = RX_BUF_SIZE;
skge             2546 drivers/net/ethernet/marvell/skge.c 	rx_size = skge->rx_ring.count * sizeof(struct skge_rx_desc);
skge             2547 drivers/net/ethernet/marvell/skge.c 	tx_size = skge->tx_ring.count * sizeof(struct skge_tx_desc);
skge             2548 drivers/net/ethernet/marvell/skge.c 	skge->mem_size = tx_size + rx_size;
skge             2549 drivers/net/ethernet/marvell/skge.c 	skge->mem = pci_alloc_consistent(hw->pdev, skge->mem_size, &skge->dma);
skge             2550 drivers/net/ethernet/marvell/skge.c 	if (!skge->mem)
skge             2553 drivers/net/ethernet/marvell/skge.c 	BUG_ON(skge->dma & 7);
skge             2555 drivers/net/ethernet/marvell/skge.c 	if (upper_32_bits(skge->dma) != upper_32_bits(skge->dma + skge->mem_size)) {
skge             2561 drivers/net/ethernet/marvell/skge.c 	err = skge_ring_alloc(&skge->rx_ring, skge->mem, skge->dma);
skge             2569 drivers/net/ethernet/marvell/skge.c 	err = skge_ring_alloc(&skge->tx_ring, skge->mem + rx_size,
skge             2570 drivers/net/ethernet/marvell/skge.c 			      skge->dma + rx_size);
skge             2598 drivers/net/ethernet/marvell/skge.c 	skge_qset(skge, rxqaddr[port], skge->rx_ring.to_clean);
skge             2600 drivers/net/ethernet/marvell/skge.c 	BUG_ON(skge->tx_ring.to_use != skge->tx_ring.to_clean);
skge             2602 drivers/net/ethernet/marvell/skge.c 	skge_qset(skge, txqaddr[port], skge->tx_ring.to_use);
skge             2607 drivers/net/ethernet/marvell/skge.c 	skge_led(skge, LED_MODE_ON);
skge             2615 drivers/net/ethernet/marvell/skge.c 	napi_enable(&skge->napi);
skge             2622 drivers/net/ethernet/marvell/skge.c 	kfree(skge->tx_ring.start);
skge             2624 drivers/net/ethernet/marvell/skge.c 	skge_rx_clean(skge);
skge             2625 drivers/net/ethernet/marvell/skge.c 	kfree(skge->rx_ring.start);
skge             2627 drivers/net/ethernet/marvell/skge.c 	pci_free_consistent(hw->pdev, skge->mem_size, skge->mem, skge->dma);
skge             2628 drivers/net/ethernet/marvell/skge.c 	skge->mem = NULL;
skge             2644 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2645 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2646 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2648 drivers/net/ethernet/marvell/skge.c 	if (!skge->mem)
skge             2651 drivers/net/ethernet/marvell/skge.c 	netif_info(skge, ifdown, skge->netdev, "disabling interface\n");
skge             2656 drivers/net/ethernet/marvell/skge.c 		del_timer_sync(&skge->link_timer);
skge             2658 drivers/net/ethernet/marvell/skge.c 	napi_disable(&skge->napi);
skge             2670 drivers/net/ethernet/marvell/skge.c 	skge_write8(skge->hw, SK_REG(skge->port, LNK_LED_REG), LED_REG_OFF);
skge             2672 drivers/net/ethernet/marvell/skge.c 		genesis_stop(skge);
skge             2674 drivers/net/ethernet/marvell/skge.c 		yukon_stop(skge);
skge             2707 drivers/net/ethernet/marvell/skge.c 	skge_led(skge, LED_MODE_OFF);
skge             2713 drivers/net/ethernet/marvell/skge.c 	skge_rx_clean(skge);
skge             2715 drivers/net/ethernet/marvell/skge.c 	kfree(skge->rx_ring.start);
skge             2716 drivers/net/ethernet/marvell/skge.c 	kfree(skge->tx_ring.start);
skge             2717 drivers/net/ethernet/marvell/skge.c 	pci_free_consistent(hw->pdev, skge->mem_size, skge->mem, skge->dma);
skge             2718 drivers/net/ethernet/marvell/skge.c 	skge->mem = NULL;
skge             2732 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2733 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2743 drivers/net/ethernet/marvell/skge.c 	if (unlikely(skge_avail(&skge->tx_ring) < skb_shinfo(skb)->nr_frags + 1))
skge             2746 drivers/net/ethernet/marvell/skge.c 	e = skge->tx_ring.to_use;
skge             2814 drivers/net/ethernet/marvell/skge.c 	skge_write8(hw, Q_ADDR(txqaddr[skge->port], Q_CSR), CSR_START);
skge             2816 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, tx_queued, KERN_DEBUG, skge->netdev,
skge             2818 drivers/net/ethernet/marvell/skge.c 		     e - skge->tx_ring.start, skb->len);
skge             2820 drivers/net/ethernet/marvell/skge.c 	skge->tx_ring.to_use = e->next;
skge             2823 drivers/net/ethernet/marvell/skge.c 	if (skge_avail(&skge->tx_ring) <= TX_LOW_WATER) {
skge             2831 drivers/net/ethernet/marvell/skge.c 	e = skge->tx_ring.to_use;
skge             2870 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2873 drivers/net/ethernet/marvell/skge.c 	for (e = skge->tx_ring.to_clean; e != skge->tx_ring.to_use; e = e->next) {
skge             2876 drivers/net/ethernet/marvell/skge.c 		skge_tx_unmap(skge->hw->pdev, e, td->control);
skge             2884 drivers/net/ethernet/marvell/skge.c 	skge->tx_ring.to_clean = e;
skge             2889 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2891 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, timer, KERN_DEBUG, skge->netdev, "tx timeout\n");
skge             2893 drivers/net/ethernet/marvell/skge.c 	skge_write8(skge->hw, Q_ADDR(txqaddr[skge->port], Q_CSR), CSR_STOP);
skge             2931 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2932 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2933 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2950 drivers/net/ethernet/marvell/skge.c 		if (skge->flow_status == FLOW_STAT_REM_SEND ||
skge             2951 drivers/net/ethernet/marvell/skge.c 		    skge->flow_status == FLOW_STAT_SYMMETRIC)
skge             2970 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             2971 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             2972 drivers/net/ethernet/marvell/skge.c 	int port = skge->port;
skge             2974 drivers/net/ethernet/marvell/skge.c 	int rx_pause = (skge->flow_status == FLOW_STAT_REM_SEND ||
skge             2975 drivers/net/ethernet/marvell/skge.c 			skge->flow_status == FLOW_STAT_SYMMETRIC);
skge             3032 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             3034 drivers/net/ethernet/marvell/skge.c 	if (is_genesis(skge->hw))
skge             3049 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             3053 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, rx_status, KERN_DEBUG, skge->netdev,
skge             3055 drivers/net/ethernet/marvell/skge.c 		     e - skge->rx_ring.start, status, len);
skge             3057 drivers/net/ethernet/marvell/skge.c 	if (len > skge->rx_buf_size)
skge             3063 drivers/net/ethernet/marvell/skge.c 	if (bad_phy_status(skge->hw, status))
skge             3066 drivers/net/ethernet/marvell/skge.c 	if (phy_length(skge->hw, status) != len)
skge             3074 drivers/net/ethernet/marvell/skge.c 		pci_dma_sync_single_for_cpu(skge->hw->pdev,
skge             3079 drivers/net/ethernet/marvell/skge.c 		pci_dma_sync_single_for_device(skge->hw->pdev,
skge             3083 drivers/net/ethernet/marvell/skge.c 		skge_rx_reuse(e, skge->rx_buf_size);
skge             3088 drivers/net/ethernet/marvell/skge.c 		nskb = netdev_alloc_skb_ip_align(dev, skge->rx_buf_size);
skge             3097 drivers/net/ethernet/marvell/skge.c 		if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
skge             3102 drivers/net/ethernet/marvell/skge.c 		pci_unmap_single(skge->hw->pdev,
skge             3120 drivers/net/ethernet/marvell/skge.c 	netif_printk(skge, rx_err, KERN_DEBUG, skge->netdev,
skge             3122 drivers/net/ethernet/marvell/skge.c 		     e - skge->rx_ring.start, control, status);
skge             3124 drivers/net/ethernet/marvell/skge.c 	if (is_genesis(skge->hw)) {
skge             3141 drivers/net/ethernet/marvell/skge.c 	skge_rx_reuse(e, skge->rx_buf_size);
skge             3148 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             3149 drivers/net/ethernet/marvell/skge.c 	struct skge_ring *ring = &skge->tx_ring;
skge             3153 drivers/net/ethernet/marvell/skge.c 	skge_write8(skge->hw, Q_ADDR(txqaddr[skge->port], Q_CSR), CSR_IRQ_CL_F);
skge             3161 drivers/net/ethernet/marvell/skge.c 		skge_tx_unmap(skge->hw->pdev, e, control);
skge             3164 drivers/net/ethernet/marvell/skge.c 			netif_printk(skge, tx_done, KERN_DEBUG, skge->netdev,
skge             3166 drivers/net/ethernet/marvell/skge.c 				     e - skge->tx_ring.start);
skge             3175 drivers/net/ethernet/marvell/skge.c 	skge->tx_ring.to_clean = e;
skge             3181 drivers/net/ethernet/marvell/skge.c 		     skge_avail(&skge->tx_ring) > TX_LOW_WATER)) {
skge             3184 drivers/net/ethernet/marvell/skge.c 			     skge_avail(&skge->tx_ring) > TX_LOW_WATER)) {
skge             3194 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = container_of(napi, struct skge_port, napi);
skge             3195 drivers/net/ethernet/marvell/skge.c 	struct net_device *dev = skge->netdev;
skge             3196 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             3197 drivers/net/ethernet/marvell/skge.c 	struct skge_ring *ring = &skge->rx_ring;
skge             3203 drivers/net/ethernet/marvell/skge.c 	skge_write8(hw, Q_ADDR(rxqaddr[skge->port], Q_CSR), CSR_IRQ_CL_F);
skge             3225 drivers/net/ethernet/marvell/skge.c 	skge_write8(hw, Q_ADDR(rxqaddr[skge->port], Q_CSR), CSR_START);
skge             3231 drivers/net/ethernet/marvell/skge.c 		hw->intr_mask |= napimask[skge->port];
skge             3353 drivers/net/ethernet/marvell/skge.c 			struct skge_port *skge = netdev_priv(dev);
skge             3357 drivers/net/ethernet/marvell/skge.c 				yukon_phy_intr(skge);
skge             3359 drivers/net/ethernet/marvell/skge.c 				bcom_phy_intr(skge);
skge             3391 drivers/net/ethernet/marvell/skge.c 		struct skge_port *skge = netdev_priv(hw->dev[0]);
skge             3393 drivers/net/ethernet/marvell/skge.c 		napi_schedule(&skge->napi);
skge             3409 drivers/net/ethernet/marvell/skge.c 		struct skge_port *skge = netdev_priv(hw->dev[1]);
skge             3413 drivers/net/ethernet/marvell/skge.c 			napi_schedule(&skge->napi);
skge             3441 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             3444 drivers/net/ethernet/marvell/skge.c 	skge_intr(dev->irq, skge->hw);
skge             3451 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge = netdev_priv(dev);
skge             3452 drivers/net/ethernet/marvell/skge.c 	struct skge_hw *hw = skge->hw;
skge             3453 drivers/net/ethernet/marvell/skge.c 	unsigned port = skge->port;
skge             3691 drivers/net/ethernet/marvell/skge.c 	const struct skge_port *skge = netdev_priv(dev);
skge             3692 drivers/net/ethernet/marvell/skge.c 	const struct skge_hw *hw = skge->hw;
skge             3701 drivers/net/ethernet/marvell/skge.c 	seq_printf(seq, "Tx Ring: (%d)\n", skge_avail(&skge->tx_ring));
skge             3702 drivers/net/ethernet/marvell/skge.c 	for (e = skge->tx_ring.to_clean; e != skge->tx_ring.to_use; e = e->next) {
skge             3710 drivers/net/ethernet/marvell/skge.c 	for (e = skge->rx_ring.to_clean; ; e = e->next) {
skge             3733 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge;
skge             3738 drivers/net/ethernet/marvell/skge.c 	skge = netdev_priv(dev);
skge             3741 drivers/net/ethernet/marvell/skge.c 		if (skge->debugfs)
skge             3742 drivers/net/ethernet/marvell/skge.c 			skge->debugfs = debugfs_rename(skge_debug,
skge             3743 drivers/net/ethernet/marvell/skge.c 						       skge->debugfs,
skge             3748 drivers/net/ethernet/marvell/skge.c 		debugfs_remove(skge->debugfs);
skge             3749 drivers/net/ethernet/marvell/skge.c 		skge->debugfs = NULL;
skge             3753 drivers/net/ethernet/marvell/skge.c 		skge->debugfs = debugfs_create_file(dev->name, 0444, skge_debug,
skge             3809 drivers/net/ethernet/marvell/skge.c 	struct skge_port *skge;
skge             3810 drivers/net/ethernet/marvell/skge.c 	struct net_device *dev = alloc_etherdev(sizeof(*skge));
skge             3828 drivers/net/ethernet/marvell/skge.c 	skge = netdev_priv(dev);
skge             3829 drivers/net/ethernet/marvell/skge.c 	netif_napi_add(dev, &skge->napi, skge_poll, NAPI_WEIGHT);
skge             3830 drivers/net/ethernet/marvell/skge.c 	skge->netdev = dev;
skge             3831 drivers/net/ethernet/marvell/skge.c 	skge->hw = hw;
skge             3832 drivers/net/ethernet/marvell/skge.c 	skge->msg_enable = netif_msg_init(debug, default_msg);
skge             3834 drivers/net/ethernet/marvell/skge.c 	skge->tx_ring.count = DEFAULT_TX_RING_SIZE;
skge             3835 drivers/net/ethernet/marvell/skge.c 	skge->rx_ring.count = DEFAULT_RX_RING_SIZE;
skge             3838 drivers/net/ethernet/marvell/skge.c 	skge->autoneg = AUTONEG_ENABLE;
skge             3839 drivers/net/ethernet/marvell/skge.c 	skge->flow_control = FLOW_MODE_SYM_OR_REM;
skge             3840 drivers/net/ethernet/marvell/skge.c 	skge->duplex = -1;
skge             3841 drivers/net/ethernet/marvell/skge.c 	skge->speed = -1;
skge             3842 drivers/net/ethernet/marvell/skge.c 	skge->advertising = skge_supported_modes(hw);
skge             3845 drivers/net/ethernet/marvell/skge.c 		skge->wol = wol_supported(hw) & WAKE_MAGIC;
skge             3846 drivers/net/ethernet/marvell/skge.c 		device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
skge             3851 drivers/net/ethernet/marvell/skge.c 	skge->port = port;
skge             3855 drivers/net/ethernet/marvell/skge.c 	    timer_setup(&skge->link_timer, xm_link_timer, 0);
skge             3870 drivers/net/ethernet/marvell/skge.c 	const struct skge_port *skge = netdev_priv(dev);
skge             3872 drivers/net/ethernet/marvell/skge.c 	netif_info(skge, probe, skge->netdev, "addr %pM\n", dev->dev_addr);
skge             4068 drivers/net/ethernet/marvell/skge.c 		struct skge_port *skge = netdev_priv(dev);
skge             4073 drivers/net/ethernet/marvell/skge.c 		if (skge->wol)
skge             4074 drivers/net/ethernet/marvell/skge.c 			skge_wol_init(skge);
skge             4129 drivers/net/ethernet/marvell/skge.c 		struct skge_port *skge = netdev_priv(dev);
skge             4131 drivers/net/ethernet/marvell/skge.c 		if (skge->wol)
skge             4132 drivers/net/ethernet/marvell/skge.c 			skge_wol_init(skge);