* [PATCH 0/5] sky2 bugfixes for 2.6.17
@ 2006-05-17 21:37 Stephen Hemminger
2006-05-17 21:37 ` [PATCH 1/5] sky2: allow dual port usage Stephen Hemminger
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Stephen Hemminger @ 2006-05-17 21:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Set of bug fixes to address issues on dual port cards, and
the new Yukon Ultra used on many vendors new dual core laptops.
Since Linus seems to have ignored the last sky2 patch, this
set is based on 2.6.17-rc4 latest.
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] sky2: allow dual port usage
2006-05-17 21:37 [PATCH 0/5] sky2 bugfixes for 2.6.17 Stephen Hemminger
@ 2006-05-17 21:37 ` Stephen Hemminger
2006-05-18 18:16 ` [PATCH 1a/5] " Stephen Hemminger
2006-05-17 21:37 ` [PATCH 2/5] Subjec: sky2, skge: correct PCI id for DGE-560T Stephen Hemminger
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2006-05-17 21:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
[-- Attachment #1: sky2-dual-port.patch --]
[-- Type: text/plain, Size: 1809 bytes --]
If both ports are receiving on the SysKonnect dual port cards,
then it appears the bus interface unit can give an interrupt status
for frame before DMA has completed. This leads to bogus frames
and general confusion. This is why receive checksumming is also
messed up on dual port cards.
A workaround for the out of order receive problem is to eliminating
split transactions on PCI-X.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- sky2.orig/drivers/net/sky2.c 2006-05-17 14:33:28.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-05-17 14:34:57.000000000 -0700
@@ -1020,7 +1020,25 @@
struct sky2_hw *hw = sky2->hw;
unsigned port = sky2->port;
u32 ramsize, rxspace, imask;
- 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);
@@ -3067,12 +3085,7 @@
sky2->duplex = -1;
sky2->speed = -1;
sky2->advertising = sky2_supported_modes(hw);
-
- /* Receive checksum disabled for Yukon XL
- * because of observed problems with incorrect
- * values when multiple packets are received in one interrupt
- */
- sky2->rx_csum = (hw->chip_id != CHIP_ID_YUKON_XL);
+ sky2->rx_csum = 1;
spin_lock_init(&sky2->phy_lock);
sky2->tx_pending = TX_DEF_PENDING;
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/5] Subjec: sky2, skge: correct PCI id for DGE-560T
2006-05-17 21:37 [PATCH 0/5] sky2 bugfixes for 2.6.17 Stephen Hemminger
2006-05-17 21:37 ` [PATCH 1/5] sky2: allow dual port usage Stephen Hemminger
@ 2006-05-17 21:37 ` Stephen Hemminger
2006-05-17 21:37 ` [PATCH 3/5] sky2: more fixes for Yukon Ultra Stephen Hemminger
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2006-05-17 21:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
[-- Attachment #1: dlink-560t.patch --]
[-- Type: text/plain, Size: 1454 bytes --]
The Dlink DGE-560T uses Yukon2 chipset so it needs sky2 driver; and
the DGE-530T uses Yukon1 so it uses skge driver.
Bug: http://bugzilla.kernel.org/show_bug.cgi?id=6544
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- sky2.orig/drivers/net/skge.c 2006-04-27 11:12:39.000000000 -0700
+++ sky2/drivers/net/skge.c 2006-05-16 10:35:27.000000000 -0700
@@ -78,8 +78,7 @@
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_GE) },
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_YU) },
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DLINK_DGE510T), },
- { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) },
- { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) },
+ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b01) }, /* DGE-530T */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4320) },
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5005) }, /* Belkin */
{ PCI_DEVICE(PCI_VENDOR_ID_CNET, PCI_DEVICE_ID_CNET_GIGACARD) },
--- sky2.orig/drivers/net/sky2.c 2006-05-16 10:34:22.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-05-16 10:35:49.000000000 -0700
@@ -105,6 +105,7 @@
static const struct pci_device_id sky2_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) },
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) },
+ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) }, /* DGE-560T */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4340) },
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4341) },
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4342) },
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/5] sky2: more fixes for Yukon Ultra
2006-05-17 21:37 [PATCH 0/5] sky2 bugfixes for 2.6.17 Stephen Hemminger
2006-05-17 21:37 ` [PATCH 1/5] sky2: allow dual port usage Stephen Hemminger
2006-05-17 21:37 ` [PATCH 2/5] Subjec: sky2, skge: correct PCI id for DGE-560T Stephen Hemminger
@ 2006-05-17 21:37 ` Stephen Hemminger
2006-05-17 21:37 ` [PATCH 4/5] sky2: force NAPI repoll if busy Stephen Hemminger
2006-05-17 21:37 ` [PATCH 5/5] sky2 version 1.4 Stephen Hemminger
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2006-05-17 21:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
[-- Attachment #1: sky2-ec-u.patch --]
[-- Type: text/plain, Size: 1512 bytes --]
Logic error in the phy initialization code. Also, turn on wake on lan
bit in status control.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- sky2.orig/drivers/net/sky2.c 2006-05-17 08:55:51.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-05-17 08:55:54.000000000 -0700
@@ -236,6 +236,7 @@
}
if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
+ sky2_write16(hw, B0_CTST, Y2_HW_WOL_ON);
sky2_pci_write32(hw, PCI_DEV_REG3, 0);
reg1 = sky2_pci_read32(hw, PCI_DEV_REG4);
reg1 &= P_ASPM_CONTROL_MSK;
@@ -307,7 +308,7 @@
u16 ctrl, ct1000, adv, pg, ledctrl, ledover;
if (sky2->autoneg == AUTONEG_ENABLE &&
- (hw->chip_id != CHIP_ID_YUKON_XL || hw->chip_id == CHIP_ID_YUKON_EC_U)) {
+ !(hw->chip_id == CHIP_ID_YUKON_XL || hw->chip_id == CHIP_ID_YUKON_EC_U)) {
u16 ectrl = gm_phy_read(hw, port, PHY_MARV_EXT_CTRL);
ectrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK |
--- sky2.orig/drivers/net/sky2.h 2006-05-17 08:55:51.000000000 -0700
+++ sky2/drivers/net/sky2.h 2006-05-17 08:55:54.000000000 -0700
@@ -214,6 +214,8 @@
enum {
Y2_VMAIN_AVAIL = 1<<17,/* VMAIN available (YUKON-2 only) */
Y2_VAUX_AVAIL = 1<<16,/* VAUX available (YUKON-2 only) */
+ Y2_HW_WOL_ON = 1<<15,/* HW WOL On (Yukon-EC Ultra A1 only) */
+ Y2_HW_WOL_OFF = 1<<14,/* HW WOL On (Yukon-EC Ultra A1 only) */
Y2_ASF_ENABLE = 1<<13,/* ASF Unit Enable (YUKON-2 only) */
Y2_ASF_DISABLE = 1<<12,/* ASF Unit Disable (YUKON-2 only) */
Y2_CLK_RUN_ENA = 1<<11,/* CLK_RUN Enable (YUKON-2 only) */
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/5] sky2: force NAPI repoll if busy
2006-05-17 21:37 [PATCH 0/5] sky2 bugfixes for 2.6.17 Stephen Hemminger
` (2 preceding siblings ...)
2006-05-17 21:37 ` [PATCH 3/5] sky2: more fixes for Yukon Ultra Stephen Hemminger
@ 2006-05-17 21:37 ` Stephen Hemminger
2006-05-17 21:37 ` [PATCH 5/5] sky2 version 1.4 Stephen Hemminger
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2006-05-17 21:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
[-- Attachment #1: sky2-morework.patch --]
[-- Type: text/plain, Size: 1258 bytes --]
If the status ring processing can't keep up with the incoming frames,
it is more efficient to have NAPI keep scheduling the poll routine
rather than causing another interrupt.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- sky2.orig/drivers/net/sky2.c 2006-05-17 08:55:54.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-05-17 08:56:03.000000000 -0700
@@ -1920,6 +1920,12 @@
}
}
+/* Is status ring empty or is there more to do? */
+static inline int sky2_more_work(const struct sky2_hw *hw)
+{
+ return (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX));
+}
+
/* Process status response ring */
static int sky2_status_intr(struct sky2_hw *hw, int to_do)
{
@@ -2192,19 +2198,19 @@
if (status & Y2_IS_CHK_TXA2)
sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2);
- if (status & Y2_IS_STAT_BMU)
- sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
-
work_done = sky2_status_intr(hw, work_limit);
*budget -= work_done;
dev0->quota -= work_done;
- if (work_done >= work_limit)
+ if (status & Y2_IS_STAT_BMU)
+ sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
+
+ if (sky2_more_work(hw))
return 1;
netif_rx_complete(dev0);
- status = sky2_read32(hw, B0_Y2_SP_LISR);
+ sky2_read32(hw, B0_Y2_SP_LISR);
return 0;
}
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/5] sky2 version 1.4
2006-05-17 21:37 [PATCH 0/5] sky2 bugfixes for 2.6.17 Stephen Hemminger
` (3 preceding siblings ...)
2006-05-17 21:37 ` [PATCH 4/5] sky2: force NAPI repoll if busy Stephen Hemminger
@ 2006-05-17 21:37 ` Stephen Hemminger
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2006-05-17 21:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
[-- Attachment #1: sky2-1.4.patch --]
[-- Type: text/plain, Size: 397 bytes --]
Need to track impact of this group of changes.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- sky2.orig/drivers/net/sky2.c 2006-05-16 10:10:13.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-05-16 10:10:15.000000000 -0700
@@ -51,7 +51,7 @@
#include "sky2.h"
#define DRV_NAME "sky2"
-#define DRV_VERSION "1.3"
+#define DRV_VERSION "1.4"
#define PFX DRV_NAME " "
/*
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1a/5] sky2: allow dual port usage
2006-05-17 21:37 ` [PATCH 1/5] sky2: allow dual port usage Stephen Hemminger
@ 2006-05-18 18:16 ` Stephen Hemminger
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2006-05-18 18:16 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
If both ports are receiving on the SysKonnect dual port cards,
then it appears the bus interface unit can give an interrupt status
for frame before DMA has completed. This leads to bogus frames
and general confusion. This is why receive checksumming is also
messed up on dual port cards.
A workaround for the out of order receive problem is to eliminating
split transactions on PCI-X.
This version is based of the current linux-2.6.git including earlier
patch to disable dual ports.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- sky2.orig/drivers/net/sky2.c 2006-05-18 11:08:10.000000000 -0700
+++ sky2/drivers/net/sky2.c 2006-05-18 11:11:48.000000000 -0700
@@ -1020,19 +1020,26 @@
struct sky2_hw *hw = sky2->hw;
unsigned port = sky2->port;
u32 ramsize, rxspace, imask;
- int err;
+ int cap, err = -ENOMEM;
struct net_device *otherdev = hw->dev[sky2->port^1];
- /* Block bringing up both ports at the same time on a dual port card.
- * There is an unfixed bug where receiver gets confused and picks up
- * packets out of order. Until this is fixed, prevent data corruption.
+ /*
+ * 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)) {
- printk(KERN_INFO PFX "dual port support is disabled.\n");
- return -EBUSY;
- }
-
- err = -ENOMEM;
+ 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);
@@ -3078,12 +3085,7 @@
sky2->duplex = -1;
sky2->speed = -1;
sky2->advertising = sky2_supported_modes(hw);
-
- /* Receive checksum disabled for Yukon XL
- * because of observed problems with incorrect
- * values when multiple packets are received in one interrupt
- */
- sky2->rx_csum = (hw->chip_id != CHIP_ID_YUKON_XL);
+ sky2->rx_csum = 1;
spin_lock_init(&sky2->phy_lock);
sky2->tx_pending = TX_DEF_PENDING;
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-05-18 18:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-17 21:37 [PATCH 0/5] sky2 bugfixes for 2.6.17 Stephen Hemminger
2006-05-17 21:37 ` [PATCH 1/5] sky2: allow dual port usage Stephen Hemminger
2006-05-18 18:16 ` [PATCH 1a/5] " Stephen Hemminger
2006-05-17 21:37 ` [PATCH 2/5] Subjec: sky2, skge: correct PCI id for DGE-560T Stephen Hemminger
2006-05-17 21:37 ` [PATCH 3/5] sky2: more fixes for Yukon Ultra Stephen Hemminger
2006-05-17 21:37 ` [PATCH 4/5] sky2: force NAPI repoll if busy Stephen Hemminger
2006-05-17 21:37 ` [PATCH 5/5] sky2 version 1.4 Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).