Lines Matching refs:kdev
304 struct device *kdev; in bcm_enet_receive_queue() local
309 kdev = &priv->pdev->dev; in bcm_enet_receive_queue()
381 dma_sync_single_for_cpu(kdev, desc->address, in bcm_enet_receive_queue()
384 dma_sync_single_for_device(kdev, desc->address, in bcm_enet_receive_queue()
387 dma_unmap_single(kdev, desc->address, in bcm_enet_receive_queue()
869 static void bcm_enet_free_rx_buf_ring(struct device *kdev, struct bcm_enet_priv *priv) in bcm_enet_free_rx_buf_ring() argument
880 dma_unmap_single(kdev, desc->address, priv->rx_buf_size, in bcm_enet_free_rx_buf_ring()
894 struct device *kdev; in bcm_enet_open() local
903 kdev = &priv->pdev->dev; in bcm_enet_open()
914 dev_err(kdev, "could not attach to PHY\n"); in bcm_enet_open()
964 p = dma_alloc_coherent(kdev, size, &priv->rx_desc_dma, GFP_KERNEL); in bcm_enet_open()
975 p = dma_alloc_coherent(kdev, size, &priv->tx_desc_dma, GFP_KERNEL); in bcm_enet_open()
1017 dev_err(kdev, "cannot allocate rx buffer queue\n"); in bcm_enet_open()
1111 bcm_enet_free_rx_buf_ring(kdev, priv); in bcm_enet_open()
1117 dma_free_coherent(kdev, priv->tx_desc_alloc_size, in bcm_enet_open()
1121 dma_free_coherent(kdev, priv->rx_desc_alloc_size, in bcm_enet_open()
1189 struct device *kdev; in bcm_enet_stop() local
1192 kdev = &priv->pdev->dev; in bcm_enet_stop()
1217 bcm_enet_free_rx_buf_ring(kdev, priv); in bcm_enet_stop()
1221 dma_free_coherent(kdev, priv->rx_desc_alloc_size, in bcm_enet_stop()
1223 dma_free_coherent(kdev, priv->tx_desc_alloc_size, in bcm_enet_stop()
2100 struct device *kdev; in bcm_enetsw_open() local
2107 kdev = &priv->pdev->dev; in bcm_enetsw_open()
2127 p = dma_alloc_coherent(kdev, size, &priv->rx_desc_dma, GFP_KERNEL); in bcm_enetsw_open()
2129 dev_err(kdev, "cannot allocate rx ring %u\n", size); in bcm_enetsw_open()
2139 p = dma_alloc_coherent(kdev, size, &priv->tx_desc_dma, GFP_KERNEL); in bcm_enetsw_open()
2141 dev_err(kdev, "cannot allocate tx ring\n"); in bcm_enetsw_open()
2152 dev_err(kdev, "cannot allocate tx skb queue\n"); in bcm_enetsw_open()
2166 dev_err(kdev, "cannot allocate rx buffer queue\n"); in bcm_enetsw_open()
2214 dev_err(kdev, "cannot allocate rx buffer queue\n"); in bcm_enetsw_open()
2313 bcm_enet_free_rx_buf_ring(kdev, priv); in bcm_enetsw_open()
2319 dma_free_coherent(kdev, priv->tx_desc_alloc_size, in bcm_enetsw_open()
2323 dma_free_coherent(kdev, priv->rx_desc_alloc_size, in bcm_enetsw_open()
2341 struct device *kdev; in bcm_enetsw_stop() local
2344 kdev = &priv->pdev->dev; in bcm_enetsw_stop()
2363 bcm_enet_free_rx_buf_ring(kdev, priv); in bcm_enetsw_stop()
2367 dma_free_coherent(kdev, priv->rx_desc_alloc_size, in bcm_enetsw_stop()
2369 dma_free_coherent(kdev, priv->tx_desc_alloc_size, in bcm_enetsw_stop()