linux-mips
[Top] [All Lists]

Re: [PATCH] au1000_eth.c Power Management, driver registration and modul

To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Subject: Re: [PATCH] au1000_eth.c Power Management, driver registration and module support
From: Rodolfo Giometti <giometti@linux.it>
Date: Tue, 2 May 2006 17:09:14 +0200
Cc: jgarzik@pobox.com, netdev@vger.kernel.org, Linux-MIPS <linux-mips@linux-mips.org>
In-reply-to: <4446857D.90507@ru.mvista.com>
Organization: GNU/Linux Device Drivers, Embedded Systems and Courses
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060405154711.GL7029@enneenne.com> <20060405222332.GO7029@enneenne.com> <20060405222620.GP7029@enneenne.com> <4435290C.50607@ru.mvista.com> <20060406155011.GC23424@enneenne.com> <4446857D.90507@ru.mvista.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.5.1+cvs20040105i
Hello,

here:

   
http://ftp.enneenne.com/pub/misc/au1100-patches/linux/patch-au1000_eth-pm-and-registration

the new version of my patch for au1000_eth.c who should implement:

* Module support.

   -    bool "MIPS AU1000 Ethernet support"
   +    tristate "MIPS AU1000 Ethernet support"

* Driver registration.

   +static int __init au1000_eth_init(void)
   +{
   +    return driver_register(&au1000_driver);
   +}
   +
   +static void __exit au1000_eth_cleanup(void)
   +{
   +    driver_unregister(&au1000_driver);
   +}      

* Power Management.

   +#ifdef CONFIG_PM
   +    .suspend        = au1000_drv_suspend,
   +    .resume         = au1000_drv_resume,
   +#endif

Also, as suggested by Sergei it:

* uses physical addresses and not KSEG1-based virtual anymore and
  claims/releases the 4-byte MAC enable registers:

   wwpc:~# cat /proc/iomem
   10500000-1050ffff : eth-base
   10520000-10520003 : eth-mac
      
* assigns to the Ethernet ports two consecutive MAC addresses:

   -            dev->dev_addr[4] += 0x10;
   +                            ((unsigned long) macen_addr);
   +            memcpy(ndev->dev_addr, au1000_mac_addr, 
sizeof(au1000_mac_addr));
   +            ndev->dev_addr[5] += 0x01;
      
Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                                giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>