* Pegasus: Bug / Correction (?)
@ 2009-08-13 10:11 Davide Rizzo
2009-08-14 17:24 ` petkan
0 siblings, 1 reply; 3+ messages in thread
From: Davide Rizzo @ 2009-08-13 10:11 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
petkan-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f
Bug Correction
ADM8515 fails to read central 2 bytes of MAC address
This patch solves the problem, but I didn't understand it.
Signed-off-by: Davide Rizzo <elpa.rizzo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff -urNp linux-2.6.30.4/drivers/net/usb/pegasus.c
linux-2.6.30.4.elpa/drivers/net/usb/pegasus.c
--- linux-2.6.30.4/drivers/net/usb/pegasus.c 2009-08-13 07:14:57.000000000 +0200
+++ linux-2.6.30.4.elpa/drivers/net/usb/pegasus.c 2009-08-13
08:39:01.000000000 +0200
@@ -425,7 +425,6 @@ fail:
static inline void enable_eprom_write(pegasus_t * pegasus)
{
__u8 tmp;
- int ret;
get_registers(pegasus, EthCtrl2, 1, &tmp);
set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE);
@@ -434,7 +433,6 @@ static inline void enable_eprom_write(pe
static inline void disable_eprom_write(pegasus_t * pegasus)
{
__u8 tmp;
- int ret;
get_registers(pegasus, EthCtrl2, 1, &tmp);
set_register(pegasus, EpromCtrl, 0);
@@ -486,9 +525,9 @@ static void set_ethernet_addr(pegasus_t
{
__u8 node_id[6];
- if (pegasus->features & PEGASUS_II) {
+/*if (pegasus->features & PEGASUS_II) {
get_registers(pegasus, 0x10, sizeof(node_id), node_id);
- } else {
+ } else*/ {
get_node_id(pegasus, node_id);
set_registers(pegasus, EthID, sizeof (node_id), node_id);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Pegasus: Bug / Correction (?)
2009-08-13 10:11 Pegasus: Bug / Correction (?) Davide Rizzo
@ 2009-08-14 17:24 ` petkan
[not found] ` <e315af7ef85836e3c6dcdf6e1a6f5583.squirrel-nPnTwAqkgEqakBO8gow8eQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: petkan @ 2009-08-14 17:24 UTC (permalink / raw)
To: Davide Rizzo; +Cc: linux-usb, netdev, petkan
Not good - the correction will disable set_address for older controllers.
Have you tried this code on a different device?
Petko
> Bug Correction
> ADM8515 fails to read central 2 bytes of MAC address
> This patch solves the problem, but I didn't understand it.
>
> Signed-off-by: Davide Rizzo <elpa.rizzo@gmail.com>
> ---
> diff -urNp linux-2.6.30.4/drivers/net/usb/pegasus.c
> linux-2.6.30.4.elpa/drivers/net/usb/pegasus.c
> --- linux-2.6.30.4/drivers/net/usb/pegasus.c 2009-08-13 07:14:57.000000000
> +0200
> +++ linux-2.6.30.4.elpa/drivers/net/usb/pegasus.c 2009-08-13
> 08:39:01.000000000 +0200
> @@ -425,7 +425,6 @@ fail:
> static inline void enable_eprom_write(pegasus_t * pegasus)
> {
> __u8 tmp;
> - int ret;
>
> get_registers(pegasus, EthCtrl2, 1, &tmp);
> set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE);
> @@ -434,7 +433,6 @@ static inline void enable_eprom_write(pe
> static inline void disable_eprom_write(pegasus_t * pegasus)
> {
> __u8 tmp;
> - int ret;
>
> get_registers(pegasus, EthCtrl2, 1, &tmp);
> set_register(pegasus, EpromCtrl, 0);
> @@ -486,9 +525,9 @@ static void set_ethernet_addr(pegasus_t
> {
> __u8 node_id[6];
>
> - if (pegasus->features & PEGASUS_II) {
> +/*if (pegasus->features & PEGASUS_II) {
> get_registers(pegasus, 0x10, sizeof(node_id), node_id);
> - } else {
> + } else*/ {
> get_node_id(pegasus, node_id);
> set_registers(pegasus, EthID, sizeof (node_id), node_id);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-15 5:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-13 10:11 Pegasus: Bug / Correction (?) Davide Rizzo
2009-08-14 17:24 ` petkan
[not found] ` <e315af7ef85836e3c6dcdf6e1a6f5583.squirrel-nPnTwAqkgEqakBO8gow8eQ@public.gmane.org>
2009-08-15 5:57 ` Davide Rizzo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox