Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 194dcdba authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

parents 19b8cba2 bdb59f94
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -223,6 +223,8 @@ static int gfar_mdio_of_init_one(struct device_node *np)
	if (ret)
		return ret;

	/* The gianfar device will try to use the same ID created below to find
	 * this bus, to coordinate register access (since they share).  */
	mdio_dev = platform_device_register_simple("fsl-gianfar_mdio",
			res.start&0xfffff, &res, 1);
	if (IS_ERR(mdio_dev))
@@ -394,6 +396,30 @@ static int __init gfar_of_init(void)
			of_node_put(mdio);
		}

		/* Get MDIO bus controlled by this eTSEC, if any.  Normally only
		 * eTSEC 1 will control an MDIO bus, not necessarily the same
		 * bus that its PHY is on ('mdio' above), so we can't just use
		 * that.  What we do is look for a gianfar mdio device that has
		 * overlapping registers with this device.  That's really the
		 * whole point, to find the device sharing our registers to
		 * coordinate access with it.
		 */
		for_each_compatible_node(mdio, NULL, "fsl,gianfar-mdio") {
			if (of_address_to_resource(mdio, 0, &res))
				continue;

			if (res.start >= r[0].start && res.end <= r[0].end) {
				/* Get the ID the mdio bus platform device was
				 * registered with.  gfar_data.bus_id is
				 * different because it's for finding a PHY,
				 * while this is for finding a MII bus.
				 */
				gfar_data.mdio_bus = res.start&0xfffff;
				of_node_put(mdio);
				break;
			}
		}

		ret =
		    platform_device_add_data(gfar_dev, &gfar_data,
					     sizeof(struct
+4 −5
Original line number Diff line number Diff line
@@ -644,10 +644,6 @@ This function frees the transmiter and receiver descriptor rings.
*/
static void amd8111e_free_ring(struct amd8111e_priv* lp)
{

	/* Free transmit and receive skbs */
	amd8111e_free_skbs(lp->amd8111e_net_dev);

	/* Free transmit and receive descriptor rings */
	if(lp->rx_ring){
		pci_free_consistent(lp->pci_dev,
@@ -1233,7 +1229,9 @@ static int amd8111e_close(struct net_device * dev)

	amd8111e_disable_interrupt(lp);
	amd8111e_stop_chip(lp);
	amd8111e_free_ring(lp);

	/* Free transmit and receive skbs */
	amd8111e_free_skbs(lp->amd8111e_net_dev);

	netif_carrier_off(lp->amd8111e_net_dev);

@@ -1243,6 +1241,7 @@ static int amd8111e_close(struct net_device * dev)

	spin_unlock_irq(&lp->lock);
	free_irq(dev->irq, dev);
	amd8111e_free_ring(lp);

	/* Update the statistics before closing */
	amd8111e_get_stats(dev);
+5 −1
Original line number Diff line number Diff line
@@ -1080,7 +1080,8 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
		init_timer(&lp->check_timer);
		lp->check_timer.data = (unsigned long)dev;
		lp->check_timer.function = at91ether_check_link;
	}
	} else if (lp->board_data.phy_irq_pin >= 32)
		gpio_request(lp->board_data.phy_irq_pin, "ethernet_phy");

	/* Display ethernet banner */
	printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%s)\n",
@@ -1167,6 +1168,9 @@ static int __devexit at91ether_remove(struct platform_device *pdev)
	struct net_device *dev = platform_get_drvdata(pdev);
	struct at91_private *lp = netdev_priv(dev);

	if (lp->board_data.phy_irq_pin >= 32)
		gpio_free(lp->board_data.phy_irq_pin);

	unregister_netdev(dev);
	free_irq(dev->irq, dev);
	dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);
+4 −3
Original line number Diff line number Diff line
@@ -2310,7 +2310,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
		if (tpd != ptpd)
			memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
		tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
		tpd->word2 = (cpu_to_le16(buffer_info->length) &
		tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT);
		tpd->word2 |= (cpu_to_le16(buffer_info->length) &
			TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;

		/*
@@ -2409,8 +2410,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
		vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
			((vlan_tag >> 9) & 0x8);
		ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
		ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) <<
			TPD_VL_TAGGED_SHIFT;
		ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) <<
			TPD_VLANTAG_SHIFT;
	}

	tso = atl1_tso(adapter, skb, ptpd);
+1 −1
Original line number Diff line number Diff line
@@ -504,7 +504,7 @@ struct rx_free_desc {
#define TPD_PKTNT_MASK		0x0001
#define TPD_PKTINT_SHIFT	15
#define TPD_VLANTAG_MASK	0xFFFF
#define TPD_VLAN_SHIFT		16
#define TPD_VLANTAG_SHIFT	16

/* tpd word 3 bits 0:13 */
#define TPD_EOP_MASK		0x0001
Loading