diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-09-18 16:59:52 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-21 14:43:47 -0400 |
commit | 0d19a540beb78493cd5acb7428760af0dc1ea154 (patch) | |
tree | 0150783c3738889fa56315b3acfd038d635824fa /drivers/net/ethernet/sfc/tx.c | |
parent | f3ad50034425692965a0f2becdd9c45ecb45cd66 (diff) |
sfc: Add GFP flags to efx_nic_alloc_buffer() and make most callers allow blocking
Most call sites for efx_nic_alloc_buffer() are part of the probe or
reconfiguration paths and can allocate with GFP_KERNEL. A few others
should use GFP_NOIO (I think). Only one is in atomic context and
must use the current GFP_ATOMIC.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/tx.c')
-rw-r--r-- | drivers/net/ethernet/sfc/tx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c index 5e090e54298e..c0d40403db23 100644 --- a/drivers/net/ethernet/sfc/tx.c +++ b/drivers/net/ethernet/sfc/tx.c | |||
@@ -708,7 +708,8 @@ static u8 *efx_tsoh_get_buffer(struct efx_tx_queue *tx_queue, | |||
708 | TSOH_STD_SIZE * (index % TSOH_PER_PAGE) + TSOH_OFFSET; | 708 | TSOH_STD_SIZE * (index % TSOH_PER_PAGE) + TSOH_OFFSET; |
709 | 709 | ||
710 | if (unlikely(!page_buf->addr) && | 710 | if (unlikely(!page_buf->addr) && |
711 | efx_nic_alloc_buffer(tx_queue->efx, page_buf, PAGE_SIZE)) | 711 | efx_nic_alloc_buffer(tx_queue->efx, page_buf, PAGE_SIZE, |
712 | GFP_ATOMIC)) | ||
712 | return NULL; | 713 | return NULL; |
713 | 714 | ||
714 | result = (u8 *)page_buf->addr + offset; | 715 | result = (u8 *)page_buf->addr + offset; |