Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions drivers/char/phytnetled/phytnet_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ of_ndev_init(struct led_data *phytnet_led)
return 0;
}


#ifdef CONFIG_ACPI
static int
acpi_ndev_init(struct led_data *phytnet_led)
{
Expand Down Expand Up @@ -188,6 +188,7 @@ acpi_ndev_init(struct led_data *phytnet_led)

return 0;
}
#endif

static int
gpio_init(struct led_data *phytnet_led)
Expand Down Expand Up @@ -235,10 +236,13 @@ led_init_and_control(struct work_struct *work)
int err = -1;
struct led_data *phytnet_led = container_of(work, struct led_data, led_control_work.work);

if (phytnet_led->pdev->dev.of_node)
if (phytnet_led->pdev->dev.of_node) {
err = of_ndev_init(phytnet_led);
else if (has_acpi_companion(&phytnet_led->pdev->dev))
} else if (has_acpi_companion(&phytnet_led->pdev->dev)) {
#ifdef CONFIG_ACPI
err = acpi_ndev_init(phytnet_led);
#endif
}

if (err) {
dev_err(&phytnet_led->pdev->dev, "ndev init wrong\n");
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ config ETHOC
source "drivers/net/ethernet/packetengines/Kconfig"
source "drivers/net/ethernet/pasemi/Kconfig"
source "drivers/net/ethernet/pensando/Kconfig"
source "drivers/net/ethernet/phytium/Kconfig"
source "drivers/net/ethernet/phytium-pci-vnet/Kconfig"
source "drivers/net/ethernet/qlogic/Kconfig"
source "drivers/net/ethernet/brocade/Kconfig"
Comment on lines 168 to 172
source "drivers/net/ethernet/qualcomm/Kconfig"
Expand Down Expand Up @@ -195,7 +197,6 @@ source "drivers/net/ethernet/wangxun/Kconfig"
source "drivers/net/ethernet/wiznet/Kconfig"
source "drivers/net/ethernet/xilinx/Kconfig"
source "drivers/net/ethernet/xircom/Kconfig"
source "drivers/net/ethernet/phytium/Kconfig"
source "drivers/net/ethernet/guangruntong/Kconfig"
source "drivers/net/ethernet/bzwx/Kconfig"
source "drivers/net/ethernet/linkdata/Kconfig"
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ obj-$(CONFIG_NET_VENDOR_OKI) += oki-semi/
obj-$(CONFIG_ETHOC) += ethoc.o
obj-$(CONFIG_NET_VENDOR_PACKET_ENGINES) += packetengines/
obj-$(CONFIG_NET_VENDOR_PASEMI) += pasemi/
obj-$(CONFIG_NET_VENDOR_PHYTIUM) += phytium/
obj-$(CONFIG_VNET_VENDOR_PHYTIUM) += phytium-pci-vnet/
obj-$(CONFIG_NET_VENDOR_QLOGIC) += qlogic/
obj-$(CONFIG_NET_VENDOR_QUALCOMM) += qualcomm/
obj-$(CONFIG_NET_VENDOR_REALTEK) += realtek/
Expand Down Expand Up @@ -107,7 +109,6 @@ obj-$(CONFIG_NET_VENDOR_XILINX) += xilinx/
obj-$(CONFIG_NET_VENDOR_XIRCOM) += xircom/
obj-$(CONFIG_NET_VENDOR_SYNOPSYS) += synopsys/
obj-$(CONFIG_NET_VENDOR_PENSANDO) += pensando/
obj-$(CONFIG_NET_VENDOR_PHYTIUM) += phytium/
obj-$(CONFIG_NET_VENDOR_GRT) += guangruntong/
obj-$(CONFIG_NET_VENDOR_BZWX) += bzwx/
obj-$(CONFIG_NET_VENDOR_LINKDATA) += linkdata/
6 changes: 3 additions & 3 deletions drivers/net/ethernet/cadence/macb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct sifive_fu540_macb_mgmt {
#define GEM_MAX_TX_LEN (unsigned int)(0x3FC0)

#define GEM_MTU_MIN_SIZE ETH_MIN_MTU
#define MACB_NETIF_LSO NETIF_F_TSO
#define MACB_NETIF_LSO (NETIF_F_TSO | NETIF_F_TSO6)

#define MACB_WOL_HAS_MAGIC_PACKET (0x1 << 0)
#define MACB_WOL_ENABLED (0x1 << 1)
Expand Down Expand Up @@ -767,7 +767,7 @@ static void macb_mac_link_down(struct phylink_config *config, unsigned int mode,

/* Tx clean */
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) {
spin_lock(&queue->tx_ptr_lock);
spin_lock_bh(&queue->tx_ptr_lock);
for (i = 0; i < bp->tx_ring_size; i++) {
tx_skb = macb_tx_skb(queue, i);
/* free unsent skb buffers */
Expand All @@ -778,7 +778,7 @@ static void macb_mac_link_down(struct phylink_config *config, unsigned int mode,
macb_set_addr(bp, tx_desc, 0);
tx_desc->ctrl &= ~MACB_BIT(TX_USED);
}
spin_unlock(&queue->tx_ptr_lock);
spin_unlock_bh(&queue->tx_ptr_lock);
}

netif_tx_stop_all_queues(ndev);
Expand Down
26 changes: 26 additions & 0 deletions drivers/net/ethernet/phytium-pci-vnet/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Phytium PCI virtual network device configuration
#

menu "Phytium PCI Virtual Ethernet Drivers"
config VNET_VENDOR_PHYTIUM
bool "Phytium Virtual Ethernet devices"
depends on ARCH_PHYTIUM
depends on HAS_IOMEM
default y
help
If you have a network (Ethernet) card belonging to this class, say Y.

Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all the
remaining Cadence network card questions. If you say Y, you will be
asked for your specific card in the following questions.

if VNET_VENDOR_PHYTIUM

source "drivers/net/ethernet/phytium-pci-vnet/pci-ep-net/Kconfig"
source "drivers/net/ethernet/phytium-pci-vnet/pci-rc-net/Kconfig"

endif #VNET_VENDOR_PHYTIUM
endmenu
7 changes: 7 additions & 0 deletions drivers/net/ethernet/phytium-pci-vnet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright(c) 2022 - 2025 Phytium Technology Co., Ltd.
#
# Makefile for the Phytium PCI virtual network device drivers.

obj-$(CONFIG_PHYTIUM_PCI_EPF_VNET) += pci-ep-net/
obj-$(CONFIG_PHYTIUM_PCI_RC_VNET) += pci-rc-net/
19 changes: 19 additions & 0 deletions drivers/net/ethernet/phytium-pci-vnet/pci-ep-net/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Phytium PCI EP virtual network device configuration
#

config PHYTIUM_PCI_EPF_VNET
tristate "Phytium PCI Endpoint Virtual Ethernet Device"
depends on PCI_ENDPOINT
depends on PCIE_PHYTIUM_EP
help
This option enables support for the Phytium PCI Endpoint Virtual Ethernet function
driver. It allows the device to appear as a network interface to a PCIe root complex.

Typically used in conjunction with a Phytium PCIe Root Complex host that supports
the corresponding RC virtual network function.

If you want this endpoint to provide virtual networking over PCIe, say Y or M.

If unsure, say N.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/phytium-pci-vnet/pci-ep-net/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright(c) 2022 - 2025 Phytium Technology Co., Ltd.
#
# Makefile for the Phytium network device drivers.

obj-$(CONFIG_PHYTIUM_PCI_EPF_VNET) += pci_epf_vnet.o
Loading
Loading