* Binding FCC interfaces to device names in reverse order
@ 2006-06-15 11:59 Laurent Pinchart
2006-06-15 12:17 ` John Otken
2006-06-15 12:53 ` Vitaly Bordug
0 siblings, 2 replies; 4+ messages in thread
From: Laurent Pinchart @ 2006-06-15 11:59 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I'm trying to change the order in which the MPC8248 FCC devices are bound to
network interface names.
The current behaviour is to handle FCC1, FCC2 and FCC3 in that order. FCC1 is
thus mapped to eth0 and FCC2 to eth1 (FCC3 is unused in my design).
For some reason I'd like to map FCC2 to eth0 and FCC1 to eth1. Interface names
are allocated as devices are registered, so I thought I could change the
detection order by modifying the ppc_sys_platform_devices array:
ppc_sys_platform_devices[MPC82xx_CPM_FCC1].id = 2;
ppc_sys_platform_devices[MPC82xx_CPM_FCC2].id = 1;
FCC devices detection is indeed reversed, and FCC2 is mapped to eth0. Plugging
a cable into the FCC2 socket prints a message referencing eth0, and ifconfig
confirms that eth0 is running.
Unfortunately, that's where things stop working. I can't ping FCC1 or FCC2, no
data is received by the kernel.
Does anyone know why changing the device ids breaks the fs_enet driver ?
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Binding FCC interfaces to device names in reverse order
2006-06-15 11:59 Binding FCC interfaces to device names in reverse order Laurent Pinchart
@ 2006-06-15 12:17 ` John Otken
2006-06-15 12:53 ` Vitaly Bordug
1 sibling, 0 replies; 4+ messages in thread
From: John Otken @ 2006-06-15 12:17 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
Does it work if you plug a cable into both Ethernets? If so, then
your PHYs might not be correctly mapped.
Laurent Pinchart wrote:
> Hello,
>
> I'm trying to change the order in which the MPC8248 FCC devices are bound to
> network interface names.
>
> The current behaviour is to handle FCC1, FCC2 and FCC3 in that order. FCC1 is
> thus mapped to eth0 and FCC2 to eth1 (FCC3 is unused in my design).
>
> For some reason I'd like to map FCC2 to eth0 and FCC1 to eth1. Interface names
> are allocated as devices are registered, so I thought I could change the
> detection order by modifying the ppc_sys_platform_devices array:
>
> ppc_sys_platform_devices[MPC82xx_CPM_FCC1].id = 2;
> ppc_sys_platform_devices[MPC82xx_CPM_FCC2].id = 1;
>
> FCC devices detection is indeed reversed, and FCC2 is mapped to eth0. Plugging
> a cable into the FCC2 socket prints a message referencing eth0, and ifconfig
> confirms that eth0 is running.
>
> Unfortunately, that's where things stop working. I can't ping FCC1 or FCC2, no
> data is received by the kernel.
>
> Does anyone know why changing the device ids breaks the fs_enet driver ?
>
> Laurent Pinchart
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Binding FCC interfaces to device names in reverse order
2006-06-15 11:59 Binding FCC interfaces to device names in reverse order Laurent Pinchart
2006-06-15 12:17 ` John Otken
@ 2006-06-15 12:53 ` Vitaly Bordug
2006-06-16 14:50 ` Laurent Pinchart
1 sibling, 1 reply; 4+ messages in thread
From: Vitaly Bordug @ 2006-06-15 12:53 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
On Thu, 15 Jun 2006 13:59:02 +0200
Laurent Pinchart <laurent.pinchart@tbox.biz> wrote:
> Hello,
>
> I'm trying to change the order in which the MPC8248 FCC devices are bound to
> network interface names.
>
> The current behaviour is to handle FCC1, FCC2 and FCC3 in that order. FCC1 is
> thus mapped to eth0 and FCC2 to eth1 (FCC3 is unused in my design).
>
> For some reason I'd like to map FCC2 to eth0 and FCC1 to eth1. Interface names
> are allocated as devices are registered, so I thought I could change the
> detection order by modifying the ppc_sys_platform_devices array:
>
> ppc_sys_platform_devices[MPC82xx_CPM_FCC1].id = 2;
> ppc_sys_platform_devices[MPC82xx_CPM_FCC2].id = 1;
>
> FCC devices detection is indeed reversed, and FCC2 is mapped to eth0. Plugging
> a cable into the FCC2 socket prints a message referencing eth0, and ifconfig
> confirms that eth0 is running.
>
> Unfortunately, that's where things stop working. I can't ping FCC1 or FCC2, no
> data is received by the kernel.
>
> Does anyone know why changing the device ids breaks the fs_enet driver ?
Obviously, because board-specific platform_data fixup use that id field to detect what soc device is that - fcc1 or fcc2 this case. So the phy's will be wrong-assigned, as well as other stuff.
To change order pdevs are registered, you may try to disable all the fccs at the startup, and then enable them after ppc_sys_init, or just shoot enable-disable seq (this was't tested at all, but supposed to work).
>
> Laurent Pinchart
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
--
Sincerely,
Vitaly
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Binding FCC interfaces to device names in reverse order
2006-06-15 12:53 ` Vitaly Bordug
@ 2006-06-16 14:50 ` Laurent Pinchart
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2006-06-16 14:50 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded
> > Does anyone know why changing the device ids breaks the fs_enet driver ?
>
> Obviously, because board-specific platform_data fixup use that id field to
> detect what soc device is that - fcc1 or fcc2 this case. So the phy's will
> be wrong-assigned, as well as other stuff.
>
> To change order pdevs are registered, you may try to disable all the fccs
> at the startup, and then enable them after ppc_sys_init, or just shoot
> enable-disable seq (this was't tested at all, but supposed to work).
Enabling the FCCs in a device_initcall() call instead of arch_initcall()
works. I had to call ppc_sys_device_fixup manually.
Thanks for your help.
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-16 14:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 11:59 Binding FCC interfaces to device names in reverse order Laurent Pinchart
2006-06-15 12:17 ` John Otken
2006-06-15 12:53 ` Vitaly Bordug
2006-06-16 14:50 ` Laurent Pinchart
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).