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

Commit b7ad6d75 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  [PATCH] Use of uninitialized variable in drivers/net/depca.c
  [PATCH] Use after free in net/tulip/de2104x.c
  [PATCH] sis900 adm7001 PHY support
  [PATCH] sky2: more ethtool stats
  [PATCH] s390: qeth :allow setting of attribute "route6" to "no_router".
  [PATCH] s390: qeth driver cleanups
  [PATCH] s390: qeth driver statistics fixes
  [PATCH] AMD Au1xx0: fix Ethernet TX stats
  [PATCH] fix spidernet build issue
parents 0caab23e 6a6bbd29
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -58,8 +58,8 @@ obj-$(CONFIG_STNIC) += stnic.o 8390.o
obj-$(CONFIG_FEALNX) += fealnx.o
obj-$(CONFIG_FEALNX) += fealnx.o
obj-$(CONFIG_TIGON3) += tg3.o
obj-$(CONFIG_TIGON3) += tg3.o
obj-$(CONFIG_BNX2) += bnx2.o
obj-$(CONFIG_BNX2) += bnx2.o
spidernet-y += spider_net.o spider_net_ethtool.o sungem_phy.o
spidernet-y += spider_net.o spider_net_ethtool.o
obj-$(CONFIG_SPIDER_NET) += spidernet.o
obj-$(CONFIG_SPIDER_NET) += spidernet.o sungem_phy.o
obj-$(CONFIG_TC35815) += tc35815.o
obj-$(CONFIG_TC35815) += tc35815.o
obj-$(CONFIG_SKGE) += skge.o
obj-$(CONFIG_SKGE) += skge.o
obj-$(CONFIG_SKY2) += sky2.o
obj-$(CONFIG_SKY2) += sky2.o
+7 −11
Original line number Original line Diff line number Diff line
@@ -90,8 +90,6 @@ static void au1000_tx_timeout(struct net_device *);
static int au1000_set_config(struct net_device *dev, struct ifmap *map);
static int au1000_set_config(struct net_device *dev, struct ifmap *map);
static void set_rx_mode(struct net_device *);
static void set_rx_mode(struct net_device *);
static struct net_device_stats *au1000_get_stats(struct net_device *);
static struct net_device_stats *au1000_get_stats(struct net_device *);
static inline void update_tx_stats(struct net_device *, u32, u32);
static inline void update_rx_stats(struct net_device *, u32);
static void au1000_timer(unsigned long);
static void au1000_timer(unsigned long);
static int au1000_ioctl(struct net_device *, struct ifreq *, int);
static int au1000_ioctl(struct net_device *, struct ifreq *, int);
static int mdio_read(struct net_device *, int, int);
static int mdio_read(struct net_device *, int, int);
@@ -1825,16 +1823,11 @@ static void __exit au1000_cleanup_module(void)
	}
	}
}
}



static void update_tx_stats(struct net_device *dev, u32 status)
static inline void 
update_tx_stats(struct net_device *dev, u32 status, u32 pkt_len)
{
{
	struct au1000_private *aup = (struct au1000_private *) dev->priv;
	struct au1000_private *aup = (struct au1000_private *) dev->priv;
	struct net_device_stats *ps = &aup->stats;
	struct net_device_stats *ps = &aup->stats;


	ps->tx_packets++;
	ps->tx_bytes += pkt_len;

	if (status & TX_FRAME_ABORTED) {
	if (status & TX_FRAME_ABORTED) {
		if (dev->if_port == IF_PORT_100BASEFX) {
		if (dev->if_port == IF_PORT_100BASEFX) {
			if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
			if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
@@ -1867,7 +1860,7 @@ static void au1000_tx_ack(struct net_device *dev)
	ptxd = aup->tx_dma_ring[aup->tx_tail];
	ptxd = aup->tx_dma_ring[aup->tx_tail];


	while (ptxd->buff_stat & TX_T_DONE) {
	while (ptxd->buff_stat & TX_T_DONE) {
		update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff);
		update_tx_stats(dev, ptxd->status);
		ptxd->buff_stat &= ~TX_T_DONE;
		ptxd->buff_stat &= ~TX_T_DONE;
		ptxd->len = 0;
		ptxd->len = 0;
		au_sync();
		au_sync();
@@ -1889,6 +1882,7 @@ static void au1000_tx_ack(struct net_device *dev)
static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
{
{
	struct au1000_private *aup = (struct au1000_private *) dev->priv;
	struct au1000_private *aup = (struct au1000_private *) dev->priv;
	struct net_device_stats *ps = &aup->stats;
	volatile tx_dma_t *ptxd;
	volatile tx_dma_t *ptxd;
	u32 buff_stat;
	u32 buff_stat;
	db_dest_t *pDB;
	db_dest_t *pDB;
@@ -1908,7 +1902,7 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
		return 1;
		return 1;
	}
	}
	else if (buff_stat & TX_T_DONE) {
	else if (buff_stat & TX_T_DONE) {
		update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff);
		update_tx_stats(dev, ptxd->status);
		ptxd->len = 0;
		ptxd->len = 0;
	}
	}


@@ -1928,6 +1922,9 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
	else
	else
		ptxd->len = skb->len;
		ptxd->len = skb->len;


	ps->tx_packets++;
	ps->tx_bytes += ptxd->len;

	ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE;
	ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE;
	au_sync();
	au_sync();
	dev_kfree_skb(skb);
	dev_kfree_skb(skb);
@@ -1936,7 +1933,6 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
	return 0;
	return 0;
}
}



static inline void update_rx_stats(struct net_device *dev, u32 status)
static inline void update_rx_stats(struct net_device *dev, u32 status)
{
{
	struct au1000_private *aup = (struct au1000_private *) dev->priv;
	struct au1000_private *aup = (struct au1000_private *) dev->priv;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1412,7 +1412,7 @@ static int __init depca_mca_probe(struct device *device)
		irq = 11;
		irq = 11;
		break;
		break;
	default:
	default:
		printk("%s: mca_probe IRQ error.  You should never get here (%d).\n", dev->name, where);
		printk("%s: mca_probe IRQ error.  You should never get here (%d).\n", mdev->name, where);
		return -EINVAL;
		return -EINVAL;
	}
	}


+1 −0
Original line number Original line Diff line number Diff line
@@ -128,6 +128,7 @@ static const struct mii_chip_info {
	{ "SiS 900 Internal MII PHY", 		0x001d, 0x8000, LAN },
	{ "SiS 900 Internal MII PHY", 		0x001d, 0x8000, LAN },
	{ "SiS 7014 Physical Layer Solution", 	0x0016, 0xf830, LAN },
	{ "SiS 7014 Physical Layer Solution", 	0x0016, 0xf830, LAN },
	{ "Altimata AC101LF PHY",               0x0022, 0x5520, LAN },
	{ "Altimata AC101LF PHY",               0x0022, 0x5520, LAN },
	{ "ADM 7001 LAN PHY",			0x002e, 0xcc60, LAN },
	{ "AMD 79C901 10BASE-T PHY",  		0x0000, 0x6B70, LAN },
	{ "AMD 79C901 10BASE-T PHY",  		0x0000, 0x6B70, LAN },
	{ "AMD 79C901 HomePNA PHY",		0x0000, 0x6B90, HOME},
	{ "AMD 79C901 HomePNA PHY",		0x0000, 0x6B90, HOME},
	{ "ICS LAN PHY",			0x0015, 0xF440, LAN },
	{ "ICS LAN PHY",			0x0015, 0xF440, LAN },
+22 −5
Original line number Original line Diff line number Diff line
@@ -2478,17 +2478,34 @@ static const struct sky2_stat {
	{ "rx_unicast",    GM_RXF_UC_OK },
	{ "rx_unicast",    GM_RXF_UC_OK },
	{ "tx_mac_pause",  GM_TXF_MPAUSE },
	{ "tx_mac_pause",  GM_TXF_MPAUSE },
	{ "rx_mac_pause",  GM_RXF_MPAUSE },
	{ "rx_mac_pause",  GM_RXF_MPAUSE },
	{ "collisions",    GM_TXF_SNG_COL },
	{ "collisions",    GM_TXF_COL },
	{ "late_collision",GM_TXF_LAT_COL },
	{ "late_collision",GM_TXF_LAT_COL },
	{ "aborted", 	   GM_TXF_ABO_COL },
	{ "aborted", 	   GM_TXF_ABO_COL },
	{ "single_collisions", GM_TXF_SNG_COL },
	{ "multi_collisions", GM_TXF_MUL_COL },
	{ "multi_collisions", GM_TXF_MUL_COL },
	{ "fifo_underrun", GM_TXE_FIFO_UR },

	{ "fifo_overflow", GM_RXE_FIFO_OV },
	{ "rx_short",      GM_RXE_SHT },
	{ "rx_toolong",    GM_RXF_LNG_ERR },
	{ "rx_jabber",     GM_RXF_JAB_PKT },
	{ "rx_runt", 	   GM_RXE_FRAG },
	{ "rx_runt", 	   GM_RXE_FRAG },
	{ "rx_64_byte_packets", GM_RXF_64B },
	{ "rx_65_to_127_byte_packets", GM_RXF_127B },
	{ "rx_128_to_255_byte_packets", GM_RXF_255B },
	{ "rx_256_to_511_byte_packets", GM_RXF_511B },
	{ "rx_512_to_1023_byte_packets", GM_RXF_1023B },
	{ "rx_1024_to_1518_byte_packets", GM_RXF_1518B },
	{ "rx_1518_to_max_byte_packets", GM_RXF_MAX_SZ },
	{ "rx_too_long",   GM_RXF_LNG_ERR },
	{ "rx_too_long",   GM_RXF_LNG_ERR },
	{ "rx_fifo_overflow", GM_RXE_FIFO_OV },
	{ "rx_jabber",     GM_RXF_JAB_PKT },
	{ "rx_fcs_error",   GM_RXF_FCS_ERR },
	{ "rx_fcs_error",   GM_RXF_FCS_ERR },

	{ "tx_64_byte_packets", GM_TXF_64B },
	{ "tx_65_to_127_byte_packets", GM_TXF_127B },
	{ "tx_128_to_255_byte_packets", GM_TXF_255B },
	{ "tx_256_to_511_byte_packets", GM_TXF_511B },
	{ "tx_512_to_1023_byte_packets", GM_TXF_1023B },
	{ "tx_1024_to_1518_byte_packets", GM_TXF_1518B },
	{ "tx_1519_to_max_byte_packets", GM_TXF_MAX_SZ },
	{ "tx_fifo_underrun", GM_TXE_FIFO_UR },
};
};


static u32 sky2_get_rx_csum(struct net_device *dev)
static u32 sky2_get_rx_csum(struct net_device *dev)
Loading