All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sky2: patches for 2.6.16 -stable
@ 2007-02-22  0:04 Stephen Hemminger
  2007-02-22  0:04 ` [PATCH 1/2] sky2: fix for NAPI with dual port boards Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephen Hemminger @ 2007-02-22  0:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: netdev

I compared the current sky2 driver against the version in 2.6.16.40.
These were the only two patches that should be added.
They both relate to dual port boards, and not to many people have
them.

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


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

* [PATCH 1/2] sky2: fix for NAPI with dual port boards
  2007-02-22  0:04 [PATCH 0/2] sky2: patches for 2.6.16 -stable Stephen Hemminger
@ 2007-02-22  0:04 ` Stephen Hemminger
  2007-02-22  0:04 ` [PATCH 2/2] sky2: dual-port pci-x checksum fix Stephen Hemminger
  2007-02-22 20:08 ` [PATCH 0/2] sky2: patches for 2.6.16 -stable Adrian Bunk
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2007-02-22  0:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: netdev

[-- Attachment #1: sky2-napi-dual.patch --]
[-- Type: text/plain, Size: 941 bytes --]

This driver uses port 0 to handle receives on both ports. So
the netif_poll_disable call in dev_close would end up stopping the
second port on dual port cards.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

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

--- linux-2.6.16.40.orig/drivers/net/sky2.c	2007-02-21 15:57:56.000000000 -0800
+++ linux-2.6.16.40/drivers/net/sky2.c	2007-02-21 15:58:02.000000000 -0800
@@ -1402,6 +1402,13 @@
 	/* Stop more packets from being queued */
 	netif_stop_queue(dev);
 
+ 	/*
+ 	 * Both ports share the NAPI poll on port 0, so if necessary undo the
+ 	 * the disable that is done in dev_close.
+ 	 */
+ 	if (sky2->port == 0 && hw->ports > 1)
+ 		netif_poll_enable(dev);
+
 	/* Disable port IRQ */
 	spin_lock_irq(&hw->hw_lock);
 	hw->intr_mask &= ~((sky2->port == 0) ? Y2_IS_IRQ_PHY1 : Y2_IS_IRQ_PHY2);

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


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

* [PATCH 2/2] sky2: dual-port pci-x checksum fix
  2007-02-22  0:04 [PATCH 0/2] sky2: patches for 2.6.16 -stable Stephen Hemminger
  2007-02-22  0:04 ` [PATCH 1/2] sky2: fix for NAPI with dual port boards Stephen Hemminger
@ 2007-02-22  0:04 ` Stephen Hemminger
  2007-02-22 20:08 ` [PATCH 0/2] sky2: patches for 2.6.16 -stable Adrian Bunk
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2007-02-22  0:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: netdev

[-- Attachment #1: sky2-pcix-dual.patch --]
[-- Type: text/plain, Size: 1202 bytes --]

Add a workaround for dual port PCI-X card that returns status out of
order sometimes because of split transactions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>


--- linux-2.6.16.40.orig/drivers/net/sky2.c	2007-02-14 16:45:23.000000000 -0800
+++ linux-2.6.16.40/drivers/net/sky2.c	2007-02-14 16:47:06.000000000 -0800
@@ -1031,7 +1031,25 @@
 	struct sky2_hw *hw = sky2->hw;
 	unsigned port = sky2->port;
 	u32 ramsize, rxspace;
-	int err = -ENOMEM;
+	int cap, err = -ENOMEM;
+	struct net_device *otherdev = hw->dev[sky2->port^1];
+
+	/*
+ 	 * On dual port PCI-X card, there is an problem where status
+	 * can be received out of order due to split transactions
+	 */
+	if (otherdev && netif_running(otherdev) &&
+ 	    (cap = pci_find_capability(hw->pdev, PCI_CAP_ID_PCIX))) {
+ 		struct sky2_port *osky2 = netdev_priv(otherdev);
+ 		u16 cmd;
+
+ 		cmd = sky2_pci_read16(hw, cap + PCI_X_CMD);
+ 		cmd &= ~PCI_X_CMD_MAX_SPLIT;
+ 		sky2_pci_write16(hw, cap + PCI_X_CMD, cmd);
+
+ 		sky2->rx_csum = 0;
+ 		osky2->rx_csum = 0;
+ 	}
 
 	if (netif_msg_ifup(sky2))
 		printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);

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


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

* Re: [PATCH 0/2] sky2: patches for 2.6.16 -stable
  2007-02-22  0:04 [PATCH 0/2] sky2: patches for 2.6.16 -stable Stephen Hemminger
  2007-02-22  0:04 ` [PATCH 1/2] sky2: fix for NAPI with dual port boards Stephen Hemminger
  2007-02-22  0:04 ` [PATCH 2/2] sky2: dual-port pci-x checksum fix Stephen Hemminger
@ 2007-02-22 20:08 ` Adrian Bunk
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2007-02-22 20:08 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On Wed, Feb 21, 2007 at 04:04:41PM -0800, Stephen Hemminger wrote:

> I compared the current sky2 driver against the version in 2.6.16.40.
> These were the only two patches that should be added.
> They both relate to dual port boards, and not to many people have
> them.

Thanks, I've applied both.

> Stephen Hemminger

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2007-02-22 20:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22  0:04 [PATCH 0/2] sky2: patches for 2.6.16 -stable Stephen Hemminger
2007-02-22  0:04 ` [PATCH 1/2] sky2: fix for NAPI with dual port boards Stephen Hemminger
2007-02-22  0:04 ` [PATCH 2/2] sky2: dual-port pci-x checksum fix Stephen Hemminger
2007-02-22 20:08 ` [PATCH 0/2] sky2: patches for 2.6.16 -stable Adrian Bunk

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.