xgbe-desc.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. /*
  2. * AMD 10Gb Ethernet driver
  3. *
  4. * This file is available to you under your choice of the following two
  5. * licenses:
  6. *
  7. * License 1: GPLv2
  8. *
  9. * Copyright (c) 2014 Advanced Micro Devices, Inc.
  10. *
  11. * This file is free software; you may copy, redistribute and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation, either version 2 of the License, or (at
  14. * your option) any later version.
  15. *
  16. * This file is distributed in the hope that it will be useful, but
  17. * WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  23. *
  24. * This file incorporates work covered by the following copyright and
  25. * permission notice:
  26. * The Synopsys DWC ETHER XGMAC Software Driver and documentation
  27. * (hereinafter "Software") is an unsupported proprietary work of Synopsys,
  28. * Inc. unless otherwise expressly agreed to in writing between Synopsys
  29. * and you.
  30. *
  31. * The Software IS NOT an item of Licensed Software or Licensed Product
  32. * under any End User Software License Agreement or Agreement for Licensed
  33. * Product with Synopsys or any supplement thereto. Permission is hereby
  34. * granted, free of charge, to any person obtaining a copy of this software
  35. * annotated with this license and the Software, to deal in the Software
  36. * without restriction, including without limitation the rights to use,
  37. * copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  38. * of the Software, and to permit persons to whom the Software is furnished
  39. * to do so, subject to the following conditions:
  40. *
  41. * The above copyright notice and this permission notice shall be included
  42. * in all copies or substantial portions of the Software.
  43. *
  44. * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS"
  45. * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  46. * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  47. * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS
  48. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  49. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  50. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  51. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  52. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  53. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  54. * THE POSSIBILITY OF SUCH DAMAGE.
  55. *
  56. *
  57. * License 2: Modified BSD
  58. *
  59. * Copyright (c) 2014 Advanced Micro Devices, Inc.
  60. * All rights reserved.
  61. *
  62. * Redistribution and use in source and binary forms, with or without
  63. * modification, are permitted provided that the following conditions are met:
  64. * * Redistributions of source code must retain the above copyright
  65. * notice, this list of conditions and the following disclaimer.
  66. * * Redistributions in binary form must reproduce the above copyright
  67. * notice, this list of conditions and the following disclaimer in the
  68. * documentation and/or other materials provided with the distribution.
  69. * * Neither the name of Advanced Micro Devices, Inc. nor the
  70. * names of its contributors may be used to endorse or promote products
  71. * derived from this software without specific prior written permission.
  72. *
  73. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  74. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  75. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  76. * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  77. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  78. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  79. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  80. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  81. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  82. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  83. *
  84. * This file incorporates work covered by the following copyright and
  85. * permission notice:
  86. * The Synopsys DWC ETHER XGMAC Software Driver and documentation
  87. * (hereinafter "Software") is an unsupported proprietary work of Synopsys,
  88. * Inc. unless otherwise expressly agreed to in writing between Synopsys
  89. * and you.
  90. *
  91. * The Software IS NOT an item of Licensed Software or Licensed Product
  92. * under any End User Software License Agreement or Agreement for Licensed
  93. * Product with Synopsys or any supplement thereto. Permission is hereby
  94. * granted, free of charge, to any person obtaining a copy of this software
  95. * annotated with this license and the Software, to deal in the Software
  96. * without restriction, including without limitation the rights to use,
  97. * copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  98. * of the Software, and to permit persons to whom the Software is furnished
  99. * to do so, subject to the following conditions:
  100. *
  101. * The above copyright notice and this permission notice shall be included
  102. * in all copies or substantial portions of the Software.
  103. *
  104. * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS"
  105. * BASIS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  106. * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  107. * PARTICULAR PURPOSE ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS
  108. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  109. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  110. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  111. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  112. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  113. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  114. * THE POSSIBILITY OF SUCH DAMAGE.
  115. */
  116. #include "xgbe.h"
  117. #include "xgbe-common.h"
  118. static void xgbe_unmap_skb(struct xgbe_prv_data *, struct xgbe_ring_data *);
  119. static void xgbe_free_ring(struct xgbe_prv_data *pdata,
  120. struct xgbe_ring *ring)
  121. {
  122. struct xgbe_ring_data *rdata;
  123. unsigned int i;
  124. if (!ring)
  125. return;
  126. if (ring->rdata) {
  127. for (i = 0; i < ring->rdesc_count; i++) {
  128. rdata = GET_DESC_DATA(ring, i);
  129. xgbe_unmap_skb(pdata, rdata);
  130. }
  131. kfree(ring->rdata);
  132. ring->rdata = NULL;
  133. }
  134. if (ring->rdesc) {
  135. dma_free_coherent(pdata->dev,
  136. (sizeof(struct xgbe_ring_desc) *
  137. ring->rdesc_count),
  138. ring->rdesc, ring->rdesc_dma);
  139. ring->rdesc = NULL;
  140. }
  141. }
  142. static void xgbe_free_ring_resources(struct xgbe_prv_data *pdata)
  143. {
  144. struct xgbe_channel *channel;
  145. unsigned int i;
  146. DBGPR("-->xgbe_free_ring_resources\n");
  147. channel = pdata->channel;
  148. for (i = 0; i < pdata->channel_count; i++, channel++) {
  149. xgbe_free_ring(pdata, channel->tx_ring);
  150. xgbe_free_ring(pdata, channel->rx_ring);
  151. }
  152. DBGPR("<--xgbe_free_ring_resources\n");
  153. }
  154. static int xgbe_init_ring(struct xgbe_prv_data *pdata,
  155. struct xgbe_ring *ring, unsigned int rdesc_count)
  156. {
  157. DBGPR("-->xgbe_init_ring\n");
  158. if (!ring)
  159. return 0;
  160. /* Descriptors */
  161. ring->rdesc_count = rdesc_count;
  162. ring->rdesc = dma_alloc_coherent(pdata->dev,
  163. (sizeof(struct xgbe_ring_desc) *
  164. rdesc_count), &ring->rdesc_dma,
  165. GFP_KERNEL);
  166. if (!ring->rdesc)
  167. return -ENOMEM;
  168. /* Descriptor information */
  169. ring->rdata = kcalloc(rdesc_count, sizeof(struct xgbe_ring_data),
  170. GFP_KERNEL);
  171. if (!ring->rdata)
  172. return -ENOMEM;
  173. DBGPR(" rdesc=0x%p, rdesc_dma=0x%llx, rdata=0x%p\n",
  174. ring->rdesc, ring->rdesc_dma, ring->rdata);
  175. DBGPR("<--xgbe_init_ring\n");
  176. return 0;
  177. }
  178. static int xgbe_alloc_ring_resources(struct xgbe_prv_data *pdata)
  179. {
  180. struct xgbe_channel *channel;
  181. unsigned int i;
  182. int ret;
  183. DBGPR("-->xgbe_alloc_ring_resources\n");
  184. channel = pdata->channel;
  185. for (i = 0; i < pdata->channel_count; i++, channel++) {
  186. DBGPR(" %s - tx_ring:\n", channel->name);
  187. ret = xgbe_init_ring(pdata, channel->tx_ring,
  188. pdata->tx_desc_count);
  189. if (ret) {
  190. netdev_alert(pdata->netdev,
  191. "error initializing Tx ring\n");
  192. goto err_ring;
  193. }
  194. DBGPR(" %s - rx_ring:\n", channel->name);
  195. ret = xgbe_init_ring(pdata, channel->rx_ring,
  196. pdata->rx_desc_count);
  197. if (ret) {
  198. netdev_alert(pdata->netdev,
  199. "error initializing Tx ring\n");
  200. goto err_ring;
  201. }
  202. }
  203. DBGPR("<--xgbe_alloc_ring_resources\n");
  204. return 0;
  205. err_ring:
  206. xgbe_free_ring_resources(pdata);
  207. return ret;
  208. }
  209. static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata)
  210. {
  211. struct xgbe_hw_if *hw_if = &pdata->hw_if;
  212. struct xgbe_channel *channel;
  213. struct xgbe_ring *ring;
  214. struct xgbe_ring_data *rdata;
  215. struct xgbe_ring_desc *rdesc;
  216. dma_addr_t rdesc_dma;
  217. unsigned int i, j;
  218. DBGPR("-->xgbe_wrapper_tx_descriptor_init\n");
  219. channel = pdata->channel;
  220. for (i = 0; i < pdata->channel_count; i++, channel++) {
  221. ring = channel->tx_ring;
  222. if (!ring)
  223. break;
  224. rdesc = ring->rdesc;
  225. rdesc_dma = ring->rdesc_dma;
  226. for (j = 0; j < ring->rdesc_count; j++) {
  227. rdata = GET_DESC_DATA(ring, j);
  228. rdata->rdesc = rdesc;
  229. rdata->rdesc_dma = rdesc_dma;
  230. rdesc++;
  231. rdesc_dma += sizeof(struct xgbe_ring_desc);
  232. }
  233. ring->cur = 0;
  234. ring->dirty = 0;
  235. ring->tx.queue_stopped = 0;
  236. hw_if->tx_desc_init(channel);
  237. }
  238. DBGPR("<--xgbe_wrapper_tx_descriptor_init\n");
  239. }
  240. static void xgbe_wrapper_rx_descriptor_init(struct xgbe_prv_data *pdata)
  241. {
  242. struct xgbe_hw_if *hw_if = &pdata->hw_if;
  243. struct xgbe_channel *channel;
  244. struct xgbe_ring *ring;
  245. struct xgbe_ring_desc *rdesc;
  246. struct xgbe_ring_data *rdata;
  247. dma_addr_t rdesc_dma, skb_dma;
  248. struct sk_buff *skb = NULL;
  249. unsigned int i, j;
  250. DBGPR("-->xgbe_wrapper_rx_descriptor_init\n");
  251. channel = pdata->channel;
  252. for (i = 0; i < pdata->channel_count; i++, channel++) {
  253. ring = channel->rx_ring;
  254. if (!ring)
  255. break;
  256. rdesc = ring->rdesc;
  257. rdesc_dma = ring->rdesc_dma;
  258. for (j = 0; j < ring->rdesc_count; j++) {
  259. rdata = GET_DESC_DATA(ring, j);
  260. rdata->rdesc = rdesc;
  261. rdata->rdesc_dma = rdesc_dma;
  262. /* Allocate skb & assign to each rdesc */
  263. skb = dev_alloc_skb(pdata->rx_buf_size);
  264. if (skb == NULL)
  265. break;
  266. skb_dma = dma_map_single(pdata->dev, skb->data,
  267. pdata->rx_buf_size,
  268. DMA_FROM_DEVICE);
  269. if (dma_mapping_error(pdata->dev, skb_dma)) {
  270. netdev_alert(pdata->netdev,
  271. "failed to do the dma map\n");
  272. dev_kfree_skb_any(skb);
  273. break;
  274. }
  275. rdata->skb = skb;
  276. rdata->skb_dma = skb_dma;
  277. rdata->skb_dma_len = pdata->rx_buf_size;
  278. rdesc++;
  279. rdesc_dma += sizeof(struct xgbe_ring_desc);
  280. }
  281. ring->cur = 0;
  282. ring->dirty = 0;
  283. ring->rx.realloc_index = 0;
  284. ring->rx.realloc_threshold = 0;
  285. hw_if->rx_desc_init(channel);
  286. }
  287. DBGPR("<--xgbe_wrapper_rx_descriptor_init\n");
  288. }
  289. static void xgbe_unmap_skb(struct xgbe_prv_data *pdata,
  290. struct xgbe_ring_data *rdata)
  291. {
  292. if (rdata->skb_dma) {
  293. if (rdata->mapped_as_page) {
  294. dma_unmap_page(pdata->dev, rdata->skb_dma,
  295. rdata->skb_dma_len, DMA_TO_DEVICE);
  296. } else {
  297. dma_unmap_single(pdata->dev, rdata->skb_dma,
  298. rdata->skb_dma_len, DMA_TO_DEVICE);
  299. }
  300. rdata->skb_dma = 0;
  301. rdata->skb_dma_len = 0;
  302. }
  303. if (rdata->skb) {
  304. dev_kfree_skb_any(rdata->skb);
  305. rdata->skb = NULL;
  306. }
  307. rdata->tso_header = 0;
  308. rdata->len = 0;
  309. rdata->interrupt = 0;
  310. rdata->mapped_as_page = 0;
  311. }
  312. static int xgbe_map_tx_skb(struct xgbe_channel *channel, struct sk_buff *skb)
  313. {
  314. struct xgbe_prv_data *pdata = channel->pdata;
  315. struct xgbe_ring *ring = channel->tx_ring;
  316. struct xgbe_ring_data *rdata;
  317. struct xgbe_packet_data *packet;
  318. struct skb_frag_struct *frag;
  319. dma_addr_t skb_dma;
  320. unsigned int start_index, cur_index;
  321. unsigned int offset, tso, vlan, datalen, len;
  322. unsigned int i;
  323. DBGPR("-->xgbe_map_tx_skb: cur = %d\n", ring->cur);
  324. offset = 0;
  325. start_index = ring->cur;
  326. cur_index = ring->cur;
  327. packet = &ring->packet_data;
  328. packet->rdesc_count = 0;
  329. packet->length = 0;
  330. tso = XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES,
  331. TSO_ENABLE);
  332. vlan = XGMAC_GET_BITS(packet->attributes, TX_PACKET_ATTRIBUTES,
  333. VLAN_CTAG);
  334. /* Save space for a context descriptor if needed */
  335. if ((tso && (packet->mss != ring->tx.cur_mss)) ||
  336. (vlan && (packet->vlan_ctag != ring->tx.cur_vlan_ctag)))
  337. cur_index++;
  338. rdata = GET_DESC_DATA(ring, cur_index);
  339. if (tso) {
  340. DBGPR(" TSO packet\n");
  341. /* Map the TSO header */
  342. skb_dma = dma_map_single(pdata->dev, skb->data,
  343. packet->header_len, DMA_TO_DEVICE);
  344. if (dma_mapping_error(pdata->dev, skb_dma)) {
  345. netdev_alert(pdata->netdev, "dma_map_single failed\n");
  346. goto err_out;
  347. }
  348. rdata->skb_dma = skb_dma;
  349. rdata->skb_dma_len = packet->header_len;
  350. rdata->tso_header = 1;
  351. offset = packet->header_len;
  352. packet->length += packet->header_len;
  353. cur_index++;
  354. rdata = GET_DESC_DATA(ring, cur_index);
  355. }
  356. /* Map the (remainder of the) packet */
  357. for (datalen = skb_headlen(skb) - offset; datalen; ) {
  358. len = min_t(unsigned int, datalen, TX_MAX_BUF_SIZE);
  359. skb_dma = dma_map_single(pdata->dev, skb->data + offset, len,
  360. DMA_TO_DEVICE);
  361. if (dma_mapping_error(pdata->dev, skb_dma)) {
  362. netdev_alert(pdata->netdev, "dma_map_single failed\n");
  363. goto err_out;
  364. }
  365. rdata->skb_dma = skb_dma;
  366. rdata->skb_dma_len = len;
  367. DBGPR(" skb data: index=%u, dma=0x%llx, len=%u\n",
  368. cur_index, skb_dma, len);
  369. datalen -= len;
  370. offset += len;
  371. packet->length += len;
  372. cur_index++;
  373. rdata = GET_DESC_DATA(ring, cur_index);
  374. }
  375. for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
  376. DBGPR(" mapping frag %u\n", i);
  377. frag = &skb_shinfo(skb)->frags[i];
  378. offset = 0;
  379. for (datalen = skb_frag_size(frag); datalen; ) {
  380. len = min_t(unsigned int, datalen, TX_MAX_BUF_SIZE);
  381. skb_dma = skb_frag_dma_map(pdata->dev, frag, offset,
  382. len, DMA_TO_DEVICE);
  383. if (dma_mapping_error(pdata->dev, skb_dma)) {
  384. netdev_alert(pdata->netdev,
  385. "skb_frag_dma_map failed\n");
  386. goto err_out;
  387. }
  388. rdata->skb_dma = skb_dma;
  389. rdata->skb_dma_len = len;
  390. rdata->mapped_as_page = 1;
  391. DBGPR(" skb data: index=%u, dma=0x%llx, len=%u\n",
  392. cur_index, skb_dma, len);
  393. datalen -= len;
  394. offset += len;
  395. packet->length += len;
  396. cur_index++;
  397. rdata = GET_DESC_DATA(ring, cur_index);
  398. }
  399. }
  400. /* Save the skb address in the last entry */
  401. rdata->skb = skb;
  402. /* Save the number of descriptor entries used */
  403. packet->rdesc_count = cur_index - start_index;
  404. DBGPR("<--xgbe_map_tx_skb: count=%u\n", packet->rdesc_count);
  405. return packet->rdesc_count;
  406. err_out:
  407. while (start_index < cur_index) {
  408. rdata = GET_DESC_DATA(ring, start_index++);
  409. xgbe_unmap_skb(pdata, rdata);
  410. }
  411. DBGPR("<--xgbe_map_tx_skb: count=0\n");
  412. return 0;
  413. }
  414. static void xgbe_realloc_skb(struct xgbe_channel *channel)
  415. {
  416. struct xgbe_prv_data *pdata = channel->pdata;
  417. struct xgbe_hw_if *hw_if = &pdata->hw_if;
  418. struct xgbe_ring *ring = channel->rx_ring;
  419. struct xgbe_ring_data *rdata;
  420. struct sk_buff *skb = NULL;
  421. dma_addr_t skb_dma;
  422. int i;
  423. DBGPR("-->xgbe_realloc_skb: rx_ring->rx.realloc_index = %u\n",
  424. ring->rx.realloc_index);
  425. for (i = 0; i < ring->dirty; i++) {
  426. rdata = GET_DESC_DATA(ring, ring->rx.realloc_index);
  427. /* Reset rdata values */
  428. xgbe_unmap_skb(pdata, rdata);
  429. /* Allocate skb & assign to each rdesc */
  430. skb = dev_alloc_skb(pdata->rx_buf_size);
  431. if (skb == NULL) {
  432. netdev_alert(pdata->netdev,
  433. "failed to allocate skb\n");
  434. break;
  435. }
  436. skb_dma = dma_map_single(pdata->dev, skb->data,
  437. pdata->rx_buf_size, DMA_FROM_DEVICE);
  438. if (dma_mapping_error(pdata->dev, skb_dma)) {
  439. netdev_alert(pdata->netdev,
  440. "failed to do the dma map\n");
  441. dev_kfree_skb_any(skb);
  442. break;
  443. }
  444. rdata->skb = skb;
  445. rdata->skb_dma = skb_dma;
  446. rdata->skb_dma_len = pdata->rx_buf_size;
  447. hw_if->rx_desc_reset(rdata);
  448. ring->rx.realloc_index++;
  449. }
  450. ring->dirty = 0;
  451. DBGPR("<--xgbe_realloc_skb\n");
  452. }
  453. void xgbe_init_function_ptrs_desc(struct xgbe_desc_if *desc_if)
  454. {
  455. DBGPR("-->xgbe_init_function_ptrs_desc\n");
  456. desc_if->alloc_ring_resources = xgbe_alloc_ring_resources;
  457. desc_if->free_ring_resources = xgbe_free_ring_resources;
  458. desc_if->map_tx_skb = xgbe_map_tx_skb;
  459. desc_if->realloc_skb = xgbe_realloc_skb;
  460. desc_if->unmap_skb = xgbe_unmap_skb;
  461. desc_if->wrapper_tx_desc_init = xgbe_wrapper_tx_descriptor_init;
  462. desc_if->wrapper_rx_desc_init = xgbe_wrapper_rx_descriptor_init;
  463. DBGPR("<--xgbe_init_function_ptrs_desc\n");
  464. }