Great, now add the following patch below and let me know what it does
and prints out now.
If the module still fails to load because of the -EBUSY error (ie. the
"read_partno returns -19" thing happens again), bring
drivers/net/tg3.c into an editor and go to around line 4185 and change
the line that reads:
while (--limit) {
into:
while (1) {
And see if it works then. PLEASE type sync a few times before trying
to load the module in this case as it could very well hang your
machine.
Thanks again for all the testing so far:
--- drivers/net/tg3.c.~2~ Mon Feb 25 17:51:41 2002
+++ drivers/net/tg3.c Tue Feb 26 18:51:33 2002
@@ -4168,16 +4168,18 @@
static int __devinit tg3_read_partno(struct tg3 *tp)
{
unsigned char vpd_data[256];
+ unsigned int smallest_limit = ~0U;
int i;
/* Enable seeprom accesses. */
- tw32(GRC_LOCAL_CTRL, GRC_LCLCTRL_AUTO_SEEPROM);
+ tw32(GRC_LOCAL_CTRL,
+ tr32(GRC_LOCAL_CTRL) | GRC_LCLCTRL_AUTO_SEEPROM);
udelay(100);
for (i = 0; i < 256; i += 4) {
u32 tmp;
u16 stat;
- int limit = 5000;
+ unsigned int limit = 100000;
pci_write_config_word(tp->pdev, TG3PCI_VPD_ADDR_FLAG, i);
while (--limit) {
@@ -4188,6 +4190,8 @@
}
if (!limit)
return -EBUSY;
+ if (limit < smallest_limit)
+ smallest_limit = limit;
pci_read_config_dword(tp->pdev, TG3PCI_VPD_DATA, &tmp);
@@ -4196,6 +4200,8 @@
vpd_data[i + 2] = ((tmp >> 16) & 0xff);
vpd_data[i + 3] = ((tmp >> 24) & 0xff);
}
+
+ printk("DEBUG: smallest_limit is %u\n", smallest_limit);
/* Now parse and find the part number. */
for (i = 0; i < 256; ) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/