LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniele Venzano <webvenza@libero.it>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Cc: Eric BENARD / Free <ebenard@free.fr>
Subject: Re: [PATCH] Sis900 bug fixes 2/4
Date: Tue, 18 May 2004 14:22:09 +0200	[thread overview]
Message-ID: <20040518122209.GE23565@picchio.gall.it> (raw)
In-Reply-To: <20040518120237.GC23565@picchio.gall.it>


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

Patch 2 of 4

Add new ISA bridge PCI ID

I added some constants to make the code more readable and modified the if
body to check for another ID in case the first check fails.

Any comment is highly appreciated.

-- 
-----------------------------
Daniele Venzano
Web: http://teg.homeunix.org


[-- Attachment #1.2: sis900-isa-bridge-id.diff --]
[-- Type: text/plain, Size: 1475 bytes --]

diff -Naru -X /home/venza/kernel/dontdiff linux-2.6.6/drivers/net/sis900.c linux-sis900/drivers/net/sis900.c
--- linux-2.6.6/drivers/net/sis900.c	2004-04-04 22:31:55.000000000 +0200
+++ linux-sis900/drivers/net/sis900.c	2004-05-18 10:51:39.000000000 +0200
@@ -260,9 +260,13 @@
 	u8 reg;
 	int i;
 
-	if ((isa_bridge = pci_find_device(0x1039, 0x0008, isa_bridge)) == NULL) {
-		printk("%s: Can not find ISA bridge\n", net_dev->name);
-		return 0;
+	isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, SIS630E_ISA_BRIDGE_ID_1, isa_bridge);
+	if (!isa_bridge) {
+		isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, SIS630E_ISA_BRIDGE_ID_2, isa_bridge);
+		if (!isa_bridge) {
+			printk("%s: Can not find ISA bridge\n", net_dev->name);
+			return 0;
+		}
 	}
 	pci_read_config_byte(isa_bridge, 0x48, &reg);
 	pci_write_config_byte(isa_bridge, 0x48, reg | 0x40);
diff -Naru -X /home/venza/kernel/dontdiff linux-2.6.6/drivers/net/sis900.h linux-sis900/drivers/net/sis900.h
--- linux-2.6.6/drivers/net/sis900.h	2003-06-17 06:19:41.000000000 +0200
+++ linux-sis900/drivers/net/sis900.h	2004-05-18 10:49:50.000000000 +0200
@@ -274,6 +274,9 @@
 #define TX_TOTAL_SIZE	NUM_TX_DESC*sizeof(BufferDesc)
 #define RX_TOTAL_SIZE	NUM_RX_DESC*sizeof(BufferDesc)
 
+#define SIS630E_ISA_BRIDGE_ID_1	0x0008	
+#define SIS630E_ISA_BRIDGE_ID_2	0x0018	
+
 /* PCI stuff, should be move to pci.h */
 #define SIS630_VENDOR_ID        0x1039
 #define SIS630_DEVICE_ID        0x0630

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

  parent reply	other threads:[~2004-05-18 12:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-18 12:02 [PATCH] Sis900 bug fixes 0/4 Daniele Venzano
2004-05-18 12:18 ` [PATCH] Sis900 bug fixes 1/4 Daniele Venzano
2004-05-18 12:22 ` Daniele Venzano [this message]
2004-05-18 12:30 ` [PATCH] Sis900 bug fixes 3/4 Daniele Venzano
2004-05-18 12:39   ` Daniele Venzano
2004-05-19 14:28   ` Daniele Venzano
2004-05-19 23:58     ` Jeff Garzik
2004-05-18 12:33 ` [PATCH] Sis900 bug fixes 4/4 Daniele Venzano
2004-05-18 13:39 ` [PATCH] Sis900 bug fixes 0/4 Dominik Karall
2004-05-19  6:57   ` Grischa Jacobs
2004-05-18 14:23 ` Dominik Karall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040518122209.GE23565@picchio.gall.it \
    --to=webvenza@libero.it \
    --cc=akpm@osdl.org \
    --cc=ebenard@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] Sis900 bug fixes 2/4' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).