Hi, guys I am trying to port E1000 82572EI Intel PCIE card in U-boot. Now the phy can be aoto linked up and I can also receive data, but the package I send can not go out.
I print some register: roy :e1000_transmit tctl = 3003f0fa: roy :e1000_transmit tarc0 = 7800403: roy :e1000_transmit tarc1 = 7000403: roy :e1000_transmit txdctl = 1010000: roy :e1000_transmit tdfh = 1800: roy :e1000_transmit tdft = 1800: roy :e1000_transmit tdfpc = 0: roy :e1000_transmit tx_tail = 0: roy :e1000_transmit: , in 0:txp->lower.data 2a00000b roy :e1000_transmit: , :txd_cmd b000000 roy :e1000_transmit: , :txp->upper.data 0 After the Transmit DD bit change to 1, I got roy :e1000_transmit return tdfh = 1805: roy :e1000_transmit return tdft = 1808: roy :e1000_transmit tdfpc = 1: roy :e1000_transmit: , in txp->upper.data 1000000 I believe the DD bit has been set in status register. The package has been send to transmit FIFO. But the package seems to stay in the FIFO (tdfh != tdft) . why it can not be send out? I paste the correspondig code here: static int e1000_transmit(struct eth_device *nic, volatile void *packet, int length) { struct e1000_hw *hw = nic->priv; struct e1000_tx_desc *txp; int i = 0; int roy_tmp; //dump the register roy_tmp = E1000_READ_REG(hw, TCTL); printf("roy :%s tctl = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TARC0); printf("roy :%s tarc0 = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TARC1); printf("roy :%s tarc1 = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TXDCTL); printf("roy :%s txdctl = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TDFH); printf("roy :%s tdfh = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TDFT); printf("roy :%s tdft = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TDFPC); printf("roy :%s tdfpc = %x: \n", __FUNCTION__, roy_tmp ); printf("roy :%s tx_tail = %x: \n", __FUNCTION__, tx_tail ); txp = tx_base + tx_tail; tx_tail = (tx_tail + 1) % 8; txp->buffer_addr = cpu_to_le64(virt_to_bus(packet)); // txp->lower.data = cpu_to_le32(E1000_TXD_CMD_RPS | E1000_TXD_CMD_EOP | // E1000_TXD_CMD_IFCS | length); hw->txd_cmd |= E1000_TXD_CMD_RS; txp->lower.data = cpu_to_le32(hw->txd_cmd | length); printf("roy :%s: , in %x:txp->lower.data %x\n", __FUNCTION__,i++, txp->lower.data); printf("roy :%s: , :txd_cmd %x\n", __FUNCTION__, hw->txd_cmd); txp->upper.data = 0; E1000_WRITE_REG(hw, TDT, tx_tail); E1000_WRITE_FLUSH(hw); printf("roy :%s: , :txp->upper.data %x\n", __FUNCTION__, txp->upper.data); while (!(le32_to_cpu(txp->upper.data) & E1000_TXD_STAT_DD)) { if (i++ > TOUT_LOOP) { DEBUGOUT("e1000: tx timeout\n"); return 0; } udelay(10); /* give the nic a chance to write to the register */ } mdelay (1000); //dump register roy_tmp = E1000_READ_REG(hw, TDFH); printf("roy :%s return tdfh = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TDFT); printf("roy :%s return tdft = %x: \n", __FUNCTION__, roy_tmp ); roy_tmp = E1000_READ_REG(hw, TDFPC); printf("roy :%s tdfpc = %x: \n", __FUNCTION__, roy_tmp ); printf("roy :%s: , in txp->upper.data %x\n", __FUNCTION__, txp->upper.data); printf("roy :%s: , :return\n", __FUNCTION__); return 1; } Do you guys have any idea? What should I check or set? Thanks. Roy ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel