aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tehuti.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-22 02:36:56 -0400
commitcf9b59e9d3e008591d1f54830f570982bb307a0d (patch)
tree113478ce8fd8c832ba726ffdf59b82cb46356476 /drivers/net/tehuti.c
parent44504b2bebf8b5823c59484e73096a7d6574471d (diff)
parentf4b87dee923342505e1ddba8d34ce9de33e75050 (diff)
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/net/tehuti.c')
-rw-r--r--drivers/net/tehuti.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index f5493092521a..20ab16192325 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -808,7 +808,7 @@ static void bdx_setmulti(struct net_device *ndev)
808 WRITE_REG(priv, regRX_MCST_HASH0 + i * 4, ~0); 808 WRITE_REG(priv, regRX_MCST_HASH0 + i * 4, ~0);
809 } else if (!netdev_mc_empty(ndev)) { 809 } else if (!netdev_mc_empty(ndev)) {
810 u8 hash; 810 u8 hash;
811 struct dev_mc_list *mclist; 811 struct netdev_hw_addr *ha;
812 u32 reg, val; 812 u32 reg, val;
813 813
814 /* set IMF to deny all multicast frames */ 814 /* set IMF to deny all multicast frames */
@@ -825,10 +825,10 @@ static void bdx_setmulti(struct net_device *ndev)
825 * into RX_MAC_MCST regs. we skip this phase now and accept ALL 825 * into RX_MAC_MCST regs. we skip this phase now and accept ALL
826 * multicast frames throu IMF */ 826 * multicast frames throu IMF */
827 /* accept the rest of addresses throu IMF */ 827 /* accept the rest of addresses throu IMF */
828 netdev_for_each_mc_addr(mclist, ndev) { 828 netdev_for_each_mc_addr(ha, ndev) {
829 hash = 0; 829 hash = 0;
830 for (i = 0; i < ETH_ALEN; i++) 830 for (i = 0; i < ETH_ALEN; i++)
831 hash ^= mclist->dmi_addr[i]; 831 hash ^= ha->addr[i];
832 reg = regRX_MCST_HASH0 + ((hash >> 5) << 2); 832 reg = regRX_MCST_HASH0 + ((hash >> 5) << 2);
833 val = READ_REG(priv, reg); 833 val = READ_REG(priv, reg);
834 val |= (1 << (hash % 32)); 834 val |= (1 << (hash % 32));
@@ -1303,7 +1303,6 @@ static int bdx_rx_receive(struct bdx_priv *priv, struct rxd_fifo *f, int budget)
1303 priv->net_stats.rx_bytes += len; 1303 priv->net_stats.rx_bytes += len;
1304 1304
1305 skb_put(skb, len); 1305 skb_put(skb, len);
1306 skb->dev = priv->ndev;
1307 skb->ip_summed = CHECKSUM_UNNECESSARY; 1306 skb->ip_summed = CHECKSUM_UNNECESSARY;
1308 skb->protocol = eth_type_trans(skb, priv->ndev); 1307 skb->protocol = eth_type_trans(skb, priv->ndev);
1309 1308
@@ -1509,7 +1508,7 @@ bdx_tx_map_skb(struct bdx_priv *priv, struct sk_buff *skb,
1509 int nr_frags = skb_shinfo(skb)->nr_frags; 1508 int nr_frags = skb_shinfo(skb)->nr_frags;
1510 int i; 1509 int i;
1511 1510
1512 db->wptr->len = skb->len - skb->data_len; 1511 db->wptr->len = skb_headlen(skb);
1513 db->wptr->addr.dma = pci_map_single(priv->pdev, skb->data, 1512 db->wptr->addr.dma = pci_map_single(priv->pdev, skb->data,
1514 db->wptr->len, PCI_DMA_TODEVICE); 1513 db->wptr->len, PCI_DMA_TODEVICE);
1515 pbl->len = CPU_CHIP_SWAP32(db->wptr->len); 1514 pbl->len = CPU_CHIP_SWAP32(db->wptr->len);
@@ -2034,7 +2033,6 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2034 /************** priv ****************/ 2033 /************** priv ****************/
2035 priv = nic->priv[port] = netdev_priv(ndev); 2034 priv = nic->priv[port] = netdev_priv(ndev);
2036 2035
2037 memset(priv, 0, sizeof(struct bdx_priv));
2038 priv->pBdxRegs = nic->regs + port * 0x8000; 2036 priv->pBdxRegs = nic->regs + port * 0x8000;
2039 priv->port = port; 2037 priv->port = port;
2040 priv->pdev = pdev; 2038 priv->pdev = pdev;