Re: [PATCH] Intel IXP4xx network drivers v.2 - Ethernet and HSS

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Lennert Buytenhek <buytenh@...>
Cc: Michael-Luke Jones <mlj28@...>, Jeff Garzik <jeff@...>, <netdev@...>, lkml <linux-kernel@...>, Russell King <rmk@...>, ARM Linux Mailing List <linux-arm-kernel@...>
Date: Tuesday, May 8, 2007 - 1:17 pm

Lennert Buytenhek writes:

> The board support code knows such things as that the "front ethernet

Sure. And I don't want it to know.

It has to pick up any available queue for RX, that is. If the
board code knows it uses ETH connected to NPE-B and NPE-C, and
HSS-0 connected (obviously) to NPE-A, and it wants some crypto
functions etc., it can pick a queue which normally belongs to
HSS-1. If the code knows the board has both HSS and only NPE-B
Ethernet, it can use one of NPE-C Ethernet's queues. It's that
simple.

The Ethernet (and HSS etc.) driver knows it has to use queue 24 for
NPE-B Ethernet's TX and 27 for TX and so on, this is fixed in the
firmware so I don't let the board code mess with that. The
Ethernet RX queue is different, we can just make something up and
tell NPE about that.

That's BTW the same thing you would want to do with SRAM - except
that the SRAM allocator is technically possible, while making
queue assignments needs knowledge about the hardware.

> If Intel puts out a firmware update next month, and your ethernet

Nope, we just modify Ethernet driver:
drivers/net/arm/ixp4xx_eth.c:
#define TX_QUEUE(plat) (NPE_ID(port) + 23)
#define RXFREE_QUEUE(plat) (NPE_ID(port) + 26)
#define TXDONE_QUEUE 31

> The

I've never considered doing that :-)

drivers/net/wan/ixp4xx_hss.c:
/* Queue IDs */
#define HSS0_CHL_RXTRIG_QUEUE 12 /* orig size = 32 dwords */
#define HSS0_PKT_RX_QUEUE 13 /* orig size = 32 dwords */
#define HSS0_PKT_TX0_QUEUE 14 /* orig size = 16 dwords */
#define HSS0_PKT_TX1_QUEUE 15
#define HSS0_PKT_TX2_QUEUE 16
#define HSS0_PKT_TX3_QUEUE 17
#define HSS0_PKT_RXFREE0_QUEUE 18 /* orig size = 16 dwords */
#define HSS0_PKT_RXFREE1_QUEUE 19
#define HSS0_PKT_RXFREE2_QUEUE 20
#define HSS0_PKT_RXFREE3_QUEUE 21
#define HSS0_PKT_TXDONE_QUEUE 22 /* orig size = 64 dwords */

#define HSS1_CHL_RXTRIG_QUEUE 10
#define HSS1_PKT_RX_QUEUE 0
#define HSS1_PKT_TX0_QUEUE 5
#define HSS1_PKT_TX1_QUEUE 6
#define HSS1_PKT_TX2_QUEUE 7
#define HSS1_PKT_TX3_QUEUE 8
#define HSS1_PKT_RXFREE0_QUEUE 1
#define HSS1_PKT_RXFREE1_QUEUE 2
#define HSS1_PKT_RXFREE2_QUEUE 3
#define HSS1_PKT_RXFREE3_QUEUE 4
#define HSS1_PKT_TXDONE_QUEUE 9

>> Without them the code in question is hardly readable,

Well, you may have the point, but I also care about others :-)
--
Krzysztof Halasa
-

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Sun May 6, 7:46 pm)
Re: [PATCH 0/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Mon May 7, 9:40 pm)
Re: [PATCH 0/3] Intel IXP4xx network drivers, Leon Woestenberg, (Mon May 7, 4:39 pm)
Re: [PATCH 0/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Mon May 7, 5:21 pm)
[PATCH 2a/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Mon May 7, 6:27 am)
[PATCH 3/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Sun May 6, 8:07 pm)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Lennert Buytenhek, (Tue May 8, 7:40 am)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Michael-Luke Jones, (Mon May 7, 8:59 am)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Mon May 7, 1:12 pm)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Michael-Luke Jones, (Mon May 7, 2:14 pm)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Mon May 7, 3:57 pm)
[PATCH] Intel IXP4xx network drivers v.2 - Ethernet and HSS, Krzysztof Halasa, (Mon May 7, 9:19 pm)
Re: [PATCH] Intel IXP4xx network drivers v.2 - Ethernet and ..., Lennert Buytenhek, (Tue May 8, 10:53 am)
Re: [PATCH] Intel IXP4xx network drivers v.2 - Ethernet and ..., Krzysztof Halasa, (Tue May 8, 1:17 pm)
Re: [PATCH] Intel IXP4xx network drivers v.2 - Ethernet and ..., Michael-Luke Jones, (Tue May 8, 3:22 am)
[PATCH] Intel IXP4xx network drivers v.3 - QMGR, Krzysztof Halasa, (Mon May 7, 8:46 pm)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Lennert Buytenhek, (Tue May 8, 7:32 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Krzysztof Halasa, (Tue May 8, 10:12 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Lennert Buytenhek, (Tue May 8, 10:40 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Krzysztof Halasa, (Tue May 8, 12:59 pm)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Lennert Buytenhek, (Wed May 9, 6:21 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Krzysztof Halasa, (Thu May 10, 10:08 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Alexey Zaytsev, (Tue May 8, 8:47 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Lennert Buytenhek, (Tue May 8, 8:59 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Michael-Luke Jones, (Tue May 8, 3:05 am)
Re: [PATCH] Intel IXP4xx network drivers v.3 - QMGR, Krzysztof Halasa, (Tue May 8, 9:57 am)
[PATCH] Intel IXP4xx network drivers v.2 - NPE, Krzysztof Halasa, (Mon May 7, 8:36 pm)
Re: [PATCH] Intel IXP4xx network drivers v.2 - NPE, Michael-Luke Jones, (Tue May 8, 3:02 am)
Re: [PATCH] Intel IXP4xx network drivers v.2 - NPE, Krzysztof Halasa, (Tue May 8, 9:56 am)
[PATCH] Intel IXP4xx network drivers v.2, Krzysztof Halasa, (Mon May 7, 8:11 pm)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Christian Hohnstaedt, (Mon May 7, 1:52 pm)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Mon May 7, 4:00 pm)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Lennert Buytenhek, (Tue May 8, 7:48 am)
Re: [PATCH 3/3] Intel IXP4xx network drivers, Krzysztof Halasa, (Tue May 8, 9:47 am)
[PATCH 2/3] ARM: include IXP4xx "fuses" support, Krzysztof Halasa, (Sun May 6, 8:07 pm)
Re: [PATCH 2/3] ARM: include IXP4xx "fuses" support, Alexey Zaytsev, (Mon May 7, 1:24 am)
Re: [PATCH 2/3] ARM: include IXP4xx "fuses" support, Krzysztof Halasa, (Mon May 7, 6:24 am)
[PATCH] Use menuconfig objects II - netdev/wan, Krzysztof Halasa, (Mon May 7, 5:02 pm)