Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - BCM5709S: Page 1 of 2 (11 Items)
   
BCM5709S  
I am trying to modify the FreeBSD code if_bnx.c to include support for BCM5709S chipset. As part of that, I would like 
to know where should I add the routine to initialzing 5709 for SERDES mode of operation. Does it have to be under /sys/
dev/mii directory? I see a buch of files there with support for diffrenet PHY types.

Secondly, what is the chain of function calls that would finally lead to that init routine being called. 

Thanks for your help


Tanmay
RE: BCM5709S  
Unfortuantely, we don't have any SERDES hardware implementations
in-house... sys/dev/mii generally does deal with specific PHY
implementations, but unless there's a specific SERDES implementation in
the FreeBSD if_bnx code, there shouldn't be any need to update that
portion of the library.  If this is custom code, I'd say that the best
place to do it will likely be in the hardware initialization function
which is called whenever the interface is configured.

  R.

-----Original Message-----
From: Tanmay Kishore [mailto:community-noreply@qnx.com] 
Sent: Wednesday, March 25, 2009 9:57 PM
To: drivers-networking
Subject: BCM5709S

I am trying to modify the FreeBSD code if_bnx.c to include support for
BCM5709S chipset. As part of that, I would like to know where should I
add the routine to initialzing 5709 for SERDES mode of operation. Does
it have to be under /sys/dev/mii directory? I see a buch of files there
with support for diffrenet PHY types.

Secondly, what is the chain of function calls that would finally lead to
that init routine being called. 

Thanks for your help


Tanmay

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post25270
Re: RE: BCM5709S  
Thanks!!! I will try the freeBSD code without any modification for SERDES and see what happens. On a differenet note, 
when I try to load io-pkt using the following command:

io-pkt-v4 -d bnx,

I get the following error: unknown symbol: pci_get_function. pci_get_function is a FreeBSD function. What is its 
equivalent in QNX?


Thanks again for your help.

Tanmay. 
RE: RE: BCM5709S  
I had a quick look through the NetBSD bnx source and couldn't find that
function.  Where is it getting called from?

	R 

-----Original Message-----
From: Tanmay Kishore [mailto:community-noreply@qnx.com] 
Sent: Thursday, March 26, 2009 2:42 PM
To: drivers-networking
Subject: Re: RE: BCM5709S

Thanks!!! I will try the freeBSD code without any modification for
SERDES and see what happens. On a differenet note, when I try to load
io-pkt using the following command:

io-pkt-v4 -d bnx,

I get the following error: unknown symbol: pci_get_function.
pci_get_function is a FreeBSD function. What is its equivalent in QNX?


Thanks again for your help.

Tanmay. 

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post25385
Re: RE: RE: BCM5709S  
the ndame of the function is bnx_get_media in if_bnx.c. I am not sure if you have the latest file with you or not. 
Otherwise, you can try looking up in the latest linux source code repository and you can find this function in the 
if_bnx2.c file.

Tanmay
RE: RE: RE: BCM5709S  
Hmmm... I'm looking at version 1.23 of the source and there doesn't seem
to be a bnx_get_media function in the file. 

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/if_bnx.c?rev=1.23&co
ntent-type=text/x-cvsweb-markup

Obviously the linux code base is going to do Something Different from
the NetBSD source base and there may be no equivalent function for it.

  R. 

-----Original Message-----
From: Tanmay Kishore [mailto:community-noreply@qnx.com] 
Sent: Thursday, March 26, 2009 3:26 PM
To: drivers-networking
Subject: Re: RE: RE: BCM5709S

the ndame of the function is bnx_get_media in if_bnx.c. I am not sure if
you have the latest file with you or not. Otherwise, you can try looking
up in the latest linux source code repository and you can find this
function in the if_bnx2.c file.

Tanmay

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post25393
Re: RE: RE: RE: BCM5709S  
So here's the link to directory containing the latest FreeBSD files:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/bce/

If you look at the if_bnx.c, you should be able to find the function bnx_get_media(). Or look for pci_get_function().

Tanmay
RE: RE: RE: RE: BCM5709S  
Ah....  You're using the FreeBSD driver.  I thought that you'd said you
were using the NetBSD driver. 

Unfortunately, I think that you'll have to dig into the FreeBSD source a
bit more to figure out what that pci call does...  I'm not sure of what
the equivalent code would be for Neutrino.  

   R.


-----Original Message-----
From: Tanmay Kishore [mailto:community-noreply@qnx.com] 
Sent: Thursday, March 26, 2009 5:04 PM
To: drivers-networking
Subject: Re: RE: RE: RE: BCM5709S

So here's the link to directory containing the latest FreeBSD files:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/bce/

If you look at the if_bnx.c, you should be able to find the function
bnx_get_media(). Or look for pci_get_function().

Tanmay

_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post25403
Re: RE: RE: RE: RE: BCM5709S  
Thanks for all your help. Your response time is amazing. Keep up the good work.

Tanmay
Re: RE: RE: RE: RE: BCM5709S  
So, I could finally get to a stage where the 5709 driver can detect the SERDES PHY. But unfortunately, it compalins 
about "no carrier" when I run the ifconfig command. In my log, I see the gentbi.c phy driver getting executed and it 
detects the PHY device twice, once for phy address = 2, and  the next one for phy address == 3. Here's the log:

      gentbi2 at bnx2 phy 2: Generic ten-bit interface, rev. 0
      gentbi2: 1000baseSX, 1000baseSX-FDX, auto
      Find PHY, oui = 00000af7, model = 0000003f
      gentbi3 at bnx2 phy 31: Generic ten-bit interface, rev. 0
      gentbi3: 1000baseSX, 1000baseSX-FDX, auto

These logs are from mii.c:mii_attach() and gentbi.c:gentbiattach() function calls. The locations of the files is under 
sys/dev/mii folder. What I am not able to understand is why the gentbiattach function executes twise for the same device
.

Secondly, the output of ifconfig shows no carrier detect under the status field. Here's the output:

>ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
	inet 127.0.0.1 netmask 0xff000000

bnx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
	enabled=0
	address: 00:10:18:49:7b:d4
	media: Ethernet autoselect
	status: no carrier
	inet 172.22.130.12 netmask 0xffffff00 broadcast 172.22.130.255

bnx2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
	capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
	enabled=0
	address: 00:10:18:49:7b:d0
	media: Ethernet autoselect
	status: no carrier

As you can see, the status shows up as no carrier. Do you guys know what could be causing this? I can send you some 
status register dumps if that helps. But you will have to ask specifically which dump are you interested in.

Thanks,
Tanmay