mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
Merge branch 'net-sparx5-misc-fixes-for-sparx5-and-lan969x'
Daniel Machon says: ==================== net: sparx5: misc fixes for sparx5 and lan969x This series fixes various issues in the sparx5 driver, which also serves lan969x. Details are in the individual commit descriptions. ==================== Link: https://patch.msgid.link/20260817-misc-fixes-sparx5-lan969x-v3-0-c7c7fef723a8@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
dac0c3fa97
|
|
@ -162,13 +162,18 @@ static int sparx5_port_stop(struct net_device *ndev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void sparx5_set_rx_mode(struct net_device *dev)
|
||||
static int sparx5_set_rx_mode(struct net_device *dev,
|
||||
struct netdev_hw_addr_list *uc,
|
||||
struct netdev_hw_addr_list *mc)
|
||||
{
|
||||
struct sparx5_port *port = netdev_priv(dev);
|
||||
struct sparx5 *sparx5 = port->sparx5;
|
||||
|
||||
if (!test_bit(port->portno, sparx5->bridge_mask))
|
||||
__dev_mc_sync(dev, sparx5_mc_sync, sparx5_mc_unsync);
|
||||
return __hw_addr_sync_dev(mc, dev, sparx5_mc_sync,
|
||||
sparx5_mc_unsync);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sparx5_port_get_phys_port_name(struct net_device *dev,
|
||||
|
|
@ -249,7 +254,7 @@ static const struct net_device_ops sparx5_port_netdev_ops = {
|
|||
.ndo_open = sparx5_port_open,
|
||||
.ndo_stop = sparx5_port_stop,
|
||||
.ndo_start_xmit = sparx5_port_xmit_impl,
|
||||
.ndo_set_rx_mode = sparx5_set_rx_mode,
|
||||
.ndo_set_rx_mode_async = sparx5_set_rx_mode,
|
||||
.ndo_get_phys_port_name = sparx5_port_get_phys_port_name,
|
||||
.ndo_set_mac_address = sparx5_set_mac_address,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
|
|
|
|||
|
|
@ -2077,8 +2077,9 @@ int sparx5_vcap_init(struct sparx5 *sparx5)
|
|||
dir = vcap_debugfs(sparx5->dev, sparx5->debugfs_root, ctrl);
|
||||
for (idx = 0; idx < consts->n_ports; ++idx)
|
||||
if (sparx5->ports[idx])
|
||||
vcap_port_debugfs(sparx5->dev, dir, ctrl,
|
||||
sparx5->ports[idx]->ndev);
|
||||
vcap_port_debugfs_portno(sparx5->dev, dir, ctrl,
|
||||
sparx5->ports[idx]->ndev,
|
||||
sparx5->ports[idx]->portno);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -400,6 +400,27 @@ void vcap_port_debugfs(struct device *dev, struct dentry *parent,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(vcap_port_debugfs);
|
||||
|
||||
void vcap_port_debugfs_portno(struct device *dev,
|
||||
struct dentry *parent,
|
||||
struct vcap_control *vctrl,
|
||||
struct net_device *ndev,
|
||||
unsigned int portno)
|
||||
{
|
||||
struct vcap_port_debugfs_info *info;
|
||||
char name[16];
|
||||
|
||||
info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
|
||||
if (!info)
|
||||
return;
|
||||
|
||||
info->vctrl = vctrl;
|
||||
info->ndev = ndev;
|
||||
|
||||
snprintf(name, sizeof(name), "p%u", portno);
|
||||
debugfs_create_file(name, 0444, parent, info, &vcap_port_debugfs_fops);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vcap_port_debugfs_portno);
|
||||
|
||||
/* Show the full VCAP instance data (rules with all fields) */
|
||||
static int vcap_debugfs_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ void vcap_port_debugfs(struct device *dev, struct dentry *parent,
|
|||
struct vcap_control *vctrl,
|
||||
struct net_device *ndev);
|
||||
|
||||
void vcap_port_debugfs_portno(struct device *dev,
|
||||
struct dentry *parent,
|
||||
struct vcap_control *vctrl,
|
||||
struct net_device *ndev,
|
||||
unsigned int portno);
|
||||
|
||||
/* Create a debugFS entry for a vcap instance */
|
||||
struct dentry *vcap_debugfs(struct device *dev, struct dentry *parent,
|
||||
struct vcap_control *vctrl);
|
||||
|
|
@ -30,6 +36,14 @@ static inline void vcap_port_debugfs(struct device *dev, struct dentry *parent,
|
|||
{
|
||||
}
|
||||
|
||||
static inline void vcap_port_debugfs_portno(struct device *dev,
|
||||
struct dentry *parent,
|
||||
struct vcap_control *vctrl,
|
||||
struct net_device *ndev,
|
||||
unsigned int portno)
|
||||
{
|
||||
}
|
||||
|
||||
static inline struct dentry *vcap_debugfs(struct device *dev,
|
||||
struct dentry *parent,
|
||||
struct vcap_control *vctrl)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user