sky2: tx ring index mask fix
authorStephen Hemminger <shemminger@osdl.org>
Mon, 8 May 2006 22:11:28 +0000 (15:11 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Mon, 8 May 2006 23:00:25 +0000 (16:00 -0700)
Mask for transmit ring status was picking up bits from the
unused sync ring.  They were always zero, so far...
Also, make sure to remind self not to make tx ring too big.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
drivers/net/sky2.c

index 552aca76b283fd3263fbd945dc7c3c3c289a283b..4bb6ea13efddc0998fa7ab29dc6f43021bd1044b 100644 (file)
@@ -1927,7 +1927,8 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
 
                case OP_TXINDEXLE:
                        /* TX index reports status for both ports */
-                       sky2_tx_done(hw->dev[0], status & 0xffff);
+                       BUILD_BUG_ON(TX_RING_SIZE > 0x1000);
+                       sky2_tx_done(hw->dev[0], status & 0xfff);
                        if (hw->dev[1])
                                sky2_tx_done(hw->dev[1],
                                     ((status >> 24) & 0xff)