patch-2.4.0-test9 linux/arch/ppc/8260_io/enet.c
Next file: linux/arch/ppc/8260_io/fcc_enet.c
Previous file: linux/arch/ppc/8260_io/commproc.c
Back to the patch index
Back to the overall index
- Lines: 63
- Date:
Sun Sep 17 09:48:05 2000
- Orig file:
v2.4.0-test8/linux/arch/ppc/8260_io/enet.c
- Orig date:
Mon Jun 19 13:25:05 2000
diff -u --recursive --new-file v2.4.0-test8/linux/arch/ppc/8260_io/enet.c linux/arch/ppc/8260_io/enet.c
@@ -466,8 +466,11 @@
cep->stats.rx_bytes += pkt_len;
/* This does 16 byte alignment, much more than we need.
- */
- skb = dev_alloc_skb(pkt_len);
+ * The packet length includes FCS, but we don't want to
+ * include that when passing upstream as it messes up
+ * bridging applications.
+ */
+ skb = dev_alloc_skb(pkt_len-4);
if (skb == NULL) {
printk("%s: Memory squeeze, dropping packet.\n", dev->name);
@@ -475,10 +478,10 @@
}
else {
skb->dev = dev;
- skb_put(skb,pkt_len); /* Make room */
+ skb_put(skb,pkt_len-4); /* Make room */
eth_copy_and_sum(skb,
(unsigned char *)__va(bdp->cbd_bufaddr),
- pkt_len, 0);
+ pkt_len-4, 0);
skb->protocol=eth_type_trans(skb,dev);
netif_rx(skb);
}
@@ -549,10 +552,10 @@
/* Log any net taps. */
printk("%s: Promiscuous mode enabled.\n", dev->name);
- cep->sccp->scc_pmsr |= SCC_PMSR_PRO;
+ cep->sccp->scc_pmsr |= SCC_PSMR_PRO;
} else {
- cep->sccp->scc_pmsr &= ~SCC_PMSR_PRO;
+ cep->sccp->scc_pmsr &= ~SCC_PSMR_PRO;
if (dev->flags & IFF_ALLMULTI) {
/* Catch all multicast addresses, so set the
@@ -678,11 +681,11 @@
* These are relative offsets in the DP ram address space.
* Initialize base addresses for the buffer descriptors.
*/
- i = m8260_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE);
+ i = m8260_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
ep->sen_genscc.scc_rbase = i;
cep->rx_bd_base = (cbd_t *)&immap->im_dprambase[i];
- i = m8260_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE);
+ i = m8260_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
ep->sen_genscc.scc_tbase = i;
cep->tx_bd_base = (cbd_t *)&immap->im_dprambase[i];
@@ -816,7 +819,7 @@
/* Set processing mode. Use Ethernet CRC, catch broadcast, and
* start frame search 22 bit times after RENA.
*/
- sccp->scc_pmsr = (SCC_PMSR_ENCRC | SCC_PMSR_NIB22);
+ sccp->scc_pmsr = (SCC_PSMR_ENCRC | SCC_PSMR_NIB22);
/* It is now OK to enable the Ethernet transmitter.
* Unfortunately, there are board implementation differences here.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)