patch-2.1.45 linux/drivers/net/sunhme.c
Next file: linux/drivers/net/sunqe.c
Previous file: linux/drivers/net/strip.c
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Wed Jul 16 19:22:51 1997
- Orig file:
v2.1.44/linux/drivers/net/sunhme.c
- Orig date:
Thu May 15 16:48:03 1997
diff -u --recursive --new-file v2.1.44/linux/drivers/net/sunhme.c linux/drivers/net/sunhme.c
@@ -946,7 +946,8 @@
/* Because we reserve afterwards. */
skb_put(skb, (ETH_FRAME_LEN + RX_OFFSET));
- hb->happy_meal_rxd[i].rx_addr = (unsigned int) skb->data;
+ hb->happy_meal_rxd[i].rx_addr =
+ (u32) ((unsigned long)skb->data);
skb_reserve(skb, RX_OFFSET);
hb->happy_meal_rxd[i].rx_flags =
(RXFLAG_OWN | ((RX_BUF_ALLOC_SIZE - RX_OFFSET) << 16));
@@ -1615,7 +1616,8 @@
/* Return it to the Happy meal. */
drop_it:
hp->net_stats.rx_dropped++;
- this->rx_addr = (unsigned int) hp->rx_skbs[elem]->data;
+ this->rx_addr =
+ (u32) ((unsigned long)hp->rx_skbs[elem]->data);
this->rx_flags =
(RXFLAG_OWN | ((RX_BUF_ALLOC_SIZE - RX_OFFSET) << 16));
goto next;
@@ -1634,7 +1636,8 @@
hp->rx_skbs[elem] = new_skb;
new_skb->dev = dev;
skb_put(new_skb, (ETH_FRAME_LEN + RX_OFFSET));
- rxbase[elem].rx_addr = (unsigned int) new_skb->data;
+ rxbase[elem].rx_addr =
+ (u32) ((unsigned long)new_skb->data);
skb_reserve(new_skb, RX_OFFSET);
rxbase[elem].rx_flags =
(RXFLAG_OWN | ((RX_BUF_ALLOC_SIZE - RX_OFFSET) << 16));
@@ -1655,7 +1658,8 @@
memcpy(copy_skb->data, skb->data, len);
/* Reuse original ring buffer. */
- rxbase[elem].rx_addr = (unsigned int) skb->data;
+ rxbase[elem].rx_addr =
+ (u32) ((unsigned long)skb->data);
rxbase[elem].rx_flags =
(RXFLAG_OWN | ((RX_BUF_ALLOC_SIZE - RX_OFFSET) << 16));
@@ -1913,7 +1917,8 @@
SXD(("SX<l[%d]e[%d]>", len, entry));
hp->tx_skbs[entry] = skb;
- hp->happy_block->happy_meal_txd[entry].tx_addr = (unsigned int) skb->data;
+ hp->happy_block->happy_meal_txd[entry].tx_addr =
+ (u32) ((unsigned long)skb->data);
hp->happy_block->happy_meal_txd[entry].tx_flags =
(TXFLAG_OWN | TXFLAG_SOP | TXFLAG_EOP | (len & TXFLAG_SIZE));
hp->tx_new = NEXT_TX(entry);
@@ -2087,6 +2092,8 @@
printk("\n");
hp = (struct happy_meal *) dev->priv;
+ memset(hp, 0, sizeof(*hp));
+
hp->happy_sbus_dev = sdev;
if(sdev->num_registers != 5) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov