sky2 version 1.15 (88e8071) support
Subsystems (2)
cover sky2 version 1.15 (88e8071) support
These changes are to enable the Yukon Extreme (88e8071) chipset. This chip is similar to earlier chip but has a different set of offloading operations and some other minor quirks.
Marvell has given me some evaluation boards with the 88e8071 chip set. The chip is available now, but haven't seen a systems with the hardware yet. The support fot this is exprerimental at this point, but haven't encountered any new problems.
Signature · 1 line
Stephen Hemminger <[email protected]>
PATCH 1/7 sky2: avoid reserved regions on ethtool reg dump
On Yukon EX reading some of the undocumented places in the memory space will cause a hang. Since they don't provide useful information, just skip the reserved areas.
--- drivers/net/sky2.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/net/sky2.c +9 -5
@@ -3330,7 +3330,7 @@ static int sky2_get_regs_len(struct net_/* * Returns copy of control register region -* Note: access to the RAM address register set will cause timeouts. +* Note: ethtool_get_regs always provides full size (16k) buffer */ static void sky2_get_regs (struct net_device *dev,struct ethtool_regs *regs,void *p)
@@ -3338,15 +3338,19 @@ static void sky2_get_regs(struct net_devconst struct sky2_port *sky2 =netdev_priv (dev);const void __iomem *io = sky2->hw->regs; -BUG_ON (regs->len <B3_RI_WTO_R1 ); regs->version =1 ;memset (p,0 , regs->len);memcpy_fromio (p, io,B3_RAM_ADDR ); -memcpy_fromio (p +B3_RI_WTO_R1 , - io +B3_RI_WTO_R1 , - regs->len -B3_RI_WTO_R1 ); +/* skip diagnostic ram region */ +memcpy_fromio (p +B3_RI_WTO_R1 , io +B3_RI_WTO_R1 ,0x2000 -B3_RI_WTO_R1 ); + +/* copy GMAC registers */ +memcpy_fromio (p +BASE_GMAC_1 , io +BASE_GMAC_1 ,0x1000 ); +if (sky2->hw->ports >1 ) +memcpy_fromio (p +BASE_GMAC_2 , io +BASE_GMAC_2 ,0x1000 ); + }/* In order to do Jumbo packets on these chips, need to turn off the
Signature · 1 line
Stephen Hemminger <[email protected]>
Re: [PATCH 1/7] sky2: avoid reserved regions on ethtool reg dump
Quoted 9 lines · Stephen Hemminger
On Yukon EX reading some of the undocumented places in the memory space will cause a hang. Since they don't provide useful information, just skip the reserved areas.
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/sky2.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
applied 1-7 to #upstream (2.6.23)
PATCH 2/7 sky2: Add PCI device specfic register 4 & 5
In reply to Stephen HemmingerNeed to setup more PCI control control registers are on Yukon EX. Some of these also exist on Yukon EC-U as well.
--- drivers/net/sky2.c | 18 ++++++++---- drivers/net/sky2.h | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 6 deletions(-)
drivers/net/sky2.c +12 -6
@@ -217,13 +217,19 @@ static void sky2_power_on(struct sky2_hwsky2_write8 (hw,B2_Y2_CLK_GATE ,0 );if (hw->chip_id ==CHIP_ID_YUKON_EC_U || hw->chip_id ==CHIP_ID_YUKON_EX ) { -u32 reg1; +u32 reg; -sky2_pci_write32 (hw,PCI_DEV_REG3 ,0 ); - reg1 =sky2_pci_read32 (hw,PCI_DEV_REG4 ); - reg1 &=P_ASPM_CONTROL_MSK ; -sky2_pci_write32 (hw,PCI_DEV_REG4 , reg1); -sky2_pci_write32 (hw,PCI_DEV_REG5 ,0 ); + reg =sky2_pci_read32 (hw,PCI_DEV_REG4 ); +/* set all bits to 0 except bits 15..12 and 8 */ + reg &=P_ASPM_CONTROL_MSK ; +sky2_pci_write32 (hw,PCI_DEV_REG4 , reg); + + reg =sky2_pci_read32 (hw,PCI_DEV_REG5 ); +/* set all bits to 0 except bits 28 & 27 */ + reg &=P_CTL_TIM_VMAIN_AV_MSK ; +sky2_pci_write32 (hw,PCI_DEV_REG5 , reg); + +sky2_pci_write32 (hw,PCI_CFG_REG_1 ,0 ); } }
drivers/net/sky2.h +77 -0
95 lines not on this page · raw message
Signature · 1 line
Stephen Hemminger <[email protected]>
PATCH 3/7 sky2: rename BMU register
In reply to Stephen HemmingerThis register is more of a test and control register on Yukon2. So rename it to Q_TEST and give some bit definitions.
--- drivers/net/sky2.c | 2 +- drivers/net/sky2.h | 29 +++++++++++------------------ 2 files changed, 12 insertions(+), 19 deletions(-)
drivers/net/sky2.c +1 -1
@@ -1140,7 +1140,7 @@ static int sky2_rx_start(struct sky2_porif (hw->chip_id ==CHIP_ID_YUKON_EC_U && (hw->chip_rev ==CHIP_REV_YU_EC_U_A1 || hw->chip_rev ==CHIP_REV_YU_EC_U_B0 )) -sky2_write32 (hw,Q_ADDR (rxq,Q_F ),F_M_RX_RAM_DIS ); +sky2_write32 (hw,Q_ADDR (rxq,Q_TEST ),F_M_RX_RAM_DIS );sky2_prefetch_init (hw, rxq, sky2->rx_le_map,RX_LE_SIZE -1 );
drivers/net/sky2.h +11 -18
@@ -592,23 +592,15 @@ enum {enum {B8_Q_REGS =0x0400 ,/* base of Queue registers */ Q_D =0x00 ,/* 8*32 bit Current Descriptor */ -Q_DA_L =0x20 ,/* 32 bit Current Descriptor Address Low dWord */ -Q_DA_H =0x24 ,/* 32 bit Current Descriptor Address High dWord */ +Q_VLAN =0x20 ,/* 16 bit Current VLAN Tag */ +Q_DONE =0x24 ,/* 16 bit Done Index */ Q_AC_L =0x28 ,/* 32 bit Current Address Counter Low dWord */ Q_AC_H =0x2c ,/* 32 bit Current Address Counter High dWord */ Q_BC =0x30 ,/* 32 bit Current Byte Counter */ Q_CSR =0x34 ,/* 32 bit BMU Control/Status Register */ -Q_F =0x38 ,/* 32 bit Flag Register */ -Q_T1 =0x3c ,/* 32 bit Test Register 1 */ -Q_T1_TR =0x3c ,/* 8 bit Test Register 1 Transfer SM */ -Q_T1_WR =0x3d ,/* 8 bit Test Register 1 Write Descriptor SM */ -Q_T1_RD =0x3e ,/* 8 bit Test Register 1 Read Descriptor SM */ -Q_T1_SV =0x3f ,/* 8 bit Test Register 1 Supervisor SM */ -Q_T2 =0x40 ,/* 32 bit Test Register 2 */ -Q_T3 =0x44 ,/* 32 bit Test Register 3 */ +Q_TEST =0x38 ,/* 32 bit Test/Control Register */ /* Yukon-2 */ -Q_DONE =0x24 ,/* 16 bit Done Index (Yukon-2 only) */ Q_WM =0x40 ,/* 16 bit FIFO Watermark */ Q_AL =0x42 ,/* 8 bit FIFO Alignment */ Q_RSP =0x44 ,/* 16 bit FIFO Read Shadow Pointer */
@@ -622,15 +614,16 @@ enum { };#define Q_ADDR (reg, offs) (B8_Q_REGS + (reg) + (offs)) -/* Q_F 32 bit Flag Register */ +/* Q_TEST 32 bit Test Register */ enum { -F_ALM_FULL =1 <<27 ,/* Rx FIFO: almost full */ -F_EMPTY =1 <<27 ,/* Tx FIFO: empty flag */ -F_FIFO_EOF =1 <<26 ,/* Tag (EOF Flag) bit in FIFO */ -F_WM_REACHED =1 <<25 ,/* Watermark reached */ +/* Transmit */ +F_TX_CHK_AUTO_OFF =1 <<31 ,/* Tx checksum auto calc off (Yukon EX) */ +F_TX_CHK_AUTO_ON =1 <<30 ,/* Tx checksum auto calc off (Yukon EX) */ + +/* Receive */ F_M_RX_RAM_DIS =1 <<24 ,/* MAC Rx RAM Read Port disable */ -F_FIFO_LEVEL =0x1fL <<16 ,/* Bit 23..16: # of Qwords in FIFO */ -F_WATER_MARK =0x0007ffL ,/* Bit 10.. 0: Watermark */ + +/* Hardware testbits not used */ };/* Queue Prefetch Unit Offsets, use Y2_QADDR() to address (Yukon-2 only)*/
Signature · 1 line
Stephen Hemminger <[email protected]>
PATCH 4/7 sky2: enable clocks before probe
In reply to Stephen HemmingerCatch-22: On Yukon EX (88E8071) need to have internal clocks enabled before reading chip id. It is harmless on other chips.
--- drivers/net/sky2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/sky2.c +3 -4
@@ -2519,6 +2519,9 @@ static int __devinit sky2_init(struct sk {u8 t8; +/* Enable all clocks */ +sky2_pci_write32 (hw,PCI_DEV_REG3 ,0 ); +sky2_write8 (hw,B0_CTST ,CS_RST_CLR ); hw->chip_id =sky2_read8 (hw,B2_CHIP_ID );
@@ -2532,10 +2535,6 @@ static int __devinit sky2_init(struct skdev_warn (&hw->pdev->dev,"this driver not yet tested on this chip type\n" "Please report success or failure to <[email protected]>\n" ); -/* Make sure and enable all clocks */ -if (hw->chip_id ==CHIP_ID_YUKON_EX || hw->chip_id ==CHIP_ID_YUKON_EC_U ) -sky2_pci_write32 (hw,PCI_DEV_REG3 ,0 ); - hw->chip_rev = (sky2_read8 (hw,B2_MAC_CFG ) &CFG_CHIP_R_MSK ) >>4 ;/* This rev is really old, and requires untested workarounds */
Signature · 1 line
Stephen Hemminger <[email protected]>
PATCH 5/7 sky2: GPIO register
In reply to Stephen HemmingerThe General Purpose I/O register is yet another hardware workaround catchall. Enable workaround that vendor driver does to stay but for bug compatiable.
--- drivers/net/sky2.c | 5 +++++ drivers/net/sky2.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+)
drivers/net/sky2.h +14 -0
@@ -441,6 +441,20 @@ enum { TST_CFG_WRITE_OFF= 1<<0, /* Disable Config Reg WR */ }; +/* B2_GPIO */ +enum { +GLB_GPIO_CLK_DEB_ENA =1 <<31 ,/* Clock Debug Enable */ +GLB_GPIO_CLK_DBG_MSK =0xf <<26 ,/* Clock Debug */ + +GLB_GPIO_INT_RST_D3_DIS =1 <<15 ,/* Disable Internal Reset After D3 to D0 */ +GLB_GPIO_LED_PAD_SPEED_UP =1 <<14 ,/* LED PAD Speed Up */ +GLB_GPIO_STAT_RACE_DIS =1 <<13 ,/* Status Race Disable */ +GLB_GPIO_TEST_SEL_MSK =3 <<11 ,/* Testmode Select */ +GLB_GPIO_TEST_SEL_BASE =1 <<11 , +GLB_GPIO_RAND_ENA =1 <<10 ,/* Random Enable */ +GLB_GPIO_RAND_BIT_1 =1 <<9 ,/* Random Bit 1 */ +}; +/* B2_MAC_CFG 8 bit MAC Configuration / Chip Revision */ enum {CFG_CHIP_R_MSK =0xf <<4 ,/* Bit 7.. 4: Chip Revision */
drivers/net/sky2.c +5 -0
@@ -230,6 +230,11 @@ static void sky2_power_on(struct sky2_hwsky2_pci_write32 (hw,PCI_DEV_REG5 , reg);sky2_pci_write32 (hw,PCI_CFG_REG_1 ,0 ); + +/* Enable workaround for dev 4.107 on Yukon-Ultra & Extreme */ + reg =sky2_read32 (hw,B2_GP_IO ); + reg |=GLB_GPIO_STAT_RACE_DIS ; +sky2_write32 (hw,B2_GP_IO , reg); } }
Signature · 1 line
Stephen Hemminger <[email protected]>
PATCH 6/7 sky2: Yukon Extreme (88e8071) support.
In reply to Stephen HemmingerEnable support for Yukon EX chipset (88e8071).
Most of changes are related to new commands to chip for transmit, and change in status and checksumming.
--- drivers/net/sky2.c | 176 +++++++++++++++++++++++++++++++---------------------- drivers/net/sky2.h | 43 ++++++++++++ 2 files changed, 148 insertions(+), 71 deletions(-)
drivers/net/sky2.c +106 -70
@@ -130,7 +130,7 @@ static const struct pci_device_id sky2_i { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, /* 88EC034 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4369) }, /* 88EC042 */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436A) }, /* 88E8058 */ -// { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */ + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436B) }, /* 88E8071 */ { 0 } };
@@ -661,6 +661,30 @@ static void sky2_wol_init(struct sky2_po } +static void sky2_set_tx_stfwd (struct sky2_hw *hw,unsigned port) +{ +if (hw->chip_id ==CHIP_ID_YUKON_EX && hw->chip_rev !=CHIP_REV_YU_EX_A0 ) { +sky2_write32 (hw,SK_REG (port,TX_GMF_CTRL_T ), +TX_STFW_ENA | + (hw->dev[port]->mtu >ETH_DATA_LEN ) ?TX_JUMBO_ENA :TX_JUMBO_DIS ); + }else { +if (hw->dev[port]->mtu >ETH_DATA_LEN ) { +/* set Tx GMAC FIFO Almost Empty Threshold */ +sky2_write32 (hw,SK_REG (port,TX_GMF_AE_THR ), + (ECU_JUMBO_WM <<16 ) |ECU_AE_THR ); + +sky2_write32 (hw,SK_REG (port,TX_GMF_CTRL_T ), +TX_JUMBO_ENA |TX_STFW_DIS ); + +/* Can't do offload because of lack of store/forward */ + hw->dev[port]->features &= ~(NETIF_F_TSO |NETIF_F_SG + |NETIF_F_ALL_CSUM ); + }else +sky2_write32 (hw,SK_REG (port,TX_GMF_CTRL_T ), +TX_JUMBO_DIS |TX_STFW_ENA ); + } +} +static void sky2_mac_init (struct sky2_hw *hw,unsigned port) {struct sky2_port *sky2 =netdev_priv (hw->dev[port]);
@@ -741,8 +765,11 @@ static void sky2_mac_init(struct sky2_hw/* Configure Rx MAC FIFO */ sky2_write8 (hw,SK_REG (port,RX_GMF_CTRL_T ),GMF_RST_CLR ); -sky2_write32 (hw,SK_REG (port,RX_GMF_CTRL_T ), -GMF_OPER_ON |GMF_RX_F_FL_ON ); + reg =GMF_OPER_ON |GMF_RX_F_FL_ON ; +if (hw->chip_id ==CHIP_ID_YUKON_EX ) + reg |=GMF_RX_OVER_ON ; + +sky2_write32 (hw,SK_REG (port,RX_GMF_CTRL_T ), reg);/* Flush Rx MAC FIFO on any flow control or error */ sky2_write16 (hw,SK_REG (port,RX_GMF_FL_MSK ),GMR_FS_ANY_ERR );
@@ -758,16 +785,7 @@ static void sky2_mac_init(struct sky2_hwsky2_write8 (hw,SK_REG (port,RX_GMF_LP_THR ),768 /8 );sky2_write8 (hw,SK_REG (port,RX_GMF_UP_THR ),1024 /8 ); -/* set Tx GMAC FIFO Almost Empty Threshold */ -sky2_write32 (hw,SK_REG (port,TX_GMF_AE_THR ), - (ECU_JUMBO_WM <<16 ) |ECU_AE_THR ); - -if (hw->dev[port]->mtu >ETH_DATA_LEN ) -sky2_write32 (hw,SK_REG (port,TX_GMF_CTRL_T ), -TX_JUMBO_ENA |TX_STFW_DIS ); -else -sky2_write32 (hw,SK_REG (port,TX_GMF_CTRL_T ), -TX_JUMBO_DIS |TX_STFW_ENA ); +sky2_set_tx_stfwd (hw, port); } }
@@ -950,14 +968,16 @@ static void rx_set_checksum(struct sky2_ {struct sky2_rx_le *le; - le =sky2_next_rx (sky2); - le->addr =cpu_to_le32 ((ETH_HLEN <<16 ) |ETH_HLEN ); - le->ctrl =0 ; - le->opcode =OP_TCPSTART |HW_OWNER ; - -sky2_write32 (sky2->hw, -Q_ADDR (rxqaddr[sky2->port],Q_CSR ), - sky2->rx_csum ?BMU_ENA_RX_CHKSUM :BMU_DIS_RX_CHKSUM ); +if (sky2->hw->chip_id !=CHIP_ID_YUKON_EX ) { + le =sky2_next_rx (sky2); + le->addr =cpu_to_le32 ((ETH_HLEN <<16 ) |ETH_HLEN ); + le->ctrl =0 ; + le->opcode =OP_TCPSTART |HW_OWNER ; + +sky2_write32 (sky2->hw, +Q_ADDR (rxqaddr[sky2->port],Q_CSR ), + sky2->rx_csum ?BMU_ENA_RX_CHKSUM :BMU_DIS_RX_CHKSUM ); + } }
@@ -1296,6 +1316,10 @@ static int sky2_up(struct net_device *desky2_qset (hw, txqaddr[port]); +/* This is copied from sk98lin 10.0.5.3; no one tells me about erratta's */ +if (hw->chip_id ==CHIP_ID_YUKON_EX && hw->chip_rev ==CHIP_REV_YU_EX_B0 ) +sky2_write32 (hw,Q_ADDR (txqaddr[port],Q_TEST ),F_TX_CHK_AUTO_OFF ); +/* Set almost empty threshold */ if (hw->chip_id ==CHIP_ID_YUKON_EC_U && hw->chip_rev ==CHIP_REV_YU_EC_U_A0 )
@@ -1404,14 +1428,16 @@ static int sky2_xmit_frame(struct sk_buf/* Check for TCP Segmentation Offload */ mss =skb_shinfo (skb)->gso_size;if (mss !=0 ) { - mss +=tcp_optlen (skb);/* TCP options */ - mss +=ip_hdrlen (skb) +sizeof (struct tcphdr ); - mss +=ETH_HLEN ; +if (hw->chip_id !=CHIP_ID_YUKON_EX ) + mss +=ETH_HLEN +ip_hdrlen (skb) +tcp_hdrlen (skb); -if (mss != sky2->tx_last_mss) { - le =get_tx_le (sky2); - le->addr =cpu_to_le32 (mss); - le->opcode =OP_LRGLEN |HW_OWNER ; +if (mss != sky2->tx_last_mss) { + le =get_tx_le (sky2); + le->addr =cpu_to_le32 (mss); +if (hw->chip_id ==CHIP_ID_YUKON_EX ) + le->opcode =OP_MSS |HW_OWNER ; +else + le->opcode =OP_LRGLEN |HW_OWNER ; sky2->tx_last_mss = mss; } }
@@ -1433,24 +1459,30 @@ static int sky2_xmit_frame(struct sk_buf/* Handle TCP checksum offload */ if (skb->ip_summed ==CHECKSUM_PARTIAL ) { -const unsigned offset =skb_transport_offset (skb); -u32 tcpsum; - - tcpsum = offset <<16 ;/* sum start */ - tcpsum |= offset + skb->csum_offset;/* sum write */ - - ctrl |=CALSUM |WR_SUM |INIT_SUM |LOCK_SUM ; -if (ip_hdr (skb)->protocol ==IPPROTO_UDP ) - ctrl |=UDPTCP ; - -if (tcpsum != sky2->tx_tcpsum) { - sky2->tx_tcpsum = tcpsum; - - le =get_tx_le (sky2); - le->addr =cpu_to_le32 (tcpsum); - le->length =0 ;/* initial checksum value */ - le->ctrl =1 ;/* one packet */ - le->opcode =OP_TCPLISW |HW_OWNER ; +/* On Yukon EX (some versions) encoding change. */ +if (hw->chip_id ==CHIP_ID_YUKON_EX + && hw->chip_rev !=CHIP_REV_YU_EX_B0 ) + ctrl |=CALSUM ;/* auto checksum */ +else { +const unsigned offset =skb_transport_offset (skb); +u32 tcpsum; + + tcpsum = offset <<16 ;/* sum start */ + tcpsum |= offset + skb->csum_offset;/* sum write */ + + ctrl |=CALSUM |WR_SUM |INIT_SUM |LOCK_SUM ; +if (ip_hdr (skb)->protocol ==IPPROTO_UDP ) + ctrl |=UDPTCP ; + +if (tcpsum != sky2->tx_tcpsum) { + sky2->tx_tcpsum = tcpsum; + + le =get_tx_le (sky2); + le->addr =cpu_to_le32 (tcpsum); + le->length =0 ;/* initial checksum value */ + le->ctrl =1 ;/* one packet */ + le->opcode =OP_TCPLISW |HW_OWNER ; + } } }
@@ -1924,15 +1956,8 @@ static int sky2_change_mtu(struct net_desynchronize_irq (hw->pdev->irq); -if (hw->chip_id ==CHIP_ID_YUKON_EC_U || hw->chip_id ==CHIP_ID_YUKON_EX ) { -if (new_mtu >ETH_DATA_LEN ) { -sky2_write32 (hw,SK_REG (port,TX_GMF_CTRL_T ), -TX_JUMBO_ENA |TX_STFW_DIS ); - dev->features &=NETIF_F_TSO |NETIF_F_SG |NETIF_F_IP_CSUM ; - }else -sky2_write32 (hw,SK_REG (port,TX_GMF_CTRL_T ), -TX_JUMBO_DIS |TX_STFW_ENA ); - } +if (hw->chip_id ==CHIP_ID_YUKON_EC_U || hw->chip_id ==CHIP_ID_YUKON_EX ) +sky2_set_tx_stfwd (hw, port); ctl =gma_read16 (hw, port,GM_GP_CTRL );gma_write16 (hw, port,GM_GP_CTRL , ctl & ~GM_GPCR_RX_ENA );
@@ -2129,6 +2154,7 @@ static int sky2_status_intr(struct sky2_while (hw->st_idx != hwidx) {struct sky2_status_le *le = hw->st_le + hw->st_idx; +unsigned port = le->css &CSS_LINK_BIT ;struct net_device *dev;struct sk_buff *skb;u32 status;
@@ -2136,9 +2162,7 @@ static int sky2_status_intr(struct sky2_ hw->st_idx =RING_NEXT (hw->st_idx,STATUS_RING_SIZE ); -BUG_ON (le->link >=2 ); - dev = hw->dev[le->link]; - + dev = hw->dev[port]; sky2 =netdev_priv (dev); length =le16_to_cpu (le->length); status =le32_to_cpu (le->status);
@@ -2151,6 +2175,16 @@ static int sky2_status_intr(struct sky2_ goto force_update; } +/* This chip reports checksum status differently */ +if (hw->chip_id ==CHIP_ID_YUKON_EX ) { +if (sky2->rx_csum && + (le->css & (CSS_ISIPV4 |CSS_ISIPV6 )) && + (le->css &CSS_TCPUDPCSOK )) + skb->ip_summed =CHECKSUM_UNNECESSARY ; +else + skb->ip_summed =CHECKSUM_NONE ; + } + skb->protocol =eth_type_trans (skb, dev); sky2->net_stats.rx_packets++; sky2->net_stats.rx_bytes += skb->len;
@@ -2166,10 +2200,10 @@ static int sky2_status_intr(struct sky2_netif_receive_skb (skb);/* Update receiver after 16 frames */ -if (++buf_write[le->link] ==RX_BUF_WRITE ) { +if (++buf_write[port] ==RX_BUF_WRITE ) { force_update: -sky2_put_idx (hw, rxqaddr[le->link], sky2->rx_put); - buf_write[le->link] =0 ; +sky2_put_idx (hw, rxqaddr[port], sky2->rx_put); + buf_write[port] =0 ; }/* Stop after net poll weight */
@@ -2190,6 +2224,9 @@ force_update:if (!sky2->rx_csum)break ; +if (hw->chip_id ==CHIP_ID_YUKON_EX ) +break ; +/* Both checksum counters are programmed to start at * the same offset, so unless there is a problem they * should match. This failure is an early indication that
@@ -2205,7 +2242,7 @@ force_update: dev->name, status); sky2->rx_csum =0 ;sky2_write32 (sky2->hw, -Q_ADDR (rxqaddr[le->link],Q_CSR ), +Q_ADDR (rxqaddr[port],Q_CSR ),BMU_DIS_RX_CHKSUM ); }break ;
@@ -2536,10 +2573,6 @@ static int __devinit sky2_init(struct skreturn -EOPNOTSUPP ; } -if (hw->chip_id ==CHIP_ID_YUKON_EX ) -dev_warn (&hw->pdev->dev,"this driver not yet tested on this chip type\n" -"Please report success or failure to <[email protected]>\n" ); - hw->chip_rev = (sky2_read8 (hw,B2_MAC_CFG ) &CFG_CHIP_R_MSK ) >>4 ;/* This rev is really old, and requires untested workarounds */
@@ -2599,6 +2632,11 @@ static void sky2_reset(struct sky2_hw *hfor (i =0 ; i < hw->ports; i++) {sky2_write8 (hw,SK_REG (i,GMAC_LINK_CTRL ),GMLC_RST_SET );sky2_write8 (hw,SK_REG (i,GMAC_LINK_CTRL ),GMLC_RST_CLR ); + +if (hw->chip_id ==CHIP_ID_YUKON_EX ) +sky2_write16 (hw,SK_REG (i,GMAC_CTRL ), +GMC_BYP_MACSECRX_ON |GMC_BYP_MACSECTX_ON + |GMC_BYP_RETR_ON ); }sky2_write8 (hw,B2_TST_CTRL1 ,TST_CFG_WRITE_OFF );
@@ -2745,7 +2783,7 @@ static int sky2_set_wol(struct net_devic sky2->wol = wol->wolopts; -if (hw->chip_id ==CHIP_ID_YUKON_EC_U ) +if (hw->chip_id ==CHIP_ID_YUKON_EC_U || hw->chip_id ==CHIP_ID_YUKON_EX )sky2_write32 (hw,B0_CTST , sky2->wol ?Y2_HW_WOL_ON :Y2_HW_WOL_OFF );
@@ -3371,9 +3409,7 @@ static int no_tx_offload(struct net_deviconst struct sky2_port *sky2 =netdev_priv (dev);const struct sky2_hw *hw = sky2->hw; -return dev->mtu >ETH_DATA_LEN && - (hw->chip_id ==CHIP_ID_YUKON_EX - || hw->chip_id ==CHIP_ID_YUKON_EC_U ); +return dev->mtu >ETH_DATA_LEN && hw->chip_id ==CHIP_ID_YUKON_EC_U ; }static int sky2_set_tx_csum (struct net_device *dev,u32 data)
drivers/net/sky2.h +42 -1
82 lines not on this page · raw message
Signature · 1 line
Stephen Hemminger <[email protected]>
PATCH 7/7 sky2: version 1.15
In reply to Stephen HemmingerNew version because of new chip support.
--- drivers/net/sky2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sky2.c +1 -1
@@ -50,7 +50,7 @@#include "sky2.h" #define DRV_NAME "sky2" -#define DRV_VERSION "1.14" +#define DRV_VERSION "1.15"#define PFX DRV_NAME " "/*
Signature · 1 line
Stephen Hemminger <[email protected]>
Quoted 8 lines · Stephen Hemminger
These changes are to enable the Yukon Extreme (88e8071) chipset. This chip is similar to earlier chip but has a different set of offloading operations and some other minor quirks.
Marvell has given me some evaluation boards with the 88e8071 chip set. The chip is available now, but haven't seen a systems with the hardware yet. The support fot this is exprerimental at this point, but haven't encountered any new problems.
Just to confirm... these are all for #upstream (2.6.23), correct?
Quoted 5 lines · On Wed, 13 Jun 2007 16:05:23 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger
These changes are to enable the Yukon Extreme (88e8071) chipset. This chip is similar to earlier chip but has a different set of offloading operations and some other minor quirks.
Quoted 8 lines
Quoted 4 lines
Marvell has given me some evaluation boards with the 88e8071 chip set. The chip is available now, but haven't seen a systems with the hardware yet. The support fot this is exprerimental at this point, but haven't encountered any new problems.
Just to confirm... these are all for #upstream (2.6.23), correct?
Yes, given that the hardware is not available on common platforms yet, it should go into 2.6.23