rxdes 61 drivers/net/ethernet/faraday/ftgmac100.c struct ftgmac100_rxdes *rxdes; rxdes 383 drivers/net/ethernet/faraday/ftgmac100.c struct ftgmac100_rxdes *rxdes, gfp_t gfp) rxdes 413 drivers/net/ethernet/faraday/ftgmac100.c rxdes->rxdes3 = cpu_to_le32(map); rxdes 420 drivers/net/ethernet/faraday/ftgmac100.c rxdes->rxdes0 = cpu_to_le32(priv->rxdes0_edorr_mask); rxdes 422 drivers/net/ethernet/faraday/ftgmac100.c rxdes->rxdes0 = 0; rxdes 452 drivers/net/ethernet/faraday/ftgmac100.c struct ftgmac100_rxdes *rxdes; rxdes 460 drivers/net/ethernet/faraday/ftgmac100.c rxdes = &priv->rxdes[pointer]; rxdes 463 drivers/net/ethernet/faraday/ftgmac100.c status = le32_to_cpu(rxdes->rxdes0); rxdes 479 drivers/net/ethernet/faraday/ftgmac100.c csum_vlan = le32_to_cpu(rxdes->rxdes1); rxdes 505 drivers/net/ethernet/faraday/ftgmac100.c ftgmac100_alloc_rx_buf(priv, pointer, rxdes, GFP_ATOMIC); rxdes 539 drivers/net/ethernet/faraday/ftgmac100.c map = le32_to_cpu(rxdes->rxdes3); rxdes 553 drivers/net/ethernet/faraday/ftgmac100.c ftgmac100_alloc_rx_buf(priv, pointer, rxdes, GFP_ATOMIC); rxdes 572 drivers/net/ethernet/faraday/ftgmac100.c rxdes->rxdes0 = cpu_to_le32(status & priv->rxdes0_edorr_mask); rxdes 863 drivers/net/ethernet/faraday/ftgmac100.c struct ftgmac100_rxdes *rxdes = &priv->rxdes[i]; rxdes 865 drivers/net/ethernet/faraday/ftgmac100.c dma_addr_t map = le32_to_cpu(rxdes->rxdes3); rxdes 894 drivers/net/ethernet/faraday/ftgmac100.c if (priv->rxdes) rxdes 897 drivers/net/ethernet/faraday/ftgmac100.c priv->rxdes, priv->rxdes_dma); rxdes 898 drivers/net/ethernet/faraday/ftgmac100.c priv->rxdes = NULL; rxdes 925 drivers/net/ethernet/faraday/ftgmac100.c priv->rxdes = dma_alloc_coherent(priv->dev, rxdes 928 drivers/net/ethernet/faraday/ftgmac100.c if (!priv->rxdes) rxdes 949 drivers/net/ethernet/faraday/ftgmac100.c struct ftgmac100_rxdes *rxdes = NULL; rxdes 962 drivers/net/ethernet/faraday/ftgmac100.c rxdes = &priv->rxdes[i]; rxdes 963 drivers/net/ethernet/faraday/ftgmac100.c rxdes->rxdes0 = 0; rxdes 964 drivers/net/ethernet/faraday/ftgmac100.c rxdes->rxdes3 = cpu_to_le32(priv->rx_scratch_dma); rxdes 967 drivers/net/ethernet/faraday/ftgmac100.c rxdes->rxdes0 |= cpu_to_le32(priv->rxdes0_edorr_mask); rxdes 985 drivers/net/ethernet/faraday/ftgmac100.c struct ftgmac100_rxdes *rxdes = &priv->rxdes[i]; rxdes 987 drivers/net/ethernet/faraday/ftgmac100.c if (ftgmac100_alloc_rx_buf(priv, i, rxdes, GFP_KERNEL)) rxdes 1283 drivers/net/ethernet/faraday/ftgmac100.c struct ftgmac100_rxdes *rxdes = &priv->rxdes[priv->rx_pointer]; rxdes 1286 drivers/net/ethernet/faraday/ftgmac100.c return !!(rxdes->rxdes0 & cpu_to_le32(FTGMAC100_RXDES0_RXPKT_RDY)); rxdes 46 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes rxdes[RX_QUEUE_ENTRIES]; rxdes 73 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes, gfp_t gfp); rxdes 170 drivers/net/ethernet/faraday/ftmac100.c offsetof(struct ftmac100_descs, rxdes)); rxdes 191 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_first_segment(struct ftmac100_rxdes *rxdes) rxdes 193 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_FRS); rxdes 196 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_last_segment(struct ftmac100_rxdes *rxdes) rxdes 198 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_LRS); rxdes 201 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_owned_by_dma(struct ftmac100_rxdes *rxdes) rxdes 203 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RXDMA_OWN); rxdes 206 drivers/net/ethernet/faraday/ftmac100.c static void ftmac100_rxdes_set_dma_own(struct ftmac100_rxdes *rxdes) rxdes 209 drivers/net/ethernet/faraday/ftmac100.c rxdes->rxdes0 = cpu_to_le32(FTMAC100_RXDES0_RXDMA_OWN); rxdes 212 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_rx_error(struct ftmac100_rxdes *rxdes) rxdes 214 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RX_ERR); rxdes 217 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_crc_error(struct ftmac100_rxdes *rxdes) rxdes 219 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_CRC_ERR); rxdes 222 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_frame_too_long(struct ftmac100_rxdes *rxdes) rxdes 224 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_FTL); rxdes 227 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_runt(struct ftmac100_rxdes *rxdes) rxdes 229 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RUNT); rxdes 232 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_odd_nibble(struct ftmac100_rxdes *rxdes) rxdes 234 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RX_ODD_NB); rxdes 237 drivers/net/ethernet/faraday/ftmac100.c static unsigned int ftmac100_rxdes_frame_length(struct ftmac100_rxdes *rxdes) rxdes 239 drivers/net/ethernet/faraday/ftmac100.c return le32_to_cpu(rxdes->rxdes0) & FTMAC100_RXDES0_RFL; rxdes 242 drivers/net/ethernet/faraday/ftmac100.c static bool ftmac100_rxdes_multicast(struct ftmac100_rxdes *rxdes) rxdes 244 drivers/net/ethernet/faraday/ftmac100.c return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_MULTICAST); rxdes 247 drivers/net/ethernet/faraday/ftmac100.c static void ftmac100_rxdes_set_buffer_size(struct ftmac100_rxdes *rxdes, rxdes 250 drivers/net/ethernet/faraday/ftmac100.c rxdes->rxdes1 &= cpu_to_le32(FTMAC100_RXDES1_EDORR); rxdes 251 drivers/net/ethernet/faraday/ftmac100.c rxdes->rxdes1 |= cpu_to_le32(FTMAC100_RXDES1_RXBUF_SIZE(size)); rxdes 254 drivers/net/ethernet/faraday/ftmac100.c static void ftmac100_rxdes_set_end_of_ring(struct ftmac100_rxdes *rxdes) rxdes 256 drivers/net/ethernet/faraday/ftmac100.c rxdes->rxdes1 |= cpu_to_le32(FTMAC100_RXDES1_EDORR); rxdes 259 drivers/net/ethernet/faraday/ftmac100.c static void ftmac100_rxdes_set_dma_addr(struct ftmac100_rxdes *rxdes, rxdes 262 drivers/net/ethernet/faraday/ftmac100.c rxdes->rxdes2 = cpu_to_le32(addr); rxdes 265 drivers/net/ethernet/faraday/ftmac100.c static dma_addr_t ftmac100_rxdes_get_dma_addr(struct ftmac100_rxdes *rxdes) rxdes 267 drivers/net/ethernet/faraday/ftmac100.c return le32_to_cpu(rxdes->rxdes2); rxdes 274 drivers/net/ethernet/faraday/ftmac100.c static void ftmac100_rxdes_set_page(struct ftmac100_rxdes *rxdes, struct page *page) rxdes 276 drivers/net/ethernet/faraday/ftmac100.c rxdes->rxdes3 = (unsigned int)page; rxdes 279 drivers/net/ethernet/faraday/ftmac100.c static struct page *ftmac100_rxdes_get_page(struct ftmac100_rxdes *rxdes) rxdes 281 drivers/net/ethernet/faraday/ftmac100.c return (struct page *)rxdes->rxdes3; rxdes 299 drivers/net/ethernet/faraday/ftmac100.c return &priv->descs->rxdes[priv->rx_pointer]; rxdes 305 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes = ftmac100_current_rxdes(priv); rxdes 307 drivers/net/ethernet/faraday/ftmac100.c while (!ftmac100_rxdes_owned_by_dma(rxdes)) { rxdes 308 drivers/net/ethernet/faraday/ftmac100.c if (ftmac100_rxdes_first_segment(rxdes)) rxdes 309 drivers/net/ethernet/faraday/ftmac100.c return rxdes; rxdes 311 drivers/net/ethernet/faraday/ftmac100.c ftmac100_rxdes_set_dma_own(rxdes); rxdes 313 drivers/net/ethernet/faraday/ftmac100.c rxdes = ftmac100_current_rxdes(priv); rxdes 320 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes) rxdes 325 drivers/net/ethernet/faraday/ftmac100.c if (unlikely(ftmac100_rxdes_rx_error(rxdes))) { rxdes 333 drivers/net/ethernet/faraday/ftmac100.c if (unlikely(ftmac100_rxdes_crc_error(rxdes))) { rxdes 341 drivers/net/ethernet/faraday/ftmac100.c if (unlikely(ftmac100_rxdes_frame_too_long(rxdes))) { rxdes 347 drivers/net/ethernet/faraday/ftmac100.c } else if (unlikely(ftmac100_rxdes_runt(rxdes))) { rxdes 353 drivers/net/ethernet/faraday/ftmac100.c } else if (unlikely(ftmac100_rxdes_odd_nibble(rxdes))) { rxdes 367 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes = ftmac100_current_rxdes(priv); rxdes 371 drivers/net/ethernet/faraday/ftmac100.c netdev_dbg(netdev, "drop packet %p\n", rxdes); rxdes 374 drivers/net/ethernet/faraday/ftmac100.c if (ftmac100_rxdes_last_segment(rxdes)) rxdes 377 drivers/net/ethernet/faraday/ftmac100.c ftmac100_rxdes_set_dma_own(rxdes); rxdes 379 drivers/net/ethernet/faraday/ftmac100.c rxdes = ftmac100_current_rxdes(priv); rxdes 380 drivers/net/ethernet/faraday/ftmac100.c } while (!done && !ftmac100_rxdes_owned_by_dma(rxdes)); rxdes 388 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes; rxdes 395 drivers/net/ethernet/faraday/ftmac100.c rxdes = ftmac100_rx_locate_first_segment(priv); rxdes 396 drivers/net/ethernet/faraday/ftmac100.c if (!rxdes) rxdes 399 drivers/net/ethernet/faraday/ftmac100.c if (unlikely(ftmac100_rx_packet_error(priv, rxdes))) { rxdes 408 drivers/net/ethernet/faraday/ftmac100.c ret = ftmac100_rxdes_last_segment(rxdes); rxdes 421 drivers/net/ethernet/faraday/ftmac100.c if (unlikely(ftmac100_rxdes_multicast(rxdes))) rxdes 424 drivers/net/ethernet/faraday/ftmac100.c map = ftmac100_rxdes_get_dma_addr(rxdes); rxdes 427 drivers/net/ethernet/faraday/ftmac100.c length = ftmac100_rxdes_frame_length(rxdes); rxdes 428 drivers/net/ethernet/faraday/ftmac100.c page = ftmac100_rxdes_get_page(rxdes); rxdes 441 drivers/net/ethernet/faraday/ftmac100.c ftmac100_alloc_rx_page(priv, rxdes, GFP_ATOMIC); rxdes 660 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes, gfp_t gfp) rxdes 681 drivers/net/ethernet/faraday/ftmac100.c ftmac100_rxdes_set_page(rxdes, page); rxdes 682 drivers/net/ethernet/faraday/ftmac100.c ftmac100_rxdes_set_dma_addr(rxdes, map); rxdes 683 drivers/net/ethernet/faraday/ftmac100.c ftmac100_rxdes_set_buffer_size(rxdes, RX_BUF_SIZE); rxdes 684 drivers/net/ethernet/faraday/ftmac100.c ftmac100_rxdes_set_dma_own(rxdes); rxdes 693 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes = &priv->descs->rxdes[i]; rxdes 694 drivers/net/ethernet/faraday/ftmac100.c struct page *page = ftmac100_rxdes_get_page(rxdes); rxdes 695 drivers/net/ethernet/faraday/ftmac100.c dma_addr_t map = ftmac100_rxdes_get_dma_addr(rxdes); rxdes 731 drivers/net/ethernet/faraday/ftmac100.c ftmac100_rxdes_set_end_of_ring(&priv->descs->rxdes[RX_QUEUE_ENTRIES - 1]); rxdes 734 drivers/net/ethernet/faraday/ftmac100.c struct ftmac100_rxdes *rxdes = &priv->descs->rxdes[i]; rxdes 736 drivers/net/ethernet/faraday/ftmac100.c if (ftmac100_alloc_rx_page(priv, rxdes, GFP_KERNEL))