Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253867
b: refs/heads/master
c: 118133e
h: refs/heads/master
i:
  253865: 806bc82
  253863: 9b0061a
v: v3
  • Loading branch information
Sonic Zhang authored and David S. Miller committed Jun 17, 2011
1 parent 1499ddd commit 49fadeb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3cb78c772de593afa720687ce3abbed8d93b0c3
refs/heads/master: 118133e6580a0c912cda86109b6468b5ffe73f1c
20 changes: 10 additions & 10 deletions trunk/drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ MODULE_DESCRIPTION(DRV_DESC);
MODULE_ALIAS("platform:bfin_mac");

#if defined(CONFIG_BFIN_MAC_USE_L1)
# define bfin_mac_alloc(dma_handle, size) l1_data_sram_zalloc(size)
# define bfin_mac_free(dma_handle, ptr) l1_data_sram_free(ptr)
# define bfin_mac_alloc(dma_handle, size, num) l1_data_sram_zalloc(size*num)
# define bfin_mac_free(dma_handle, ptr, num) l1_data_sram_free(ptr)
#else
# define bfin_mac_alloc(dma_handle, size) \
dma_alloc_coherent(NULL, size, dma_handle, GFP_KERNEL)
# define bfin_mac_free(dma_handle, ptr) \
dma_free_coherent(NULL, sizeof(*ptr), ptr, dma_handle)
# define bfin_mac_alloc(dma_handle, size, num) \
dma_alloc_coherent(NULL, size*num, dma_handle, GFP_KERNEL)
# define bfin_mac_free(dma_handle, ptr, num) \
dma_free_coherent(NULL, sizeof(*ptr)*num, ptr, dma_handle)
#endif

#define PKT_BUF_SZ 1580
Expand Down Expand Up @@ -95,7 +95,7 @@ static void desc_list_free(void)
t = t->next;
}
}
bfin_mac_free(dma_handle, tx_desc);
bfin_mac_free(dma_handle, tx_desc, CONFIG_BFIN_TX_DESC_NUM);
}

if (rx_desc) {
Expand All @@ -109,7 +109,7 @@ static void desc_list_free(void)
r = r->next;
}
}
bfin_mac_free(dma_handle, rx_desc);
bfin_mac_free(dma_handle, rx_desc, CONFIG_BFIN_RX_DESC_NUM);
}
}

Expand All @@ -126,13 +126,13 @@ static int desc_list_init(void)
#endif

tx_desc = bfin_mac_alloc(&dma_handle,
sizeof(struct net_dma_desc_tx) *
sizeof(struct net_dma_desc_tx),
CONFIG_BFIN_TX_DESC_NUM);
if (tx_desc == NULL)
goto init_error;

rx_desc = bfin_mac_alloc(&dma_handle,
sizeof(struct net_dma_desc_rx) *
sizeof(struct net_dma_desc_rx),
CONFIG_BFIN_RX_DESC_NUM);
if (rx_desc == NULL)
goto init_error;
Expand Down

0 comments on commit 49fadeb

Please sign in to comment.