Loading drivers/net/chelsio/espi.c +20 −21 Original line number Diff line number Diff line Loading @@ -341,8 +341,7 @@ u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait) * compare with t1_espi_get_mon(), it reads espiInTxSop[0 ~ 3] in * one shot, since there is no per port counter on the out side. */ int t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait) int t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait) { struct peespi *espi = adapter->espi; u8 i, nport = (u8)adapter->params.nports; Loading drivers/net/chelsio/gmac.h +9 −2 Original line number Diff line number Diff line Loading @@ -42,8 +42,15 @@ #include "common.h" enum { MAC_STATS_UPDATE_FAST, MAC_STATS_UPDATE_FULL }; enum { MAC_DIRECTION_RX = 1, MAC_DIRECTION_TX = 2 }; enum { MAC_STATS_UPDATE_FAST, MAC_STATS_UPDATE_FULL }; enum { MAC_DIRECTION_RX = 1, MAC_DIRECTION_TX = 2 }; struct cmac_statistics { /* Transmit */ Loading drivers/net/chelsio/mv88e1xxx.c +7 −10 Original line number Diff line number Diff line Loading @@ -73,9 +73,8 @@ static int mv88e1xxx_interrupt_enable(struct cphy *cphy) t1_tpi_read(cphy->adapter, A_ELMER0_INT_ENABLE, &elmer); elmer |= ELMER0_GP_BIT1; if (is_T2(cphy->adapter)) { if (is_T2(cphy->adapter)) elmer |= ELMER0_GP_BIT2 | ELMER0_GP_BIT3 | ELMER0_GP_BIT4; } t1_tpi_write(cphy->adapter, A_ELMER0_INT_ENABLE, elmer); } return 0; Loading @@ -92,9 +91,8 @@ static int mv88e1xxx_interrupt_disable(struct cphy *cphy) t1_tpi_read(cphy->adapter, A_ELMER0_INT_ENABLE, &elmer); elmer &= ~ELMER0_GP_BIT1; if (is_T2(cphy->adapter)) { if (is_T2(cphy->adapter)) elmer &= ~(ELMER0_GP_BIT2|ELMER0_GP_BIT3|ELMER0_GP_BIT4); } t1_tpi_write(cphy->adapter, A_ELMER0_INT_ENABLE, elmer); } return 0; Loading @@ -112,9 +110,8 @@ static int mv88e1xxx_interrupt_clear(struct cphy *cphy) if (t1_is_asic(cphy->adapter)) { t1_tpi_read(cphy->adapter, A_ELMER0_INT_CAUSE, &elmer); elmer |= ELMER0_GP_BIT1; if (is_T2(cphy->adapter)) { if (is_T2(cphy->adapter)) elmer |= ELMER0_GP_BIT2|ELMER0_GP_BIT3|ELMER0_GP_BIT4; } t1_tpi_write(cphy->adapter, A_ELMER0_INT_CAUSE, elmer); } return 0; Loading drivers/net/chelsio/sge.c +64 −61 Original line number Diff line number Diff line Loading @@ -850,7 +850,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q) struct freelQ_e *e = &q->entries[q->pidx]; unsigned int dma_len = q->rx_buffer_size - q->dma_offset; while (q->credits < q->size) { struct sk_buff *skb; dma_addr_t mapping; Loading Loading @@ -881,7 +880,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q) } q->credits++; } } /* Loading Loading @@ -1137,6 +1135,7 @@ static void unexpected_offload(struct adapter *adapter, struct freelQ *fl) static inline unsigned int compute_large_page_tx_descs(struct sk_buff *skb) { unsigned int count = 0; if (PAGE_SIZE > SGE_TX_DESC_MAX_PLEN) { unsigned int nfrags = skb_shinfo(skb)->nr_frags; unsigned int i, len = skb->len - skb->data_len; Loading Loading @@ -2099,18 +2098,23 @@ static void espibug_workaround_t204(unsigned long data) if (adapter->open_device_map & PORT_MASK) { int i; if (t1_espi_get_mon_t204(adapter, &(seop[0]), 0) < 0) { if (t1_espi_get_mon_t204(adapter, &(seop[0]), 0) < 0) return; } for (i = 0; i < nports; i++) { struct sk_buff *skb = sge->espibug_skb[i]; if ( (netif_running(adapter->port[i].dev)) && !(netif_queue_stopped(adapter->port[i].dev)) && (seop[i] && ((seop[i] & 0xfff) == 0)) && skb ) { if (!netif_running(adapter->port[i].dev) || netif_queue_stopped(adapter->port[i].dev) || !seop[i] || ((seop[i] & 0xfff) != 0) || !skb) continue; if (!skb->cb[0]) { u8 ch_mac_addr[ETH_ALEN] = {0x0, 0x7, 0x43, 0x0, 0x0, 0x0}; u8 ch_mac_addr[ETH_ALEN] = { 0x0, 0x7, 0x43, 0x0, 0x0, 0x0 }; memcpy(skb->data + sizeof(struct cpl_tx_pkt), ch_mac_addr, ETH_ALEN); memcpy(skb->data + skb->len - 10, Loading @@ -2125,7 +2129,6 @@ static void espibug_workaround_t204(unsigned long data) t1_sge_tx(skb, adapter, 0, adapter->port[i].dev); } } } mod_timer(&sge->espibug_timer, jiffies + sge->espibug_timeout); } Loading drivers/net/chelsio/subr.c +41 −42 Original line number Diff line number Diff line Loading @@ -262,8 +262,7 @@ static int mi1_wait_until_ready(adapter_t *adapter, int mi1_reg) udelay(10); } while (busy && --attempts); if (busy) CH_ALERT("%s: MDIO operation timed out\n", adapter->name); CH_ALERT("%s: MDIO operation timed out\n", adapter->name); return busy; } Loading Loading
drivers/net/chelsio/espi.c +20 −21 Original line number Diff line number Diff line Loading @@ -341,8 +341,7 @@ u32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait) * compare with t1_espi_get_mon(), it reads espiInTxSop[0 ~ 3] in * one shot, since there is no per port counter on the out side. */ int t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait) int t1_espi_get_mon_t204(adapter_t *adapter, u32 *valp, u8 wait) { struct peespi *espi = adapter->espi; u8 i, nport = (u8)adapter->params.nports; Loading
drivers/net/chelsio/gmac.h +9 −2 Original line number Diff line number Diff line Loading @@ -42,8 +42,15 @@ #include "common.h" enum { MAC_STATS_UPDATE_FAST, MAC_STATS_UPDATE_FULL }; enum { MAC_DIRECTION_RX = 1, MAC_DIRECTION_TX = 2 }; enum { MAC_STATS_UPDATE_FAST, MAC_STATS_UPDATE_FULL }; enum { MAC_DIRECTION_RX = 1, MAC_DIRECTION_TX = 2 }; struct cmac_statistics { /* Transmit */ Loading
drivers/net/chelsio/mv88e1xxx.c +7 −10 Original line number Diff line number Diff line Loading @@ -73,9 +73,8 @@ static int mv88e1xxx_interrupt_enable(struct cphy *cphy) t1_tpi_read(cphy->adapter, A_ELMER0_INT_ENABLE, &elmer); elmer |= ELMER0_GP_BIT1; if (is_T2(cphy->adapter)) { if (is_T2(cphy->adapter)) elmer |= ELMER0_GP_BIT2 | ELMER0_GP_BIT3 | ELMER0_GP_BIT4; } t1_tpi_write(cphy->adapter, A_ELMER0_INT_ENABLE, elmer); } return 0; Loading @@ -92,9 +91,8 @@ static int mv88e1xxx_interrupt_disable(struct cphy *cphy) t1_tpi_read(cphy->adapter, A_ELMER0_INT_ENABLE, &elmer); elmer &= ~ELMER0_GP_BIT1; if (is_T2(cphy->adapter)) { if (is_T2(cphy->adapter)) elmer &= ~(ELMER0_GP_BIT2|ELMER0_GP_BIT3|ELMER0_GP_BIT4); } t1_tpi_write(cphy->adapter, A_ELMER0_INT_ENABLE, elmer); } return 0; Loading @@ -112,9 +110,8 @@ static int mv88e1xxx_interrupt_clear(struct cphy *cphy) if (t1_is_asic(cphy->adapter)) { t1_tpi_read(cphy->adapter, A_ELMER0_INT_CAUSE, &elmer); elmer |= ELMER0_GP_BIT1; if (is_T2(cphy->adapter)) { if (is_T2(cphy->adapter)) elmer |= ELMER0_GP_BIT2|ELMER0_GP_BIT3|ELMER0_GP_BIT4; } t1_tpi_write(cphy->adapter, A_ELMER0_INT_CAUSE, elmer); } return 0; Loading
drivers/net/chelsio/sge.c +64 −61 Original line number Diff line number Diff line Loading @@ -850,7 +850,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q) struct freelQ_e *e = &q->entries[q->pidx]; unsigned int dma_len = q->rx_buffer_size - q->dma_offset; while (q->credits < q->size) { struct sk_buff *skb; dma_addr_t mapping; Loading Loading @@ -881,7 +880,6 @@ static void refill_free_list(struct sge *sge, struct freelQ *q) } q->credits++; } } /* Loading Loading @@ -1137,6 +1135,7 @@ static void unexpected_offload(struct adapter *adapter, struct freelQ *fl) static inline unsigned int compute_large_page_tx_descs(struct sk_buff *skb) { unsigned int count = 0; if (PAGE_SIZE > SGE_TX_DESC_MAX_PLEN) { unsigned int nfrags = skb_shinfo(skb)->nr_frags; unsigned int i, len = skb->len - skb->data_len; Loading Loading @@ -2099,18 +2098,23 @@ static void espibug_workaround_t204(unsigned long data) if (adapter->open_device_map & PORT_MASK) { int i; if (t1_espi_get_mon_t204(adapter, &(seop[0]), 0) < 0) { if (t1_espi_get_mon_t204(adapter, &(seop[0]), 0) < 0) return; } for (i = 0; i < nports; i++) { struct sk_buff *skb = sge->espibug_skb[i]; if ( (netif_running(adapter->port[i].dev)) && !(netif_queue_stopped(adapter->port[i].dev)) && (seop[i] && ((seop[i] & 0xfff) == 0)) && skb ) { if (!netif_running(adapter->port[i].dev) || netif_queue_stopped(adapter->port[i].dev) || !seop[i] || ((seop[i] & 0xfff) != 0) || !skb) continue; if (!skb->cb[0]) { u8 ch_mac_addr[ETH_ALEN] = {0x0, 0x7, 0x43, 0x0, 0x0, 0x0}; u8 ch_mac_addr[ETH_ALEN] = { 0x0, 0x7, 0x43, 0x0, 0x0, 0x0 }; memcpy(skb->data + sizeof(struct cpl_tx_pkt), ch_mac_addr, ETH_ALEN); memcpy(skb->data + skb->len - 10, Loading @@ -2125,7 +2129,6 @@ static void espibug_workaround_t204(unsigned long data) t1_sge_tx(skb, adapter, 0, adapter->port[i].dev); } } } mod_timer(&sge->espibug_timer, jiffies + sge->espibug_timeout); } Loading
drivers/net/chelsio/subr.c +41 −42 Original line number Diff line number Diff line Loading @@ -262,8 +262,7 @@ static int mi1_wait_until_ready(adapter_t *adapter, int mi1_reg) udelay(10); } while (busy && --attempts); if (busy) CH_ALERT("%s: MDIO operation timed out\n", adapter->name); CH_ALERT("%s: MDIO operation timed out\n", adapter->name); return busy; } Loading