diff options
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.c')
-rw-r--r-- | drivers/net/ethernet/sfc/nic.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index 4a9a5beec8fc..326d799762d6 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c | |||
@@ -124,9 +124,6 @@ int efx_nic_test_registers(struct efx_nic *efx, | |||
124 | unsigned address = 0, i, j; | 124 | unsigned address = 0, i, j; |
125 | efx_oword_t mask, imask, original, reg, buf; | 125 | efx_oword_t mask, imask, original, reg, buf; |
126 | 126 | ||
127 | /* Falcon should be in loopback to isolate the XMAC from the PHY */ | ||
128 | WARN_ON(!LOOPBACK_INTERNAL(efx)); | ||
129 | |||
130 | for (i = 0; i < n_regs; ++i) { | 127 | for (i = 0; i < n_regs; ++i) { |
131 | address = regs[i].address; | 128 | address = regs[i].address; |
132 | mask = imask = regs[i].mask; | 129 | mask = imask = regs[i].mask; |
@@ -308,8 +305,8 @@ efx_free_special_buffer(struct efx_nic *efx, struct efx_special_buffer *buffer) | |||
308 | int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer, | 305 | int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer, |
309 | unsigned int len) | 306 | unsigned int len) |
310 | { | 307 | { |
311 | buffer->addr = pci_alloc_consistent(efx->pci_dev, len, | 308 | buffer->addr = dma_alloc_coherent(&efx->pci_dev->dev, len, |
312 | &buffer->dma_addr); | 309 | &buffer->dma_addr, GFP_ATOMIC); |
313 | if (!buffer->addr) | 310 | if (!buffer->addr) |
314 | return -ENOMEM; | 311 | return -ENOMEM; |
315 | buffer->len = len; | 312 | buffer->len = len; |
@@ -320,8 +317,8 @@ int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer, | |||
320 | void efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer) | 317 | void efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer) |
321 | { | 318 | { |
322 | if (buffer->addr) { | 319 | if (buffer->addr) { |
323 | pci_free_consistent(efx->pci_dev, buffer->len, | 320 | dma_free_coherent(&efx->pci_dev->dev, buffer->len, |
324 | buffer->addr, buffer->dma_addr); | 321 | buffer->addr, buffer->dma_addr); |
325 | buffer->addr = NULL; | 322 | buffer->addr = NULL; |
326 | } | 323 | } |
327 | } | 324 | } |