Netdev List
 help / color / mirror / Atom feed
* Re: [RFT/PATCH] 3c509: use proper suspend/resume API
From: Pekka J Enberg @ 2006-02-15 11:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, netdev
In-Reply-To: <20060215022523.1d21b9c9.akpm@osdl.org>

Hi Andrew,

On Wed, 15 Feb 2006, Andrew Morton wrote:
> Problem is, it doesn't resume correctly either with or without the patch:
> it needs rmmod+modprobe to get it going again.  (Which is better than the
> aic7xxx driver, which has a coronary and panics the kernel on post-resume
> reboot).

Hmm. Either I am totally confused or we don't even attempt suspend/resume 
for eisa and mca bus devices. Care to try this patch?

			Pekka

Index: 2.6/drivers/eisa/eisa-bus.c
===================================================================
--- 2.6.orig/drivers/eisa/eisa-bus.c
+++ 2.6/drivers/eisa/eisa-bus.c
@@ -128,9 +128,31 @@ static int eisa_bus_match (struct device
 	return 0;
 }
 
+static int eisa_bus_suspend(struct device * dev, pm_message_t state)
+{
+	int ret = 0;
+
+	if (dev->driver && dev->driver->suspend)
+		ret = dev->driver->suspend(dev, state);
+
+	return ret;
+}
+
+static int eisa_bus_resume(struct device * dev)
+{
+	int ret = 0;
+
+	if (dev->driver && dev->driver->resume)
+		ret = dev->driver->resume(dev);
+
+	return ret;
+}
+
 struct bus_type eisa_bus_type = {
 	.name  = "eisa",
 	.match = eisa_bus_match,
+	.suspend = eisa_bus_suspend,
+	.resume = eisa_bus_resume,
 };
 
 int eisa_driver_register (struct eisa_driver *edrv)
Index: 2.6/drivers/mca/mca-bus.c
===================================================================
--- 2.6.orig/drivers/mca/mca-bus.c
+++ 2.6/drivers/mca/mca-bus.c
@@ -63,9 +63,32 @@ static int mca_bus_match (struct device 
 	return 0;
 }
 
+static int mca_bus_suspend(struct device * dev, pm_message_t state)
+{
+	int ret = 0;
+
+	if (dev->driver && dev->driver->suspend)
+		ret = dev->driver->suspend(dev, state);
+
+	return ret;
+}
+
+static int mca_bus_resume(struct device * dev)
+{
+	int ret = 0;
+
+	if (dev->driver && dev->driver->resume)
+		ret = dev->driver->resume(dev);
+
+	return ret;
+}
+
+
 struct bus_type mca_bus_type = {
 	.name  = "MCA",
 	.match = mca_bus_match,
+	.suspend = mca_bus_suspend,
+	.resume = mca_bus_resume,
 };
 EXPORT_SYMBOL (mca_bus_type);
 

^ permalink raw reply

* Re: [RFT/PATCH] 3c509: use proper suspend/resume API
From: Pekka J Enberg @ 2006-02-15 11:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, netdev
In-Reply-To: <20060215022523.1d21b9c9.akpm@osdl.org>

On Wed, 15 Feb 2006, Andrew Morton wrote:
> I have a 3c509, and I'm not afraid to use it!
> 
> Problem is, it doesn't resume correctly either with or without the patch:
> it needs rmmod+modprobe to get it going again.  (Which is better than the
> aic7xxx driver, which has a coronary and panics the kernel on post-resume
> reboot).

Is there anything in the logs to give us a clue what's going on? I can't 
see anything obvious looking at the code, but then again I don't have 
datasheets for 3c509 either.

			Pekka

^ permalink raw reply

* Re: [RFT/PATCH] 3c509: use proper suspend/resume API
From: Andrew Morton @ 2006-02-15 10:25 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: linux-kernel, netdev
In-Reply-To: <1139935173.22151.2.camel@localhost>

Pekka Enberg <penberg@cs.helsinki.fi> wrote:
>
> I am looking for someone with 3c509 netword card that can do
>  suspend/resume to test this patch.

I have a 3c509, and I'm not afraid to use it!

Problem is, it doesn't resume correctly either with or without the patch:
it needs rmmod+modprobe to get it going again.  (Which is better than the
aic7xxx driver, which has a coronary and panics the kernel on post-resume
reboot).

But at least nothing got worse, and it makes that darn warning go away.

^ permalink raw reply

* Re: [RFC,NETFILTER]: Fix xfrm lookup after SNAT
From: David S. Miller @ 2006-02-15  9:34 UTC (permalink / raw)
  To: herbert; +Cc: netdev, netfilter-devel, kaber
In-Reply-To: <20060214014924.GA954@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 14 Feb 2006 12:49:24 +1100

> On Mon, Feb 13, 2006 at 06:25:01PM +0100, Patrick McHardy wrote:
> > I finally got around to fixing the "ip_finish_output2: No header cache
> > and no neighbour!" problem reported by Andi Kleen. Instead of rerouting
> > the packet in POST_ROUTING, we reuse the original route for the
> > xfrm_lookup. This introduces a small restriction (see changelog entry),
> > but I think it should work.
> > 
> > Herbert, do you see any problems with this patch?
> 
> Looks perfect to me.  I think the restriction makes sense since SNAT
> is done in post-routing so it's counter-intuitive to repeat the lookup
> anyway.
>  
> > Signed-off-by: Patrick McHardy <kaber@trash.net>
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Looks good to me too, applied to net-2.6

Thanks a lot.

^ permalink raw reply

* [RFT/PATCH] 3c509: use proper suspend/resume API
From: Pekka Enberg @ 2006-02-14 16:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

Hi,

I am looking for someone with 3c509 netword card that can do
suspend/resume to test this patch.

			Pekka

Subject: 3c509: use proper suspend/resume API
From: Pekka Enberg <penberg@cs.helsinki.fi>

This patch converts 3c509 driver to use proper suspend/resume API instead of
the deprecated pm_register/pm_unregister.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---

Index: 2.6/drivers/net/3c509.c
===================================================================
--- 2.6.orig/drivers/net/3c509.c
+++ 2.6/drivers/net/3c509.c
@@ -174,9 +174,6 @@ struct el3_private {
 	/* skb send-queue */
 	int head, size;
 	struct sk_buff *queue[SKB_QUEUE_SIZE];
-#ifdef CONFIG_PM_LEGACY
-	struct pm_dev *pmdev;
-#endif
 	enum {
 		EL3_MCA,
 		EL3_PNP,
@@ -201,11 +198,15 @@ static void el3_tx_timeout (struct net_d
 static void el3_down(struct net_device *dev);
 static void el3_up(struct net_device *dev);
 static struct ethtool_ops ethtool_ops;
-#ifdef CONFIG_PM_LEGACY
-static int el3_suspend(struct pm_dev *pdev);
-static int el3_resume(struct pm_dev *pdev);
-static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data);
+#ifdef CONFIG_PM
+static int el3_suspend(struct device *, pm_message_t);
+static int el3_resume(struct device *);
+#else
+#define el3_suspend NULL
+#define el3_resume NULL
 #endif
+
+
 /* generic device remove for all device types */
 #if defined(CONFIG_EISA) || defined(CONFIG_MCA)
 static int el3_device_remove (struct device *device);
@@ -229,7 +230,9 @@ static struct eisa_driver el3_eisa_drive
 		.driver   = {
 				.name    = "3c509",
 				.probe   = el3_eisa_probe,
-				.remove  = __devexit_p (el3_device_remove)
+				.remove  = __devexit_p (el3_device_remove),
+				.suspend = el3_suspend,
+				.resume  = el3_resume,
 		}
 };
 #endif
@@ -262,6 +265,8 @@ static struct mca_driver el3_mca_driver 
 				.bus = &mca_bus_type,
 				.probe = el3_mca_probe,
 				.remove = __devexit_p(el3_device_remove),
+				.suspend = el3_suspend,
+				.resume  = el3_resume,
 		},
 };
 #endif /* CONFIG_MCA */
@@ -362,10 +367,6 @@ static void el3_common_remove (struct ne
 	struct el3_private *lp = netdev_priv(dev);
 
 	(void) lp;				/* Keep gcc quiet... */
-#ifdef CONFIG_PM_LEGACY
-	if (lp->pmdev)
-		pm_unregister(lp->pmdev);
-#endif
 #if defined(__ISAPNP__)
 	if (lp->type == EL3_PNP)
 		pnp_device_detach(to_pnp_dev(lp->dev));
@@ -572,16 +573,6 @@ no_pnp:
 	if (err)
 		goto out1;
 
-#ifdef CONFIG_PM_LEGACY
-	/* register power management */
-	lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback);
-	if (lp->pmdev) {
-		struct pm_dev *p;
-		p = lp->pmdev;
-		p->data = (struct net_device *)dev;
-	}
-#endif
-
 	el3_cards++;
 	lp->next_dev = el3_root_dev;
 	el3_root_dev = dev;
@@ -1480,20 +1471,17 @@ el3_up(struct net_device *dev)
 }
 
 /* Power Management support functions */
-#ifdef CONFIG_PM_LEGACY
+#ifdef CONFIG_PM
 
 static int
-el3_suspend(struct pm_dev *pdev)
+el3_suspend(struct device *pdev, pm_message_t state)
 {
 	unsigned long flags;
 	struct net_device *dev;
 	struct el3_private *lp;
 	int ioaddr;
 	
-	if (!pdev && !pdev->data)
-		return -EINVAL;
-
-	dev = (struct net_device *)pdev->data;
+	dev = pdev->driver_data;
 	lp = netdev_priv(dev);
 	ioaddr = dev->base_addr;
 
@@ -1510,17 +1498,14 @@ el3_suspend(struct pm_dev *pdev)
 }
 
 static int
-el3_resume(struct pm_dev *pdev)
+el3_resume(struct device *pdev)
 {
 	unsigned long flags;
 	struct net_device *dev;
 	struct el3_private *lp;
 	int ioaddr;
 	
-	if (!pdev && !pdev->data)
-		return -EINVAL;
-
-	dev = (struct net_device *)pdev->data;
+	dev = pdev->driver_data;
 	lp = netdev_priv(dev);
 	ioaddr = dev->base_addr;
 
@@ -1536,20 +1521,7 @@ el3_resume(struct pm_dev *pdev)
 	return 0;
 }
 
-static int
-el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data)
-{
-	switch (rqst) {
-		case PM_SUSPEND:
-			return el3_suspend(pdev);
-
-		case PM_RESUME:
-			return el3_resume(pdev);
-	}
-	return 0;
-}
-
-#endif /* CONFIG_PM_LEGACY */
+#endif /* CONFIG_PM */
 
 /* Parameters that may be passed into the module. */
 static int debug = -1;

^ permalink raw reply

* [2.6 patch] schedule eepro100.c for removal
From: Adrian Bunk @ 2006-02-14 15:22 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel, netdev

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 4 Feb 2006

 Documentation/feature-removal-schedule.txt |    6 ++++++
 drivers/net/eepro100.c                     |    1 +
 2 files changed, 7 insertions(+)

--- linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt.old	2006-01-18 08:38:57.000000000 +0100
+++ linux-2.6.15-mm4-full/Documentation/feature-removal-schedule.txt	2006-01-18 08:39:59.000000000 +0100
@@ -164,0 +165,6 @@
+---------------------------
+
+What:   eepro100 network driver
+When:   August 2006
+Why:    replaced by the e100 driver
+Who:    Adrian Bunk <bunk@stusta.de>

--- linux-2.6.16-rc1-mm5-full/drivers/net/eepro100.c.old	2006-02-03 23:37:55.000000000 +0100
+++ linux-2.6.16-rc1-mm5-full/drivers/net/eepro100.c	2006-02-03 23:39:10.000000000 +0100
@@ -2391,6 +2391,7 @@ static int __init eepro100_init_module(v
 #ifdef MODULE
 	printk(version);
 #endif
+	printk(KERN_WARNING "eepro100 will be removed soon, please use the e100 driver\n");
 	return pci_module_init(&eepro100_driver);
 }
 

^ permalink raw reply

* Re: [RFC,NETFILTER]: Fix xfrm lookup after SNAT
From: Herbert Xu @ 2006-02-14  1:49 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Linux Netdev List, Netfilter Development Mailinglist
In-Reply-To: <43F0C0ED.8000303@trash.net>

On Mon, Feb 13, 2006 at 06:25:01PM +0100, Patrick McHardy wrote:
> I finally got around to fixing the "ip_finish_output2: No header cache
> and no neighbour!" problem reported by Andi Kleen. Instead of rerouting
> the packet in POST_ROUTING, we reuse the original route for the
> xfrm_lookup. This introduces a small restriction (see changelog entry),
> but I think it should work.
> 
> Herbert, do you see any problems with this patch?

Looks perfect to me.  I think the restriction makes sense since SNAT
is done in post-routing so it's counter-intuitive to repeat the lookup
anyway.
 
> Signed-off-by: Patrick McHardy <kaber@trash.net>

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* Re: [PATCH] 2.6.16: [NETFILTER] Fix Kconfig menu level for x_tables
From: David S. Miller @ 2006-02-13 23:42 UTC (permalink / raw)
  To: laforge; +Cc: netdev, netfilter-devel
In-Reply-To: <20060213110600.GQ4601@sunbeam.de.gnumonks.org>

From: Harald Welte <laforge@netfilter.org>
Date: Mon, 13 Feb 2006 12:06:00 +0100

> [NETFILTER] Fix Kconfig menu level for x_tables
> 
> The new x_tables related Kconfig options appear at the wrong menu level
> without this patch.
> 
> Signed-off-by: Harald Welte <laforge@netfilter.org>

Applied, thanks Harald.

^ permalink raw reply

* Re: 2.6.16, sk98lin out of date
From: Alistair John Strachan @ 2006-02-13 23:15 UTC (permalink / raw)
  To: Daniel Drake; +Cc: Matti Aarnio, netdev, linux-kernel
In-Reply-To: <43F0E284.2040805@gentoo.org>

On Monday 13 February 2006 19:48, Daniel Drake wrote:
> Alistair John Strachan wrote:
> > Thanks Matti, I wasn't even aware of this driver. Might I suggest the
> > "old" driver be marked as such in Linux 2.6.16. I guess I must've
> > skipped over it because it begins with "New", and does not contain
> > the word "Marvell", which is indicated exclusively by lspci.
>
> I changed the help text of all 3 drivers (sk98lin/skge/sky2) to
> point out which ones are/aren't interchangable in 2.6.16. The situation
> is a little confusing.

Thanks, this would have prevented my mistake.

> The reason that the sk98lin diff is so huge is because SysKonnect
> effectively added support for a substantially different range of cards
> (Yukon-2) into the existing driver. This is far from the driver quality
> required for the kernel today, so Stephen Hemminger (skge author) wrote
> a new driver (sky2) for the Yukon-2 range.
>
> The long term plan is to obsolete and remove sk98lin, but we aren't
> ready yet: skge issues pop up every month or two, and sky2 is young.
>
> Stephen's own words:
> > I applaud the initiative, but this it is too premature to obsolete
> > the existing driver. There may be lots of chip versions and other
> > variables that make the existing driver a better choice.

Well, Stephen's driver works great for me and sk98lin frankly didn't.

-- 
Cheers,
Alistair.

'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

^ permalink raw reply

* [PATCH 5/5] IrDA: pci_register_driver conversion
From: Samuel Ortiz @ 2006-02-13 22:15 UTC (permalink / raw)
  To: ext David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Jean Tourrilhes, IrDA users

This patch converts 2 IrDA drivers pci_module_init() calls to
pci_register_driver().

Signed-off-by: Christophe Lucas <clucas-6bugY6I12JBBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Domen Puncer <domen-CvScVCPLwOZg9hUCZPvPmw@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index 3137592..910c0ca 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -1778,7 +1778,7 @@ static struct pci_driver donauboe_pci_dr
 static int __init
 donauboe_init (void)
 {
-  return pci_module_init(&donauboe_pci_driver);
+  return pci_register_driver(&donauboe_pci_driver);
 }
 
 static void __exit
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index a9f49f0..97a49e0 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -1887,7 +1887,7 @@ static int __init vlsi_mod_init(void)
 		vlsi_proc_root->owner = THIS_MODULE;
 	}
 
-	ret = pci_module_init(&vlsi_irda_driver);
+	ret = pci_register_driver(&vlsi_irda_driver);
 
 	if (ret && vlsi_proc_root)
 		remove_proc_entry(PROC_DIR, NULL);


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply related

* [PATCH 4/5] IrDA: sti/cli removal from EP7211 IrDA driver
From: Samuel Ortiz @ 2006-02-13 22:15 UTC (permalink / raw)
  To: ext David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Jean Tourrilhes, IrDA users

This patch replaces the deprecated sti/cli routines with the corresponding
spin_lock ones.

Signed-off-by: David chosrova <david.chosrova-TDf4sKD1mxeHlu7OokbhRg@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>

diff --git a/drivers/net/irda/ep7211_ir.c b/drivers/net/irda/ep7211_ir.c
index 3189626..4cba38f 100644
--- a/drivers/net/irda/ep7211_ir.c
+++ b/drivers/net/irda/ep7211_ir.c
@@ -8,6 +8,7 @@
 #include <linux/delay.h>
 #include <linux/tty.h>
 #include <linux/init.h>
+#include <linux/spinlock.h>
 
 #include <net/irda/irda.h>
 #include <net/irda/irda_device.h>
@@ -23,6 +24,8 @@ static void ep7211_ir_close(dongle_t *se
 static int  ep7211_ir_change_speed(struct irda_task *task);
 static int  ep7211_ir_reset(struct irda_task *task);
 
+static DEFINE_SPINLOCK(ep7211_lock);
+
 static struct dongle_reg dongle = {
 	.type = IRDA_EP7211_IR,
 	.open = ep7211_ir_open,
@@ -36,7 +39,7 @@ static void ep7211_ir_open(dongle_t *sel
 {
 	unsigned int syscon1, flags;
 
-	save_flags(flags); cli();
+	spin_lock_irqsave(&ep7211_lock, flags);
 
 	/* Turn on the SIR encoder. */
 	syscon1 = clps_readl(SYSCON1);
@@ -46,14 +49,14 @@ static void ep7211_ir_open(dongle_t *sel
 	/* XXX: We should disable modem status interrupts on the first
 		UART (interrupt #14). */
 
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ep7211_lock, flags);
 }
 
 static void ep7211_ir_close(dongle_t *self)
 {
 	unsigned int syscon1, flags;
 
-	save_flags(flags); cli();
+	spin_lock_irqsave(&ep7211_lock, flags);
 
 	/* Turn off the SIR encoder. */
 	syscon1 = clps_readl(SYSCON1);
@@ -63,7 +66,7 @@ static void ep7211_ir_close(dongle_t *se
 	/* XXX: If we've disabled the modem status interrupts, we should
 		reset them back to their original state. */
 
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ep7211_lock, flags);
 }
 
 /*


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply related

* [PATCH 3/5] IrDA: nsc-ircc: support for yet another Thinkpad IrDA chipset
From: Samuel Ortiz @ 2006-02-13 22:15 UTC (permalink / raw)
  To: ext David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Jean Tourrilhes, IrDA users

This patch simply adds support for a variation of the nsc-ircc PC8739x
chipset, found in some IBM Thinkpad laptops.

Signed-off-by: Jean Tourrilhes <jt-sDzT885Ts8HQT0dZR+AlfA@public.gmane.org> 
Signed-off-by: Samuel Ortiz <samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org> 

diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index e8ff07f..39cf5f0 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -90,9 +90,9 @@ static int qos_mtt_bits = 0x07;  /* 1 ms
 static int dongle_id;
 
 /* Use BIOS settions by default, but user may supply module parameters */
-static unsigned int io[]  = { ~0, ~0, ~0, ~0 };
-static unsigned int irq[] = {  0,  0,  0,  0 };
-static unsigned int dma[] = {  0,  0,  0,  0 };
+static unsigned int io[]  = { ~0, ~0, ~0, ~0, ~0 };
+static unsigned int irq[] = {  0,  0,  0,  0,  0 };
+static unsigned int dma[] = {  0,  0,  0,  0,  0 };
 
 static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info);
@@ -115,10 +115,12 @@ static nsc_chip_t chips[] = {
 	/* Contributed by Jan Frey - IBM A30/A31 */
 	{ "PC8739x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xea, 0xff, 
 	  nsc_ircc_probe_39x, nsc_ircc_init_39x },
+	{ "IBM", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf4, 0xff,
+ 	  nsc_ircc_probe_39x, nsc_ircc_init_39x },
 	{ NULL }
 };
 
-static struct nsc_ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL };
+static struct nsc_ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL, NULL };
 
 static char *dongle_types[] = {
 	"Differential serial interface",


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply related

* [PATCH 2/5] IrDA: nsc-ircc: PM update
From: Samuel Ortiz @ 2006-02-13 22:15 UTC (permalink / raw)
  To: ext David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Jean Tourrilhes, IrDA users

This patch brings the nsc-ircc code to a more up to date power management
scheme, following the current device model.

Signed-off-by: Dmitry Torokhov <dtor-JGs/UdohzUI@public.gmane.org>
Signed-off-by: Rudolf Marek <r.marek-3zVPrsR01WjrBKCeMvbIDA@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>

diff --git a/drivers/net/irda/nsc-ircc.h b/drivers/net/irda/nsc-ircc.h
index 6edf7e5..dacf671 100644
--- a/drivers/net/irda/nsc-ircc.h
+++ b/drivers/net/irda/nsc-ircc.h
@@ -269,7 +269,7 @@ struct nsc_ircc_cb {
 	__u32 new_speed;
 	int index;                 /* Instance index */
 
-        struct pm_dev *dev;
+	struct platform_device *pldev;
 };
 
 static inline void switch_bank(int iobase, int bank)
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index 74cb38c..e8ff07f 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -55,14 +55,12 @@
 #include <linux/rtnetlink.h>
 #include <linux/dma-mapping.h>
 #include <linux/pnp.h>
+#include <linux/platform_device.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/byteorder.h>
 
-#include <linux/pm.h>
-#include <linux/pm_legacy.h>
-
 #include <net/irda/wrapper.h>
 #include <net/irda/irda.h>
 #include <net/irda/irda_device.h>
@@ -74,6 +72,19 @@
 
 static char *driver_name = "nsc-ircc";
 
+/* Power Management */
+#define NSC_IRCC_DRIVER_NAME                  "nsc-ircc"
+static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state);
+static int nsc_ircc_resume(struct platform_device *dev);
+
+static struct platform_driver nsc_ircc_driver = {
+	.suspend	= nsc_ircc_suspend,
+	.resume		= nsc_ircc_resume,
+	.driver		= {
+		.name	= NSC_IRCC_DRIVER_NAME,
+	},
+};
+
 /* Module parameters */
 static int qos_mtt_bits = 0x07;  /* 1 ms or more */
 static int dongle_id;
@@ -164,7 +175,6 @@ static int  nsc_ircc_net_open(struct net
 static int  nsc_ircc_net_close(struct net_device *dev);
 static int  nsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static struct net_device_stats *nsc_ircc_net_get_stats(struct net_device *dev);
-static int nsc_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data);
 
 /* Globals */
 static int pnp_registered;
@@ -186,6 +196,12 @@ static int __init nsc_ircc_init(void)
 	int reg;
 	int i = 0;
 
+	ret = platform_driver_register(&nsc_ircc_driver); 
+        if (ret) {
+                IRDA_ERROR("%s, Can't register driver!\n", driver_name);       
+                return ret;                                                                       
+        }	
+
  	/* Register with PnP subsystem to detect disable ports */
 	ret = pnp_register_driver(&nsc_ircc_pnp_driver);
 
@@ -274,6 +290,7 @@ static int __init nsc_ircc_init(void)
 	}
 
 	if (ret) {
+		platform_driver_unregister(&nsc_ircc_driver);
 		pnp_unregister_driver(&nsc_ircc_pnp_driver);
 		pnp_registered = 0;
 	}
@@ -291,13 +308,13 @@ static void __exit nsc_ircc_cleanup(void
 {
 	int i;
 
-	pm_unregister_all(nsc_ircc_pmproc);
-	
 	for (i = 0; i < ARRAY_SIZE(dev_self); i++) {
 		if (dev_self[i])
 			nsc_ircc_close(dev_self[i]);
 	}
 
+	platform_driver_unregister(&nsc_ircc_driver);
+
 	if (pnp_registered)
  		pnp_unregister_driver(&nsc_ircc_pnp_driver);
 	
@@ -314,7 +331,6 @@ static int __init nsc_ircc_open(chipio_t
 {
 	struct net_device *dev;
 	struct nsc_ircc_cb *self;
-	struct pm_dev *pmdev;
 	void *ret;
 	int err, chip_index;
 
@@ -444,11 +460,18 @@ static int __init nsc_ircc_open(chipio_t
 	self->io.dongle_id = dongle_id;
 	nsc_ircc_init_dongle_interface(self->io.fir_base, dongle_id);
 
-        pmdev = pm_register(PM_SYS_DEV, PM_SYS_IRDA, nsc_ircc_pmproc);
-        if (pmdev)
-                pmdev->data = self;
+ 	self->pldev = platform_device_register_simple(NSC_IRCC_DRIVER_NAME,
+ 						      self->index, NULL, 0);
+ 	if (IS_ERR(self->pldev)) {
+ 		err = PTR_ERR(self->pldev);
+ 		goto out5;
+ 	}
+ 	platform_set_drvdata(self->pldev, self);
 
 	return chip_index;
+
+ out5: 
+ 	unregister_netdev(dev);
  out4:
 	dma_free_coherent(NULL, self->tx_buff.truesize,
 			  self->tx_buff.head, self->tx_buff_dma);
@@ -479,6 +502,8 @@ static int __exit nsc_ircc_close(struct 
 
         iobase = self->io.fir_base;
 
+	platform_device_unregister(self->pldev);
+
 	/* Remove netdevice */
 	unregister_netdev(self->netdev);
 
@@ -2278,45 +2303,83 @@ static struct net_device_stats *nsc_ircc
 	return &self->stats;
 }
 
-static void nsc_ircc_suspend(struct nsc_ircc_cb *self)
+static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
 {
-	IRDA_MESSAGE("%s, Suspending\n", driver_name);
-
+     	struct nsc_ircc_cb *self = platform_get_drvdata(dev);
+ 	int bank;
+	unsigned long flags;
+ 	int iobase = self->io.fir_base;
+	
 	if (self->io.suspended)
-		return;
-
-	nsc_ircc_net_close(self->netdev);
+		return 0;
 
+	IRDA_DEBUG(1, "%s, Suspending\n", driver_name);
+		
+	rtnl_lock();
+	if (netif_running(self->netdev)) {
+		netif_device_detach(self->netdev);
+		spin_lock_irqsave(&self->lock, flags);
+		/* Save current bank */
+		bank = inb(iobase+BSR);
+		
+		/* Disable interrupts */
+		switch_bank(iobase, BANK0);
+		outb(0, iobase+IER);
+		
+		/* Restore bank register */
+		outb(bank, iobase+BSR);
+		
+		spin_unlock_irqrestore(&self->lock, flags);
+		free_irq(self->io.irq, self->netdev);
+		disable_dma(self->io.dma);
+	}
 	self->io.suspended = 1;
+	rtnl_unlock();
+ 	
+	return 0;
 }
-
-static void nsc_ircc_wakeup(struct nsc_ircc_cb *self)
+ 
+static int nsc_ircc_resume(struct platform_device *dev)
 {
+ 	struct nsc_ircc_cb *self = platform_get_drvdata(dev);
+ 	unsigned long flags;
+ 
 	if (!self->io.suspended)
-		return;
+		return 0;
+
+	IRDA_DEBUG(1, "%s, Waking up\n", driver_name);
 
+	rtnl_lock();
 	nsc_ircc_setup(&self->io);
-	nsc_ircc_net_open(self->netdev);
-	
-	IRDA_MESSAGE("%s, Waking up\n", driver_name);
+	nsc_ircc_init_dongle_interface(self->io.fir_base, self->io.dongle_id);
 
+	if (netif_running(self->netdev)) {
+		if (request_irq(self->io.irq, nsc_ircc_interrupt, 0,                     				
+				self->netdev->name, self->netdev)) {
+ 		    	IRDA_WARNING("%s, unable to allocate irq=%d\n",
+				     driver_name, self->io.irq);
+			
+			/*
+			 * Don't fail resume process, just kill this
+			 * network interface
+			 */
+			unregister_netdevice(self->netdev);
+		} else {
+			spin_lock_irqsave(&self->lock, flags);
+			nsc_ircc_change_speed(self, self->io.speed);
+			spin_unlock_irqrestore(&self->lock, flags);
+			netif_device_attach(self->netdev);
+		}
+		
+	} else {
+		spin_lock_irqsave(&self->lock, flags);
+		nsc_ircc_change_speed(self, 9600);
+		spin_unlock_irqrestore(&self->lock, flags);
+	}
 	self->io.suspended = 0;
-}
+	rtnl_unlock();
 
-static int nsc_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
-        struct nsc_ircc_cb *self = (struct nsc_ircc_cb*) dev->data;
-        if (self) {
-                switch (rqst) {
-                case PM_SUSPEND:
-                        nsc_ircc_suspend(self);
-                        break;
-                case PM_RESUME:
-                        nsc_ircc_wakeup(self);
-                        break;
-                }
-        }
-	return 0;
+ 	return 0;
 }
 
 MODULE_AUTHOR("Dag Brattli <dagb-WiQn+q4tdXRhl2p70BpVqQ@public.gmane.org>");


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply related

* [PATCH 1/5] IrDA: nsc-ircc: ISAPnP support
From: Samuel Ortiz @ 2006-02-13 22:14 UTC (permalink / raw)
  To: ext David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Jean Tourrilhes, IrDA users

This enables PnP support for the nsc-ircc chipset.
Since we can't fetch the chipset cfg_base from the PnP layer, we just use
the PnP information as one more hint when probing the chip.

Signed-off-by: Jean Tourrilhes <jt-sDzT885Ts8HQT0dZR+AlfA@public.gmane.org> 
Signed-off-by: Samuel Ortiz <samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org> 

diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index ee717d0..74cb38c 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -12,6 +12,7 @@
  *     Copyright (c) 1998-2000 Dag Brattli <dagb-WiQn+q4tdXRhl2p70BpVqQ@public.gmane.org>
  *     Copyright (c) 1998 Lichen Wang, <lwang-df/MbWHcLfRBDgjK7y7TUQ@public.gmane.org>
  *     Copyright (c) 1998 Actisys Corp., www.actisys.com
+ *     Copyright (c) 2000-2004 Jean Tourrilhes <jt-sDzT885Ts8HQT0dZR+AlfA@public.gmane.org>
  *     All Rights Reserved
  *      
  *     This program is free software; you can redistribute it and/or 
@@ -53,6 +54,7 @@
 #include <linux/init.h>
 #include <linux/rtnetlink.h>
 #include <linux/dma-mapping.h>
+#include <linux/pnp.h>
 
 #include <asm/io.h>
 #include <asm/dma.h>
@@ -78,8 +80,8 @@ static int dongle_id;
 
 /* Use BIOS settions by default, but user may supply module parameters */
 static unsigned int io[]  = { ~0, ~0, ~0, ~0 };
-static unsigned int irq[] = { 0, 0, 0, 0, 0 };
-static unsigned int dma[] = { 0, 0, 0, 0, 0 };
+static unsigned int irq[] = {  0,  0,  0,  0 };
+static unsigned int dma[] = {  0,  0,  0,  0 };
 
 static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info);
@@ -87,6 +89,7 @@ static int nsc_ircc_probe_39x(nsc_chip_t
 static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_338(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info);
+static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id);
 
 /* These are the known NSC chips */
 static nsc_chip_t chips[] = {
@@ -104,7 +107,6 @@ static nsc_chip_t chips[] = {
 	{ NULL }
 };
 
-/* Max 4 instances for now */
 static struct nsc_ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL };
 
 static char *dongle_types[] = {
@@ -126,8 +128,24 @@ static char *dongle_types[] = {
 	"No dongle connected",
 };
 
+/* PNP probing */
+static chipio_t pnp_info;
+static const struct pnp_device_id nsc_ircc_pnp_table[] = {
+	{ .id = "NSC6001", .driver_data = 0 },
+	{ .id = "IBM0071", .driver_data = 0 },
+	{ }
+};
+
+MODULE_DEVICE_TABLE(pnp, nsc_ircc_pnp_table);
+
+static struct pnp_driver nsc_ircc_pnp_driver = {
+	.name = "nsc-ircc",
+	.id_table = nsc_ircc_pnp_table,
+	.probe = nsc_ircc_pnp_probe,
+};
+
 /* Some prototypes */
-static int  nsc_ircc_open(int i, chipio_t *info);
+static int  nsc_ircc_open(chipio_t *info);
 static int  nsc_ircc_close(struct nsc_ircc_cb *self);
 static int  nsc_ircc_setup(chipio_t *info);
 static void nsc_ircc_pio_receive(struct nsc_ircc_cb *self);
@@ -148,6 +166,10 @@ static int  nsc_ircc_net_ioctl(struct ne
 static struct net_device_stats *nsc_ircc_net_get_stats(struct net_device *dev);
 static int nsc_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data);
 
+/* Globals */
+static int pnp_registered;
+static int pnp_succeeded;
+
 /*
  * Function nsc_ircc_init ()
  *
@@ -158,28 +180,30 @@ static int __init nsc_ircc_init(void)
 {
 	chipio_t info;
 	nsc_chip_t *chip;
-	int ret = -ENODEV;
+	int ret;
 	int cfg_base;
 	int cfg, id;
 	int reg;
 	int i = 0;
 
+ 	/* Register with PnP subsystem to detect disable ports */
+	ret = pnp_register_driver(&nsc_ircc_pnp_driver);
+
+ 	if (ret >= 0)
+ 		pnp_registered = 1;
+
+	ret = -ENODEV;
+
 	/* Probe for all the NSC chipsets we know about */
-	for (chip=chips; chip->name ; chip++) {
+	for (chip = chips; chip->name ; chip++) {
 		IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __FUNCTION__,
 			   chip->name);
 		
 		/* Try all config registers for this chip */
-		for (cfg=0; cfg<3; cfg++) {
+		for (cfg = 0; cfg < ARRAY_SIZE(chip->cfg); cfg++) {
 			cfg_base = chip->cfg[cfg];
 			if (!cfg_base)
 				continue;
-			
-			memset(&info, 0, sizeof(chipio_t));
-			info.cfg_base = cfg_base;
-			info.fir_base = io[i];
-			info.dma = dma[i];
-			info.irq = irq[i];
 
 			/* Read index register */
 			reg = inb(cfg_base);
@@ -194,26 +218,66 @@ static int __init nsc_ircc_init(void)
 			if ((id & chip->cid_mask) == chip->cid_value) {
 				IRDA_DEBUG(2, "%s() Found %s chip, revision=%d\n",
 					   __FUNCTION__, chip->name, id & ~chip->cid_mask);
-				/* 
-				 * If the user supplies the base address, then
-				 * we init the chip, if not we probe the values
-				 * set by the BIOS
-				 */				
-				if (io[i] < 0x2000) {
-					chip->init(chip, &info);
-				} else
-					chip->probe(chip, &info);
-
-				if (nsc_ircc_open(i, &info) == 0)
-					ret = 0;
+				
+				/*
+				 * If we found a correct PnP setting, 
+				 * we first try it.
+				 */
+				if (pnp_succeeded) {
+					memset(&info, 0, sizeof(chipio_t));
+					info.cfg_base = cfg_base;
+					info.fir_base = pnp_info.fir_base;
+					info.dma = pnp_info.dma;
+					info.irq = pnp_info.irq;
+					
+					if (info.fir_base < 0x2000) {
+						IRDA_MESSAGE("%s, chip->init\n", driver_name);
+						chip->init(chip, &info);
+					} else
+						chip->probe(chip, &info);
+					
+					if (nsc_ircc_open(&info) >= 0)
+						ret = 0;
+				}
+				
+				/*
+				 * Opening based on PnP values failed.
+				 * Let's fallback to user values, or probe
+				 * the chip.
+				 */
+				if (ret) {
+					IRDA_DEBUG(2, "%s, PnP init failed\n", driver_name);
+					memset(&info, 0, sizeof(chipio_t));
+					info.cfg_base = cfg_base;
+					info.fir_base = io[i];
+					info.dma = dma[i];
+					info.irq = irq[i];
+		
+					/* 
+					 * If the user supplies the base address, then
+					 * we init the chip, if not we probe the values
+					 * set by the BIOS
+					 */				
+					if (io[i] < 0x2000) {
+						chip->init(chip, &info);
+					} else
+						chip->probe(chip, &info);
+					
+					if (nsc_ircc_open(&info) >= 0)
+						ret = 0;
+				}				
 				i++;
 			} else {
 				IRDA_DEBUG(2, "%s(), Wrong chip id=0x%02x\n", __FUNCTION__, id);
 			}
 		} 
-		
 	}
 
+	if (ret) {
+		pnp_unregister_driver(&nsc_ircc_pnp_driver);
+		pnp_registered = 0;
+	}
+		
 	return ret;
 }
 
@@ -228,11 +292,16 @@ static void __exit nsc_ircc_cleanup(void
 	int i;
 
 	pm_unregister_all(nsc_ircc_pmproc);
-
-	for (i=0; i < 4; i++) {
+	
+	for (i = 0; i < ARRAY_SIZE(dev_self); i++) {
 		if (dev_self[i])
 			nsc_ircc_close(dev_self[i]);
 	}
+
+	if (pnp_registered)
+ 		pnp_unregister_driver(&nsc_ircc_pnp_driver);
+	
+	pnp_registered = 0;
 }
 
 /*
@@ -241,16 +310,27 @@ static void __exit nsc_ircc_cleanup(void
  *    Open driver instance
  *
  */
-static int __init nsc_ircc_open(int i, chipio_t *info)
+static int __init nsc_ircc_open(chipio_t *info)
 {
 	struct net_device *dev;
 	struct nsc_ircc_cb *self;
-        struct pm_dev *pmdev;
+	struct pm_dev *pmdev;
 	void *ret;
-	int err;
+	int err, chip_index;
 
 	IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
 
+
+ 	for (chip_index = 0; chip_index < ARRAY_SIZE(dev_self); chip_index++) {
+		if (!dev_self[chip_index])
+			break;
+	}
+	
+	if (chip_index == ARRAY_SIZE(dev_self)) {
+		IRDA_ERROR("%s(), maximum number of supported chips reached!\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+
 	IRDA_MESSAGE("%s, Found chip at base=0x%03x\n", driver_name,
 		     info->cfg_base);
 
@@ -271,8 +351,8 @@ static int __init nsc_ircc_open(int i, c
 	spin_lock_init(&self->lock);
    
 	/* Need to store self somewhere */
-	dev_self[i] = self;
-	self->index = i;
+	dev_self[chip_index] = self;
+	self->index = chip_index;
 
 	/* Initialize IO */
 	self->io.cfg_base  = info->cfg_base;
@@ -351,7 +431,7 @@ static int __init nsc_ircc_open(int i, c
 
 	/* Check if user has supplied a valid dongle id or not */
 	if ((dongle_id <= 0) ||
-	    (dongle_id >= (sizeof(dongle_types) / sizeof(dongle_types[0]))) ) {
+	    (dongle_id >= ARRAY_SIZE(dongle_types))) {
 		dongle_id = nsc_ircc_read_dongle_id(self->io.fir_base);
 		
 		IRDA_MESSAGE("%s, Found dongle: %s\n", driver_name,
@@ -368,7 +448,7 @@ static int __init nsc_ircc_open(int i, c
         if (pmdev)
                 pmdev->data = self;
 
-	return 0;
+	return chip_index;
  out4:
 	dma_free_coherent(NULL, self->tx_buff.truesize,
 			  self->tx_buff.head, self->tx_buff_dma);
@@ -379,7 +459,7 @@ static int __init nsc_ircc_open(int i, c
 	release_region(self->io.fir_base, self->io.fir_ext);
  out1:
 	free_netdev(dev);
-	dev_self[i] = NULL;
+	dev_self[chip_index] = NULL;
 	return err;
 }
 
@@ -806,6 +886,43 @@ static int nsc_ircc_probe_39x(nsc_chip_t
 	return 0;
 }
 
+/* PNP probing */
+static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id)
+{
+	memset(&pnp_info, 0, sizeof(chipio_t));
+	pnp_info.irq = -1;
+	pnp_info.dma = -1;
+	pnp_succeeded = 1;
+
+	/* There don't seem to be any way to get the cfg_base.
+	 * On my box, cfg_base is in the PnP descriptor of the
+	 * motherboard. Oh well... Jean II */
+
+	if (pnp_port_valid(dev, 0) &&
+		!(pnp_port_flags(dev, 0) & IORESOURCE_DISABLED))
+		pnp_info.fir_base = pnp_port_start(dev, 0);
+
+	if (pnp_irq_valid(dev, 0) &&
+		!(pnp_irq_flags(dev, 0) & IORESOURCE_DISABLED))
+		pnp_info.irq = pnp_irq(dev, 0);
+
+	if (pnp_dma_valid(dev, 0) &&
+		!(pnp_dma_flags(dev, 0) & IORESOURCE_DISABLED))
+		pnp_info.dma = pnp_dma(dev, 0);
+
+	IRDA_DEBUG(0, "%s() : From PnP, found firbase 0x%03X ; irq %d ; dma %d.\n",
+		   __FUNCTION__, pnp_info.fir_base, pnp_info.irq, pnp_info.dma);
+	
+	if((pnp_info.fir_base == 0) ||
+	   (pnp_info.irq == -1) || (pnp_info.dma == -1)) {
+		/* Returning an error will disable the device. Yuck ! */
+		//return -EINVAL;
+		pnp_succeeded = 0;
+	}
+
+	return 0;
+}
+
 /*
  * Function nsc_ircc_setup (info)
  *


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply related

* Re: [PATCH 0/7] IrDA updates
From: Samuel Ortiz @ 2006-02-13 22:14 UTC (permalink / raw)
  To: ext David S. Miller
  Cc: IrDA users, Jean Tourrilhes, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20060209.170448.122642050.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Thu, Feb 09, 2006 at 05:04:48PM -0800, ext David S. Miller wrote:
> Something in your email client corrupts the patches.  For one
> thing, it turns lines with just spaces in them into empty lines.
> I've seen this transformation before, in patches from other
> people.
> 
> So please try to send patches 1, 2, 3, 5, and 6 to yourself until
> the emails you send out give clean applyable patches.
I have changed my email client and sent the patches to some other people and myself. Everything seems to be ok.

So, I will now send the remaining 5 patches.

Hopefully it will work for you as well.

Cheers,
Samuel.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply

* Re: 2.6.16, sk98lin out of date
From: Lee Revell @ 2006-02-13 20:40 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Mws, Alistair John Strachan, linux-kernel, netdev
In-Reply-To: <20060213203434.GI11380@w.ods.org>

On Mon, 2006-02-13 at 21:34 +0100, Willy Tarreau wrote:
> On Mon, Feb 13, 2006 at 02:03:14PM -0500, Lee Revell wrote:
> > On Mon, 2006-02-13 at 12:06 +0100, Mws wrote:
> > > hi,
> > > as i do have the same problem i may help you out.
> > > 
> > > at first, syskonnect did send their kernel diffs/patches but they
> > > we're rejected caused
> > > by coding style, indention and some people thinking that things can be
> > > done better. 
> > 
> > Haha, they didn't like the LKML code review so they just stopped sending
> > patches?  Classic.  Remind me not to buy their gear.
> 
> Lee, it's not always that simple. When you submit one driver, sometimes
> reviewers tell you that for whatever reason your driver's structure is
> wrong and it has to be changed a lot (and sometimes they're right of
> course). But when you don't have enough ressource to do the job twice,
> the best you can do is to maintain it out of tree, which is already a
> pain. I'm not saying that it is what happened with their driver, I don't
> know the history. However, I found your reaction somewhat hasty. I
> personally would prefer to offer time and help before deciding that
> I don't want anyone's products on this basis. It's not as if they
> did not release their driver's source!

True, that was a little harsh.  I just find it a little sad that all
these vendors insist on throwing away months of work rather than simply
researching what the linux kernel coding standards are ahead of time.

Lee

^ permalink raw reply

* Re: 2.6.16, sk98lin out of date
From: Willy Tarreau @ 2006-02-13 20:34 UTC (permalink / raw)
  To: Lee Revell; +Cc: Mws, Alistair John Strachan, linux-kernel, netdev
In-Reply-To: <1139857394.3202.38.camel@mindpipe>

On Mon, Feb 13, 2006 at 02:03:14PM -0500, Lee Revell wrote:
> On Mon, 2006-02-13 at 12:06 +0100, Mws wrote:
> > hi,
> > as i do have the same problem i may help you out.
> > 
> > at first, syskonnect did send their kernel diffs/patches but they
> > we're rejected caused
> > by coding style, indention and some people thinking that things can be
> > done better. 
> 
> Haha, they didn't like the LKML code review so they just stopped sending
> patches?  Classic.  Remind me not to buy their gear.

Lee, it's not always that simple. When you submit one driver, sometimes
reviewers tell you that for whatever reason your driver's structure is
wrong and it has to be changed a lot (and sometimes they're right of
course). But when you don't have enough ressource to do the job twice,
the best you can do is to maintain it out of tree, which is already a
pain. I'm not saying that it is what happened with their driver, I don't
know the history. However, I found your reaction somewhat hasty. I
personally would prefer to offer time and help before deciding that
I don't want anyone's products on this basis. It's not as if they
did not release their driver's source !

Cheers,
Willy

^ permalink raw reply

* Re: 2.6.16, sk98lin out of date
From: Daniel Drake @ 2006-02-13 19:48 UTC (permalink / raw)
  To: Alistair John Strachan; +Cc: Matti Aarnio, netdev, linux-kernel
In-Reply-To: <200602131110.34212.s0348365@sms.ed.ac.uk>

Alistair John Strachan wrote:
> Thanks Matti, I wasn't even aware of this driver. Might I suggest the
> "old" driver be marked as such in Linux 2.6.16. I guess I must've
> skipped over it because it begins with "New", and does not contain
> the word "Marvell", which is indicated exclusively by lspci.

I changed the help text of all 3 drivers (sk98lin/skge/sky2) to
point out which ones are/aren't interchangable in 2.6.16. The situation 
is a little confusing.

The reason that the sk98lin diff is so huge is because SysKonnect
effectively added support for a substantially different range of cards
(Yukon-2) into the existing driver. This is far from the driver quality
required for the kernel today, so Stephen Hemminger (skge author) wrote 
a new driver (sky2) for the Yukon-2 range.

The long term plan is to obsolete and remove sk98lin, but we aren't 
ready yet: skge issues pop up every month or two, and sky2 is young. 
Stephen's own words:

> I applaud the initiative, but this it is too premature to obsolete
> the existing driver. There may be lots of chip versions and other
> variables that make the existing driver a better choice.

Daniel

^ permalink raw reply

* Re: 2.6.16, sk98lin out of date
From: Lee Revell @ 2006-02-13 19:03 UTC (permalink / raw)
  To: Mws; +Cc: Alistair John Strachan, linux-kernel, netdev
In-Reply-To: <200602131206.26285.mws@twisted-brains.org>

On Mon, 2006-02-13 at 12:06 +0100, Mws wrote:
> hi,
> as i do have the same problem i may help you out.
> 
> at first, syskonnect did send their kernel diffs/patches but they
> we're rejected caused
> by coding style, indention and some people thinking that things can be
> done better. 

Haha, they didn't like the LKML code review so they just stopped sending
patches?  Classic.  Remind me not to buy their gear.

Lee

^ permalink raw reply

* [RFC,NETFILTER]: Fix xfrm lookup after SNAT
From: Patrick McHardy @ 2006-02-13 17:25 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Linux Netdev List, Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

I finally got around to fixing the "ip_finish_output2: No header cache
and no neighbour!" problem reported by Andi Kleen. Instead of rerouting
the packet in POST_ROUTING, we reuse the original route for the
xfrm_lookup. This introduces a small restriction (see changelog entry),
but I think it should work.

Herbert, do you see any problems with this patch?

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 3940 bytes --]

[NETFILTER]: Fix xfrm lookup after SNAT

To find out if a packet needs to be handled by IPsec after SNAT, packets
are currently rerouted in POST_ROUTING and a new xfrm lookup is done. This
breaks SNAT of non-unicast packets to non-local addresses because the
packet is routed as incoming packet and no neighbour entry is bound to the
dst_entry. In general, it seems to be a bad idea to replace the dst_entry
after the packet was already sent to the output routine because its state
might not match what's expected.

This patch changes the xfrm lookup in POST_ROUTING to re-use the original
dst_entry without routing the packet again. This means no policy routing
can be used for transport mode transforms (which keep the original route)
when packets are SNATed to match the policy, but it looks like the best
we can do for now.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 0ebf0a6fc360cf177712ed0f21f160e0ffea9f99
tree 5bef78d70573091e5055bf4e236d7d8a443d20df
parent b6d521bde1a8bcf7e3fcad139319a427c18d8012
author Patrick McHardy <kaber@trash.net> Mon, 13 Feb 2006 18:20:04 +0100
committer Patrick McHardy <kaber@trash.net> Mon, 13 Feb 2006 18:20:04 +0100

 include/linux/netfilter_ipv4.h         |    2 +-
 net/ipv4/netfilter.c                   |   41 ++++++++++++++++++++++++++++++++
 net/ipv4/netfilter/ip_nat_standalone.c |    6 ++---
 3 files changed, 45 insertions(+), 4 deletions(-)

diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h
index fdc4a95..43c09d7 100644
--- a/include/linux/netfilter_ipv4.h
+++ b/include/linux/netfilter_ipv4.h
@@ -79,7 +79,7 @@ enum nf_ip_hook_priorities {
 
 #ifdef __KERNEL__
 extern int ip_route_me_harder(struct sk_buff **pskb);
-
+extern int ip_xfrm_me_harder(struct sk_buff **pskb);
 #endif /*__KERNEL__*/
 
 #endif /*__LINUX_IP_NETFILTER_H*/
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index 52a3d7c..ed42cdc 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -78,6 +78,47 @@ int ip_route_me_harder(struct sk_buff **
 }
 EXPORT_SYMBOL(ip_route_me_harder);
 
+#ifdef CONFIG_XFRM
+int ip_xfrm_me_harder(struct sk_buff **pskb)
+{
+	struct flowi fl;
+	unsigned int hh_len;
+	struct dst_entry *dst;
+
+	if (IPCB(*pskb)->flags & IPSKB_XFRM_TRANSFORMED)
+		return 0;
+	if (xfrm_decode_session(*pskb, &fl, AF_INET) < 0)
+		return -1;
+
+	dst = (*pskb)->dst;
+	if (dst->xfrm)
+		dst = ((struct xfrm_dst *)dst)->route;
+	dst_hold(dst);
+
+	if (xfrm_lookup(&dst, &fl, (*pskb)->sk, 0) < 0)
+		return -1;
+
+	dst_release((*pskb)->dst);
+	(*pskb)->dst = dst;
+
+	/* Change in oif may mean change in hh_len. */
+	hh_len = (*pskb)->dst->dev->hard_header_len;
+	if (skb_headroom(*pskb) < hh_len) {
+		struct sk_buff *nskb;
+
+		nskb = skb_realloc_headroom(*pskb, hh_len);
+		if (!nskb)
+			return -1;
+		if ((*pskb)->sk)
+			skb_set_owner_w(nskb, (*pskb)->sk);
+		kfree_skb(*pskb);
+		*pskb = nskb;
+	}
+	return 0;
+}
+EXPORT_SYMBOL(ip_xfrm_me_harder);
+#endif
+
 void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
 EXPORT_SYMBOL(ip_nat_decode_session);
 
diff --git a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c
index 92c5499..7c3f7d3 100644
--- a/net/ipv4/netfilter/ip_nat_standalone.c
+++ b/net/ipv4/netfilter/ip_nat_standalone.c
@@ -235,19 +235,19 @@ ip_nat_out(unsigned int hooknum,
 		return NF_ACCEPT;
 
 	ret = ip_nat_fn(hooknum, pskb, in, out, okfn);
+#ifdef CONFIG_XFRM
 	if (ret != NF_DROP && ret != NF_STOLEN
 	    && (ct = ip_conntrack_get(*pskb, &ctinfo)) != NULL) {
 		enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
 
 		if (ct->tuplehash[dir].tuple.src.ip !=
 		    ct->tuplehash[!dir].tuple.dst.ip
-#ifdef CONFIG_XFRM
 		    || ct->tuplehash[dir].tuple.src.u.all !=
 		       ct->tuplehash[!dir].tuple.dst.u.all
-#endif
 		    )
-			return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP;
+			return ip_xfrm_me_harder(pskb) == 0 ? ret : NF_DROP;
 	}
+#endif
 	return ret;
 }
 

^ permalink raw reply related

* Re: 2.6.16, sk98lin out of date
From: Alistair John Strachan @ 2006-02-13 11:10 UTC (permalink / raw)
  To: Matti Aarnio; +Cc: netdev, linux-kernel
In-Reply-To: <20060213110542.GZ3927@mea-ext.zmailer.org>

On Monday 13 February 2006 11:05, Matti Aarnio wrote:
> On Mon, Feb 13, 2006 at 10:58:03AM +0000, Alistair John Strachan wrote:
> > Hi,
> >
> > As I'm sure the drivers/net maintainers are well aware, SysKonnect
> > constantly update their sk98lin/sky2 driver without bothering to sync
> > their changes with the official linux kernel.
>
> My understanding is, that  skge  driver has superceded the  sk98lin  in
> most uses.
>
> There could, of course, be a change to insert vendor driver _as_is_ into
> baseline kernel with its own name.

Thanks Matti, I wasn't even aware of this driver. Might I suggest the "old" 
driver be marked as such in Linux 2.6.16. I guess I must've skipped over it 
because it begins with "New", and does not contain the word "Marvell", which 
is indicated exclusively by lspci.

-- 
Cheers,
Alistair.

'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

^ permalink raw reply

* Re: 2.6.16, sk98lin out of date
From: Mws @ 2006-02-13 11:06 UTC (permalink / raw)
  To: Alistair John Strachan; +Cc: linux-kernel, netdev
In-Reply-To: <200602131058.03419.s0348365@sms.ed.ac.uk>


[-- Attachment #1.1: Type: text/plain, Size: 1631 bytes --]

On Monday 13 February 2006 11:58, you wrote:
> Hi,
> 
> As I'm sure the drivers/net maintainers are well aware, SysKonnect constantly 
> update their sk98lin/sky2 driver without bothering to sync their changes with 
> the official linux kernel.
> 
> I quickly downloaded driver version 8.31 from http://www.skd.de/ today and 
> used the install script to generate a diff against 2.6.16-rc3. Even after 
> fixing up some DOS EOLs in the package, the diff was still well over 1.5MBs. 
> This is an enormous number of changes.
> 
> The reason I'm posting is that my DFI LanParty-UT SLI-D works with this 
> version of the driver, but not the version 2.6.16-rc3.
> 
> [alistair] 10:55 [~] dmesg | grep sk98lin
> sk98lin: Could not read VPD data.
> sk98lin: probe of 0000:01:0a.0 failed with error -5
> 
> I wonder if it's worth just identifying the "quick fix" (I've seen workarounds 
> for corrupt VPDs like mine) or whether a general merge up would be 
> beneficial..
> 
> If nobody's maintaining this driver I wouldn't mind helping out.
> 
hi,
as i do have the same problem i may help you out.

at first, syskonnect did send their kernel diffs/patches but they we're rejected caused
by coding style, indention and some people thinking that things can be done better.

i personally do apply these drivers with the generate patch function of the install.sh.

there were small modifications within kernel 2.6.16 with i also sended as a diff to syskonnect, 
but got not reply.

i attached the diff, maybe it helps ya out. it works with my 2 onboard marvell yukon gbit adapters.

regards
marcel


[-- Attachment #1.2: sk98lin_v8.28.1.3_adjustments_for_2.6.16.patch --]
[-- Type: text/x-diff, Size: 3376 bytes --]

diff -ruN linux/drivers/net/sk98lin/h/skdrv2nd.h linux-new/drivers/net/sk98lin/h/skdrv2nd.h
--- linux/drivers/net/sk98lin/h/skdrv2nd.h	2006-01-18 10:11:04.000000000 +0100
+++ linux-new/drivers/net/sk98lin/h/skdrv2nd.h	2005-09-29 10:26:12.000000000 +0200
@@ -61,7 +61,7 @@
 #ifdef HAVE_POLL_CONTROLLER
 #define SK_POLL_CONTROLLER
 #define CONFIG_SK98LIN_NAPI
+#elif defined CONFIG_NET_POLL_CONTROLLER
-#elif CONFIG_NET_POLL_CONTROLLER
 #define SK_POLL_CONTROLLER
 #define CONFIG_SK98LIN_NAPI
 #endif
diff -ruN linux/drivers/net/sk98lin/skge.c linux-new/drivers/net/sk98lin/skge.c
--- linux/drivers/net/sk98lin/skge.c	2006-01-18 10:22:44.000000000 +0100
+++ linux-new/drivers/net/sk98lin/skge.c	2005-09-29 10:26:12.000000000 +0200
@@ -107,7 +107,7 @@
 static int 	__devinit sk98lin_init_device(struct pci_dev *pdev, const struct pci_device_id *ent);
 static void 	sk98lin_remove_device(struct pci_dev *pdev);
 #ifdef CONFIG_PM
+static int	sk98lin_suspend(struct pci_dev *pdev, pm_message_t state);
-static int	sk98lin_suspend(struct pci_dev *pdev, u32 state);
 static int	sk98lin_resume(struct pci_dev *pdev);
 static void	SkEnableWOMagicPacket(SK_AC *pAC, SK_IOC IoC, SK_MAC_ADDR MacAddr);
 #endif
@@ -971,7 +971,7 @@
  */
 static int sk98lin_suspend(
 struct pci_dev	*pdev,   /* pointer to the device that is to suspend */
+pm_message_t	state)  /* what power state is desired by Linux?    */
-u32		state)  /* what power state is desired by Linux?    */
 {
 	struct net_device   *dev  = pci_get_drvdata(pdev);
 	DEV_NET		    *pNet = (DEV_NET*) dev->priv;
@@ -1024,7 +1024,7 @@
 #else
 	pci_save_state(pdev, pAC->PciState);
 #endif
+	pci_set_power_state(pdev, pci_choose_state(pdev, state)); /* set the state */
-	pci_set_power_state(pdev, state); /* set the state */
 
 	return 0;
 }
diff -ruN linux/drivers/net/sk98lin/sky2.c linux-new/drivers/net/sk98lin/sky2.c
--- linux/drivers/net/sk98lin/sky2.c	2006-01-18 10:51:36.000000000 +0100
+++ linux-new/drivers/net/sk98lin/sky2.c	2005-09-29 10:26:12.000000000 +0200
@@ -33,7 +33,7 @@
 #include "h/skdrv1st.h"
 #include "h/skdrv2nd.h"
 #include <linux/tcp.h>
+#include <linux/ip.h>
-
 /******************************************************************************
  *
  * Local Function Prototypes
@@ -337,7 +337,7 @@
 			PUSH_PKT_AS_LAST_IN_QUEUE(&pAC->TxPort[Port][0].TxQ_free, pSkPacket);
 			POP_FIRST_PKT_FROM_QUEUE(&pAC->TxPort[Port][0].TxAQ_working, pSkPacket);
 		}
+#ifdef USE_SYNC_TX_QUEUE
-#if USE_SYNC_TX_QUEUE
 		POP_FIRST_PKT_FROM_QUEUE(&pAC->TxPort[Port][0].TxSQ_working, pSkPacket);
 		while (pSkPacket != NULL) {
 			if ((pSkFrag = pSkPacket->pFrag) != NULL) {
@@ -902,7 +902,7 @@
 	pAC->TxPort[Port][TX_PRIO_LOW].TxAQ_waiting.pTail = NULL;
 	spin_lock_init(&pAC->TxPort[Port][TX_PRIO_LOW].TxAQ_waiting.QueueLock);
 	
+#ifdef USE_SYNC_TX_QUEUE
-#if USE_SYNC_TX_QUEUE
 	pAC->TxPort[Port][TX_PRIO_LOW].TxSQ_working.pHead = NULL;
 	pAC->TxPort[Port][TX_PRIO_LOW].TxSQ_working.pTail = NULL;
 	spin_lock_init(&pAC->TxPort[Port][TX_PRIO_LOW].TxSQ_working.QueueLock);
@@ -2311,7 +2311,7 @@
 					SK_DBG_MSG(pAC, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC,
 						("No changes for TxA%d\n", Port + 1));
 				}
+#ifdef USE_SYNC_TX_QUEUE
-#if USE_SYNC_TX_QUEUE
 				if (HW_SYNC_TX_SUPPORTED(pAC)) {
 					/* 
 					** Do we have a new Done idx ? 

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [PATCH] 2.6.16: [NETFILTER] Fix Kconfig menu level for x_tables
From: Harald Welte @ 2006-02-13 11:06 UTC (permalink / raw)
  To: David Miller; +Cc: Linux Netdev List, Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]

Hi Dave, please apply this to the 2.6.16 tree and push it to Linus.

Thanks!

[NETFILTER] Fix Kconfig menu level for x_tables

The new x_tables related Kconfig options appear at the wrong menu level
without this patch.

Signed-off-by: Harald Welte <laforge@netfilter.org>

---
commit 2d3e1788278398e3d9f33409066f3232730336a6
tree d23977bfeafb91fdbc5e5400d516ef623cde5a1d
parent 0b2d6ca5297c6343d9ae4c2259f85046e487ed01
author Harald Welte <laforge@netfilter.org> Mon, 13 Feb 2006 12:04:25 +0100
committer Harald Welte <laforge@netfilter.org> Mon, 13 Feb 2006 12:04:25 +0100

 net/netfilter/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 99c0a0f..0e55012 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -102,8 +102,6 @@ config NF_CT_NETLINK
 	help
 	  This option enables support for a netlink-based userspace interface
 
-endmenu
-
 config NETFILTER_XTABLES
 	tristate "Netfilter Xtables support (required for ip_tables)"
 	help
@@ -361,3 +359,5 @@ config NETFILTER_XT_MATCH_TCPMSS
 
 	  To compile it as a module, choose M here.  If unsure, say N.
 
+endmenu
+
-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related

* Re: 2.6.16, sk98lin out of date
From: Matti Aarnio @ 2006-02-13 11:05 UTC (permalink / raw)
  To: Alistair John Strachan; +Cc: netdev, linux-kernel
In-Reply-To: <200602131058.03419.s0348365@sms.ed.ac.uk>

On Mon, Feb 13, 2006 at 10:58:03AM +0000, Alistair John Strachan wrote:
> From:	Alistair John Strachan <s0348365@sms.ed.ac.uk>
> To:	netdev@vger.kernel.org
> Subject: 2.6.16, sk98lin out of date
> Date:	Mon, 13 Feb 2006 10:58:03 +0000
> Cc:	linux-kernel@vger.kernel.org
> 
> Hi,
> 
> As I'm sure the drivers/net maintainers are well aware, SysKonnect constantly 
> update their sk98lin/sky2 driver without bothering to sync their changes with 
> the official linux kernel.

My understanding is, that  skge  driver has superceded the  sk98lin  in
most uses.

There could, of course, be a change to insert vendor driver _as_is_ into
baseline kernel with its own name.


> I quickly downloaded driver version 8.31 from http://www.skd.de/ today and 
> used the install script to generate a diff against 2.6.16-rc3. Even after 
> fixing up some DOS EOLs in the package, the diff was still well over 1.5MBs. 
> This is an enormous number of changes.
> 
> The reason I'm posting is that my DFI LanParty-UT SLI-D works with this 
> version of the driver, but not the version 2.6.16-rc3.
> 
> [alistair] 10:55 [~] dmesg | grep sk98lin
> sk98lin: Could not read VPD data.
> sk98lin: probe of 0000:01:0a.0 failed with error -5
> 
> I wonder if it's worth just identifying the "quick fix" (I've seen
> workarounds for corrupt VPDs like mine) or whether a general merge
> up would be beneficial..

See if  'skge'  driver would work instead of  'sk98lin'  ?

> If nobody's maintaining this driver I wouldn't mind helping out.
> 
> -- 
> Cheers,
> Alistair.

  /Matti Aarnio

^ permalink raw reply

* 2.6.16, sk98lin out of date
From: Alistair John Strachan @ 2006-02-13 10:58 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

Hi,

As I'm sure the drivers/net maintainers are well aware, SysKonnect constantly 
update their sk98lin/sky2 driver without bothering to sync their changes with 
the official linux kernel.

I quickly downloaded driver version 8.31 from http://www.skd.de/ today and 
used the install script to generate a diff against 2.6.16-rc3. Even after 
fixing up some DOS EOLs in the package, the diff was still well over 1.5MBs. 
This is an enormous number of changes.

The reason I'm posting is that my DFI LanParty-UT SLI-D works with this 
version of the driver, but not the version 2.6.16-rc3.

[alistair] 10:55 [~] dmesg | grep sk98lin
sk98lin: Could not read VPD data.
sk98lin: probe of 0000:01:0a.0 failed with error -5

I wonder if it's worth just identifying the "quick fix" (I've seen workarounds 
for corrupt VPDs like mine) or whether a general merge up would be 
beneficial..

If nobody's maintaining this driver I wouldn't mind helping out.

-- 
Cheers,
Alistair.

'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox