Re: [PATCH] phy: export phy_mii_ioctl

2007-09-20 Thread Jeff Garzik

Domen Puncer wrote:

Export phy_mii_ioctl, so network drivers can use it when built
as modules too.

Signed-off-by: Domen Puncer [EMAIL PROTECTED]


applied


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] phy: export phy_mii_ioctl

2007-09-19 Thread Pedro Luis D. L.

Hello Jon,
I´m also working with a Phytec pcm030, but I can´t get it booted...
Which kernel are you using?
I tried to apply the 7 bestcomm patches from Sylvain and patch over these with 
this new ones that Domen released.
The base kernel I´m using is 2.6.22.6 from kernel.org.
Although I used the patch that creates pcm030.c in arch/platforms/52xx/ and 
compiled using this file, it gets halted at booting time.

Bytes transferred = 5091 (13e3 hex)
## Booting image at 0050 ...
   Image Name:   Linux-2.6.22.6
   Created:  2007-09-19   8:53:02 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:1196911 Bytes =  1.1 MB
   Load Address: 
   Entry Point:  
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
   Booting using flat device tree at 0x40

(No more output and boot is halted)


Are you using any other patch for the platform or any other kernel, because I 
tried to apply these patches to a 2.6.20 kernel and are not successful.

Bests,
Pedro.


 Date: Tue, 18 Sep 2007 15:29:09 -0400 From: [EMAIL PROTECTED] 
 To: [EMAIL PROTECTED] Subject: Re: [PATCH] phy: export phy_mii_ioctl 
 CC: netdev@vger.kernel.org; [EMAIL PROTECTED] 
 On 9/18/07, Domen Puncer  wrote: 
 More testing and getting it to work properly on Phytec pcm030 would 
 be great. Do we want to do anything about this? 
 [ 1.569657] net eth0: attached phy 0 to driver Generic PHY 
 [ 2.576013] Sending DHCP requests .PHY: f0003000:00 - Link is Up 
 - 100/Full [ 4.612000] ., OK 
 [ 6.764005] IP-Config: Got DHCP answer from 192.168.1.200, my 
 address is 192.168.1.5
 What is happening is the printk for PHY: f0003000:00 - Link is Up 
 - 100/Full is done in an interrupt and it comes in the middle of the kernel 
 doing DHCP and printing ... without a CR. 
 Two possible solutions, get rid of the link-up message or wait in in 
 the initial driver load until the link is up. Or we could leave it the 
 way it is, but some people may report this as a bug.
 -- Jon Smirl [EMAIL PROTECTED] 
 ___ 
 Linuxppc-embedded mailing list [EMAIL PROTECTED] 
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded

_
Busca desde cualquier página Web con una protección excepcional. Consigue la 
Barra de herramientas de Windows Live hoy mismo y GRATUITAMENTE.
http://www.toolbar.live.com-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] phy: export phy_mii_ioctl

2007-09-19 Thread Pedro Luis D. L.

Hello Jon,
I´m also working with a Phytec pcm030, but I can´t get it booted...
Which kernel are you using?
I tried to apply the 7 bestcomm patches from Sylvain and patch over these with 
this new ones that Domen released.
The base kernel I´m using is 2.6.22.6 from kernel.org.
Although I used the patch that creates pcm030.c in arch/platforms/52xx/ and 
compiled using this file, it gets halted at booting time.

Bytes transferred = 5091 (13e3 hex)
## Booting image at 0050 ...
   Image Name:   Linux-2.6.22.6
   Created:  2007-09-19   8:53:02 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:1196911 Bytes =  1.1 MB
   Load Address: 
   Entry Point:  
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
   Booting using flat device tree at 0x40

(No more output and boot is halted)


Are you using any other patch for the platform or any other kernel, because I 
tried to apply these patches to a 2.6.20 kernel and are not successful.

Bests,
Pedro.


 Date: Tue, 18 Sep 2007 15:29:09 -0400 From: [EMAIL PROTECTED] 
 To: [EMAIL PROTECTED] Subject: Re: [PATCH] phy: export phy_mii_ioctl 
 CC: netdev@vger.kernel.org; [EMAIL PROTECTED] 
 On 9/18/07, Domen Puncer  wrote: 
 More testing and getting it to work properly on Phytec pcm030 would 
 be great. Do we want to do anything about this? 
 [ 1.569657] net eth0: attached phy 0 to driver Generic PHY 
 [ 2.576013] Sending DHCP requests .PHY: f0003000:00 - Link is Up 
 - 100/Full [ 4.612000] ., OK 
 [ 6.764005] IP-Config: Got DHCP answer from 192.168.1.200, my 
 address is 192.168.1.5
 What is happening is the printk for PHY: f0003000:00 - Link is Up 
 - 100/Full is done in an interrupt and it comes in the middle of the kernel 
 doing DHCP and printing ... without a CR. 
 Two possible solutions, get rid of the link-up message or wait in in 
 the initial driver load until the link is up. Or we could leave it the 
 way it is, but some people may report this as a bug.
 -- Jon Smirl [EMAIL PROTECTED] 
 ___ 
 Linuxppc-embedded mailing list [EMAIL PROTECTED] 
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded

_
Busca desde cualquier página Web con una protección excepcional. Consigue la 
Barra de herramientas de Windows Live hoy mismo y GRATUITAMENTE.
http://www.toolbar.live.com-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-19 Thread Juergen Beisert
Pedro,

On Wednesday 19 September 2007 10:54, Pedro Luis D. L. wrote:
 I´m also working with a Phytec pcm030, but I can´t get it booted...
 Which kernel are you using?
 I tried to apply the 7 bestcomm patches from Sylvain and patch over these
 with this new ones that Domen released. The base kernel I´m using is
 2.6.22.6 from kernel.org.
 Although I used the patch that creates pcm030.c in arch/platforms/52xx/ and
 compiled using this file, it gets halted at booting time.

 Bytes transferred = 5091 (13e3 hex)
 ## Booting image at 0050 ...
Image Name:   Linux-2.6.22.6
Created:  2007-09-19   8:53:02 UTC
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:1196911 Bytes =  1.1 MB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using flat device tree at 0x40

 (No more output and boot is halted)

Check your oftree! Most of the time this behaviour means its a wrong oftree in 
use.

Juergen

-- 
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
     Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-19 Thread Domen Puncer
On 18/09/07 15:17 -0400, Jon Smirl wrote:
 On 9/18/07, Domen Puncer [EMAIL PROTECTED] wrote:
  More testing and getting it to work properly on Phytec pcm030 would
  be great.
 
 I compiled it as a module:
   CC [M]  drivers/net/fec_mpc52xx/fec.o
 drivers/net/fec_mpc52xx/fec.c:613: warning: 'mpc52xx_fec_mac_setup'
 defined but not used
 
 This code needs to be enclosed in #ifndef MODULE. But why aren't you
 using module_param() to make a string parameter and then copy it into
 mpc52xx_fec_mac_addr[] if the parameter is not null?

Right,

Patch at the end.
When compiled as module use modprobe fec_mpc52xx mac=foo,
when built-in add to boot line: fec_mpc52xx.mac=foo


As for link-up-printk in the middle of DHCP requests...
is it really that big of a problem?

This sort of things happen when printk doesn't have the whole
line... getting rid of link-up message would just hide it (it can show
ie. when an usb device is bound to scsi layer).


Domen

---
 drivers/net/fec_mpc52xx/fec.c |   18 ++
 1 files changed, 2 insertions(+), 16 deletions(-)

Index: linux.git/drivers/net/fec_mpc52xx/fec.c
===
--- linux.git.orig/drivers/net/fec_mpc52xx/fec.c
+++ linux.git/drivers/net/fec_mpc52xx/fec.c
@@ -53,6 +53,8 @@ static void fec_start(struct net_device 
 static void fec_reset(struct net_device *dev);
 
 static u8 mpc52xx_fec_mac_addr[6];
+module_param_array_named(mac, mpc52xx_fec_mac_addr, byte, NULL, 0);
+MODULE_PARM_DESC(mac, six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe);
 
 static void fec_tx_timeout(struct net_device *dev)
 {
@@ -609,22 +611,6 @@ static void fec_set_multicast_list(struc
}
 }
 
-static int __init mpc52xx_fec_mac_setup(char *mac_address)
-{
-   int i;
-   u64 val64;
-
-   val64 = simple_strtoull(mac_address, NULL, 16);
-
-   for (i = 0; i  6; i++)
-   mpc52xx_fec_mac_addr[5-i] = val64  (i*8);
-
-   return 0;
-}
-
-__setup(mpc52xx-mac=,mpc52xx_fec_mac_setup);
-
-
 /**
  * fec_hw_init
  * @dev: network device
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-19 Thread Jon Smirl
On 9/19/07, Pedro Luis D. L. [EMAIL PROTECTED] wrote:

 Hello Jon,
 I´m also working with a Phytec pcm030, but I can´t get it booted...
 Which kernel are you using?
 I tried to apply the 7 bestcomm patches from Sylvain and patch over these 
 with this new ones that Domen released.
 The base kernel I´m using is 2.6.22.6 from kernel.org.
 Although I used the patch that creates pcm030.c in arch/platforms/52xx/ and 
 compiled using this file, it gets halted at booting time.

 Bytes transferred = 5091 (13e3 hex)
 ## Booting image at 0050 ...
Image Name:   Linux-2.6.22.6
Created:  2007-09-19   8:53:02 UTC
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:1196911 Bytes =  1.1 MB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using flat device tree at 0x40

 (No more output and boot is halted)

The root name of your device tree needs to match the name in  pcm030.c
pcm030_probe(void). If they don't match this happens.

-- 
Jon Smirl
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-19 Thread Jon Smirl
On 9/19/07, Domen Puncer [EMAIL PROTECTED] wrote:
 Patch at the end.
 When compiled as module use modprobe fec_mpc52xx mac=foo,
 when built-in add to boot line: fec_mpc52xx.mac=foo

This patch series is working for me now.

This needs a cleanup too, but it is unrelated

  CC  drivers/serial/mpc52xx_uart.o
drivers/serial/mpc52xx_uart.c: In function 'mpc52xx_console_setup':
drivers/serial/mpc52xx_uart.c:760: warning: format '%lx' expects type
'long unsigned int', but argument 2 has type 'resource_size_t'
drivers/serial/mpc52xx_uart.c: In function 'mpc52xx_uart_of_probe':
drivers/serial/mpc52xx_uart.c:978: warning: format '%lx' expects type
'long unsigned int', but argument 3 has type 'resource_size_t'



-- 
Jon Smirl
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-19 Thread Jon Smirl
On 9/19/07, Jon Smirl [EMAIL PROTECTED] wrote:
 This needs a cleanup too, but it is unrelated

Another set of related warnings that need clean up

  CC  drivers/spi/mpc52xx_psc_spi.o
drivers/spi/mpc52xx_psc_spi.c: In function 'mpc52xx_psc_spi_activate_cs':
drivers/spi/mpc52xx_psc_spi.c:110: warning: passing argument 1 of
'in_be16' from incompatible pointer type
drivers/spi/mpc52xx_psc_spi.c:116: warning: passing argument 1 of
'out_be16' from incompatible pointer type
drivers/spi/mpc52xx_psc_spi.c: In function 'mpc52xx_psc_spi_port_config':
drivers/spi/mpc52xx_psc_spi.c:417: warning: passing argument 1 of
'out_be16' from incompatible pointer type


-- 
Jon Smirl
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-18 Thread Domen Puncer
(I edited Cc: -jeff, +sven, hope you don't mind)

On 17/09/07 18:08 -0400, Jon Smirl wrote:
 On 9/17/07, Domen Puncer [EMAIL PROTECTED] wrote:
  Export phy_mii_ioctl, so network drivers can use it when built
  as modules too.
 
 Domen, do you want to collect all of these changes for MPC5200 FEC in
 to a single patch series? The code is getting scattered around, I'll
 check it over to make sure it is all working. I have these patches
 applied individually and they all work.
 
 It builds on this series:
 [PATCH 0/7] MPC52xx Bestcomm submission for 2.6.24
 
 If you can put this together is a clean series, I should be able to
 layer support for the Phytec pcm030 on top of it.
 
 It would be these three combined...
 
 http://coderock.org/tmp/fec-v3rc1/

http://coderock.org/tmp/fec-v3rc2/
 export_phy_mii_ioctl
 fec_driver-bestcomm 
 fec_driver-dts  
 fec_driver-fec
 fec_driver-phy 

Built (on top of 7 bestcomm patches) and ran it built-in and as module
on Efika.

Order of applying only matters for phy part, which has to be after
the fec driver.


More testing and getting it to work properly on Phytec pcm030 would
be great.



Domen
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-18 Thread Jon Smirl
On 9/18/07, Domen Puncer [EMAIL PROTECTED] wrote:
 More testing and getting it to work properly on Phytec pcm030 would
 be great.

I compiled it as a module:
  CC [M]  drivers/net/fec_mpc52xx/fec.o
drivers/net/fec_mpc52xx/fec.c:613: warning: 'mpc52xx_fec_mac_setup'
defined but not used

This code needs to be enclosed in #ifndef MODULE. But why aren't you
using module_param() to make a string parameter and then copy it into
mpc52xx_fec_mac_addr[] if the parameter is not null?

If it is a module param you need to use
fec_mpc52xx_phy.mpc52xx-mac= instead of just mpc52xx-mac. The
way it is not you can't use mpc52xx-mac when built as a module.

static int __init mpc52xx_fec_mac_setup(char *mac_address)
{
int i;
u64 val64;

val64 = simple_strtoull(mac_address, NULL, 16);

for (i = 0; i  6; i++)
mpc52xx_fec_mac_addr[5-i] = val64  (i*8);

return 0;
}

__setup(mpc52xx-mac=, mpc52xx_fec_mac_setup);



-- 
Jon Smirl
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-18 Thread Jon Smirl
On 9/18/07, Domen Puncer [EMAIL PROTECTED] wrote:
 More testing and getting it to work properly on Phytec pcm030 would
 be great.

Do we want to do anything about this?

[1.569657] net eth0: attached phy 0 to driver Generic PHY
[2.576013] Sending DHCP requests .6PHY: f0003000:00 - Link is Up
- 100/Full
[4.612000] ., OK
[6.764005] IP-Config: Got DHCP answer from 192.168.1.200, my
address is 192.168.1.5

What is happening is the printk for 6PHY: f0003000:00 - Link is Up
- 100/Full is done in an interrupt and it comes in the middle of the
kernel doing DHCP and printing ... without a CR.

Two possible solutions, get rid of the link-up message or wait in in
the initial driver load until the link is up. Or we could leave it the
way it is, but some people may report this as a bug.


-- 
Jon Smirl
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] phy: export phy_mii_ioctl

2007-09-17 Thread Jon Smirl
On 9/17/07, Domen Puncer [EMAIL PROTECTED] wrote:
 Export phy_mii_ioctl, so network drivers can use it when built
 as modules too.

Domen, do you want to collect all of these changes for MPC5200 FEC in
to a single patch series? The code is getting scattered around, I'll
check it over to make sure it is all working. I have these patches
applied individually and they all work.

It builds on this series:
[PATCH 0/7] MPC52xx Bestcomm submission for 2.6.24

If you can put this together is a clean series, I should be able to
layer support for the Phytec pcm030 on top of it.

It would be these three combined...

http://coderock.org/tmp/fec-v3rc1/

diff --git a/drivers/net/fec_mpc52xx/fec.c b/drivers/net/fec_mpc52xx/fec.c
index 922e9a8..c4442e0 100644
--- a/drivers/net/fec_mpc52xx/fec.c
+++ b/drivers/net/fec_mpc52xx/fec.c
@@ -1087,11 +1087,13 @@ static struct of_platform_driver mpc52xx_fec_driver = {
 /*  */
 /* Module   */
 /*  */
+extern int fec_mdio_init(void);
+void fec_mdio_exit(void);

 static int __init
 mpc52xx_fec_init(void)
 {
-#ifdef FEC_MPC52xx_MDIO
+#ifdef CONFIG_FEC_MPC52xx_MDIO
   int ret;
   ret = fec_mdio_init();
   if (ret) {
@@ -1106,7 +1108,7 @@ static void __exit
 mpc52xx_fec_exit(void)
 {
   of_unregister_platform_driver(mpc52xx_fec_driver);
-#ifdef FEC_MPC52xx_MDIO
+#ifdef CONFIG_FEC_MPC52xx_MDIO
   fec_mdio_exit();
 #endif
 }



 Signed-off-by: Domen Puncer [EMAIL PROTECTED]

 ---
 On 17/09/07 11:53 +0200, Sven Luther wrote:
  On Sat, Sep 15, 2007 at 02:14:44PM +0200, Domen Puncer wrote:
   Updated and split version at:
   http://coderock.org/tmp/fec-v3rc1/
  
   I'll repost to lists once I run-test them.
 
  When applying those patches, the build did die with :
 
 
ERROR: phy_mii_ioctl [drivers/net/fec_mpc52xx/fec_mpc52xx.ko] undefined!
 
  Apparently, phy_mii_ioctl is not an exported symbol.
 
  Domen, did you maybe forget a little snipplet when you cut the patches
  in different pieces ? Or did i mess up applying them ?
 
  Friendly,
 
  Sven Luther


  drivers/net/phy/phy.c |1 +
  1 files changed, 1 insertion(+)

 Index: linux.git/drivers/net/phy/phy.c
 ===
 --- linux.git.orig/drivers/net/phy/phy.c
 +++ linux.git/drivers/net/phy/phy.c
 @@ -409,6 +409,7 @@ int phy_mii_ioctl(struct phy_device *phy

 return 0;
  }
 +EXPORT_SYMBOL(phy_mii_ioctl);

  /**
   * phy_start_aneg - start auto-negotiation for this PHY device

 ___
 Linuxppc-embedded mailing list
 [EMAIL PROTECTED]
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded



-- 
Jon Smirl
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html