mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: How to handle more than one network device in barebox
Date: Thu, 17 Feb 2011 11:57:14 +0100	[thread overview]
Message-ID: <201102171157.14757.jbe@pengutronix.de> (raw)

Hi,

due to the fact (all?) network device drivers in barebox are using xzalloc to 
allocate their "struct eth_device" the embedded "struct dev's" '.id' is 
always '0'. So the registration of a second network device fails always with

 register_device: already registered eth0

Currently there is no way to overwrite the network device's ID. If I init 
the "edev->dev.id" with '-1', it works. But it would be nice to define the 
network device ordering from inside the platform (and not only with the order 
I register the base devices). And copying the ".id" from the registered base 
device also does not work if the network devices are of different type, due 
to the framework starts with index 0 for different names.

Any ideas how to?

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2011-02-17 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17 10:57 Juergen Beisert [this message]
2011-02-17 11:24 ` Sascha Hauer

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=201102171157.14757.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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