Lines Matching refs:ss
197 struct myri10ge_slice_state *ss; member
917 struct myri10ge_slice_state *ss; in myri10ge_reset() local
945 bytes = mgp->max_intr_slots * sizeof(*mgp->ss[0].rx_done.entry); in myri10ge_reset()
1002 ss = &mgp->ss[i]; in myri10ge_reset()
1003 cmd.data0 = MYRI10GE_LOWPART_TO_U32(ss->rx_done.bus); in myri10ge_reset()
1004 cmd.data1 = MYRI10GE_HIGHPART_TO_U32(ss->rx_done.bus); in myri10ge_reset()
1013 ss = &mgp->ss[i]; in myri10ge_reset()
1014 ss->irq_claim = in myri10ge_reset()
1034 ss = &mgp->ss[i]; in myri10ge_reset()
1036 ss->dca_tag = (__iomem __be32 *) in myri10ge_reset()
1039 ss->dca_tag = NULL; in myri10ge_reset()
1048 ss = &mgp->ss[i]; in myri10ge_reset()
1050 memset(ss->rx_done.entry, 0, bytes); in myri10ge_reset()
1051 ss->tx.req = 0; in myri10ge_reset()
1052 ss->tx.done = 0; in myri10ge_reset()
1053 ss->tx.pkt_start = 0; in myri10ge_reset()
1054 ss->tx.pkt_done = 0; in myri10ge_reset()
1055 ss->rx_big.cnt = 0; in myri10ge_reset()
1056 ss->rx_small.cnt = 0; in myri10ge_reset()
1057 ss->rx_done.idx = 0; in myri10ge_reset()
1058 ss->rx_done.cnt = 0; in myri10ge_reset()
1059 ss->tx.wake_queue = 0; in myri10ge_reset()
1060 ss->tx.stop_queue = 0; in myri10ge_reset()
1087 myri10ge_write_dca(struct myri10ge_slice_state *ss, int cpu, int tag) in myri10ge_write_dca() argument
1089 ss->cached_dca_tag = tag; in myri10ge_write_dca()
1090 put_be32(htonl(tag), ss->dca_tag); in myri10ge_write_dca()
1093 static inline void myri10ge_update_dca(struct myri10ge_slice_state *ss) in myri10ge_update_dca() argument
1098 if (cpu != ss->cpu) { in myri10ge_update_dca()
1099 tag = dca3_get_tag(&ss->mgp->pdev->dev, cpu); in myri10ge_update_dca()
1100 if (ss->cached_dca_tag != tag) in myri10ge_update_dca()
1101 myri10ge_write_dca(ss, cpu, tag); in myri10ge_update_dca()
1102 ss->cpu = cpu; in myri10ge_update_dca()
1112 if (mgp->ss[0].dca_tag == NULL || mgp->dca_enabled) in myri10ge_setup_dca()
1128 mgp->ss[i].cpu = -1; in myri10ge_setup_dca()
1129 mgp->ss[i].cached_dca_tag = -1; in myri10ge_setup_dca()
1130 myri10ge_update_dca(&mgp->ss[i]); in myri10ge_setup_dca()
1307 myri10ge_rx_done(struct myri10ge_slice_state *ss, int len, __wsum csum) in myri10ge_rx_done() argument
1309 struct myri10ge_priv *mgp = ss->mgp; in myri10ge_rx_done()
1319 rx = &ss->rx_small; in myri10ge_rx_done()
1322 rx = &ss->rx_big; in myri10ge_rx_done()
1331 skb = napi_get_frags(&ss->napi); in myri10ge_rx_done()
1333 ss->stats.rx_dropped++; in myri10ge_rx_done()
1369 skb_record_rx_queue(skb, ss - &mgp->ss[0]); in myri10ge_rx_done()
1371 napi_gro_frags(&ss->napi); in myri10ge_rx_done()
1377 myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index) in myri10ge_tx_done() argument
1379 struct pci_dev *pdev = ss->mgp->pdev; in myri10ge_tx_done()
1380 struct myri10ge_tx_buf *tx = &ss->tx; in myri10ge_tx_done()
1399 ss->stats.tx_bytes += skb->len; in myri10ge_tx_done()
1400 ss->stats.tx_packets++; in myri10ge_tx_done()
1416 dev_queue = netdev_get_tx_queue(ss->dev, ss - ss->mgp->ss); in myri10ge_tx_done()
1426 if ((ss->mgp->dev->real_num_tx_queues > 1) && in myri10ge_tx_done()
1439 ss->mgp->running == MYRI10GE_ETH_RUNNING) { in myri10ge_tx_done()
1446 myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget) in myri10ge_clean_rx_done() argument
1448 struct myri10ge_rx_done *rx_done = &ss->rx_done; in myri10ge_clean_rx_done()
1449 struct myri10ge_priv *mgp = ss->mgp; in myri10ge_clean_rx_done()
1463 rx_ok = myri10ge_rx_done(ss, length, checksum); in myri10ge_clean_rx_done()
1472 ss->stats.rx_packets += rx_packets; in myri10ge_clean_rx_done()
1473 ss->stats.rx_bytes += rx_bytes; in myri10ge_clean_rx_done()
1476 if (ss->rx_small.fill_cnt - ss->rx_small.cnt < myri10ge_fill_thresh) in myri10ge_clean_rx_done()
1477 myri10ge_alloc_rx_pages(mgp, &ss->rx_small, in myri10ge_clean_rx_done()
1479 if (ss->rx_big.fill_cnt - ss->rx_big.cnt < myri10ge_fill_thresh) in myri10ge_clean_rx_done()
1480 myri10ge_alloc_rx_pages(mgp, &ss->rx_big, mgp->big_bytes, 0); in myri10ge_clean_rx_done()
1487 struct mcp_irq_data *stats = mgp->ss[0].fw_stats; in myri10ge_check_statblock()
1522 struct myri10ge_slice_state *ss = in myri10ge_poll() local
1527 if (ss->mgp->dca_enabled) in myri10ge_poll()
1528 myri10ge_update_dca(ss); in myri10ge_poll()
1531 work_done = myri10ge_clean_rx_done(ss, budget); in myri10ge_poll()
1535 put_be32(htonl(3), ss->irq_claim); in myri10ge_poll()
1542 struct myri10ge_slice_state *ss = arg; in myri10ge_intr() local
1543 struct myri10ge_priv *mgp = ss->mgp; in myri10ge_intr()
1544 struct mcp_irq_data *stats = ss->fw_stats; in myri10ge_intr()
1545 struct myri10ge_tx_buf *tx = &ss->tx; in myri10ge_intr()
1551 if ((mgp->dev->real_num_tx_queues == 1) && (ss != mgp->ss)) { in myri10ge_intr()
1552 napi_schedule(&ss->napi); in myri10ge_intr()
1563 napi_schedule(&ss->napi); in myri10ge_intr()
1580 myri10ge_tx_done(ss, (int)send_done_count); in myri10ge_intr()
1593 if (ss == mgp->ss) in myri10ge_intr()
1596 put_be32(htonl(3), ss->irq_claim + 1); in myri10ge_intr()
1711 ring->rx_mini_max_pending = mgp->ss[0].rx_small.mask + 1; in myri10ge_get_ringparam()
1712 ring->rx_max_pending = mgp->ss[0].rx_big.mask + 1; in myri10ge_get_ringparam()
1714 ring->tx_max_pending = mgp->ss[0].tx.mask + 1; in myri10ge_get_ringparam()
1792 struct myri10ge_slice_state *ss; in myri10ge_get_ethtool_stats() local
1813 data[i++] = (unsigned int)(mgp->ss[0].dca_tag != NULL); in myri10ge_get_ethtool_stats()
1819 ss = &mgp->ss[0]; in myri10ge_get_ethtool_stats()
1820 data[i++] = (unsigned int)ntohl(ss->fw_stats->link_up); in myri10ge_get_ethtool_stats()
1821 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_link_overflow); in myri10ge_get_ethtool_stats()
1823 (unsigned int)ntohl(ss->fw_stats->dropped_link_error_or_filtered); in myri10ge_get_ethtool_stats()
1824 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_pause); in myri10ge_get_ethtool_stats()
1825 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_bad_phy); in myri10ge_get_ethtool_stats()
1826 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_bad_crc32); in myri10ge_get_ethtool_stats()
1827 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_unicast_filtered); in myri10ge_get_ethtool_stats()
1829 (unsigned int)ntohl(ss->fw_stats->dropped_multicast_filtered); in myri10ge_get_ethtool_stats()
1830 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_runt); in myri10ge_get_ethtool_stats()
1831 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_overrun); in myri10ge_get_ethtool_stats()
1832 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_no_small_buffer); in myri10ge_get_ethtool_stats()
1833 data[i++] = (unsigned int)ntohl(ss->fw_stats->dropped_no_big_buffer); in myri10ge_get_ethtool_stats()
1836 ss = &mgp->ss[slice]; in myri10ge_get_ethtool_stats()
1838 data[i++] = (unsigned int)ss->tx.pkt_start; in myri10ge_get_ethtool_stats()
1839 data[i++] = (unsigned int)ss->tx.pkt_done; in myri10ge_get_ethtool_stats()
1840 data[i++] = (unsigned int)ss->tx.req; in myri10ge_get_ethtool_stats()
1841 data[i++] = (unsigned int)ss->tx.done; in myri10ge_get_ethtool_stats()
1842 data[i++] = (unsigned int)ss->rx_small.cnt; in myri10ge_get_ethtool_stats()
1843 data[i++] = (unsigned int)ss->rx_big.cnt; in myri10ge_get_ethtool_stats()
1844 data[i++] = (unsigned int)ss->tx.wake_queue; in myri10ge_get_ethtool_stats()
1845 data[i++] = (unsigned int)ss->tx.stop_queue; in myri10ge_get_ethtool_stats()
1846 data[i++] = (unsigned int)ss->tx.linearized; in myri10ge_get_ethtool_stats()
1934 static int myri10ge_allocate_rings(struct myri10ge_slice_state *ss) in myri10ge_allocate_rings() argument
1936 struct myri10ge_priv *mgp = ss->mgp; in myri10ge_allocate_rings()
1945 slice = ss - mgp->ss; in myri10ge_allocate_rings()
1957 ss->tx.mask = tx_ring_entries - 1; in myri10ge_allocate_rings()
1958 ss->rx_small.mask = ss->rx_big.mask = rx_ring_entries - 1; in myri10ge_allocate_rings()
1965 * sizeof(*ss->tx.req_list); in myri10ge_allocate_rings()
1966 ss->tx.req_bytes = kzalloc(bytes, GFP_KERNEL); in myri10ge_allocate_rings()
1967 if (ss->tx.req_bytes == NULL) in myri10ge_allocate_rings()
1971 ss->tx.req_list = (struct mcp_kreq_ether_send *) in myri10ge_allocate_rings()
1972 ALIGN((unsigned long)ss->tx.req_bytes, 8); in myri10ge_allocate_rings()
1973 ss->tx.queue_active = 0; in myri10ge_allocate_rings()
1975 bytes = rx_ring_entries * sizeof(*ss->rx_small.shadow); in myri10ge_allocate_rings()
1976 ss->rx_small.shadow = kzalloc(bytes, GFP_KERNEL); in myri10ge_allocate_rings()
1977 if (ss->rx_small.shadow == NULL) in myri10ge_allocate_rings()
1980 bytes = rx_ring_entries * sizeof(*ss->rx_big.shadow); in myri10ge_allocate_rings()
1981 ss->rx_big.shadow = kzalloc(bytes, GFP_KERNEL); in myri10ge_allocate_rings()
1982 if (ss->rx_big.shadow == NULL) in myri10ge_allocate_rings()
1987 bytes = tx_ring_entries * sizeof(*ss->tx.info); in myri10ge_allocate_rings()
1988 ss->tx.info = kzalloc(bytes, GFP_KERNEL); in myri10ge_allocate_rings()
1989 if (ss->tx.info == NULL) in myri10ge_allocate_rings()
1992 bytes = rx_ring_entries * sizeof(*ss->rx_small.info); in myri10ge_allocate_rings()
1993 ss->rx_small.info = kzalloc(bytes, GFP_KERNEL); in myri10ge_allocate_rings()
1994 if (ss->rx_small.info == NULL) in myri10ge_allocate_rings()
1997 bytes = rx_ring_entries * sizeof(*ss->rx_big.info); in myri10ge_allocate_rings()
1998 ss->rx_big.info = kzalloc(bytes, GFP_KERNEL); in myri10ge_allocate_rings()
1999 if (ss->rx_big.info == NULL) in myri10ge_allocate_rings()
2003 ss->rx_big.cnt = 0; in myri10ge_allocate_rings()
2004 ss->rx_small.cnt = 0; in myri10ge_allocate_rings()
2005 ss->rx_big.fill_cnt = 0; in myri10ge_allocate_rings()
2006 ss->rx_small.fill_cnt = 0; in myri10ge_allocate_rings()
2007 ss->rx_small.page_offset = MYRI10GE_ALLOC_SIZE; in myri10ge_allocate_rings()
2008 ss->rx_big.page_offset = MYRI10GE_ALLOC_SIZE; in myri10ge_allocate_rings()
2009 ss->rx_small.watchdog_needed = 0; in myri10ge_allocate_rings()
2010 ss->rx_big.watchdog_needed = 0; in myri10ge_allocate_rings()
2012 ss->rx_small.fill_cnt = ss->rx_small.mask + 1; in myri10ge_allocate_rings()
2014 myri10ge_alloc_rx_pages(mgp, &ss->rx_small, in myri10ge_allocate_rings()
2018 if (ss->rx_small.fill_cnt < ss->rx_small.mask + 1) { in myri10ge_allocate_rings()
2020 slice, ss->rx_small.fill_cnt); in myri10ge_allocate_rings()
2024 myri10ge_alloc_rx_pages(mgp, &ss->rx_big, mgp->big_bytes, 0); in myri10ge_allocate_rings()
2025 if (ss->rx_big.fill_cnt < ss->rx_big.mask + 1) { in myri10ge_allocate_rings()
2027 slice, ss->rx_big.fill_cnt); in myri10ge_allocate_rings()
2034 for (i = ss->rx_big.cnt; i < ss->rx_big.fill_cnt; i++) { in myri10ge_allocate_rings()
2035 int idx = i & ss->rx_big.mask; in myri10ge_allocate_rings()
2036 myri10ge_unmap_rx_page(mgp->pdev, &ss->rx_big.info[idx], in myri10ge_allocate_rings()
2038 put_page(ss->rx_big.info[idx].page); in myri10ge_allocate_rings()
2043 ss->rx_small.fill_cnt = ss->rx_small.cnt; in myri10ge_allocate_rings()
2044 for (i = ss->rx_small.cnt; i < ss->rx_small.fill_cnt; i++) { in myri10ge_allocate_rings()
2045 int idx = i & ss->rx_small.mask; in myri10ge_allocate_rings()
2046 myri10ge_unmap_rx_page(mgp->pdev, &ss->rx_small.info[idx], in myri10ge_allocate_rings()
2048 put_page(ss->rx_small.info[idx].page); in myri10ge_allocate_rings()
2051 kfree(ss->rx_big.info); in myri10ge_allocate_rings()
2054 kfree(ss->rx_small.info); in myri10ge_allocate_rings()
2057 kfree(ss->tx.info); in myri10ge_allocate_rings()
2060 kfree(ss->rx_big.shadow); in myri10ge_allocate_rings()
2063 kfree(ss->rx_small.shadow); in myri10ge_allocate_rings()
2066 kfree(ss->tx.req_bytes); in myri10ge_allocate_rings()
2067 ss->tx.req_bytes = NULL; in myri10ge_allocate_rings()
2068 ss->tx.req_list = NULL; in myri10ge_allocate_rings()
2074 static void myri10ge_free_rings(struct myri10ge_slice_state *ss) in myri10ge_free_rings() argument
2076 struct myri10ge_priv *mgp = ss->mgp; in myri10ge_free_rings()
2082 if (ss->tx.req_list == NULL) in myri10ge_free_rings()
2085 for (i = ss->rx_big.cnt; i < ss->rx_big.fill_cnt; i++) { in myri10ge_free_rings()
2086 idx = i & ss->rx_big.mask; in myri10ge_free_rings()
2087 if (i == ss->rx_big.fill_cnt - 1) in myri10ge_free_rings()
2088 ss->rx_big.info[idx].page_offset = MYRI10GE_ALLOC_SIZE; in myri10ge_free_rings()
2089 myri10ge_unmap_rx_page(mgp->pdev, &ss->rx_big.info[idx], in myri10ge_free_rings()
2091 put_page(ss->rx_big.info[idx].page); in myri10ge_free_rings()
2095 ss->rx_small.fill_cnt = ss->rx_small.cnt; in myri10ge_free_rings()
2096 for (i = ss->rx_small.cnt; i < ss->rx_small.fill_cnt; i++) { in myri10ge_free_rings()
2097 idx = i & ss->rx_small.mask; in myri10ge_free_rings()
2098 if (i == ss->rx_small.fill_cnt - 1) in myri10ge_free_rings()
2099 ss->rx_small.info[idx].page_offset = in myri10ge_free_rings()
2101 myri10ge_unmap_rx_page(mgp->pdev, &ss->rx_small.info[idx], in myri10ge_free_rings()
2103 put_page(ss->rx_small.info[idx].page); in myri10ge_free_rings()
2105 tx = &ss->tx; in myri10ge_free_rings()
2116 ss->stats.tx_dropped++; in myri10ge_free_rings()
2131 kfree(ss->rx_big.info); in myri10ge_free_rings()
2133 kfree(ss->rx_small.info); in myri10ge_free_rings()
2135 kfree(ss->tx.info); in myri10ge_free_rings()
2137 kfree(ss->rx_big.shadow); in myri10ge_free_rings()
2139 kfree(ss->rx_small.shadow); in myri10ge_free_rings()
2141 kfree(ss->tx.req_bytes); in myri10ge_free_rings()
2142 ss->tx.req_bytes = NULL; in myri10ge_free_rings()
2143 ss->tx.req_list = NULL; in myri10ge_free_rings()
2149 struct myri10ge_slice_state *ss; in myri10ge_request_irq() local
2181 ss = &mgp->ss[i]; in myri10ge_request_irq()
2182 snprintf(ss->irq_desc, sizeof(ss->irq_desc), in myri10ge_request_irq()
2185 myri10ge_intr, 0, ss->irq_desc, in myri10ge_request_irq()
2186 ss); in myri10ge_request_irq()
2193 &mgp->ss[i]); in myri10ge_request_irq()
2202 mgp->dev->name, &mgp->ss[0]); in myri10ge_request_irq()
2219 free_irq(mgp->msix_vectors[i].vector, &mgp->ss[i]); in myri10ge_free_irq()
2221 free_irq(pdev->irq, &mgp->ss[0]); in myri10ge_free_irq()
2232 struct myri10ge_slice_state *ss; in myri10ge_get_txrx() local
2235 ss = &mgp->ss[slice]; in myri10ge_get_txrx()
2241 ss->tx.lanai = (struct mcp_kreq_ether_send __iomem *) in myri10ge_get_txrx()
2247 ss->rx_small.lanai = (struct mcp_kreq_ether_recv __iomem *) in myri10ge_get_txrx()
2252 ss->rx_big.lanai = (struct mcp_kreq_ether_recv __iomem *) in myri10ge_get_txrx()
2255 ss->tx.send_go = (__iomem __be32 *) in myri10ge_get_txrx()
2257 ss->tx.send_stop = (__iomem __be32 *) in myri10ge_get_txrx()
2266 struct myri10ge_slice_state *ss; in myri10ge_set_stats() local
2269 ss = &mgp->ss[slice]; in myri10ge_set_stats()
2270 cmd.data0 = MYRI10GE_LOWPART_TO_U32(ss->fw_stats_bus); in myri10ge_set_stats()
2271 cmd.data1 = MYRI10GE_HIGHPART_TO_U32(ss->fw_stats_bus); in myri10ge_set_stats()
2275 dma_addr_t bus = ss->fw_stats_bus; in myri10ge_set_stats()
2294 struct myri10ge_slice_state *ss; in myri10ge_open() local
2388 ss = &mgp->ss[slice]; in myri10ge_open()
2395 status = myri10ge_allocate_rings(ss); in myri10ge_open()
2410 napi_enable(&(ss)->napi); in myri10ge_open()
2458 napi_disable(&mgp->ss[slice].napi); in myri10ge_open()
2461 myri10ge_free_rings(&mgp->ss[i]); in myri10ge_open()
2480 if (mgp->ss[0].tx.req_bytes == NULL) in myri10ge_close()
2486 napi_disable(&mgp->ss[i].napi); in myri10ge_close()
2507 myri10ge_free_rings(&mgp->ss[i]); in myri10ge_close()
2623 struct myri10ge_slice_state *ss; in myri10ge_xmit() local
2638 ss = &mgp->ss[queue]; in myri10ge_xmit()
2640 tx = &ss->tx; in myri10ge_xmit()
2717 ss->stats.tx_dropped += 1; in myri10ge_xmit()
2882 ss->stats.tx_dropped += 1; in myri10ge_xmit()
2892 struct myri10ge_slice_state *ss; in myri10ge_sw_tso() local
2917 ss = &mgp->ss[skb_get_queue_mapping(skb)]; in myri10ge_sw_tso()
2919 ss->stats.tx_dropped += 1; in myri10ge_sw_tso()
2931 slice_stats = &mgp->ss[i].stats; in myri10ge_get_stats()
3342 myri10ge_check_slice(struct myri10ge_slice_state *ss, int *reset_needed, in myri10ge_check_slice() argument
3345 struct myri10ge_priv *mgp = ss->mgp; in myri10ge_check_slice()
3346 int slice = ss - mgp->ss; in myri10ge_check_slice()
3348 if (ss->tx.req != ss->tx.done && in myri10ge_check_slice()
3349 ss->tx.done == ss->watchdog_tx_done && in myri10ge_check_slice()
3350 ss->watchdog_tx_req != ss->watchdog_tx_done) { in myri10ge_check_slice()
3359 slice, ss->tx.queue_active, ss->tx.req, in myri10ge_check_slice()
3360 ss->tx.done, ss->tx.pkt_start, in myri10ge_check_slice()
3361 ss->tx.pkt_done, in myri10ge_check_slice()
3362 (int)ntohl(mgp->ss[slice].fw_stats-> in myri10ge_check_slice()
3365 ss->stuck = 1; in myri10ge_check_slice()
3368 if (ss->watchdog_tx_done != ss->tx.done || in myri10ge_check_slice()
3369 ss->watchdog_rx_done != ss->rx_done.cnt) { in myri10ge_check_slice()
3372 ss->watchdog_tx_done = ss->tx.done; in myri10ge_check_slice()
3373 ss->watchdog_tx_req = ss->tx.req; in myri10ge_check_slice()
3374 ss->watchdog_rx_done = ss->rx_done.cnt; in myri10ge_check_slice()
3385 struct myri10ge_slice_state *ss; in myri10ge_watchdog() local
3436 rx_pause_cnt = ntohl(mgp->ss[0].fw_stats->dropped_pause); in myri10ge_watchdog()
3438 ss = mgp->ss; in myri10ge_watchdog()
3439 if (ss->stuck) { in myri10ge_watchdog()
3440 myri10ge_check_slice(ss, &reset_needed, in myri10ge_watchdog()
3443 ss->stuck = 0; in myri10ge_watchdog()
3476 struct myri10ge_slice_state *ss; in myri10ge_watchdog_timer() local
3483 rx_pause_cnt = ntohl(mgp->ss[0].fw_stats->dropped_pause); in myri10ge_watchdog_timer()
3488 ss = &mgp->ss[i]; in myri10ge_watchdog_timer()
3489 if (ss->rx_small.watchdog_needed) { in myri10ge_watchdog_timer()
3490 myri10ge_alloc_rx_pages(mgp, &ss->rx_small, in myri10ge_watchdog_timer()
3493 if (ss->rx_small.fill_cnt - ss->rx_small.cnt >= in myri10ge_watchdog_timer()
3495 ss->rx_small.watchdog_needed = 0; in myri10ge_watchdog_timer()
3497 if (ss->rx_big.watchdog_needed) { in myri10ge_watchdog_timer()
3498 myri10ge_alloc_rx_pages(mgp, &ss->rx_big, in myri10ge_watchdog_timer()
3500 if (ss->rx_big.fill_cnt - ss->rx_big.cnt >= in myri10ge_watchdog_timer()
3502 ss->rx_big.watchdog_needed = 0; in myri10ge_watchdog_timer()
3504 myri10ge_check_slice(ss, &reset_needed, &busy_slice_cnt, in myri10ge_watchdog_timer()
3529 struct myri10ge_slice_state *ss; in myri10ge_free_slices() local
3534 if (mgp->ss == NULL) in myri10ge_free_slices()
3538 ss = &mgp->ss[i]; in myri10ge_free_slices()
3539 if (ss->rx_done.entry != NULL) { in myri10ge_free_slices()
3541 sizeof(*ss->rx_done.entry); in myri10ge_free_slices()
3543 ss->rx_done.entry, ss->rx_done.bus); in myri10ge_free_slices()
3544 ss->rx_done.entry = NULL; in myri10ge_free_slices()
3546 if (ss->fw_stats != NULL) { in myri10ge_free_slices()
3547 bytes = sizeof(*ss->fw_stats); in myri10ge_free_slices()
3549 ss->fw_stats, ss->fw_stats_bus); in myri10ge_free_slices()
3550 ss->fw_stats = NULL; in myri10ge_free_slices()
3552 __netif_napi_del(&ss->napi); in myri10ge_free_slices()
3556 kfree(mgp->ss); in myri10ge_free_slices()
3557 mgp->ss = NULL; in myri10ge_free_slices()
3562 struct myri10ge_slice_state *ss; in myri10ge_alloc_slices() local
3567 bytes = sizeof(*mgp->ss) * mgp->num_slices; in myri10ge_alloc_slices()
3568 mgp->ss = kzalloc(bytes, GFP_KERNEL); in myri10ge_alloc_slices()
3569 if (mgp->ss == NULL) { in myri10ge_alloc_slices()
3574 ss = &mgp->ss[i]; in myri10ge_alloc_slices()
3575 bytes = mgp->max_intr_slots * sizeof(*ss->rx_done.entry); in myri10ge_alloc_slices()
3576 ss->rx_done.entry = dma_alloc_coherent(&pdev->dev, bytes, in myri10ge_alloc_slices()
3577 &ss->rx_done.bus, in myri10ge_alloc_slices()
3579 if (ss->rx_done.entry == NULL) in myri10ge_alloc_slices()
3581 bytes = sizeof(*ss->fw_stats); in myri10ge_alloc_slices()
3582 ss->fw_stats = dma_alloc_coherent(&pdev->dev, bytes, in myri10ge_alloc_slices()
3583 &ss->fw_stats_bus, in myri10ge_alloc_slices()
3585 if (ss->fw_stats == NULL) in myri10ge_alloc_slices()
3587 ss->mgp = mgp; in myri10ge_alloc_slices()
3588 ss->dev = mgp->dev; in myri10ge_alloc_slices()
3589 netif_napi_add(ss->dev, &ss->napi, myri10ge_poll, in myri10ge_alloc_slices()