All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/16] 2.6.23-stable review, network driver changes
@ 2007-11-15  6:39 ` Greg KH
  2007-11-15  6:39   ` [patch 01/16] libertas: more endianness breakage Greg KH
                     ` (16 more replies)
  0 siblings, 17 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:39 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan

This is the start of the stable review cycle for the 2.6.23.X release.
There are 16 patches in this series, all will be posted as a response to
this one.  If anyone has any issues with these being applied, please let
us know.  If anyone is a maintainer of the proper subsystem, and wants
to add a Signed-off-by: line to the patch, please respond with it.

These patches are sent out with a number of different people on the Cc:
line.  If you wish to be a reviewer, please email stable@kernel.org to
add your name to the list.  If you want to be off the reviewer list,
also email us.

Responses should be made by Friday 00:00:00 UTC.  Anything received
after that time might be too late.

This set of patches focuses on only networking drivers.

The diffstat of this review series is included below.

thanks,

greg k-h

-----

 drivers/net/ehea/ehea_qmr.c            |   20 +---
 drivers/net/ehea/ehea_qmr.h            |    2 
 drivers/net/forcedeth.c                |   35 ++++++--
 drivers/net/pppol2tp.c                 |   25 ++++-
 drivers/net/skge.c                     |  141 +++++++++++++++++----------------
 drivers/net/skge.h                     |    6 -
 drivers/net/sky2.c                     |   87 ++++++++++++++++----
 drivers/net/tg3.c                      |   10 +-
 drivers/net/wireless/ipw2100.c         |   39 +++++++++
 drivers/net/wireless/ipw2100.h         |    4 
 drivers/net/wireless/libertas/11d.c    |    2 
 drivers/net/wireless/libertas/cmd.c    |    6 -
 drivers/net/wireless/libertas/wext.c   |    8 -
 drivers/net/wireless/rtl8187_dev.c     |   31 +++----
 drivers/net/wireless/zd1201.c          |    4 
 drivers/net/wireless/zd1211rw/zd_usb.c |    7 +
 include/linux/pci_ids.h                |    4 
 17 files changed, 283 insertions(+), 148 deletions(-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 01/16] libertas: more endianness breakage
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
@ 2007-11-15  6:39   ` Greg KH
  2007-11-15  6:39   ` [patch 02/16] libertas: fix " Greg KH
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:39 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Al Viro,
	John W. Linville, Al Viro, Dan Williams

[-- Attachment #1: libertas-more-endianness-breakage.patch --]
[-- Type: text/plain, Size: 2320 bytes --]



-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Al Viro <viro@ftp.linux.org.uk>

based on patch 8362cd413e8116306fafbaf414f0419db0595142 in mainline.

	domain->header.len is le16 and has just been assigned
cpu_to_le16(arithmetical expression).  And all fields of adapter->logmsg
are __le32; not a single 16-bit among them...
	That's incremental to the previous one

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/libertas/11d.c  |    2 +-
 drivers/net/wireless/libertas/wext.c |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

--- a/drivers/net/wireless/libertas/11d.c
+++ b/drivers/net/wireless/libertas/11d.c
@@ -562,7 +562,7 @@ int libertas_cmd_802_11d_domain_info(wla
 		       nr_subband * sizeof(struct ieeetypes_subbandset));
 
 		cmd->size = cpu_to_le16(sizeof(pdomaininfo->action) +
-					     domain->header.len +
+					     le16_to_cpu(domain->header.len) +
 					     sizeof(struct mrvlietypesheader) +
 					     S_DS_GEN);
 	} else {
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -973,7 +973,7 @@ static struct iw_statistics *wlan_get_wi
 	/* Quality by TX errors */
 	priv->wstats.discard.retries = priv->stats.tx_errors;
 
-	tx_retries = le16_to_cpu(adapter->logmsg.retry);
+	tx_retries = le32_to_cpu(adapter->logmsg.retry);
 
 	if (tx_retries > 75)
 		tx_qual = (90 - tx_retries) * POOR / 15;
@@ -989,10 +989,10 @@ static struct iw_statistics *wlan_get_wi
 		    (PERFECT - VERY_GOOD) / 50 + VERY_GOOD;
 	quality = min(quality, tx_qual);
 
-	priv->wstats.discard.code = le16_to_cpu(adapter->logmsg.wepundecryptable);
-	priv->wstats.discard.fragment = le16_to_cpu(adapter->logmsg.rxfrag);
+	priv->wstats.discard.code = le32_to_cpu(adapter->logmsg.wepundecryptable);
+	priv->wstats.discard.fragment = le32_to_cpu(adapter->logmsg.rxfrag);
 	priv->wstats.discard.retries = tx_retries;
-	priv->wstats.discard.misc = le16_to_cpu(adapter->logmsg.ackfailure);
+	priv->wstats.discard.misc = le32_to_cpu(adapter->logmsg.ackfailure);
 
 	/* Calculate quality */
 	priv->wstats.qual.qual = max(quality, (u32)100);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 02/16] libertas: fix endianness breakage
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
  2007-11-15  6:39   ` [patch 01/16] libertas: more endianness breakage Greg KH
@ 2007-11-15  6:39   ` Greg KH
  2007-11-15  6:40   ` [patch 03/16] ehea: 64K page kernel support fix Greg KH
                     ` (14 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:39 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Al Viro,
	John W. Linville, Al Viro, Dan Williams

[-- Attachment #1: libertas-fix-endianness-breakage.patch --]
[-- Type: text/plain, Size: 1139 bytes --]



-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Al Viro <viro@ftp.linux.org.uk>

patch 5707708111ca6c4e9a1160acffdc98a98d95e462 in mainline.

	wep->keytype[] is u8

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/libertas/cmd.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -185,14 +185,12 @@ static int wlan_cmd_802_11_set_wep(wlan_
 
 			switch (pkey->len) {
 			case KEY_LEN_WEP_40:
-				wep->keytype[i] =
-					cpu_to_le16(cmd_type_wep_40_bit);
+				wep->keytype[i] = cmd_type_wep_40_bit;
 				memmove(&wep->keymaterial[i], pkey->key,
 				        pkey->len);
 				break;
 			case KEY_LEN_WEP_104:
-				wep->keytype[i] =
-					cpu_to_le16(cmd_type_wep_104_bit);
+				wep->keytype[i] = cmd_type_wep_104_bit;
 				memmove(&wep->keymaterial[i], pkey->key,
 				        pkey->len);
 				break;

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 03/16] ehea: 64K page kernel support fix
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
  2007-11-15  6:39   ` [patch 01/16] libertas: more endianness breakage Greg KH
  2007-11-15  6:39   ` [patch 02/16] libertas: fix " Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:40   ` [patch 04/16] forcedeth msi bugfix Greg KH
                     ` (13 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Jan-Bernd Themann, Jeff Garzik

[-- Attachment #1: ehea-64k-page-kernel-support-fix.patch --]
[-- Type: text/plain, Size: 2987 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Jan-Bernd Themann <ossthema@de.ibm.com>

based on 2c69448bbcedebeb8409ddb05fbc7d3fe1cfbda7 in mainline.

The current eHEA module compiled for 64K page kernels can not
be loaded with insmod due to bad hypervisor call parameters.
The patch is a subset of the follwing patch which has been applied
for 2.6.24 upstream:

http://www.spinics.net/lists/netdev/msg42814.html

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/ehea/ehea_qmr.c |   20 ++++++++------------
 drivers/net/ehea/ehea_qmr.h |    2 +-
 2 files changed, 9 insertions(+), 13 deletions(-)

--- a/drivers/net/ehea/ehea_qmr.c
+++ b/drivers/net/ehea/ehea_qmr.c
@@ -563,8 +563,7 @@ int ehea_destroy_qp(struct ehea_qp *qp)
 int ehea_create_busmap( void )
 {
 	u64 vaddr = EHEA_BUSMAP_START;
-	unsigned long abs_max_pfn = 0;
-	unsigned long sec_max_pfn;
+	unsigned long high_section_index = 0;
 	int i;
 
 	/*
@@ -574,14 +573,10 @@ int ehea_create_busmap( void )
 	ehea_bmap.valid_sections = 0;
 
 	for (i = 0; i < NR_MEM_SECTIONS; i++)
-		if (valid_section_nr(i)) {
-			sec_max_pfn = section_nr_to_pfn(i);
-			if (sec_max_pfn > abs_max_pfn)
-				abs_max_pfn = sec_max_pfn;
-			ehea_bmap.valid_sections++;
-		}
+		if (valid_section_nr(i))
+			high_section_index = i;
 
-	ehea_bmap.entries = abs_max_pfn / EHEA_PAGES_PER_SECTION + 1;
+	ehea_bmap.entries = high_section_index + 1;
 	ehea_bmap.vaddr = vmalloc(ehea_bmap.entries * sizeof(*ehea_bmap.vaddr));
 
 	if (!ehea_bmap.vaddr)
@@ -593,6 +588,7 @@ int ehea_create_busmap( void )
 		if (pfn_valid(pfn)) {
 			ehea_bmap.vaddr[i] = vaddr;
 			vaddr += EHEA_SECTSIZE;
+			ehea_bmap.valid_sections++;
 		} else
 			ehea_bmap.vaddr[i] = 0;
 	}
@@ -637,7 +633,7 @@ int ehea_reg_kernel_mr(struct ehea_adapt
 
 	mr_len = ehea_bmap.valid_sections * EHEA_SECTSIZE;
 
-	pt =  kzalloc(EHEA_MAX_RPAGE * sizeof(u64), GFP_KERNEL);
+	pt =  kzalloc(PAGE_SIZE, GFP_KERNEL);
 	if (!pt) {
 		ehea_error("no mem");
 		ret = -ENOMEM;
@@ -660,8 +656,8 @@ int ehea_reg_kernel_mr(struct ehea_adapt
 			void *sectbase = __va(i << SECTION_SIZE_BITS);
 			unsigned long k = 0;
 
-			for (j = 0; j < (PAGES_PER_SECTION / EHEA_MAX_RPAGE);
-			      j++) {
+			for (j = 0; j < (EHEA_PAGES_PER_SECTION /
+					 EHEA_MAX_RPAGE); j++) {
 
 				for (m = 0; m < EHEA_MAX_RPAGE; m++) {
 					pg = sectbase + ((k++) * EHEA_PAGESIZE);
--- a/drivers/net/ehea/ehea_qmr.h
+++ b/drivers/net/ehea/ehea_qmr.h
@@ -39,7 +39,7 @@
 #define EHEA_PAGESHIFT         12
 #define EHEA_PAGESIZE          (1UL << EHEA_PAGESHIFT)
 #define EHEA_SECTSIZE          (1UL << 24)
-#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> PAGE_SHIFT)
+#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT)
 
 #if (1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE
 #error eHEA module can't work if kernel sectionsize < ehea sectionsize

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 04/16] forcedeth msi bugfix
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (2 preceding siblings ...)
  2007-11-15  6:40   ` [patch 03/16] ehea: 64K page kernel support fix Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:40   ` [patch 05/16] forcedeth: add MCP77 device IDs Greg KH
                     ` (12 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Manfred Spraul, Jeff Garzik

[-- Attachment #1: forcedeth-msi-bugfix.patch --]
[-- Type: text/plain, Size: 4246 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Manfred Spraul <manfred@colorfullife.com>

patch a7475906bc496456ded9e4b062f94067fb93057a in mainline.

pci_enable_msi() replaces the INTx irq number in pci_dev->irq with the
new MSI irq number.
The forcedeth driver did not update the copy in netdevice->irq and
parts of the driver used the stale copy.
See bugzilla.kernel.org, bug 9047.

The patch
- updates netdevice->irq
- replaces all accesses to netdevice->irq with pci_dev->irq.

The patch is against 2.6.23.1. IMHO suitable for both 2.6.23 and 2.6.24

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/forcedeth.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -988,7 +988,7 @@ static void nv_enable_irq(struct net_dev
 		if (np->msi_flags & NV_MSI_X_ENABLED)
 			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
 		else
-			enable_irq(dev->irq);
+			enable_irq(np->pci_dev->irq);
 	} else {
 		enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
 		enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector);
@@ -1004,7 +1004,7 @@ static void nv_disable_irq(struct net_de
 		if (np->msi_flags & NV_MSI_X_ENABLED)
 			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
 		else
-			disable_irq(dev->irq);
+			disable_irq(np->pci_dev->irq);
 	} else {
 		disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
 		disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector);
@@ -1601,7 +1601,7 @@ static void nv_do_rx_refill(unsigned lon
 		if (np->msi_flags & NV_MSI_X_ENABLED)
 			disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
 		else
-			disable_irq(dev->irq);
+			disable_irq(np->pci_dev->irq);
 	} else {
 		disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
 	}
@@ -1619,7 +1619,7 @@ static void nv_do_rx_refill(unsigned lon
 		if (np->msi_flags & NV_MSI_X_ENABLED)
 			enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
 		else
-			enable_irq(dev->irq);
+			enable_irq(np->pci_dev->irq);
 	} else {
 		enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
 	}
@@ -3557,10 +3557,12 @@ static int nv_request_irq(struct net_dev
 	if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
 		if ((ret = pci_enable_msi(np->pci_dev)) == 0) {
 			np->msi_flags |= NV_MSI_ENABLED;
+			dev->irq = np->pci_dev->irq;
 			if (request_irq(np->pci_dev->irq, handler, IRQF_SHARED, dev->name, dev) != 0) {
 				printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
 				pci_disable_msi(np->pci_dev);
 				np->msi_flags &= ~NV_MSI_ENABLED;
+				dev->irq = np->pci_dev->irq;
 				goto out_err;
 			}
 
@@ -3623,7 +3625,7 @@ static void nv_do_nic_poll(unsigned long
 		if (np->msi_flags & NV_MSI_X_ENABLED)
 			disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
 		else
-			disable_irq_lockdep(dev->irq);
+			disable_irq_lockdep(np->pci_dev->irq);
 		mask = np->irqmask;
 	} else {
 		if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) {
@@ -3641,6 +3643,8 @@ static void nv_do_nic_poll(unsigned long
 	}
 	np->nic_poll_irq = 0;
 
+	/* disable_irq() contains synchronize_irq, thus no irq handler can run now */
+
 	if (np->recover_error) {
 		np->recover_error = 0;
 		printk(KERN_INFO "forcedeth: MAC in recoverable error state\n");
@@ -3677,7 +3681,6 @@ static void nv_do_nic_poll(unsigned long
 		}
 	}
 
-	/* FIXME: Do we need synchronize_irq(dev->irq) here? */
 
 	writel(mask, base + NvRegIrqMask);
 	pci_push(base);
@@ -3690,7 +3693,7 @@ static void nv_do_nic_poll(unsigned long
 		if (np->msi_flags & NV_MSI_X_ENABLED)
 			enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
 		else
-			enable_irq_lockdep(dev->irq);
+			enable_irq_lockdep(np->pci_dev->irq);
 	} else {
 		if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) {
 			nv_nic_irq_rx(0, dev);
@@ -4943,7 +4946,7 @@ static int nv_close(struct net_device *d
 	np->in_shutdown = 1;
 	spin_unlock_irq(&np->lock);
 	netif_poll_disable(dev);
-	synchronize_irq(dev->irq);
+	synchronize_irq(np->pci_dev->irq);
 
 	del_timer_sync(&np->oom_kick);
 	del_timer_sync(&np->nic_poll);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 05/16] forcedeth: add MCP77 device IDs
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (3 preceding siblings ...)
  2007-11-15  6:40   ` [patch 04/16] forcedeth msi bugfix Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:40   ` [patch 06/16] TG3: Fix performance regression on 5705 Greg KH
                     ` (11 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Ayaz Abdulla, Jeff Garzik

[-- Attachment #1: forcedeth-add-mcp77-device-ids.patch --]
[-- Type: text/plain, Size: 2748 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Ayaz Abdulla <aabdulla@nvidia.com>

patch 96fd4cd3e40e240f0c385af87f58e74da8b7099a in mainline.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/forcedeth.c |   16 ++++++++++++++++
 include/linux/pci_ids.h |    4 ++++
 2 files changed, 20 insertions(+)

--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5566,6 +5566,22 @@ static struct pci_device_id pci_tbl[] = 
 		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_31),
 		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
 	},
+	{	/* MCP77 Ethernet Controller */
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_32),
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+	},
+	{	/* MCP77 Ethernet Controller */
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_33),
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+	},
+	{	/* MCP77 Ethernet Controller */
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_34),
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+	},
+	{	/* MCP77 Ethernet Controller */
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_35),
+		.driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
+	},
 	{0,},
 };
 
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1233,6 +1233,10 @@
 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE       0x0560
 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE       0x056C
 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE       0x0759
+#define PCI_DEVICE_ID_NVIDIA_NVENET_32              0x0760
+#define PCI_DEVICE_ID_NVIDIA_NVENET_33              0x0761
+#define PCI_DEVICE_ID_NVIDIA_NVENET_34              0x0762
+#define PCI_DEVICE_ID_NVIDIA_NVENET_35              0x0763
 
 #define PCI_VENDOR_ID_IMS		0x10e0
 #define PCI_DEVICE_ID_IMS_TT128		0x9128

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 06/16] TG3: Fix performance regression on 5705.
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (4 preceding siblings ...)
  2007-11-15  6:40   ` [patch 05/16] forcedeth: add MCP77 device IDs Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:40   ` [patch 07/16] Fix L2TP oopses Greg KH
                     ` (10 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Michael Chan, David S. Miller

[-- Attachment #1: tg3-fix-performance-regression-on-5705.patch --]
[-- Type: text/plain, Size: 1812 bytes --]



-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Michael Chan <mchan@broadcom.com>

patch 114342f2d38439cb1a54f1f724fa38729b093c48 in mainline.

A performance regression was introduced by the following commit:

    commit ee6a99b539a50b4e9398938a0a6d37f8bf911550
    Author: Michael Chan <mchan@broadcom.com>
    Date:   Wed Jul 18 21:49:10 2007 -0700

    [TG3]: Fix msi issue with kexec/kdump.

In making that change, the PCI latency timer and cache line size
registers were not restored after chip reset.  On the 5705, the
latency timer gets reset to 0 during chip reset and this causes
very poor performance.

Update version to 3.81.1

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/tg3.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
 
 #define DRV_MODULE_NAME		"tg3"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"3.81"
-#define DRV_MODULE_RELDATE	"September 5, 2007"
+#define DRV_MODULE_VERSION	"3.81.1"
+#define DRV_MODULE_RELDATE	"October 18, 2007"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0
@@ -4874,6 +4874,12 @@ static void tg3_restore_pci_state(struct
 
 	pci_write_config_dword(tp->pdev, TG3PCI_COMMAND, tp->pci_cmd);
 
+	if (!(tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS)) {
+		pci_write_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE,
+				      tp->pci_cacheline_sz);
+		pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER,
+				      tp->pci_lat_timer);
+	}
 	/* Make sure PCI-X relaxed ordering bit is clear. */
 	pci_read_config_dword(tp->pdev, TG3PCI_X_CAPS, &val);
 	val &= ~PCIX_CAPS_RELAXED_ORDERING;

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 07/16] Fix L2TP oopses.
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (5 preceding siblings ...)
  2007-11-15  6:40   ` [patch 06/16] TG3: Fix performance regression on 5705 Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:40   ` [patch 08/16] skge: fix ram buffer size calculation Greg KH
                     ` (9 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, bunk,
	James Chapman, David S. Miller

[-- Attachment #1: fix-l2tp-oopses.patch --]
[-- Type: text/plain, Size: 3195 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: James Chapman <jchapman@katalix.com>

changeset 91781004b9c029ee55b7aa9ef950a373ba865dc6 in mainline.

[PPP]: L2TP: Fix oops in transmit and receive paths

Changes made on 18-sep to fix skb handling in the pppol2tp driver
broke the transmit and receive paths. Users are only running into this
now because distros are now using 2.6.23 and I must have messed up
when I tested the change.

For receive, we now do our own calculation of how much to pull from
the skb (variable length L2TP header) rather than using
skb_transport_offset(). Also, if the skb isn't a data packet, it must
be passed back to UDP with skb->data pointing to the UDP header.

For transmit, make sure skb->sk is set up because ip_queue_xmit()
needs it.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/pppol2tp.c |   25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -487,7 +487,7 @@ static int pppol2tp_recv_core(struct soc
 {
 	struct pppol2tp_session *session = NULL;
 	struct pppol2tp_tunnel *tunnel;
-	unsigned char *ptr;
+	unsigned char *ptr, *optr;
 	u16 hdrflags;
 	u16 tunnel_id, session_id;
 	int length;
@@ -495,7 +495,7 @@ static int pppol2tp_recv_core(struct soc
 
 	tunnel = pppol2tp_sock_to_tunnel(sock);
 	if (tunnel == NULL)
-		goto error;
+		goto no_tunnel;
 
 	/* UDP always verifies the packet length. */
 	__skb_pull(skb, sizeof(struct udphdr));
@@ -508,7 +508,7 @@ static int pppol2tp_recv_core(struct soc
 	}
 
 	/* Point to L2TP header */
-	ptr = skb->data;
+	optr = ptr = skb->data;
 
 	/* Get L2TP header flags */
 	hdrflags = ntohs(*(__be16*)ptr);
@@ -636,12 +636,14 @@ static int pppol2tp_recv_core(struct soc
 	/* If offset bit set, skip it. */
 	if (hdrflags & L2TP_HDRFLAG_O) {
 		offset = ntohs(*(__be16 *)ptr);
-		skb->transport_header += 2 + offset;
-		if (!pskb_may_pull(skb, skb_transport_offset(skb) + 2))
-			goto discard;
+		ptr += 2 + offset;
 	}
 
-	__skb_pull(skb, skb_transport_offset(skb));
+	offset = ptr - optr;
+	if (!pskb_may_pull(skb, offset))
+		goto discard;
+
+	__skb_pull(skb, offset);
 
 	/* Skip PPP header, if present.	 In testing, Microsoft L2TP clients
 	 * don't send the PPP header (PPP header compression enabled), but
@@ -651,6 +653,9 @@ static int pppol2tp_recv_core(struct soc
 	 * Note that skb->data[] isn't dereferenced from a u16 ptr here since
 	 * the field may be unaligned.
 	 */
+	if (!pskb_may_pull(skb, 2))
+		goto discard;
+
 	if ((skb->data[0] == 0xff) && (skb->data[1] == 0x03))
 		skb_pull(skb, 2);
 
@@ -708,6 +713,10 @@ discard:
 	return 0;
 
 error:
+	/* Put UDP header back */
+	__skb_push(skb, sizeof(struct udphdr));
+
+no_tunnel:
 	return 1;
 }
 
@@ -1049,6 +1058,8 @@ static int pppol2tp_xmit(struct ppp_chan
 	/* Get routing info from the tunnel socket */
 	dst_release(skb->dst);
 	skb->dst = sk_dst_get(sk_tun);
+	skb_orphan(skb);
+	skb->sk = sk_tun;
 
 	/* Queue the packet to IP for output */
 	len = skb->len;

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (6 preceding siblings ...)
  2007-11-15  6:40   ` [patch 07/16] Fix L2TP oopses Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15 16:11     ` Linus Torvalds
  2007-11-15  6:40   ` [patch 09/16] skge: XM PHY handling fixes Greg KH
                     ` (8 subsequent siblings)
  16 siblings, 1 reply; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Stephen Hemminger, Jeff Garzik

[-- Attachment #1: skge-ram-buffer-fix.patch --]
[-- Type: text/plain, Size: 3844 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@linux-foundation.org>

patch 7fb7ac241162dc51ec0f7644d4a97b2855213c32 in mainline.

This fixes problems with transmit hangs on older fiber based SysKonnect boards.

Adjust ram buffer sizing calculation to make it correct on all boards
and make it like the code in sky2 driver.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

---
 drivers/net/skge.c |   51 ++++++++++++++++++++++++---------------------------
 1 file changed, 24 insertions(+), 27 deletions(-)

--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2400,32 +2400,31 @@ static int skge_ioctl(struct net_device 
 	return err;
 }
 
-static void skge_ramset(struct skge_hw *hw, u16 q, u32 start, size_t len)
+/* Assign Ram Buffer allocation to queue */
+static void skge_ramset(struct skge_hw *hw, u16 q, u32 start, u32 space)
 {
 	u32 end;
 
-	start /= 8;
-	len /= 8;
-	end = start + len - 1;
+	/* convert from K bytes to qwords used for hw register */
+	start *= 1024/8;
+	space *= 1024/8;
+	end = start + space - 1;
 
 	skge_write8(hw, RB_ADDR(q, RB_CTRL), RB_RST_CLR);
 	skge_write32(hw, RB_ADDR(q, RB_START), start);
+	skge_write32(hw, RB_ADDR(q, RB_END), end);
 	skge_write32(hw, RB_ADDR(q, RB_WP), start);
 	skge_write32(hw, RB_ADDR(q, RB_RP), start);
-	skge_write32(hw, RB_ADDR(q, RB_END), end);
 
 	if (q == Q_R1 || q == Q_R2) {
+		u32 tp = space - space/4;
+
 		/* Set thresholds on receive queue's */
-		skge_write32(hw, RB_ADDR(q, RB_RX_UTPP),
-			     start + (2*len)/3);
-		skge_write32(hw, RB_ADDR(q, RB_RX_LTPP),
-			     start + (len/3));
-	} else {
-		/* Enable store & forward on Tx queue's because
-		 * Tx FIFO is only 4K on Genesis and 1K on Yukon
-		 */
+		skge_write32(hw, RB_ADDR(q, RB_RX_UTPP), tp);
+		skge_write32(hw, RB_ADDR(q, RB_RX_LTPP), space/4);
+	} else if (hw->chip_id != CHIP_ID_GENESIS)
+		/* Genesis Tx Fifo is too small for normal store/forward */
 		skge_write8(hw, RB_ADDR(q, RB_CTRL), RB_ENA_STFWD);
-	}
 
 	skge_write8(hw, RB_ADDR(q, RB_CTRL), RB_ENA_OP_MD);
 }
@@ -2453,7 +2452,7 @@ static int skge_up(struct net_device *de
 	struct skge_port *skge = netdev_priv(dev);
 	struct skge_hw *hw = skge->hw;
 	int port = skge->port;
-	u32 chunk, ram_addr;
+	u32 ramaddr, ramsize, rxspace;
 	size_t rx_size, tx_size;
 	int err;
 
@@ -2508,14 +2507,15 @@ static int skge_up(struct net_device *de
 	spin_unlock_bh(&hw->phy_lock);
 
 	/* Configure RAMbuffers */
-	chunk = hw->ram_size / ((hw->ports + 1)*2);
-	ram_addr = hw->ram_offset + 2 * chunk * port;
+	ramsize = (hw->ram_size - hw->ram_offset) / hw->ports;
+	ramaddr = hw->ram_offset + port * ramsize;
+	rxspace = 8 + (2*(ramsize - 16))/3;
 
-	skge_ramset(hw, rxqaddr[port], ram_addr, chunk);
-	skge_qset(skge, rxqaddr[port], skge->rx_ring.to_clean);
+	skge_ramset(hw, rxqaddr[port], ramaddr, rxspace);
+	skge_ramset(hw, txqaddr[port], ramaddr + rxspace, ramsize - rxspace);
 
+	skge_qset(skge, rxqaddr[port], skge->rx_ring.to_clean);
 	BUG_ON(skge->tx_ring.to_use != skge->tx_ring.to_clean);
-	skge_ramset(hw, txqaddr[port], ram_addr+chunk, chunk);
 	skge_qset(skge, txqaddr[port], skge->tx_ring.to_use);
 
 	/* Start receiver BMU */
@@ -3450,15 +3450,12 @@ static int skge_reset(struct skge_hw *hw
 	if (hw->chip_id == CHIP_ID_GENESIS) {
 		if (t8 == 3) {
 			/* special case: 4 x 64k x 36, offset = 0x80000 */
-			hw->ram_size = 0x100000;
-			hw->ram_offset = 0x80000;
+			hw->ram_size = 1024;
+			hw->ram_offset = 512;
 		} else
 			hw->ram_size = t8 * 512;
-	}
-	else if (t8 == 0)
-		hw->ram_size = 0x20000;
-	else
-		hw->ram_size = t8 * 4096;
+	} else /* Yukon */
+		hw->ram_size = t8 ? t8 * 4 : 128;
 
 	hw->intr_mask = IS_HW_ERR;
 

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 09/16] skge: XM PHY handling fixes
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (7 preceding siblings ...)
  2007-11-15  6:40   ` [patch 08/16] skge: fix ram buffer size calculation Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:40   ` [patch 10/16] sky2: status ring race fix Greg KH
                     ` (7 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Stephen Hemminger, Jeff Garzik

[-- Attachment #1: skge-xm-phy-poll.patch --]
[-- Type: text/plain, Size: 7517 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@linux-foundation.org>

patch 501fb72d052d2a302b423bef7dec98d9d98c8a36 in mainline.

Change how PHY is managed on SysKonnect fibre based boards.
Poll for PHY coming up 1 per second, but use interrupt to detect loss.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/skge.c |   90 ++++++++++++++++++++++++++++-------------------------
 drivers/net/skge.h |    6 +--
 2 files changed, 51 insertions(+), 45 deletions(-)

--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -57,7 +57,7 @@
 #define TX_WATCHDOG		(5 * HZ)
 #define NAPI_WEIGHT		64
 #define BLINK_MS		250
-#define LINK_HZ			(HZ/2)
+#define LINK_HZ			HZ
 
 MODULE_DESCRIPTION("SysKonnect Gigabit Ethernet driver");
 MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>");
@@ -992,19 +992,15 @@ static void xm_link_down(struct skge_hw 
 {
 	struct net_device *dev = hw->dev[port];
 	struct skge_port *skge = netdev_priv(dev);
-	u16 cmd, msk;
+	u16 cmd = xm_read16(hw, port, XM_MMU_CMD);
 
-	if (hw->phy_type == SK_PHY_XMAC) {
-		msk = xm_read16(hw, port, XM_IMSK);
-		msk |= XM_IS_INP_ASS | XM_IS_LIPA_RC | XM_IS_RX_PAGE | XM_IS_AND;
-		xm_write16(hw, port, XM_IMSK, msk);
-	}
+	xm_write16(hw, port, XM_IMSK, XM_IMSK_DISABLE);
 
-	cmd = xm_read16(hw, port, XM_MMU_CMD);
 	cmd &= ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX);
 	xm_write16(hw, port, XM_MMU_CMD, cmd);
+
 	/* dummy read to ensure writing */
-	(void) xm_read16(hw, port, XM_MMU_CMD);
+	xm_read16(hw, port, XM_MMU_CMD);
 
 	if (netif_carrier_ok(dev))
 		skge_link_down(skge);
@@ -1100,7 +1096,7 @@ static void genesis_reset(struct skge_hw
 
 	/* reset the statistics module */
 	xm_write32(hw, port, XM_GP_PORT, XM_GP_RES_STAT);
-	xm_write16(hw, port, XM_IMSK, 0xffff);	/* disable XMAC IRQs */
+	xm_write16(hw, port, XM_IMSK, XM_IMSK_DISABLE);
 	xm_write32(hw, port, XM_MODE, 0);		/* clear Mode Reg */
 	xm_write16(hw, port, XM_TX_CMD, 0);	/* reset TX CMD Reg */
 	xm_write16(hw, port, XM_RX_CMD, 0);	/* reset RX CMD Reg */
@@ -1138,7 +1134,7 @@ static void bcom_check_link(struct skge_
 	u16 status;
 
 	/* read twice because of latch */
-	(void) xm_phy_read(hw, port, PHY_BCOM_STAT);
+	xm_phy_read(hw, port, PHY_BCOM_STAT);
 	status = xm_phy_read(hw, port, PHY_BCOM_STAT);
 
 	if ((status & PHY_ST_LSYNC) == 0) {
@@ -1339,7 +1335,7 @@ static void xm_phy_init(struct skge_port
 	mod_timer(&skge->link_timer, jiffies + LINK_HZ);
 }
 
-static void xm_check_link(struct net_device *dev)
+static int xm_check_link(struct net_device *dev)
 {
 	struct skge_port *skge = netdev_priv(dev);
 	struct skge_hw *hw = skge->hw;
@@ -1347,25 +1343,25 @@ static void xm_check_link(struct net_dev
 	u16 status;
 
 	/* read twice because of latch */
-	(void) xm_phy_read(hw, port, PHY_XMAC_STAT);
+	xm_phy_read(hw, port, PHY_XMAC_STAT);
 	status = xm_phy_read(hw, port, PHY_XMAC_STAT);
 
 	if ((status & PHY_ST_LSYNC) == 0) {
 		xm_link_down(hw, port);
-		return;
+		return 0;
 	}
 
 	if (skge->autoneg == AUTONEG_ENABLE) {
 		u16 lpa, res;
 
 		if (!(status & PHY_ST_AN_OVER))
-			return;
+			return 0;
 
 		lpa = xm_phy_read(hw, port, PHY_XMAC_AUNE_LP);
 		if (lpa & PHY_B_AN_RF) {
 			printk(KERN_NOTICE PFX "%s: remote fault\n",
 			       dev->name);
-			return;
+			return 0;
 		}
 
 		res = xm_phy_read(hw, port, PHY_XMAC_RES_ABI);
@@ -1381,7 +1377,7 @@ static void xm_check_link(struct net_dev
 		default:
 			printk(KERN_NOTICE PFX "%s: duplex mismatch\n",
 			       dev->name);
-			return;
+			return 0;
 		}
 
 		/* We are using IEEE 802.3z/D5.0 Table 37-4 */
@@ -1405,11 +1401,14 @@ static void xm_check_link(struct net_dev
 
 	if (!netif_carrier_ok(dev))
 		genesis_link_up(skge);
+	return 1;
 }
 
 /* Poll to check for link coming up.
+ *
  * Since internal PHY is wired to a level triggered pin, can't
- * get an interrupt when carrier is detected.
+ * get an interrupt when carrier is detected, need to poll for
+ * link coming up.
  */
 static void xm_link_timer(unsigned long arg)
 {
@@ -1417,29 +1416,35 @@ static void xm_link_timer(unsigned long 
 	struct net_device *dev = skge->netdev;
  	struct skge_hw *hw = skge->hw;
 	int port = skge->port;
+	int i;
+	unsigned long flags;
 
 	if (!netif_running(dev))
 		return;
 
-	if (netif_carrier_ok(dev)) {
+	spin_lock_irqsave(&hw->phy_lock, flags);
+
+	/*
+	 * Verify that the link by checking GPIO register three times.
+	 * This pin has the signal from the link_sync pin connected to it.
+	 */
+	for (i = 0; i < 3; i++) {
+		if (xm_read16(hw, port, XM_GP_PORT) & XM_GP_INP_ASS)
+			goto link_down;
+	}
+
+        /* Re-enable interrupt to detect link down */
+	if (xm_check_link(dev)) {
+		u16 msk = xm_read16(hw, port, XM_IMSK);
+		msk &= ~XM_IS_INP_ASS;
+		xm_write16(hw, port, XM_IMSK, msk);
 		xm_read16(hw, port, XM_ISRC);
-		if (!(xm_read16(hw, port, XM_ISRC) & XM_IS_INP_ASS))
-			goto nochange;
 	} else {
-		if (xm_read32(hw, port, XM_GP_PORT) & XM_GP_INP_ASS)
-			goto nochange;
-		xm_read16(hw, port, XM_ISRC);
-		if (xm_read16(hw, port, XM_ISRC) & XM_IS_INP_ASS)
-			goto nochange;
+link_down:
+		mod_timer(&skge->link_timer,
+			  round_jiffies(jiffies + LINK_HZ));
 	}
-
-	spin_lock(&hw->phy_lock);
-	xm_check_link(dev);
-	spin_unlock(&hw->phy_lock);
-
-nochange:
-	if (netif_running(dev))
-		mod_timer(&skge->link_timer, jiffies + LINK_HZ);
+	spin_unlock_irqrestore(&hw->phy_lock, flags);
 }
 
 static void genesis_mac_init(struct skge_hw *hw, int port)
@@ -1683,14 +1688,16 @@ static void genesis_mac_intr(struct skge
 		printk(KERN_DEBUG PFX "%s: mac interrupt status 0x%x\n",
 		       skge->netdev->name, status);
 
-	if (hw->phy_type == SK_PHY_XMAC &&
-	    (status & (XM_IS_INP_ASS | XM_IS_LIPA_RC)))
-		xm_link_down(hw, port);
+	if (hw->phy_type == SK_PHY_XMAC && (status & XM_IS_INP_ASS)) {
+  		xm_link_down(hw, port);
+		mod_timer(&skge->link_timer, jiffies + 1);
+	}
 
 	if (status & XM_IS_TXF_UR) {
 		xm_write32(hw, port, XM_MODE, XM_MD_FTF);
 		++skge->net_stats.tx_fifo_errors;
 	}
+
 	if (status & XM_IS_RXF_OV) {
 		xm_write32(hw, port, XM_MODE, XM_MD_FRF);
 		++skge->net_stats.rx_fifo_errors;
@@ -1750,11 +1757,12 @@ static void genesis_link_up(struct skge_
 	}
 
 	xm_write32(hw, port, XM_MODE, mode);
-	msk = XM_DEF_MSK;
-	if (hw->phy_type != SK_PHY_XMAC)
-		msk |= XM_IS_INP_ASS;	/* disable GP0 interrupt bit */
 
+	/* Turn on detection of Tx underrun, Rx overrun */
+	msk = xm_read16(hw, port, XM_IMSK);
+	msk &= ~(XM_IS_RXF_OV | XM_IS_TXF_UR);
 	xm_write16(hw, port, XM_IMSK, msk);
+
 	xm_read16(hw, port, XM_ISRC);
 
 	/* get MMU Command Reg. */
@@ -2185,7 +2193,7 @@ static void yukon_mac_intr(struct skge_h
 	u8 status = skge_read8(hw, SK_REG(port, GMAC_IRQ_SRC));
 
 	if (netif_msg_intr(skge))
-		printk(KERN_DEBUG PFX "%s: mac interrupt status 0x%x\n",
+		printk(KERN_DEBUG PFX "%s: yukon mac interrupt status 0x%x\n",
 		       dev->name, status);
 
 	if (status & GM_IS_RX_FF_OR) {
--- a/drivers/net/skge.h
+++ b/drivers/net/skge.h
@@ -2193,11 +2193,9 @@ enum {
 	XM_IS_TXF_UR	= 1<<2,	/* Bit  2:	Transmit FIFO Underrun */
 	XM_IS_TX_COMP	= 1<<1,	/* Bit  1:	Frame Tx Complete */
 	XM_IS_RX_COMP	= 1<<0,	/* Bit  0:	Frame Rx Complete */
-};
-
-#define XM_DEF_MSK	(~(XM_IS_INP_ASS | XM_IS_LIPA_RC | \
-			   XM_IS_RXF_OV | XM_IS_TXF_UR))
 
+	XM_IMSK_DISABLE	= 0xffff,
+};
 
 /*	XM_HW_CFG	16 bit r/w	Hardware Config Register */
 enum {

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 10/16] sky2: status ring race fix
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (8 preceding siblings ...)
  2007-11-15  6:40   ` [patch 09/16] skge: XM PHY handling fixes Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:40   ` [patch 11/16] sky2: ethtool register reserved area blackout Greg KH
                     ` (6 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Stephen Hemminger, Jeff Garzik

[-- Attachment #1: sky2-status-race.patch --]
[-- Type: text/plain, Size: 1802 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Stephen Hemminger <shemminger@linux-foundation.org>

patch ab5adecb2d02f3688719dfb5936a82833fcc3955 in mainline.

The D-Link PCI-X board (and maybe others) can lie about status
ring entries. It seems it will update the register for last status
index before completing the DMA for the ring entry. To avoid reading
stale data, zap the old entry and check.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2246,20 +2246,26 @@ static int sky2_status_intr(struct sky2_
 	while (hw->st_idx != hwidx) {
 		struct sky2_port *sky2;
 		struct sky2_status_le *le  = hw->st_le + hw->st_idx;
-		unsigned port = le->css & CSS_LINK_BIT;
+		unsigned port;
 		struct net_device *dev;
 		struct sk_buff *skb;
 		u32 status;
 		u16 length;
+		u8 opcode = le->opcode;
+
+		if (!(opcode & HW_OWNER))
+			break;
 
 		hw->st_idx = RING_NEXT(hw->st_idx, STATUS_RING_SIZE);
 
+		port = le->css & CSS_LINK_BIT;
 		dev = hw->dev[port];
 		sky2 = netdev_priv(dev);
 		length = le16_to_cpu(le->length);
 		status = le32_to_cpu(le->status);
 
-		switch (le->opcode & ~HW_OWNER) {
+		le->opcode = 0;
+		switch (opcode & ~HW_OWNER) {
 		case OP_RXSTAT:
 			++rx[port];
 			skb = sky2_receive(dev, length, status);
@@ -2352,7 +2358,7 @@ static int sky2_status_intr(struct sky2_
 		default:
 			if (net_ratelimit())
 				printk(KERN_WARNING PFX
-				       "unknown status opcode 0x%x\n", le->opcode);
+				       "unknown status opcode 0x%x\n", opcode);
 		}
 	}
 

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 11/16] sky2: ethtool register reserved area blackout
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (9 preceding siblings ...)
  2007-11-15  6:40   ` [patch 10/16] sky2: status ring race fix Greg KH
@ 2007-11-15  6:40   ` Greg KH
  2007-11-15  6:41   ` [patch 12/16] sky2: fix power settings on Yukon XL Greg KH
                     ` (5 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:40 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Stephen Hemminger, David S. Miller

[-- Attachment #1: sky2-ethdump.patch --]
[-- Type: text/plain, Size: 3089 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Stephen Hemminger <shemminger@linux-foundation.org>

patch 295b54c4902c52cd00d7c837d50a86e39e26caec in mainline.

Make sure and not dump reserved areas of device space.
Touching some of these causes machine check exceptions on boards
like D-Link DGE-550SX.

Coding note, used a complex switch statement rather than bitmap
because it is easier to relate the block values to the documentation
rather than looking at a encoded bitmask.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/net/sky2.c |   62 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 53 insertions(+), 9 deletions(-)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3570,20 +3570,64 @@ static void sky2_get_regs(struct net_dev
 {
 	const struct sky2_port *sky2 = netdev_priv(dev);
 	const void __iomem *io = sky2->hw->regs;
+	unsigned int b;
 
 	regs->version = 1;
-	memset(p, 0, regs->len);
 
-	memcpy_fromio(p, io, B3_RAM_ADDR);
-
-	/* skip diagnostic ram region */
-	memcpy_fromio(p + B3_RI_WTO_R1, io + B3_RI_WTO_R1, 0x2000 - B3_RI_WTO_R1);
+	for (b = 0; b < 128; b++) {
+		/* This complicated switch statement is to make sure and
+		 * only access regions that are unreserved.
+		 * Some blocks are only valid on dual port cards.
+		 * and block 3 has some special diagnostic registers that
+		 * are poison.
+		 */
+		switch (b) {
+		case 3:
+			/* skip diagnostic ram region */
+			memcpy_fromio(p + 0x10, io + 0x10, 128 - 0x10);
+			break;
 
-	/* copy GMAC registers */
-	memcpy_fromio(p + BASE_GMAC_1, io + BASE_GMAC_1, 0x1000);
-	if (sky2->hw->ports > 1)
-		memcpy_fromio(p + BASE_GMAC_2, io + BASE_GMAC_2, 0x1000);
+		/* dual port cards only */
+		case 5:		/* Tx Arbiter 2 */
+		case 9: 	/* RX2 */
+		case 14 ... 15:	/* TX2 */
+		case 17: case 19: /* Ram Buffer 2 */
+		case 22 ... 23: /* Tx Ram Buffer 2 */
+		case 25: 	/* Rx MAC Fifo 1 */
+		case 27: 	/* Tx MAC Fifo 2 */
+		case 31:	/* GPHY 2 */
+		case 40 ... 47: /* Pattern Ram 2 */
+		case 52: case 54: /* TCP Segmentation 2 */
+		case 112 ... 116: /* GMAC 2 */
+			if (sky2->hw->ports == 1)
+				goto reserved;
+			/* fall through */
+		case 0:		/* Control */
+		case 2:		/* Mac address */
+		case 4:		/* Tx Arbiter 1 */
+		case 7:		/* PCI express reg */
+		case 8:		/* RX1 */
+		case 12 ... 13: /* TX1 */
+		case 16: case 18:/* Rx Ram Buffer 1 */
+		case 20 ... 21: /* Tx Ram Buffer 1 */
+		case 24: 	/* Rx MAC Fifo 1 */
+		case 26: 	/* Tx MAC Fifo 1 */
+		case 28 ... 29: /* Descriptor and status unit */
+		case 30:	/* GPHY 1*/
+		case 32 ... 39: /* Pattern Ram 1 */
+		case 48: case 50: /* TCP Segmentation 1 */
+		case 56 ... 60:	/* PCI space */
+		case 80 ... 84:	/* GMAC 1 */
+			memcpy_fromio(p, io, 128);
+			break;
+		default:
+reserved:
+			memset(p, 0, 128);
+		}
 
+		p += 128;
+		io += 128;
+	}
 }
 
 /* In order to do Jumbo packets on these chips, need to turn off the

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 12/16] sky2: fix power settings on Yukon XL
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (10 preceding siblings ...)
  2007-11-15  6:40   ` [patch 11/16] sky2: ethtool register reserved area blackout Greg KH
@ 2007-11-15  6:41   ` Greg KH
  2007-11-15  6:41     ` Greg KH
                     ` (4 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Stephen Hemminger, David S. Miller

[-- Attachment #1: sky2-phy-power.patch --]
[-- Type: text/plain, Size: 1543 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Stephen Hemminger <shemminger@linux-foundation.org>

patch ff35164e72648e0bf0b10ec4410c195e8607e88b in mainline.

Make sure PCI register for PHY power gets set correctly.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/net/sky2.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -603,21 +603,22 @@ static void sky2_phy_init(struct sky2_hw
 static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
 {
 	u32 reg1;
-	static const u32 phy_power[]
-		= { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
-
-	/* looks like this XL is back asswards .. */
-	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
-		onoff = !onoff;
+	static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
+	static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA };
 
 	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
 	reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
+
 	if (onoff)
 		/* Turn off phy power saving */
 		reg1 &= ~phy_power[port];
 	else
 		reg1 |= phy_power[port];
 
+	if (onoff && hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
+		reg1 |= coma_mode[port];
+
+
 	sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
 	sky2_pci_read32(hw, PCI_DEV_REG1);
 	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 13/16] zd1201: avoid null ptr access of skb->dev
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
@ 2007-11-15  6:41     ` Greg KH
  2007-11-15  6:39   ` [patch 02/16] libertas: fix " Greg KH
                       ` (15 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	linux-wireless, John W. Linville



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: John W. Linville <linville@tuxdriver.com>

patch 3ba72b25211217de195e3f528dd36132b38a205b in mainline.

skb->dev is not set until eth_type_trans is called...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/zd1201.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -327,8 +327,8 @@ static void zd1201_usbrx(struct urb *urb
 			memcpy(skb_put(skb, 6), &data[datalen-8], 6);
 			memcpy(skb_put(skb, 2), &data[datalen-24], 2);
 			memcpy(skb_put(skb, len), data, len);
-			skb->dev->last_rx = jiffies;
 			skb->protocol = eth_type_trans(skb, zd->dev);
+			skb->dev->last_rx = jiffies;
 			zd->stats.rx_packets++;
 			zd->stats.rx_bytes += skb->len;
 			netif_rx(skb);
@@ -384,8 +384,8 @@ static void zd1201_usbrx(struct urb *urb
 			memcpy(skb_put(skb, 2), &data[6], 2);
 			memcpy(skb_put(skb, len), data+8, len);
 		}
-		skb->dev->last_rx = jiffies;
 		skb->protocol = eth_type_trans(skb, zd->dev);
+		skb->dev->last_rx = jiffies;
 		zd->stats.rx_packets++;
 		zd->stats.rx_bytes += skb->len;
 		netif_rx(skb);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 13/16] zd1201: avoid null ptr access of skb->dev
@ 2007-11-15  6:41     ` Greg KH
  0 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	linux-wireless, John W. Linville

[-- Attachment #1: zd1201-avoid-null-ptr-access-of-skb-dev.patch --]
[-- Type: text/plain, Size: 1292 bytes --]



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: John W. Linville <linville@tuxdriver.com>

patch 3ba72b25211217de195e3f528dd36132b38a205b in mainline.

skb->dev is not set until eth_type_trans is called...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/zd1201.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -327,8 +327,8 @@ static void zd1201_usbrx(struct urb *urb
 			memcpy(skb_put(skb, 6), &data[datalen-8], 6);
 			memcpy(skb_put(skb, 2), &data[datalen-24], 2);
 			memcpy(skb_put(skb, len), data, len);
-			skb->dev->last_rx = jiffies;
 			skb->protocol = eth_type_trans(skb, zd->dev);
+			skb->dev->last_rx = jiffies;
 			zd->stats.rx_packets++;
 			zd->stats.rx_bytes += skb->len;
 			netif_rx(skb);
@@ -384,8 +384,8 @@ static void zd1201_usbrx(struct urb *urb
 			memcpy(skb_put(skb, 2), &data[6], 2);
 			memcpy(skb_put(skb, len), data+8, len);
 		}
-		skb->dev->last_rx = jiffies;
 		skb->protocol = eth_type_trans(skb, zd->dev);
+		skb->dev->last_rx = jiffies;
 		zd->stats.rx_packets++;
 		zd->stats.rx_bytes += skb->len;
 		netif_rx(skb);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 14/16] ipw2100: send WEXT scan events
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
@ 2007-11-15  6:41     ` Greg KH
  2007-11-15  6:39   ` [patch 02/16] libertas: fix " Greg KH
                       ` (15 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Dan Williams, linux-wireless, John W. Linville



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Dan Williams <dcbw@redhat.com>

patch d20c678a450a25c1c12925f60c1b4cc040acc17d in mainline

ipw2100 wasn't sending WEXT scan events at all on scan completion.  And
like ipw2200, the driver aggressively auto-scans, requiring
non-user-requested scan events to be batched together and sent at
specific intervals instead of many times per seconds.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ipw2100.c |   39 +++++++++++++++++++++++++++++++++++++++
 drivers/net/wireless/ipw2100.h |    4 ++++
 2 files changed, 43 insertions(+)

--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -2102,12 +2102,46 @@ static void isr_indicate_rf_kill(struct 
 	queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ));
 }
 
+static void send_scan_event(void *data)
+{
+	struct ipw2100_priv *priv = data;
+	union iwreq_data wrqu;
+
+	wrqu.data.length = 0;
+	wrqu.data.flags = 0;
+	wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL);
+}
+
+static void ipw2100_scan_event_later(struct work_struct *work)
+{
+	send_scan_event(container_of(work, struct ipw2100_priv,
+					scan_event_later.work));
+}
+
+static void ipw2100_scan_event_now(struct work_struct *work)
+{
+	send_scan_event(container_of(work, struct ipw2100_priv,
+					scan_event_now));
+}
+
 static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
 {
 	IPW_DEBUG_SCAN("scan complete\n");
 	/* Age the scan results... */
 	priv->ieee->scans++;
 	priv->status &= ~STATUS_SCANNING;
+
+	/* Only userspace-requested scan completion events go out immediately */
+	if (!priv->user_requested_scan) {
+		if (!delayed_work_pending(&priv->scan_event_later))
+			queue_delayed_work(priv->workqueue,
+					&priv->scan_event_later,
+					round_jiffies(msecs_to_jiffies(4000)));
+	} else {
+		priv->user_requested_scan = 0;
+		cancel_delayed_work(&priv->scan_event_later);
+		queue_work(priv->workqueue, &priv->scan_event_now);
+	}
 }
 
 #ifdef CONFIG_IPW2100_DEBUG
@@ -4376,6 +4410,7 @@ static void ipw2100_kill_workqueue(struc
 		cancel_delayed_work(&priv->wx_event_work);
 		cancel_delayed_work(&priv->hang_check);
 		cancel_delayed_work(&priv->rf_kill);
+		cancel_delayed_work(&priv->scan_event_later);
 		destroy_workqueue(priv->workqueue);
 		priv->workqueue = NULL;
 	}
@@ -6118,6 +6153,8 @@ static struct net_device *ipw2100_alloc_
 	INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work);
 	INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check);
 	INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
+	INIT_WORK(&priv->scan_event_now, ipw2100_scan_event_now);
+	INIT_DELAYED_WORK(&priv->scan_event_later, ipw2100_scan_event_later);
 
 	tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
 		     ipw2100_irq_tasklet, (unsigned long)priv);
@@ -7427,6 +7464,8 @@ static int ipw2100_wx_set_scan(struct ne
 	}
 
 	IPW_DEBUG_WX("Initiating scan...\n");
+
+	priv->user_requested_scan = 1;
 	if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) {
 		IPW_DEBUG_WX("Start scan failed.\n");
 
--- a/drivers/net/wireless/ipw2100.h
+++ b/drivers/net/wireless/ipw2100.h
@@ -588,6 +588,10 @@ struct ipw2100_priv {
 	struct delayed_work wx_event_work;
 	struct delayed_work hang_check;
 	struct delayed_work rf_kill;
+	struct work_struct scan_event_now;
+	struct delayed_work scan_event_later;
+
+	int user_requested_scan;
 
 	u32 interrupts;
 	int tx_interrupts;

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 14/16] ipw2100: send WEXT scan events
@ 2007-11-15  6:41     ` Greg KH
  0 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Dan Williams, linux-wireless, John W. Linville

[-- Attachment #1: ipw2100-send-wext-scan-events.patch --]
[-- Type: text/plain, Size: 3618 bytes --]



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Dan Williams <dcbw@redhat.com>

patch d20c678a450a25c1c12925f60c1b4cc040acc17d in mainline

ipw2100 wasn't sending WEXT scan events at all on scan completion.  And
like ipw2200, the driver aggressively auto-scans, requiring
non-user-requested scan events to be batched together and sent at
specific intervals instead of many times per seconds.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ipw2100.c |   39 +++++++++++++++++++++++++++++++++++++++
 drivers/net/wireless/ipw2100.h |    4 ++++
 2 files changed, 43 insertions(+)

--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -2102,12 +2102,46 @@ static void isr_indicate_rf_kill(struct 
 	queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ));
 }
 
+static void send_scan_event(void *data)
+{
+	struct ipw2100_priv *priv = data;
+	union iwreq_data wrqu;
+
+	wrqu.data.length = 0;
+	wrqu.data.flags = 0;
+	wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL);
+}
+
+static void ipw2100_scan_event_later(struct work_struct *work)
+{
+	send_scan_event(container_of(work, struct ipw2100_priv,
+					scan_event_later.work));
+}
+
+static void ipw2100_scan_event_now(struct work_struct *work)
+{
+	send_scan_event(container_of(work, struct ipw2100_priv,
+					scan_event_now));
+}
+
 static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
 {
 	IPW_DEBUG_SCAN("scan complete\n");
 	/* Age the scan results... */
 	priv->ieee->scans++;
 	priv->status &= ~STATUS_SCANNING;
+
+	/* Only userspace-requested scan completion events go out immediately */
+	if (!priv->user_requested_scan) {
+		if (!delayed_work_pending(&priv->scan_event_later))
+			queue_delayed_work(priv->workqueue,
+					&priv->scan_event_later,
+					round_jiffies(msecs_to_jiffies(4000)));
+	} else {
+		priv->user_requested_scan = 0;
+		cancel_delayed_work(&priv->scan_event_later);
+		queue_work(priv->workqueue, &priv->scan_event_now);
+	}
 }
 
 #ifdef CONFIG_IPW2100_DEBUG
@@ -4376,6 +4410,7 @@ static void ipw2100_kill_workqueue(struc
 		cancel_delayed_work(&priv->wx_event_work);
 		cancel_delayed_work(&priv->hang_check);
 		cancel_delayed_work(&priv->rf_kill);
+		cancel_delayed_work(&priv->scan_event_later);
 		destroy_workqueue(priv->workqueue);
 		priv->workqueue = NULL;
 	}
@@ -6118,6 +6153,8 @@ static struct net_device *ipw2100_alloc_
 	INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work);
 	INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check);
 	INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
+	INIT_WORK(&priv->scan_event_now, ipw2100_scan_event_now);
+	INIT_DELAYED_WORK(&priv->scan_event_later, ipw2100_scan_event_later);
 
 	tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
 		     ipw2100_irq_tasklet, (unsigned long)priv);
@@ -7427,6 +7464,8 @@ static int ipw2100_wx_set_scan(struct ne
 	}
 
 	IPW_DEBUG_WX("Initiating scan...\n");
+
+	priv->user_requested_scan = 1;
 	if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) {
 		IPW_DEBUG_WX("Start scan failed.\n");
 
--- a/drivers/net/wireless/ipw2100.h
+++ b/drivers/net/wireless/ipw2100.h
@@ -588,6 +588,10 @@ struct ipw2100_priv {
 	struct delayed_work wx_event_work;
 	struct delayed_work hang_check;
 	struct delayed_work rf_kill;
+	struct work_struct scan_event_now;
+	struct delayed_work scan_event_later;
+
+	int user_requested_scan;
 
 	u32 interrupts;
 	int tx_interrupts;

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 15/16] rtl8187: Fix more frag bit checking, rts duration calc
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
@ 2007-11-15  6:41     ` Greg KH
  2007-11-15  6:39   ` [patch 02/16] libertas: fix " Greg KH
                       ` (15 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Michael Wu, linux-wireless, John W. Linville



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Michael Wu <flamingice@sourmilk.net>

patch 98798f4875b7149db4eb7d0a126fc6dcd9637821 in mainline.

The wrong pointer is passed to ieee80211_get_morefrag. Fix this.

While we're at it, reorder things so they look better and the rts duration
calculation is done with the right length.

Thanks to Christoph Hellwig for finding the ieee80211_get_morefrag issue.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/rtl8187_dev.c |   31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -78,7 +78,8 @@ static int rtl8187_tx(struct ieee80211_h
 	struct rtl8187_tx_hdr *hdr;
 	struct rtl8187_tx_info *info;
 	struct urb *urb;
-	u32 tmp;
+	__le16 rts_dur = 0;
+	u32 flags;
 
 	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (!urb) {
@@ -86,24 +87,24 @@ static int rtl8187_tx(struct ieee80211_h
 		return 0;
 	}
 
-	hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
-	tmp = skb->len - sizeof(*hdr);
-	tmp |= RTL8187_TX_FLAG_NO_ENCRYPT;
-	tmp |= control->rts_cts_rate << 19;
-	tmp |= control->tx_rate << 24;
-	if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb))
-		tmp |= RTL8187_TX_FLAG_MORE_FRAG;
+	flags = skb->len;
+	flags |= RTL8187_TX_FLAG_NO_ENCRYPT;
+	flags |= control->rts_cts_rate << 19;
+	flags |= control->tx_rate << 24;
+	if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data))
+		flags |= RTL8187_TX_FLAG_MORE_FRAG;
 	if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
-		tmp |= RTL8187_TX_FLAG_RTS;
-		hdr->rts_duration =
-			ieee80211_rts_duration(dev, skb->len, control);
+		flags |= RTL8187_TX_FLAG_RTS;
+		rts_dur = ieee80211_rts_duration(dev, skb->len, control);
 	}
 	if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
-		tmp |= RTL8187_TX_FLAG_CTS;
-	hdr->flags = cpu_to_le32(tmp);
+		flags |= RTL8187_TX_FLAG_CTS;
+
+	hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
+	hdr->flags = cpu_to_le32(flags);
 	hdr->len = 0;
-	tmp = control->retry_limit << 8;
-	hdr->retry = cpu_to_le32(tmp);
+	hdr->rts_duration = rts_dur;
+	hdr->retry = cpu_to_le32(control->retry_limit << 8);
 
 	info = (struct rtl8187_tx_info *)skb->cb;
 	info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 15/16] rtl8187: Fix more frag bit checking, rts duration calc
@ 2007-11-15  6:41     ` Greg KH
  0 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Michael Wu, linux-wireless, John W. Linville

[-- Attachment #1: rtl8187-fix-more-frag-bit-checking-rts-duration-calc.patch --]
[-- Type: text/plain, Size: 2489 bytes --]



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Michael Wu <flamingice@sourmilk.net>

patch 98798f4875b7149db4eb7d0a126fc6dcd9637821 in mainline.

The wrong pointer is passed to ieee80211_get_morefrag. Fix this.

While we're at it, reorder things so they look better and the rts duration
calculation is done with the right length.

Thanks to Christoph Hellwig for finding the ieee80211_get_morefrag issue.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/rtl8187_dev.c |   31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -78,7 +78,8 @@ static int rtl8187_tx(struct ieee80211_h
 	struct rtl8187_tx_hdr *hdr;
 	struct rtl8187_tx_info *info;
 	struct urb *urb;
-	u32 tmp;
+	__le16 rts_dur = 0;
+	u32 flags;
 
 	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (!urb) {
@@ -86,24 +87,24 @@ static int rtl8187_tx(struct ieee80211_h
 		return 0;
 	}
 
-	hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
-	tmp = skb->len - sizeof(*hdr);
-	tmp |= RTL8187_TX_FLAG_NO_ENCRYPT;
-	tmp |= control->rts_cts_rate << 19;
-	tmp |= control->tx_rate << 24;
-	if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb))
-		tmp |= RTL8187_TX_FLAG_MORE_FRAG;
+	flags = skb->len;
+	flags |= RTL8187_TX_FLAG_NO_ENCRYPT;
+	flags |= control->rts_cts_rate << 19;
+	flags |= control->tx_rate << 24;
+	if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data))
+		flags |= RTL8187_TX_FLAG_MORE_FRAG;
 	if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
-		tmp |= RTL8187_TX_FLAG_RTS;
-		hdr->rts_duration =
-			ieee80211_rts_duration(dev, skb->len, control);
+		flags |= RTL8187_TX_FLAG_RTS;
+		rts_dur = ieee80211_rts_duration(dev, skb->len, control);
 	}
 	if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
-		tmp |= RTL8187_TX_FLAG_CTS;
-	hdr->flags = cpu_to_le32(tmp);
+		flags |= RTL8187_TX_FLAG_CTS;
+
+	hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
+	hdr->flags = cpu_to_le32(flags);
 	hdr->len = 0;
-	tmp = control->retry_limit << 8;
-	hdr->retry = cpu_to_le32(tmp);
+	hdr->rts_duration = rts_dur;
+	hdr->retry = cpu_to_le32(control->retry_limit << 8);
 
 	info = (struct rtl8187_tx_info *)skb->cb;
 	info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 16/16] zd1211rw, fix oops when ejecting install media
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
@ 2007-11-15  6:41     ` Greg KH
  2007-11-15  6:39   ` [patch 02/16] libertas: fix " Greg KH
                       ` (15 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	linux-wireless, John W. Linville, Marc Pignat, Daniel Drake



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Marc Pignat <marc.pignat@hevs.ch>

patch e0579d576cb894a4cf3c5af04fbf38e8c1281738 in mainline.

The disconnect function can dereference the net_device structure when it
is never allocated. This is the case when ejecting the device installer.

Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Acked-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/zd1211rw/zd_usb.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1041,14 +1041,17 @@ error:
 static void disconnect(struct usb_interface *intf)
 {
 	struct net_device *netdev = zd_intf_to_netdev(intf);
-	struct zd_mac *mac = zd_netdev_mac(netdev);
-	struct zd_usb *usb = &mac->chip.usb;
+	struct zd_mac *mac;
+	struct zd_usb *usb;
 
 	/* Either something really bad happened, or we're just dealing with
 	 * a DEVICE_INSTALLER. */
 	if (netdev == NULL)
 		return;
 
+	mac = zd_netdev_mac(netdev);
+	usb = &mac->chip.usb;
+
 	dev_dbg_f(zd_usb_dev(usb), "\n");
 
 	zd_netdev_disconnect(netdev);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 16/16] zd1211rw, fix oops when ejecting install media
@ 2007-11-15  6:41     ` Greg KH
  0 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15  6:41 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	linux-wireless, John W. Linville, Marc Pignat, Daniel Drake

[-- Attachment #1: zd1211rw-fix-oops-when-ejecting-install-media.patch --]
[-- Type: text/plain, Size: 1279 bytes --]



-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Marc Pignat <marc.pignat@hevs.ch>

patch e0579d576cb894a4cf3c5af04fbf38e8c1281738 in mainline.

The disconnect function can dereference the net_device structure when it
is never allocated. This is the case when ejecting the device installer.

Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Acked-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/zd1211rw/zd_usb.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1041,14 +1041,17 @@ error:
 static void disconnect(struct usb_interface *intf)
 {
 	struct net_device *netdev = zd_intf_to_netdev(intf);
-	struct zd_mac *mac = zd_netdev_mac(netdev);
-	struct zd_usb *usb = &mac->chip.usb;
+	struct zd_mac *mac;
+	struct zd_usb *usb;
 
 	/* Either something really bad happened, or we're just dealing with
 	 * a DEVICE_INSTALLER. */
 	if (netdev == NULL)
 		return;
 
+	mac = zd_netdev_mac(netdev);
+	usb = &mac->chip.usb;
+
 	dev_dbg_f(zd_usb_dev(usb), "\n");
 
 	zd_netdev_disconnect(netdev);

-- 

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 00/16] 2.6.23-stable review, network driver changes
  2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
                     ` (15 preceding siblings ...)
  2007-11-15  6:41     ` Greg KH
@ 2007-11-15 12:24   ` Heikki Orsila
  2007-11-15 18:34     ` [stable] " Greg KH
  16 siblings, 1 reply; 31+ messages in thread
From: Heikki Orsila @ 2007-11-15 12:24 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	torvalds, akpm, alan, shemminger

On Wed, Nov 14, 2007 at 10:39:21PM -0800, Greg KH wrote:
> This is the start of the stable review cycle for the 2.6.23.X release.
> There are 16 patches in this series, all will be posted as a response to
> this one.  If anyone has any issues with these being applied, please let
> us know.
> ...
>  drivers/net/skge.c                     |  141 +++++++++++++++++----------------
>  drivers/net/skge.h                     |    6 -

I found a regression when I applied drivers/net/skge.[ch] patches on top 
of 2.6.23.1 at stable tree (4367388f04eea72e78347dc9b299698bf4275f92). 
It hangs the network on high speed transfers.

This the same regression that happened for 2.6.24-rc*:

	http://bugzilla.kernel.org/show_bug.cgi?id=9321

The driver in 2.6.23.1 works for me. Afaik, Stephen Hemminger is working 
on it.

-- 
Heikki Orsila			Barbie's law:
heikki.orsila@iki.fi		"Math is hard, let's go shopping!"
http://www.iki.fi/shd

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15  6:40   ` [patch 08/16] skge: fix ram buffer size calculation Greg KH
@ 2007-11-15 16:11     ` Linus Torvalds
  2007-11-15 16:27       ` Stephen Hemminger
  2007-11-15 16:32       ` Greg KH
  0 siblings, 2 replies; 31+ messages in thread
From: Linus Torvalds @ 2007-11-15 16:11 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	akpm, alan, Stephen Hemminger, Jeff Garzik



On Wed, 14 Nov 2007, Greg KH wrote:
> 
> -stable review patch.  If anyone has any objections, please let us know.
> 
> ------------------
> From: Stephen Hemminger <shemminger@linux-foundation.org>
> 
> patch 7fb7ac241162dc51ec0f7644d4a97b2855213c32 in mainline.
> 
> This fixes problems with transmit hangs on older fiber based SysKonnect boards.
> 
> Adjust ram buffer sizing calculation to make it correct on all boards
> and make it like the code in sky2 driver.

This one is getting reverted in mainline in about five minutes (unless I 
find an email from Stephen to address the reported regression - I haven't 
gone through all my emails yet), so I don't think it should make it into 
stable.

			Linus

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15 16:11     ` Linus Torvalds
@ 2007-11-15 16:27       ` Stephen Hemminger
  2007-11-15 16:50         ` Linus Torvalds
  2007-11-15 21:57         ` Heikki Orsila
  2007-11-15 16:32       ` Greg KH
  1 sibling, 2 replies; 31+ messages in thread
From: Stephen Hemminger @ 2007-11-15 16:27 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Greg KH, linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	akpm, alan, Jeff Garzik

Linus Torvalds wrote:
> On Wed, 14 Nov 2007, Greg KH wrote:
>   
>> -stable review patch.  If anyone has any objections, please let us know.
>>
>> ------------------
>> From: Stephen Hemminger <shemminger@linux-foundation.org>
>>
>> patch 7fb7ac241162dc51ec0f7644d4a97b2855213c32 in mainline.
>>
>> This fixes problems with transmit hangs on older fiber based SysKonnect boards.
>>
>> Adjust ram buffer sizing calculation to make it correct on all boards
>> and make it like the code in sky2 driver.
>>     
>
> This one is getting reverted in mainline in about five minutes (unless I 
> find an email from Stephen to address the reported regression - I haven't 
> gone through all my emails yet), so I don't think it should make it into 
> stable.
>
> 			Linus
>   
I can't reproduce the users problem with the hardware I have. And 
without the patch the dual
port board doesn't work. So it is a question of regression, versus 
fixing pre-existing bugs.
I am okay with reverting the patch, as a temporary state, but concerned 
with how
to make progress in fixing this.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15 16:11     ` Linus Torvalds
  2007-11-15 16:27       ` Stephen Hemminger
@ 2007-11-15 16:32       ` Greg KH
  2007-11-15 16:48         ` Linus Torvalds
  1 sibling, 1 reply; 31+ messages in thread
From: Greg KH @ 2007-11-15 16:32 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	akpm, alan, Stephen Hemminger, Jeff Garzik

On Thu, Nov 15, 2007 at 08:11:30AM -0800, Linus Torvalds wrote:
> 
> 
> On Wed, 14 Nov 2007, Greg KH wrote:
> > 
> > -stable review patch.  If anyone has any objections, please let us know.
> > 
> > ------------------
> > From: Stephen Hemminger <shemminger@linux-foundation.org>
> > 
> > patch 7fb7ac241162dc51ec0f7644d4a97b2855213c32 in mainline.
> > 
> > This fixes problems with transmit hangs on older fiber based SysKonnect boards.
> > 
> > Adjust ram buffer sizing calculation to make it correct on all boards
> > and make it like the code in sky2 driver.
> 
> This one is getting reverted in mainline in about five minutes (unless I 
> find an email from Stephen to address the reported regression - I haven't 
> gone through all my emails yet), so I don't think it should make it into 
> stable.

Thanks for letting me know which patch is causing the problem, I just
got another report of the skge driver not working with all of these
patches applied.

It looks like I'll just drop this one from the patch list, unless
Stephen has a better idea.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15 16:32       ` Greg KH
@ 2007-11-15 16:48         ` Linus Torvalds
  2007-11-15 17:57           ` Greg KH
  2007-11-16 21:03           ` Heikki Orsila
  0 siblings, 2 replies; 31+ messages in thread
From: Linus Torvalds @ 2007-11-15 16:48 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	akpm, alan, Stephen Hemminger, Jeff Garzik



On Thu, 15 Nov 2007, Greg KH wrote:

> On Thu, Nov 15, 2007 at 08:11:30AM -0800, Linus Torvalds wrote:
> > > 
> > > patch 7fb7ac241162dc51ec0f7644d4a97b2855213c32 in mainline.
> > 
> > This one is getting reverted in mainline in about five minutes (unless I 
> > find an email from Stephen to address the reported regression - I haven't 
> > gone through all my emails yet), so I don't think it should make it into 
> > stable.
> 
> Thanks for letting me know which patch is causing the problem, I just
> got another report of the skge driver not working with all of these
> patches applied.

I suspect that's the same report.

> It looks like I'll just drop this one from the patch list, unless
> Stephen has a better idea.

This is my commit message for the revert - note the suggested possible 
fix (but also why I didn't apply it, and why things got reverted).

		Linus
---
commit 279e1dab949d33737557babfe9f74e0b74fbe39a
Author: Linus Torvalds <torvalds@woody.linux-foundation.org>
Date:   Thu Nov 15 08:44:36 2007 -0800

    Revert "skge: fix ram buffer size calculation"
    
    This reverts commit 7fb7ac241162dc51ec0f7644d4a97b2855213c32.
    
    Heikki Orsila reports that it causes a regression:
    
      "Doing
    
    	nc host port < /dev/zero
    
       on a sending machine (not skge) to an skge machine that is receiving:
    
    	nc -l -p port >/dev/null
    
       with ~60 MiB/s speed, causes the interface go malfunct. A slow
       transfer doesn't cause a problem."
    
    See
    
    	http://bugzilla.kernel.org/show_bug.cgi?id=9321
    
    for some more information.
    
    There is a workaround (also reported by Heikki):
    
      "After some fiddling, I noticed that not changing the register write
       order on patch:
    
       +       skge_write32(hw, RB_ADDR(q, RB_END), end);
               skge_write32(hw, RB_ADDR(q, RB_WP), start);
               skge_write32(hw, RB_ADDR(q, RB_RP), start);
       -       skge_write32(hw, RB_ADDR(q, RB_END), end);
    
       fixes the visible effect..  Possibly not the root cause of the
       problem, but changing the order back fixes networking here."
    
    but that has yet to be ack'ed or tested more widely, so the whole
    problem-causing commit gets reverted until this is resolved properly.
    
    Bisected-and-requested-by: Heikki Orsila <shdl@zakalwe.fi>
    Cc: Stephen Hemminger <shemminger@linux-foundation.org>
    Cc: Jeff Garzik <jeff@garzik.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

 drivers/net/skge.c |   51 +++++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 24 deletions(-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15 16:27       ` Stephen Hemminger
@ 2007-11-15 16:50         ` Linus Torvalds
  2007-11-15 21:57         ` Heikki Orsila
  1 sibling, 0 replies; 31+ messages in thread
From: Linus Torvalds @ 2007-11-15 16:50 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Greg KH, linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	akpm, alan, Jeff Garzik



On Thu, 15 Nov 2007, Stephen Hemminger wrote:
>
> I can't reproduce the users problem with the hardware I have. And 
> without the patch the dual port board doesn't work. So it is a question 
> of regression, versus fixing pre-existing bugs.

Yeah. Five years ago I might have said that it's important to fix 
pre-existing bugs, but all the ACPI and suspend etc problems have long 
since convinced me that regressions are *much* more important than stuff 
that never worked.

> I am okay with reverting the patch, as a temporary state, but concerned 
> with how to make progress in fixing this.

Well, the original bug-report did contain a suggested workaround too.

		Linus

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15 16:48         ` Linus Torvalds
@ 2007-11-15 17:57           ` Greg KH
  2007-11-16 21:03           ` Heikki Orsila
  1 sibling, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15 17:57 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	akpm, alan, Stephen Hemminger, Jeff Garzik

On Thu, Nov 15, 2007 at 08:48:58AM -0800, Linus Torvalds wrote:
> 
> 
> On Thu, 15 Nov 2007, Greg KH wrote:
> 
> > On Thu, Nov 15, 2007 at 08:11:30AM -0800, Linus Torvalds wrote:
> > > > 
> > > > patch 7fb7ac241162dc51ec0f7644d4a97b2855213c32 in mainline.
> > > 
> > > This one is getting reverted in mainline in about five minutes (unless I 
> > > find an email from Stephen to address the reported regression - I haven't 
> > > gone through all my emails yet), so I don't think it should make it into 
> > > stable.
> > 
> > Thanks for letting me know which patch is causing the problem, I just
> > got another report of the skge driver not working with all of these
> > patches applied.
> 
> I suspect that's the same report.
> 
> > It looks like I'll just drop this one from the patch list, unless
> > Stephen has a better idea.
> 
> This is my commit message for the revert - note the suggested possible 
> fix (but also why I didn't apply it, and why things got reverted).

Ok, I've now dropped this patch from the stable queue.  Stephen, if you
get something that works, and is in Linus's tree, feel free to resend it
to stable@kernel.org.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [stable] [patch 00/16] 2.6.23-stable review, network driver changes
  2007-11-15 12:24   ` [patch 00/16] 2.6.23-stable review, network driver changes Heikki Orsila
@ 2007-11-15 18:34     ` Greg KH
  0 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2007-11-15 18:34 UTC (permalink / raw)
  To: Heikki Orsila
  Cc: Greg KH, Theodore Ts'o, Zwane Mwaikambo, torvalds,
	shemminger, Justin Forbes, linux-kernel, Chris Wedgwood,
	Domenico Andreoli, Randy Dunlap, Michael Krufky, Chuck Ebbert,
	Dave Jones, akpm, Chuck Wolber, stable, alan

On Thu, Nov 15, 2007 at 02:24:48PM +0200, Heikki Orsila wrote:
> On Wed, Nov 14, 2007 at 10:39:21PM -0800, Greg KH wrote:
> > This is the start of the stable review cycle for the 2.6.23.X release.
> > There are 16 patches in this series, all will be posted as a response to
> > this one.  If anyone has any issues with these being applied, please let
> > us know.
> > ...
> >  drivers/net/skge.c                     |  141 +++++++++++++++++----------------
> >  drivers/net/skge.h                     |    6 -
> 
> I found a regression when I applied drivers/net/skge.[ch] patches on top 
> of 2.6.23.1 at stable tree (4367388f04eea72e78347dc9b299698bf4275f92). 
> It hangs the network on high speed transfers.
> 
> This the same regression that happened for 2.6.24-rc*:
> 
> 	http://bugzilla.kernel.org/show_bug.cgi?id=9321
> 
> The driver in 2.6.23.1 works for me. Afaik, Stephen Hemminger is working 
> on it.

Thanks, I've removed the offending patch, as has Linus from his tree.

greg k-h

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15 16:27       ` Stephen Hemminger
  2007-11-15 16:50         ` Linus Torvalds
@ 2007-11-15 21:57         ` Heikki Orsila
  1 sibling, 0 replies; 31+ messages in thread
From: Heikki Orsila @ 2007-11-15 21:57 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Linus Torvalds, Greg KH, linux-kernel, stable, Justin Forbes,
	Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap, Dave Jones,
	Chuck Wolber, Chris Wedgwood, Michael Krufky, Chuck Ebbert,
	Domenico Andreoli, akpm, alan, Jeff Garzik

On Thu, Nov 15, 2007 at 08:27:25AM -0800, Stephen Hemminger wrote:
> I can't reproduce the users problem with the hardware I have. And 
> without the patch the dual
> port board doesn't work. So it is a question of regression, versus 
> fixing pre-existing bugs.
> I am okay with reverting the patch, as a temporary state, but concerned 
> with how
> to make progress in fixing this.

I can reproduce the bug in a second. I will test any version you send 
me. I take it you have tested the driver on gigabit ethernet by sending 
zero from one netcat to another (the sending machine being something, 
and the receiving machine being skge)?

The only thing that needed to be done for the last 6 patches in the
mainline was reversing the order of two register writes, meaning that 
the dual port stuff need not be thrown away. This was explained in my 
bug report (that was hard to read). I'm not suggesting this is a proper 
fix. In fact, I think it's not, because we can not explain the problem.

It would _very_ nice to get to the bottom of this issue, so I would 
favor reverting the patch and trying and debugging carefully before 
creating quick and dirty fixes..

Thank you all..

-- 
Heikki Orsila			Barbie's law:
heikki.orsila@iki.fi		"Math is hard, let's go shopping!"
http://www.iki.fi/shd

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [patch 08/16] skge: fix ram buffer size calculation
  2007-11-15 16:48         ` Linus Torvalds
  2007-11-15 17:57           ` Greg KH
@ 2007-11-16 21:03           ` Heikki Orsila
  1 sibling, 0 replies; 31+ messages in thread
From: Heikki Orsila @ 2007-11-16 21:03 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Greg KH, linux-kernel, stable, Justin Forbes, Zwane Mwaikambo,
	Theodore Ts'o, Randy Dunlap, Dave Jones, Chuck Wolber,
	Chris Wedgwood, Michael Krufky, Chuck Ebbert, Domenico Andreoli,
	akpm, alan, Stephen Hemminger, Jeff Garzik

On Thu, Nov 15, 2007 at 08:48:58AM -0800, Linus Torvalds wrote:
> This is my commit message for the revert - note the suggested possible 
> fix (but also why I didn't apply it, and why things got reverted).
> 
> 		Linus
> ---
> commit 279e1dab949d33737557babfe9f74e0b74fbe39a
> Author: Linus Torvalds <torvalds@woody.linux-foundation.org>
> Date:   Thu Nov 15 08:44:36 2007 -0800
> 
>     Revert "skge: fix ram buffer size calculation"
>     
>     This reverts commit 7fb7ac241162dc51ec0f7644d4a97b2855213c32.
>     
>     Heikki Orsila reports that it causes a regression:
>     
>       "Doing
>     
>     	nc host port < /dev/zero
>     
>        on a sending machine (not skge) to an skge machine that is receiving:
>     
>     	nc -l -p port >/dev/null
>     
>        with ~60 MiB/s speed, causes the interface go malfunct. A slow
>        transfer doesn't cause a problem."
>     
>     See
>     
>     	http://bugzilla.kernel.org/show_bug.cgi?id=9321
>     
>     for some more information.
>     
>     There is a workaround (also reported by Heikki):
>     
>       "After some fiddling, I noticed that not changing the register write
>        order on patch:
>     
>        +       skge_write32(hw, RB_ADDR(q, RB_END), end);
>                skge_write32(hw, RB_ADDR(q, RB_WP), start);
>                skge_write32(hw, RB_ADDR(q, RB_RP), start);
>        -       skge_write32(hw, RB_ADDR(q, RB_END), end);
>     
>        fixes the visible effect..  Possibly not the root cause of the
>        problem, but changing the order back fixes networking here."
>     
>     but that has yet to be ack'ed or tested more widely, so the whole
>     problem-causing commit gets reverted until this is resolved properly.
>     
>     Bisected-and-requested-by: Heikki Orsila <shdl@zakalwe.fi>
>     Cc: Stephen Hemminger <shemminger@linux-foundation.org>
>     Cc: Jeff Garzik <jeff@garzik.org>
>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> 
>  drivers/net/skge.c |   51 +++++++++++++++++++++++++++------------------------
>  1 files changed, 27 insertions(+), 24 deletions(-)

Thanks. I pulled

commit 8c0863403f109a43d7000b4646da4818220d501f

and now the skge driver works here.

-- 
Heikki Orsila			Barbie's law:
heikki.orsila@iki.fi		"Math is hard, let's go shopping!"
http://www.iki.fi/shd

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2007-11-16 21:03 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20071115060353.071060513@mini.kroah.org>
2007-11-15  6:39 ` [patch 00/16] 2.6.23-stable review, network driver changes Greg KH
2007-11-15  6:39   ` [patch 01/16] libertas: more endianness breakage Greg KH
2007-11-15  6:39   ` [patch 02/16] libertas: fix " Greg KH
2007-11-15  6:40   ` [patch 03/16] ehea: 64K page kernel support fix Greg KH
2007-11-15  6:40   ` [patch 04/16] forcedeth msi bugfix Greg KH
2007-11-15  6:40   ` [patch 05/16] forcedeth: add MCP77 device IDs Greg KH
2007-11-15  6:40   ` [patch 06/16] TG3: Fix performance regression on 5705 Greg KH
2007-11-15  6:40   ` [patch 07/16] Fix L2TP oopses Greg KH
2007-11-15  6:40   ` [patch 08/16] skge: fix ram buffer size calculation Greg KH
2007-11-15 16:11     ` Linus Torvalds
2007-11-15 16:27       ` Stephen Hemminger
2007-11-15 16:50         ` Linus Torvalds
2007-11-15 21:57         ` Heikki Orsila
2007-11-15 16:32       ` Greg KH
2007-11-15 16:48         ` Linus Torvalds
2007-11-15 17:57           ` Greg KH
2007-11-16 21:03           ` Heikki Orsila
2007-11-15  6:40   ` [patch 09/16] skge: XM PHY handling fixes Greg KH
2007-11-15  6:40   ` [patch 10/16] sky2: status ring race fix Greg KH
2007-11-15  6:40   ` [patch 11/16] sky2: ethtool register reserved area blackout Greg KH
2007-11-15  6:41   ` [patch 12/16] sky2: fix power settings on Yukon XL Greg KH
2007-11-15  6:41   ` [patch 13/16] zd1201: avoid null ptr access of skb->dev Greg KH
2007-11-15  6:41     ` Greg KH
2007-11-15  6:41   ` [patch 14/16] ipw2100: send WEXT scan events Greg KH
2007-11-15  6:41     ` Greg KH
2007-11-15  6:41   ` [patch 15/16] rtl8187: Fix more frag bit checking, rts duration calc Greg KH
2007-11-15  6:41     ` Greg KH
2007-11-15  6:41   ` [patch 16/16] zd1211rw, fix oops when ejecting install media Greg KH
2007-11-15  6:41     ` Greg KH
2007-11-15 12:24   ` [patch 00/16] 2.6.23-stable review, network driver changes Heikki Orsila
2007-11-15 18:34     ` [stable] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.