Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97330
b: refs/heads/master
c: 184be0c
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed May 22, 2008
1 parent a595a62 commit e9184bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: 55668611d0b2a5947cd17f66243be3cebf21400c
refs/heads/master: 184be0c21aba048cf510036edeee095e68740951
10 changes: 3 additions & 7 deletions trunk/drivers/net/sfc/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,12 @@ static unsigned int rx_refill_limit = 95;
*/
#define EFX_RXD_HEAD_ROOM 2

static inline unsigned int efx_page_offset(void *p)
{
return (__force unsigned int)p & (PAGE_SIZE - 1);
}
static inline unsigned int efx_rx_buf_offset(struct efx_rx_buffer *buf)
{
/* Offset is always within one page, so we don't need to consider
* the page order.
*/
return efx_page_offset(buf->data);
return (__force unsigned long) buf->data & (PAGE_SIZE - 1);
}
static inline unsigned int efx_rx_buf_size(struct efx_nic *efx)
{
Expand Down Expand Up @@ -291,10 +287,10 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue,
EFX_PAGE_IP_ALIGN);
}

offset = efx_page_offset(rx_queue->buf_data);
rx_buf->len = bytes;
rx_buf->dma_addr = rx_queue->buf_dma_addr + offset;
rx_buf->data = rx_queue->buf_data;
offset = efx_rx_buf_offset(rx_buf);
rx_buf->dma_addr = rx_queue->buf_dma_addr + offset;

/* Try to pack multiple buffers per page */
if (efx->rx_buffer_order == 0) {
Expand Down

0 comments on commit e9184bf

Please sign in to comment.