hme(4) on hppa?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

hme(4) on hppa?

Stian Sletner
Hi!

I've acquired a C3600 that I've installed OpenBSD on, and everything
seems to be working swell, maybe except a bit slow on the disk i/o.  But
I have shoved a Sun Quad Fast Ethernet card in it to be part of a
bridging firewall setup, only to discover that hme(4) isn't supported on
hppa.  I was curious if anyone knows why, because AFAIK it's a plain PCI
device and it's supported on pretty much everything else that does PCI.

Thanks.

--
Stian Sletner

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Mark Kettenis
> Date: Mon, 26 May 2008 23:30:36 +0200
> From: Stian Sletner <[hidden email]>
>
> Hi!
>
> I've acquired a C3600 that I've installed OpenBSD on, and everything
> seems to be working swell, maybe except a bit slow on the disk i/o.  But
> I have shoved a Sun Quad Fast Ethernet card in it to be part of a
> bridging firewall setup, only to discover that hme(4) isn't supported on
> hppa.  I was curious if anyone knows why, because AFAIK it's a plain PCI
> device and it's supported on pretty much everything else that does PCI.

It'll probably just work if you add

hme*    at pci?                         # Sun Happy Meal

to your kernel config.

Let me know if it works and I'll add it to the hppa GENERIC kernel.

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Stian Sletner
On 2008-05-26T23:35+0200, Mark Kettenis wrote:
> It'll probably just work if you add
>
> hme*    at pci?                         # Sun Happy Meal
>
> to your kernel config.
>
> Let me know if it works and I'll add it to the hppa GENERIC kernel.

I should probably have mentioned that I've tried this.  It goes:

# config HME
HME:3: hme*: unknown device `hme'
*** Stop.

--
Stian Sletner

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Travers Buda-2
* Stian Sletner <[hidden email]> [2008-05-26 23:47:07]:

> On 2008-05-26T23:35+0200, Mark Kettenis wrote:
> > It'll probably just work if you add
> >
> > hme*    at pci?                         # Sun Happy Meal
> >
> > to your kernel config.
> >
> > Let me know if it works and I'll add it to the hppa GENERIC kernel.
>
> I should probably have mentioned that I've tried this.  It goes:
>
> # config HME
> HME:3: hme*: unknown device `hme'
> *** Stop.
>
> --
> Stian Sletner
>
>

This will fix it up.
In /usr/src/sys/dev/pci:

===================================================================
RCS file: RCS/files.pci,v
retrieving revision 1.1
diff -u -r1.1 files.pci
--- files.pci   2008/05/27 03:32:57     1.1
+++ files.pci   2008/05/27 03:34:37
@@ -355,6 +355,11 @@
 file   dev/pci/ixgb_ee.c               ixgb
 file   dev/pci/ixgb_hw.c               ixgb
 
+# Sun Happy Meal ethernet /* would you like fries with that? */
+device hme: ether, ifnet, ifmedia
+attach hme  at pci
+file   dev/pci/if_hme.c
+
 # Neterion Xframe 10 Gigabit ethernet
 device xge: ether, ifnet, ifmedia
 attach xge  at pci


--
Travers Buda

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Travers Buda-2
In reply to this post by Stian Sletner
* Stian Sletner <[hidden email]> [2008-05-26 23:47:07]:

> On 2008-05-26T23:35+0200, Mark Kettenis wrote:
> > It'll probably just work if you add
> >
> > hme*    at pci?                         # Sun Happy Meal
> >
> > to your kernel config.
> >
> > Let me know if it works and I'll add it to the hppa GENERIC kernel.
>
> I should probably have mentioned that I've tried this.  It goes:
>
> # config HME
> HME:3: hme*: unknown device `hme'
> *** Stop.
>
> --
> Stian Sletner
>
>

Sorry, this is the right patch.

In /usr/src/sys/dev/pci/

===================================================================
RCS file: RCS/files.pci,v
retrieving revision 1.1
diff -u -r1.1 files.pci
--- files.pci   2008/05/27 03:32:57     1.1
+++ files.pci   2008/05/27 03:40:46
@@ -355,6 +355,11 @@
 file   dev/pci/ixgb_ee.c               ixgb
 file   dev/pci/ixgb_hw.c               ixgb
 
+# Sun Happy Meal ethernet... would you like fries with that?
+device hme: ether, ifnet, ifmedia
+attach hme  at pci
+file   dev/pci/if_hme_pci.c
+
 # Neterion Xframe 10 Gigabit ethernet
 device xge: ether, ifnet, ifmedia
 attach xge  at pci


--
Travers Buda

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Travers Buda-2
* Travers Buda <[hidden email]> [2008-05-26 21:42:44]:

> * Stian Sletner <[hidden email]> [2008-05-26 23:47:07]:
>
> > On 2008-05-26T23:35+0200, Mark Kettenis wrote:
> > > It'll probably just work if you add
> > >
> > > hme*    at pci?                         # Sun Happy Meal
> > >
> > > to your kernel config.
> > >
> > > Let me know if it works and I'll add it to the hppa GENERIC kernel.
> >
> > I should probably have mentioned that I've tried this.  It goes:
> >
> > # config HME
> > HME:3: hme*: unknown device `hme'
> > *** Stop.
> >
> > --
> > Stian Sletner
> >
> >
>
> Sorry, this is the right patch.
>
 *snip old patch*
>

Bah, that's not right.  I've had too much coffee.  Does not
compile.  This does not compile either, but it's how sparc64 does
it (except sparc64 has it in files.sparc64.)

===================================================================
RCS file: RCS/files.pci,v
retrieving revision 1.1
diff -u -r1.1 files.pci
--- files.pci   2008/05/27 04:21:16     1.1
+++ files.pci   2008/05/27 04:28:10
@@ -230,6 +230,11 @@
 attach qli at pci with qli_pci
 file   dev/pci/qli_pci.c               qli_pci
 
+# Sun HME Ethernet controllers
+device  hme: ether, ifnet, mii, ifmedia
+attach  hme at pci
+file    dev/ic/hme.c                    hme
+
 # Ethernet driver for DC21040-based boards
 device de: ether, ifnet, ifmedia
 attach de at pci


--
Travers Buda

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Stian Sletner
On 2008-05-26T23:09-0500, Travers Buda wrote:
> Bah, that's not right.  I've had too much coffee.  Does not
> compile.  This does not compile either, but it's how sparc64 does
> it (except sparc64 has it in files.sparc64.)

You were on the right track I think.  I put this in my files.hppa:

device  hme: ether, ifnet, mii, ifmedia
file    dev/ic/hme.c                            hme
attach  hme at pci with hme_pci  
file    dev/pci/if_hme_pci.c                    hme_pci

Which compiled fine, although dmesg looks a little confused:

"Sun PCIO EBus2" rev 0x01 at pci3 dev 0 function 0 not configured
hme0 at pci3 dev 0 function 1 "Sun HME" rev 0x01: line 4 irq 2, address 08:00:20
:aa:dd:d8
ukphy0 at hme0 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 0x006051,
 model 0x0000
"Sun PCIO EBus2" rev 0x01 at pci3 dev 1 function 0 not configured
hme1 at pci3 dev 1 function 1 "Sun HME" rev 0x01: line 5 irq 3, address 08:00:20
:aa:dd:d9
ukphy1 at hme1 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 0x006051,
 model 0x0000
"Sun PCIO EBus2" rev 0x01 at pci3 dev 2 function 0 not configured
hme2 at pci3 dev 2 function 1 "Sun HME" rev 0x01: line 3 irq 5, address 08:00:20
:aa:dd:da
ukphy2 at hme2 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 0x006051,
 model 0x0000
"Sun PCIO EBus2" rev 0x01 at pci3 dev 3 function 0 not configured
hme3 at pci3 dev 3 function 1 "Sun HME" rev 0x01: line 2 irq 6, address 08:00:20
:aa:dd:db
ukphy3 at hme3 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 0x006051,
 model 0x0000

They show up in ifconfig -a, I'll test later if they actually work. :-)

Thanks for the help so far.

--
Stian Sletner

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Miod Vallat
> Which compiled fine, although dmesg looks a little confused:
>
> "Sun PCIO EBus2" rev 0x01 at pci3 dev 0 function 0 not configured
> hme0 at pci3 dev 0 function 1 "Sun HME" rev 0x01: line 4 irq 2,  
> address 08:00:20
> :aa:dd:d8
> ukphy0 at hme0 phy 1: Generic IEEE 802.3u media interface, rev. 1:  
> OUI 0x006051,
>  model 0x0000
[...]

> They show up in ifconfig -a, I'll test later if they actually work. :-)

You may want to uncomment the qsphy entries in GENERIC as well.

Miod

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Alastair Boyanich-2
On Tue, 27 May 2008 08:37:25 +0200
Miod Vallat <[hidden email]> wrote:

> > Which compiled fine, although dmesg looks a little confused:
> >
> > "Sun PCIO EBus2" rev 0x01 at pci3 dev 0 function 0 not configured
> > hme0 at pci3 dev 0 function 1 "Sun HME" rev 0x01: line 4 irq 2,  
> > address 08:00:20
> > :aa:dd:d8
> > ukphy0 at hme0 phy 1: Generic IEEE 802.3u media interface, rev. 1:  
> > OUI 0x006051,
> >  model 0x0000
> [...]
>
> > They show up in ifconfig -a, I'll test later if they actually work. :-)
>
> You may want to uncomment the qsphy entries in GENERIC as well.
>
> Miod
>
>

Should work with qsphy. I was running one for a short time on an
Staccato/a-class a180c around v4.1. Was getting a few lost interrupt
type messages under heavy loads, but that could've just been the
180mhz PA7300 not being able to peddle fast enough. Good idea to
enable it in GENERIC as Miod suggested.

Al.


--
Alastair Boyanich <[hidden email]>
This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 003 693 481. It is confidential to the ordinary user of the email address to which it was addressed and may contain copyright and/or legally privileged information. No one else may read, print, store, copy or forward all or any of it or its attachments. If you receive this email in error, please return to sender. Thank you.

If you do not wish to receive commercial email messages from Fujitsu Australia Software Technology Pty Ltd, please email [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Stian Sletner
In reply to this post by Miod Vallat
On 2008-05-27T08:37+0200, Miod Vallat wrote:

> >"Sun PCIO EBus2" rev 0x01 at pci3 dev 0 function 0 not configured
> >hme0 at pci3 dev 0 function 1 "Sun HME" rev 0x01: line 4 irq 2,  
> >address 08:00:20
> >:aa:dd:d8
> >ukphy0 at hme0 phy 1: Generic IEEE 802.3u media interface, rev. 1:  
> >OUI 0x006051,
> > model 0x0000
> [...]
>
> You may want to uncomment the qsphy entries in GENERIC as well.

Thanks for the tip.  It didn't fix the "Sun PCIO EBus" not configured
bit though.

In other news, it seems to work. :-)

--
Stian Sletner

Reply | Threaded
Open this post in threaded view
|

Re: hme(4) on hppa?

Stian Sletner
In reply to this post by Alastair Boyanich-2
On 2008-05-27T17:02+1000, Alastair Boyanich wrote:
> Should work with qsphy.

This is probably offtopic as I think it has more to do with the Sun QFE
than HPPA, but while the driver works fine, I couldn't get bridging
between its interfaces working.  I could see the traffic on both
interfaces, itt just wouldn't come through.  Between one of the QFE
ports and the onboard C3600 NIC, though, bridging works fine.

--
Stian Sletner