mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 10:46:28 +08:00
drivers/net: add IGB network card support
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
Add support for Intel IGB type of network cards. Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
735e16f842
commit
880c8e5d26
@@ -50,6 +50,16 @@ Supported devices:
|
||||
- Intel 82574L
|
||||
- Intel 82574L
|
||||
|
||||
Intel igb
|
||||
---------
|
||||
|
||||
Intel igb compatible NIC support can be found in ``drivers/net/igb.c``.
|
||||
|
||||
Supported devices:
|
||||
|
||||
- Intel 82576
|
||||
- Intel I211
|
||||
|
||||
Intel igc
|
||||
---------
|
||||
|
||||
|
||||
@@ -89,6 +89,10 @@ if(CONFIG_NET)
|
||||
list(APPEND SRCS e1000.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_NET_IGB)
|
||||
list(APPEND SRCS igb.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_NET_IGC)
|
||||
list(APPEND SRCS igc.c)
|
||||
endif()
|
||||
|
||||
@@ -815,6 +815,36 @@ config NET_E1000_RXSPARE
|
||||
|
||||
endif # NET_E1000
|
||||
|
||||
menuconfig NET_IGB
|
||||
bool "Intel IGB support"
|
||||
default n
|
||||
depends on PCI && PCI_MSIX
|
||||
---help---
|
||||
Enable IGB PCI Ethernet driver.
|
||||
|
||||
if NET_IGB
|
||||
|
||||
config NET_IGB_TXDESC
|
||||
int "Intel IGB TX descriptors"
|
||||
default 256
|
||||
|
||||
config NET_IGB_RXDESC
|
||||
int "Intel IGB RX descriptors"
|
||||
default 256
|
||||
|
||||
config NET_IGB_RXSPARE
|
||||
int "Intel IGB spare RX buffers"
|
||||
default 8
|
||||
|
||||
config NET_IGB_INT_INTERVAL
|
||||
int "Intel IGB interrupt interval"
|
||||
default 100
|
||||
range 1 8191
|
||||
---help---
|
||||
Minimum Inter-interrupt Interval in 1 us increments.
|
||||
|
||||
endif # NET_IGB
|
||||
|
||||
menuconfig NET_IGC
|
||||
bool "Intel IGC support"
|
||||
default n
|
||||
|
||||
@@ -103,14 +103,18 @@ ifeq ($(CONFIG_NET_E1000),y)
|
||||
CSRCS += e1000.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DRIVERS_WIFI_SIM),y)
|
||||
CSRCS += wifi_sim.c
|
||||
ifeq ($(CONFIG_NET_IGB),y)
|
||||
CSRCS += igb.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NET_IGC),y)
|
||||
CSRCS += igc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DRIVERS_WIFI_SIM),y)
|
||||
CSRCS += wifi_sim.c
|
||||
endif
|
||||
|
||||
# Include network build support
|
||||
|
||||
DEPPATH += --dep-path net
|
||||
|
||||
+1492
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,7 @@
|
||||
#include <nuttx/virtio/virtio-pci.h>
|
||||
#include <nuttx/net/e1000.h>
|
||||
#include <nuttx/net/igc.h>
|
||||
#include <nuttx/net/igb.h>
|
||||
#include <nuttx/can/kvaser_pci.h>
|
||||
#include <nuttx/can/ctucanfd_pci.h>
|
||||
#include <nuttx/usb/xhci_pci.h>
|
||||
@@ -163,6 +164,16 @@ int pci_register_drivers(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Initialization igb driver */
|
||||
|
||||
#ifdef CONFIG_NET_IGB
|
||||
ret = pci_igb_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
pcierr("pci_igb_init failed, ret=%d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Initialzie Kvaser pci driver */
|
||||
|
||||
#ifdef CONFIG_CAN_KVASER
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/****************************************************************************
|
||||
* include/nuttx/net/igb.h
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_NUTTX_NET_IGB_H
|
||||
#define __INCLUDE_NUTTX_NET_IGB_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pci_igb_init
|
||||
*
|
||||
* Description:
|
||||
* Register a pci driver
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int pci_igb_init(void);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_NET_IGB_H */
|
||||
Reference in New Issue
Block a user