netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@linux.it>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: jgarzik@pobox.com, netdev@vger.kernel.org,
	Linux-MIPS <linux-mips@linux-mips.org>
Subject: Re: [PATCH] au1000_eth.c Power Management, driver registration and module support
Date: Tue, 2 May 2006 17:09:14 +0200	[thread overview]
Message-ID: <20060502150914.GE20543@gundam.enneenne.com> (raw)
In-Reply-To: <4446857D.90507@ru.mvista.com>

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-05-02 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060405154711.GL7029@enneenne.com>
     [not found] ` <20060405222332.GO7029@enneenne.com>
     [not found]   ` <20060405222620.GP7029@enneenne.com>
     [not found]     ` <4435290C.50607@ru.mvista.com>
     [not found]       ` <20060406155011.GC23424@enneenne.com>
2006-04-19 18:46         ` [PATCH] au1000_eth.c probe code straightened up Sergei Shtylyov
2006-05-02 15:09           ` Rodolfo Giometti [this message]
2006-05-03  7:47             ` [PATCH] au1000_eth.c Power Management, driver registration and module support Rodolfo Giometti
2006-05-31 15:01             ` Sergei Shtylyov
2006-05-31 15:21               ` Rodolfo Giometti

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=20060502150914.GE20543@gundam.enneenne.com \
    --to=giometti@linux.it \
    --cc=jgarzik@pobox.com \
    --cc=linux-mips@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.com \
    /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;
as well as URLs for NNTP newsgroup(s).