mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
15d014d131
The way the hardware and firmware work is that there is one shared RX queue and IRQ for a number of different network interfaces. Due to this, we would like to process received packets for every interface in the same NAPI poll handler, so we need a pseudo-device to schedule polling on. What the driver currently does is that it always schedules polling for the first network interface in the list, and processes packets for every interface in the poll handler for that first interface -- however, this scheme breaks down if the first network interface happens to not be up, since netif_rx_schedule_prep() checks netif_running(). sky2 apparently has the same issue, and Stephen Hemminger suggested a way to work around this: create a variant of netif_rx_schedule_prep() that does not check netif_running(). I implemented this locally and called it netif_rx_schedule_prep_notup(), and it seems to work well, but it's something that probably not everyone would be happy with. The ixp2000 is an ARM CPU with a high-speed network interface in the CPU itself (full duplex 4Gb/s or 10Gb/s depending on the IXP model.) The CPU package also contains 8 or 16 (again depending on the IXP model) 'microengines', which are somewhat primitive but very fast and efficient processor cores which can be used to offload various things from the main CPU. This driver makes the high-speed network interface in the CPU visible and usable as a regular linux network device. Currently, it only supports the Radisys ENP2611 IXP board, but adding support for other board types should be fairly easy. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
98 lines
2.9 KiB
Text
98 lines
2.9 KiB
Text
static struct ixp2000_uengine_code ixp2400_tx =
|
|
{
|
|
.cpu_model_bitmask = 0x000003fe,
|
|
.cpu_min_revision = 0,
|
|
.cpu_max_revision = 255,
|
|
|
|
.uengine_parameters = IXP2000_UENGINE_8_CONTEXTS |
|
|
IXP2000_UENGINE_PRN_UPDATE_EVERY |
|
|
IXP2000_UENGINE_NN_FROM_PREVIOUS |
|
|
IXP2000_UENGINE_ASSERT_EMPTY_AT_0 |
|
|
IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT |
|
|
IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT,
|
|
|
|
.initial_reg_values = (struct ixp2000_reg_value []) {
|
|
{ -1, -1 }
|
|
},
|
|
|
|
.num_insns = 77,
|
|
.insns = (u8 []) {
|
|
0xf0, 0x00, 0x00, 0x07, 0x00,
|
|
0xd8, 0x03, 0x00, 0x00, 0x11,
|
|
0x3c, 0x40, 0x00, 0x04, 0xe0,
|
|
0x81, 0xf2, 0x02, 0x01, 0x00,
|
|
0xd8, 0x00, 0x80, 0x01, 0x00,
|
|
0xb0, 0x08, 0x06, 0x00, 0x00,
|
|
0xf0, 0x00, 0x0c, 0x00, 0x80,
|
|
0xb4, 0x49, 0x02, 0x03, 0x7f,
|
|
0xf0, 0x00, 0x02, 0x83, 0x00,
|
|
0xfc, 0x10, 0xac, 0x23, 0x08,
|
|
0xfc, 0x10, 0xac, 0x43, 0x10,
|
|
0xfc, 0x10, 0xac, 0x63, 0x18,
|
|
0xe0, 0x00, 0x00, 0x00, 0x02,
|
|
0xa0, 0x30, 0x02, 0x80, 0x00,
|
|
0xd8, 0x06, 0x00, 0x01, 0x01,
|
|
0x19, 0x40, 0x00, 0x04, 0x28,
|
|
0xb0, 0x0a, 0x06, 0x00, 0x00,
|
|
0xd8, 0x03, 0xc0, 0x01, 0x00,
|
|
0x00, 0x44, 0x00, 0x80, 0x80,
|
|
0xa0, 0x09, 0x06, 0x00, 0x00,
|
|
0xb0, 0x0b, 0x06, 0x04, 0x00,
|
|
0xd8, 0x13, 0x00, 0x01, 0x00,
|
|
0xb0, 0x0c, 0x06, 0x08, 0x00,
|
|
0xf0, 0x00, 0x0c, 0x00, 0xa0,
|
|
0xfc, 0x10, 0xae, 0x23, 0x88,
|
|
0xa0, 0x00, 0x12, 0x40, 0x00,
|
|
0xb0, 0xc9, 0x02, 0x43, 0x01,
|
|
0xb4, 0x49, 0x02, 0x43, 0x7f,
|
|
0xb0, 0x00, 0x22, 0x80, 0x00,
|
|
0xf0, 0x00, 0x02, 0x83, 0x00,
|
|
0xf0, 0x00, 0x0c, 0x04, 0x02,
|
|
0xb0, 0x40, 0x6c, 0x00, 0xa0,
|
|
0xd8, 0x08, 0x80, 0x01, 0x01,
|
|
0xaa, 0x00, 0x2c, 0x08, 0x02,
|
|
0xa0, 0xc0, 0x30, 0x18, 0x90,
|
|
0xa0, 0x00, 0x43, 0x00, 0x00,
|
|
0xba, 0xc0, 0x32, 0xc0, 0xa0,
|
|
0xaa, 0xb0, 0x00, 0x0f, 0x40,
|
|
0xd8, 0x0a, 0x80, 0x01, 0x04,
|
|
0xb0, 0x0a, 0x00, 0x08, 0x00,
|
|
0xf0, 0x00, 0x00, 0x0f, 0x40,
|
|
0xa4, 0x00, 0x2c, 0x08, 0x02,
|
|
0xa0, 0x8a, 0x00, 0x0c, 0xa0,
|
|
0xe0, 0x00, 0x00, 0x00, 0x04,
|
|
0xd8, 0x0c, 0x80, 0x00, 0x18,
|
|
0x3c, 0x40, 0x00, 0x04, 0xe0,
|
|
0xba, 0x80, 0x42, 0x01, 0x80,
|
|
0xb4, 0x40, 0x40, 0x13, 0xff,
|
|
0xaa, 0x88, 0x00, 0x10, 0x80,
|
|
0xb0, 0x08, 0x06, 0x00, 0x00,
|
|
0xaa, 0xf0, 0x0d, 0x80, 0x80,
|
|
0xd8, 0x0b, 0x40, 0x01, 0x05,
|
|
0xa0, 0x88, 0x0c, 0x04, 0x80,
|
|
0xfc, 0x10, 0xae, 0x43, 0x90,
|
|
0xba, 0xc0, 0x50, 0x0f, 0x01,
|
|
0x9a, 0x30, 0x50, 0x15, 0x30,
|
|
0x9a, 0xb0, 0x50, 0x16, 0x30,
|
|
0x9b, 0x50, 0x58, 0x16, 0x01,
|
|
0x8a, 0xe2, 0x08, 0x16, 0x21,
|
|
0x6b, 0x4e, 0x00, 0x83, 0x03,
|
|
0xe0, 0x00, 0x00, 0x00, 0x30,
|
|
0x9a, 0x80, 0x70, 0x0e, 0x04,
|
|
0x8b, 0x88, 0x08, 0x1e, 0x02,
|
|
0xf0, 0x00, 0x0c, 0x01, 0x81,
|
|
0xf0, 0x01, 0x80, 0x1f, 0x00,
|
|
0x9b, 0xd0, 0x78, 0x1e, 0x01,
|
|
0x3d, 0x42, 0x00, 0x1c, 0x20,
|
|
0xe0, 0x00, 0x00, 0x00, 0x08,
|
|
0xfc, 0x10, 0xae, 0x63, 0x98,
|
|
0xa4, 0x30, 0x0c, 0x04, 0x02,
|
|
0xd8, 0x03, 0x00, 0x01, 0x00,
|
|
0xd8, 0x11, 0xc1, 0x42, 0x14,
|
|
0xa0, 0x18, 0x00, 0x08, 0x00,
|
|
0x1a, 0x40, 0x00, 0x04, 0x2c,
|
|
0x33, 0x00, 0x01, 0x2f, 0x20,
|
|
0xd8, 0x03, 0x00, 0x00, 0x18,
|
|
0xe0, 0x00, 0x02, 0x00, 0x00,
|
|
}
|
|
};
|