All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Exclude DAHDI devices from being probed by netjet
@ 2010-05-29 23:29 Tzafrir Cohen
  2010-05-30 14:07 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Tzafrir Cohen @ 2010-05-29 23:29 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

Many early Zaptel / DAHDI devices were based on the same Netjet PCI
chipset. However they are not the ISDN BRI adapters the netjet driver
expects to driver.

The patch excludes devices based solely on sub-vendor ID. It seems that
all of those drivers probe for that, and I don't have a better way to
check what are the exact sub-product IDs.

Notes:
1. It seems that the same change need also be applied to some hisax
   (i4l) drivers.
2. I don't have more precise data than the PCI ID tables in the drivers.
   Does this run the risk of excluding some actual Netjet ISDN cards?
3. A more informative failure message may help (if one is actually needed).
4. The MAINTAINERS file lists the git tree
   git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/isdn-2.6.git but
   it does not seem to exist.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
---
 drivers/isdn/hardware/mISDN/netjet.c |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index 0a3553d..42dded4 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -1060,9 +1060,33 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	int cfg;
 	struct tiger_hw *card;
 
-	if (pdev->subsystem_vendor == 0x8086 &&
-	    pdev->subsystem_device == 0x0003) {
-		pr_notice("Netjet: Digium X100P/X101P not handled\n");
+	switch (pdev->subsystem_vendor) {
+	/* Fall-through */
+	case 0x2151: /* Yeastart YSTDM8xx (ystdm8xx) */
+	case 0xe16b: /* Zapata Project PCI-Radio (pciradio) */
+	case 0x6159: /* Digium Wildcard T100/E100 (wct1xxp) */
+	case 0x71fe: /* Digium Wildcard TE110P (wcte1xp) */
+	case 0x795e: /* Digium Wildcard TE110P (wcte1xp) */
+	case 0x797e: /* Digium Wildcard TE110P (wcte1xp) */
+	case 0x79de: /* Digium Wildcard TE110P (wcte1xp) */
+	case 0x79df: /* Digium Wildcard TE110P (wcte1xp) */
+	case 0x8084: /* Digium Wildcard X101P clone (wcfxo) */
+	case 0x8085: /* Digium Wildcard X101P (wcfxo) */
+	case 0x8086: /* Digium Wildcard X101P clone (wcfxo) */
+	case 0x8087: /* Digium Wildcard X101P clone (wcfxo) */
+	case 0xa800: /* Digium Wildcard TDM400P Rev H (wctdm) */
+	case 0xa801: /* Digium Wildcard TDM400P Rev H (wctdm) */
+	case 0xa8fd: /* Digium Wildcard TDM400P Rev H (wctdm) */
+	case 0xa901: /* Digium Wildcard TDM400P Rev H (wctdm) */
+	case 0xa908: /* Digium Wildcard TDM400P Rev H (wctdm) */
+	case 0xa9fd: /* Digium Wildcard TDM400P Rev H (wctdm) */
+	case 0xb100: /* Digium Wildcard TDM400P Rev E/F (wctdm) */
+	case 0xb118: /* Digium Wildcard TDM400P Rev I (wctdm) */
+	case 0xb119: /* Digium Wildcard TDM400P Rev I (wctdm) */
+	case 0xb1d9: /* Digium Wildcard TDM400P Rev I (wctdm) */
+	case 0xa159: /* Digium Wildcard S400P Prototype (wctdm) */
+	case 0xe159: /* Digium Wildcard S400P Prototype (wctdm) */
+		pr_notice("Netjet: DAHDI device not supported.\n");
 		return -ENODEV;
 	}
 
-- 
1.7.1


-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen@xorcom.com
+972-50-7952406           mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com  iax:guest@local.xorcom.com/tzafrir

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

* Re: [PATCH] Exclude DAHDI devices from being probed by netjet
  2010-05-29 23:29 [PATCH] Exclude DAHDI devices from being probed by netjet Tzafrir Cohen
@ 2010-05-30 14:07 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2010-05-30 14:07 UTC (permalink / raw)
  To: Tzafrir Cohen; +Cc: netdev, linux-kernel

> 2. I don't have more precise data than the PCI ID tables in the drivers.
>    Does this run the risk of excluding some actual Netjet ISDN cards?

Is there a reason you are seeing so many different vendor values - surely
you should see a single 'Digium' subvendor, and various subdevice values ?


> +	switch (pdev->subsystem_vendor) {
> +	/* Fall-through */
> +	case 0x2151: /* Yeastart YSTDM8xx (ystdm8xx) */
> +	case 0xe16b: /* Zapata Project PCI-Radio (pciradio) */
> +	case 0x6159: /* Digium Wildcard T100/E100 (wct1xxp) */
> +	case 0x71fe: /* Digium Wildcard TE110P (wcte1xp) */
> +	case 0x795e: /* Digium Wildcard TE110P (wcte1xp) */
> +	case 0x797e: /* Digium Wildcard TE110P (wcte1xp) */
> +	case 0x79de: /* Digium Wildcard TE110P (wcte1xp) */
> +	case 0x79df: /* Digium Wildcard TE110P (wcte1xp) */
> +	case 0x8084: /* Digium Wildcard X101P clone (wcfxo) */
> +	case 0x8085: /* Digium Wildcard X101P (wcfxo) */
> +	case 0x8086: /* Digium Wildcard X101P clone (wcfxo) */
> +	case 0x8087: /* Digium Wildcard X101P clone (wcfxo) */
> +	case 0xa800: /* Digium Wildcard TDM400P Rev H (wctdm) */
> +	case 0xa801: /* Digium Wildcard TDM400P Rev H (wctdm) */
> +	case 0xa8fd: /* Digium Wildcard TDM400P Rev H (wctdm) */
> +	case 0xa901: /* Digium Wildcard TDM400P Rev H (wctdm) */
> +	case 0xa908: /* Digium Wildcard TDM400P Rev H (wctdm) */
> +	case 0xa9fd: /* Digium Wildcard TDM400P Rev H (wctdm) */
> +	case 0xb100: /* Digium Wildcard TDM400P Rev E/F (wctdm) */
> +	case 0xb118: /* Digium Wildcard TDM400P Rev I (wctdm) */
> +	case 0xb119: /* Digium Wildcard TDM400P Rev I (wctdm) */
> +	case 0xb1d9: /* Digium Wildcard TDM400P Rev I (wctdm) */
> +	case 0xa159: /* Digium Wildcard S400P Prototype (wctdm) */
> +	case 0xe159: /* Digium Wildcard S400P Prototype (wctdm) */

That might be better as a table. You can then als include the name and
match details in the report which will help diagnose problems with it eg

	struct whatever {
		u16 svid, sdid;
		const char *name;
	}

And then print

	netjet: %s card is not supported by this driver (%04X, %04X).\n", 
		name, svid, sdid

		
Then again we don't seem to have a driver for these other kernel devices
so perhaps the safe default would be to warn and continue unless a module
option is set. At least initially.

Alan

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

end of thread, other threads:[~2010-05-30 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-29 23:29 [PATCH] Exclude DAHDI devices from being probed by netjet Tzafrir Cohen
2010-05-30 14:07 ` Alan Cox

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.