Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167565
b: refs/heads/master
c: b9d2dde
h: refs/heads/master
i:
  167563: 8b04820
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Oct 14, 2009
1 parent 80fb1fd commit c233039
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: 4439c9353589f4def506b94f8f6344433333a4b9
refs/heads/master: b9d2dde0556cde38105033cb39841658d81921d2
20 changes: 14 additions & 6 deletions trunk/drivers/staging/et131x/et1310_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1177,12 +1177,20 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev)

static inline u32 bump_fbr(u32 *fbr, u32 limit)
{
u32 v = *fbr;
add_10bit(&v, 1);
if (v > limit)
v = (*fbr & ~ET_DMA10_MASK) ^ ET_DMA10_WRAP;
*fbr = v;
return v;
u32 v = *fbr;
v++;
/* This works for all cases where limit < 1024. The 1023 case
works because 1023++ is 1024 which means the if condition is not
taken but the carry of the bit into the wrap bit toggles the wrap
value correctly */
if ((v & ET_DMA10_MASK) > limit) {
v &= ~ET_DMA10_MASK;
v ^= ET_DMA10_WRAP;
}
/* For the 1023 case */
v &= (ET_DMA10_MASK|ET_DMA10_WRAP);
*fbr = v;
return v;
}

/**
Expand Down

0 comments on commit c233039

Please sign in to comment.