Netdev List
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: j gleacher <jgleacher@yahoo.com>
Cc: jeff@garzik.org, drnlmuller+bugs@gmail.com,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: SIS190.c
Date: Sat, 10 Nov 2007 00:45:07 +0100	[thread overview]
Message-ID: <20071109234507.GA4196@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <327198.23103.qm@web57010.mail.re3.yahoo.com>

j gleacher <jgleacher@yahoo.com> :
[sorry for the delay, I was busy]
> I'm not sure how to properly send you this information about subject,
> but with a new Acer Desktop I needed to add 0x0968 to the below to
> get the eth0 recognized.

Ok. Can you check the patch below against 2.6.24-rc2 ?

diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 7200883..51bbb60 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1549,28 +1549,31 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
 }
 
 /**
- *	sis190_get_mac_addr_from_apc - Get MAC address for SiS965 model
+ *	sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model
  *	@pdev: PCI device
  *	@dev:  network device to get address for
  *
- *	SiS965 model, use APC CMOS RAM to store MAC address.
+ *	SiS96x model, use APC CMOS RAM to store MAC address.
  *	APC CMOS RAM is accessed through ISA bridge.
  *	MAC address is read into @net_dev->dev_addr.
  */
 static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
 						  struct net_device *dev)
 {
+	static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
 	struct sis190_private *tp = netdev_priv(dev);
 	struct pci_dev *isa_bridge;
 	u8 reg, tmp8;
-	int i;
+	unsigned int i;
 
 	net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n",
 		  pci_name(pdev));
 
-	isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL);
-	if (!isa_bridge)
-		isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0966, NULL);
+	for (i = 0; i < ARRAY_SIZE(ids); i++) {
+		isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, ids[i], NULL);
+		if (isa_bridge)
+			break;
+	}
 
 	if (!isa_bridge) {
 		net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n",

> While this enables the interface, the performance is horrible as my
> wlan0 if much faster and eth0 frequently hangs.  I'm learning about
> drivers, so I could help if there is a need to troubleshoot this type
> of issue. 

"hangs" == no network or no computer ?

Please send:
- a complete dmesg (from boot to poor behavior)
- the output of lspci -vvvxxxx
- the output of mii-diag -v ethX
- the content of /proc/interrupts

-- 
Ueimor

           reply	other threads:[~2007-11-09 23:45 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <327198.23103.qm@web57010.mail.re3.yahoo.com>]

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=20071109234507.GA4196@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=drnlmuller+bugs@gmail.com \
    --cc=jeff@garzik.org \
    --cc=jgleacher@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox