aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Halasa <khc@pm.waw.pl>2006-03-30 10:01:53 -0500
committerJeff Garzik <jeff@garzik.org>2006-04-01 14:32:52 -0500
commit58a7ce64426394a46e80cdc9440cc1e7c195e85d (patch)
treea33f3a552c22deb4a47976eb67d1a557d7fed29e
parentb0348b90a4a8149e5a0df312ab7810793ba7b3a4 (diff)
[PATCH] Goramo PCI200SYN WAN driver subsystem ID patch
Goramo finally got PCI subsystem ID for their PCI200SYN card. The attached patch adds support for it - cards with old EEPROM data will emit a warning with URL for update tool. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/wan/pci200syn.c27
-rw-r--r--include/linux/pci_ids.h1
2 files changed, 18 insertions, 10 deletions
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c
index eba8e5cfacc2..f485a97844cc 100644
--- a/drivers/net/wan/pci200syn.c
+++ b/drivers/net/wan/pci200syn.c
@@ -50,10 +50,6 @@ static const char* devname = "PCI200SYN";
50static int pci_clock_freq = 33000000; 50static int pci_clock_freq = 33000000;
51#define CLOCK_BASE pci_clock_freq 51#define CLOCK_BASE pci_clock_freq
52 52
53#define PCI_VENDOR_ID_GORAMO 0x10B5 /* uses PLX:9050 ID - this card */
54#define PCI_DEVICE_ID_PCI200SYN 0x9050 /* doesn't have its own ID */
55
56
57/* 53/*
58 * PLX PCI9052 local configuration and shared runtime registers. 54 * PLX PCI9052 local configuration and shared runtime registers.
59 * This structure can be used to access 9052 registers (memory mapped). 55 * This structure can be used to access 9052 registers (memory mapped).
@@ -262,7 +258,7 @@ static void pci200_pci_remove_one(struct pci_dev *pdev)
262 int i; 258 int i;
263 card_t *card = pci_get_drvdata(pdev); 259 card_t *card = pci_get_drvdata(pdev);
264 260
265 for(i = 0; i < 2; i++) 261 for (i = 0; i < 2; i++)
266 if (card->ports[i].card) { 262 if (card->ports[i].card) {
267 struct net_device *dev = port_to_dev(&card->ports[i]); 263 struct net_device *dev = port_to_dev(&card->ports[i]);
268 unregister_hdlc_device(dev); 264 unregister_hdlc_device(dev);
@@ -385,6 +381,15 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
385 " %u RX packets rings\n", ramsize / 1024, ramphys, 381 " %u RX packets rings\n", ramsize / 1024, ramphys,
386 pdev->irq, card->tx_ring_buffers, card->rx_ring_buffers); 382 pdev->irq, card->tx_ring_buffers, card->rx_ring_buffers);
387 383
384 if (pdev->subsystem_device == PCI_DEVICE_ID_PLX_9050) {
385 printk(KERN_ERR "Detected PCI200SYN card with old "
386 "configuration data.\n");
387 printk(KERN_ERR "See <http://www.kernel.org/pub/"
388 "linux/utils/net/hdlc/pci200syn/> for update.\n");
389 printk(KERN_ERR "The card will stop working with"
390 " future versions of Linux if not updated.\n");
391 }
392
388 if (card->tx_ring_buffers < 1) { 393 if (card->tx_ring_buffers < 1) {
389 printk(KERN_ERR "pci200syn: RAM test failed\n"); 394 printk(KERN_ERR "pci200syn: RAM test failed\n");
390 pci200_pci_remove_one(pdev); 395 pci200_pci_remove_one(pdev);
@@ -396,7 +401,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
396 writew(readw(p) | 0x0040, p); 401 writew(readw(p) | 0x0040, p);
397 402
398 /* Allocate IRQ */ 403 /* Allocate IRQ */
399 if(request_irq(pdev->irq, sca_intr, SA_SHIRQ, devname, card)) { 404 if (request_irq(pdev->irq, sca_intr, SA_SHIRQ, devname, card)) {
400 printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n", 405 printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n",
401 pdev->irq); 406 pdev->irq);
402 pci200_pci_remove_one(pdev); 407 pci200_pci_remove_one(pdev);
@@ -406,7 +411,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
406 411
407 sca_init(card, 0); 412 sca_init(card, 0);
408 413
409 for(i = 0; i < 2; i++) { 414 for (i = 0; i < 2; i++) {
410 port_t *port = &card->ports[i]; 415 port_t *port = &card->ports[i];
411 struct net_device *dev = port_to_dev(port); 416 struct net_device *dev = port_to_dev(port);
412 hdlc_device *hdlc = dev_to_hdlc(dev); 417 hdlc_device *hdlc = dev_to_hdlc(dev);
@@ -425,7 +430,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
425 hdlc->xmit = sca_xmit; 430 hdlc->xmit = sca_xmit;
426 port->settings.clock_type = CLOCK_EXT; 431 port->settings.clock_type = CLOCK_EXT;
427 port->card = card; 432 port->card = card;
428 if(register_hdlc_device(dev)) { 433 if (register_hdlc_device(dev)) {
429 printk(KERN_ERR "pci200syn: unable to register hdlc " 434 printk(KERN_ERR "pci200syn: unable to register hdlc "
430 "device\n"); 435 "device\n");
431 port->card = NULL; 436 port->card = NULL;
@@ -445,8 +450,10 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
445 450
446 451
447static struct pci_device_id pci200_pci_tbl[] __devinitdata = { 452static struct pci_device_id pci200_pci_tbl[] __devinitdata = {
448 { PCI_VENDOR_ID_GORAMO, PCI_DEVICE_ID_PCI200SYN, PCI_ANY_ID, 453 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_PLX,
449 PCI_ANY_ID, 0, 0, 0 }, 454 PCI_DEVICE_ID_PLX_9050, 0, 0, 0 },
455 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_PLX,
456 PCI_DEVICE_ID_PLX_PCI200SYN, 0, 0, 0 },
450 { 0, } 457 { 0, }
451}; 458};
452 459
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 870fe38378b1..6a1ef8b635c5 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -930,6 +930,7 @@
930#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151 930#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151
931#define PCI_DEVICE_ID_PLX_R753 0x1152 931#define PCI_DEVICE_ID_PLX_R753 0x1152
932#define PCI_DEVICE_ID_PLX_OLITEC 0x1187 932#define PCI_DEVICE_ID_PLX_OLITEC 0x1187
933#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196
933#define PCI_DEVICE_ID_PLX_9050 0x9050 934#define PCI_DEVICE_ID_PLX_9050 0x9050
934#define PCI_DEVICE_ID_PLX_9080 0x9080 935#define PCI_DEVICE_ID_PLX_9080 0x9080
935#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 936#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001