Seems to me that i've fixed it. The patch would have been quite smaller
if it was not for my bad English. :-)
Rationale:
Attempting to read the ethernet ID directly from the eeprom somehow
confuses ADM8515. Subsequent read requests to either the eeprom or the
MII fail as well. Didn't dig much deeper, though. For example ADM8513
does not experience this problem.
I used the fact that at power up the device is reading its ID
automatically (not true for older Pegasus based devices) and put it in the
Ethernet ID registers. So now the driver uses get_registers() instead of
read_eprom_word() if the device is Pegasus_II based one. Tested it with
all (Pegasus and Pegasus_II) gadgets i have and everything seems ok.
Please apply.
Petko
On Fri, 8 Sep 2006, Andrew Morton wrote:
Begin forwarded message:
Date: Fri, 8 Sep 2006 12:42:39 -0700
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [Bugme-new] [Bug 7126] New: Pegasus driver failing for ADMtek 8515
network device
http://bugzilla.kernel.org/show_bug.cgi?id=7126
Summary: Pegasus driver failing for ADMtek 8515 network device
Kernel Version: 2.6.17-1.2174_FC5
Status: NEW
Severity: normal
Owner: [EMAIL PROTECTED]
Submitter: [EMAIL PROTECTED]
Most recent kernel where this bug did not occur: Never
Distribution: Fedora Core 5
Hardware Environment:Fujitsu 2210 laptop with Targus Universal docking station
using a ADMtek 8515 network card
Software Environment:
Problem Description:
When attempting to run the pegasus driver on the ADMtek 8515 USB network card at
boot up I get these errors in dmesg.
pegasus 3-2.6:1.0: fail read_mii_word
And returns my MAC address as 00:50:00:50:00:50 but the modules is loaded.
When I restarted the module I get these errors in the my logs
Sep 8 12:32:34 cheopa-laptop kernel: pegasus 3-2.6:1.0: fail read_eprom_word
Sep 8 12:32:34 cheopa-laptop kernel: pegasus 3-2.6:1.0: can't reset MAC
Sep 8 12:32:34 cheopa-laptop kernel: pegasus: probe of 3-2.6:1.0 failed with
error -5
Steps to reproduce:
Connect the Targus ACP50US Universal to one of the usb ports.
Boot up computer.
After bootup see the output from dmesg and /var/log/messages.
ifconfig -a , to see the MAC addresss.
lsmod | grep pegasus , to see the module is loaded in memory.
modprobe -r pegasus.
modprobe pegasus.
See the output from dmesg and /var/log/messages.
lsmod | grep pegasus , to see the module is loaded in memory.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
--- drivers/usb/net/pegasus.c 2006-09-20 09:52:12.000000000 +0300
+++ /home/petkan/src/pegasus/v2.6/pegasus.c 2006-09-27 18:51:43.000000000
+0300
@@ -45,7 +45,7 @@
/*
* Version Information
*/
-#define DRIVER_VERSION "v0.6.13 (2005/11/13)"
+#define DRIVER_VERSION "v0.6.14 (2006/09/27)"
#define DRIVER_AUTHOR "Petko Manolov <[EMAIL PROTECTED]>"
#define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
@@ -339,7 +339,7 @@
}
fail:
if (netif_msg_drv(pegasus))
- dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__);
+ dev_warn(&pegasus->intf->dev, "%s failed\n", __FUNCTION__);
return ret;
}
@@ -376,7 +376,7 @@
fail:
if (netif_msg_drv(pegasus))
- dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__);
+ dev_warn(&pegasus->intf->dev, "%s failed\n", __FUNCTION__);
return -ETIMEDOUT;
}
@@ -413,7 +413,7 @@
fail:
if (netif_msg_drv(pegasus))
- dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__);
+ dev_warn(&pegasus->intf->dev, "%s failed\n", __FUNCTION__);
return -ETIMEDOUT;
}
@@ -461,7 +461,7 @@
return ret;
fail:
if (netif_msg_drv(pegasus))
- dev_warn(&pegasus->intf->dev, "fail %s\n", __FUNCTION__);
+ dev_warn(&pegasus->intf->dev, "%s failed\n", __FUNCTION__);
return -ETIMEDOUT;
}
#endif /* PEGASUS_WRITE_EEPROM */
@@ -481,8 +481,12 @@
{
__u8 node_id[6];
- get_node_id(pegasus, node_id);
- set_registers(pegasus, EthID, sizeof (node_id), node_id);
+ if (pegasus->features & PEGASUS_II) {
+ get_registers(pegasus, 0x10, sizeof(node_id), node_id);
+ } else {
+ get_node_id(pegasus, node_id);
+ set_registers(pegasus, EthID, sizeof (node_id), node_id);
+ }
memcpy(pegasus->net->dev_addr, node_id, sizeof (node_id));
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel