printk(KERN_INFO "%s: %s at 0x%lx, " "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, " "IRQ %d\n", dev->name, rtl_chip_info[ent->driver_data].name, dev->base_addr, dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5], dev->irq); 
if (netif_msg_probe(tp)) { printk(KERN_INFO "%s: %s at 0x%lx, " "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, " "IRQ %d\n", dev->name, rtl_chip_info[ent->driver_data].name, dev->base_addr, dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5], dev->irq); } 
rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent){	struct net_device *dev = NULL;	struct rtl8169_private *tp;	void __iomem *ioaddr = NULL;	static int board_idx = -1;	static int printed_version = 0;	u8 autoneg, duplex;	u16 speed;	int i, rc;	assert(pdev != NULL);	assert(ent != NULL);	board_idx++;	if (!printed_version) {		printk(KERN_INFO "%s Gigabit Ethernet driver %s loaded\n",		       MODULENAME, RTL8169_VERSION);		printed_version = 1;	}	rc = rtl8169_init_board(pdev, &dev, &ioaddr);	if (rc)		return rc;	tp = netdev_priv(dev);	assert(ioaddr != NULL);	if (RTL_R8(PHYstatus) & TBI_Enable) {		tp->set_speed = rtl8169_set_speed_tbi;		tp->get_settings = rtl8169_gset_tbi;		tp->phy_reset_enable = rtl8169_tbi_reset_enable;		tp->phy_reset_pending = rtl8169_tbi_reset_pending;		tp->link_ok = rtl8169_tbi_link_ok;		tp->phy_1000_ctrl_reg = PHY_Cap_1000_Full; /* Implied by TBI */	} else {		tp->set_speed = rtl8169_set_speed_xmii;		tp->get_settings = rtl8169_gset_xmii;		tp->phy_reset_enable = rtl8169_xmii_reset_enable;		tp->phy_reset_pending = rtl8169_xmii_reset_pending;		tp->link_ok = rtl8169_xmii_link_ok;	}	/* Get MAC address.  FIXME: read EEPROM */	for (i = 0; i < MAC_ADDR_LEN; i++)		dev->dev_addr[i] = RTL_R8(MAC0 + i);	dev->open = rtl8169_open;	dev->hard_start_xmit = rtl8169_start_xmit;	dev->get_stats = rtl8169_get_stats;	SET_ETHTOOL_OPS(dev, &rtl8169_ethtool_ops);	dev->stop = rtl8169_close;	dev->tx_timeout = rtl8169_tx_timeout;	dev->set_multicast_list = rtl8169_set_rx_mode;	dev->watchdog_timeo = RTL8169_TX_TIMEOUT;	dev->irq = pdev->irq;	dev->base_addr = (unsigned long) ioaddr;	dev->change_mtu = rtl8169_change_mtu;#ifdef CONFIG_R8169_NAPI	dev->poll = rtl8169_poll;	dev->weight = R8169_NAPI_WEIGHT;#endif#ifdef CONFIG_R8169_VLAN	dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;	dev->vlan_rx_register = rtl8169_vlan_rx_register;	dev->vlan_rx_kill_vid = rtl8169_vlan_rx_kill_vid;#endif#ifdef CONFIG_NET_POLL_CONTROLLER	dev->poll_controller = rtl8169_netpoll;#endif	tp->intr_mask = 0xffff;	tp->pci_dev = pdev;	tp->mmio_addr = ioaddr;	spin_lock_init(&tp->lock);	rc = register_netdev(dev);	if (rc) {		rtl8169_release_board(pdev, dev, ioaddr);		return rc;	}	printk(KERN_DEBUG "%s: Identified chip type is '%s'.\n", dev->name,	       rtl_chip_info[tp->chipset].name);	pci_set_drvdata(pdev, dev);	printk(KERN_INFO "%s: %s at 0x%lx, "	       "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "	       "IRQ %d\n",	       dev->name,	       rtl_chip_info[ent->driver_data].name,	       dev->base_addr,	       dev->dev_addr[0], dev->dev_addr[1],	       dev->dev_addr[2], dev->dev_addr[3],	       dev->dev_addr[4], dev->dev_addr[5], dev->irq);	rtl8169_hw_phy_config(dev);	dprintk("Set MAC Reg C+CR Offset 0x82h = 0x01h\n");	RTL_W8(0x82, 0x01);	if (tp->mac_version < RTL_GIGA_MAC_VER_E) {		dprintk("Set PCI Latency=0x40\n");		pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x40);	}	if (tp->mac_version == RTL_GIGA_MAC_VER_D) {		dprintk("Set MAC Reg C+CR Offset 0x82h = 0x01h\n");		RTL_W8(0x82, 0x01);		dprintk("Set PHY Reg 0x0bh = 0x00h\n");		mdio_write(ioaddr, 0x0b, 0x0000); //w 0x0b 15 0 0	}	rtl8169_link_option(board_idx, &autoneg, &speed, &duplex);	rtl8169_set_speed(dev, autoneg, speed, duplex);		if (RTL_R8(PHYstatus) & TBI_Enable)		printk(KERN_INFO PFX "%s: TBI auto-negotiating\n", dev->name);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b57b7e5a11c4e45565cf34d786d74ad35483fe83/r8169.c/clean/drivers/net/r8169.c