skge: bad checksums on big-endian platforms
Subsystems (2)
PATCH 1/2 skge: bad checksums on big-endian platforms
Skge driver always causes bad checksums on big-endian. The checksum in the receive control block was being swapped when it doesn't need to be.
Signed-off-by Stephen Hemminger <[email protected]>
drivers/net/skge.c +1 -2
@@ -2717,8 +2717,7 @@ static int skge_poll(struct net_device *if (control &BMU_OWN )break ; - skb =skge_rx_get (skge, e, control, rd->status, -le16_to_cpu (rd->csum2)); + skb =skge_rx_get (skge, e, control, rd->status, rd->csum2);if (likely (skb)) { dev->last_rx = jiffies;netif_receive_skb (skb);
PATCH 2/2 skge: don't allow transmit ring to be too small
The driver will get stuck (permanent transmit timeout), if the transmit ring size is set too small. It needs to have enough ring elements to hold one maximum size transmit.
Signed-off-by Stephen Hemminger <[email protected]>
drivers/net/skge.c +1 -1
@@ -402,7 +402,7 @@ static int skge_set_ring_param(struct neint err;if (p->rx_pending ==0 || p->rx_pending >MAX_RX_RING_SIZE || - p->tx_pending ==0 || p->tx_pending >MAX_TX_RING_SIZE ) + p->tx_pending <MAX_SKB_FRAGS +1 || p->tx_pending >MAX_TX_RING_SIZE )return -EINVAL ; skge->rx_ring.count = p->rx_pending;