linux/drivers/net/usb/smsc75xx.c

// SPDX-License-Identifier: GPL-2.0-or-later
 /***************************************************************************
 *
 * Copyright (C) 2007-2010 SMSC
 *
 *****************************************************************************/

#include <linux/module.h>
#include <linux/kmod.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/usb.h>
#include <linux/bitrev.h>
#include <linux/crc16.h>
#include <linux/crc32.h>
#include <linux/usb/usbnet.h>
#include <linux/slab.h>
#include <linux/of_net.h>
#include "smsc75xx.h"

#define SMSC_CHIPNAME
#define SMSC_DRIVER_VERSION
#define HS_USB_PKT_SIZE
#define FS_USB_PKT_SIZE
#define DEFAULT_HS_BURST_CAP_SIZE
#define DEFAULT_FS_BURST_CAP_SIZE
#define DEFAULT_BULK_IN_DELAY
#define MAX_SINGLE_PACKET_SIZE
#define LAN75XX_EEPROM_MAGIC
#define EEPROM_MAC_OFFSET
#define DEFAULT_TX_CSUM_ENABLE
#define DEFAULT_RX_CSUM_ENABLE
#define SMSC75XX_INTERNAL_PHY_ID
#define SMSC75XX_TX_OVERHEAD
#define MAX_RX_FIFO_SIZE
#define MAX_TX_FIFO_SIZE
#define USB_VENDOR_ID_SMSC
#define USB_PRODUCT_ID_LAN7500
#define USB_PRODUCT_ID_LAN7505
#define RXW_PADDING
#define SUPPORTED_WAKE

#define SUSPEND_SUSPEND0
#define SUSPEND_SUSPEND1
#define SUSPEND_SUSPEND2
#define SUSPEND_SUSPEND3
#define SUSPEND_ALLMODES

struct smsc75xx_priv {};

static bool turbo_mode =;
module_param(turbo_mode, bool, 0644);
MODULE_PARM_DESC();

static int smsc75xx_link_ok_nopm(struct usbnet *dev);
static int smsc75xx_phy_gig_workaround(struct usbnet *dev);

static int __must_check __smsc75xx_read_reg(struct usbnet *dev, u32 index,
					    u32 *data, int in_pm)
{}

static int __must_check __smsc75xx_write_reg(struct usbnet *dev, u32 index,
					     u32 data, int in_pm)
{}

static int __must_check smsc75xx_read_reg_nopm(struct usbnet *dev, u32 index,
					       u32 *data)
{}

static int __must_check smsc75xx_write_reg_nopm(struct usbnet *dev, u32 index,
						u32 data)
{}

static int __must_check smsc75xx_read_reg(struct usbnet *dev, u32 index,
					  u32 *data)
{}

static int __must_check smsc75xx_write_reg(struct usbnet *dev, u32 index,
					   u32 data)
{}

/* Loop until the read is completed with timeout
 * called with phy_mutex held */
static __must_check int __smsc75xx_phy_wait_not_busy(struct usbnet *dev,
						     int in_pm)
{}

static int __smsc75xx_mdio_read(struct net_device *netdev, int phy_id, int idx,
				int in_pm)
{}

static void __smsc75xx_mdio_write(struct net_device *netdev, int phy_id,
				  int idx, int regval, int in_pm)
{}

static int smsc75xx_mdio_read_nopm(struct net_device *netdev, int phy_id,
				   int idx)
{}

static void smsc75xx_mdio_write_nopm(struct net_device *netdev, int phy_id,
				     int idx, int regval)
{}

static int smsc75xx_mdio_read(struct net_device *netdev, int phy_id, int idx)
{}

static void smsc75xx_mdio_write(struct net_device *netdev, int phy_id, int idx,
				int regval)
{}

static int smsc75xx_wait_eeprom(struct usbnet *dev)
{}

static int smsc75xx_eeprom_confirm_not_busy(struct usbnet *dev)
{}

static int smsc75xx_read_eeprom(struct usbnet *dev, u32 offset, u32 length,
				u8 *data)
{}

static int smsc75xx_write_eeprom(struct usbnet *dev, u32 offset, u32 length,
				 u8 *data)
{}

static int smsc75xx_dataport_wait_not_busy(struct usbnet *dev)
{}

static int smsc75xx_dataport_write(struct usbnet *dev, u32 ram_select, u32 addr,
				   u32 length, u32 *buf)
{}

/* returns hash bit number for given MAC address */
static u32 smsc75xx_hash(char addr[ETH_ALEN])
{}

static void smsc75xx_deferred_multicast_write(struct work_struct *param)
{}

static void smsc75xx_set_multicast(struct net_device *netdev)
{}

static int smsc75xx_update_flowcontrol(struct usbnet *dev, u8 duplex,
					    u16 lcladv, u16 rmtadv)
{}

static int smsc75xx_link_reset(struct usbnet *dev)
{}

static void smsc75xx_status(struct usbnet *dev, struct urb *urb)
{}

static int smsc75xx_ethtool_get_eeprom_len(struct net_device *net)
{}

static int smsc75xx_ethtool_get_eeprom(struct net_device *netdev,
				       struct ethtool_eeprom *ee, u8 *data)
{}

static int smsc75xx_ethtool_set_eeprom(struct net_device *netdev,
				       struct ethtool_eeprom *ee, u8 *data)
{}

static void smsc75xx_ethtool_get_wol(struct net_device *net,
				     struct ethtool_wolinfo *wolinfo)
{}

static int smsc75xx_ethtool_set_wol(struct net_device *net,
				    struct ethtool_wolinfo *wolinfo)
{}

static const struct ethtool_ops smsc75xx_ethtool_ops =;

static int smsc75xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
{}

static void smsc75xx_init_mac_address(struct usbnet *dev)
{}

static int smsc75xx_set_mac_address(struct usbnet *dev)
{}

static int smsc75xx_phy_initialize(struct usbnet *dev)
{}

static int smsc75xx_set_rx_max_frame_length(struct usbnet *dev, int size)
{}

static int smsc75xx_change_mtu(struct net_device *netdev, int new_mtu)
{}

/* Enable or disable Rx checksum offload engine */
static int smsc75xx_set_features(struct net_device *netdev,
	netdev_features_t features)
{}

static int smsc75xx_wait_ready(struct usbnet *dev, int in_pm)
{}

static int smsc75xx_phy_gig_workaround(struct usbnet *dev)
{}

static int smsc75xx_reset(struct usbnet *dev)
{}

static const struct net_device_ops smsc75xx_netdev_ops =;

static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf)
{}

static void smsc75xx_unbind(struct usbnet *dev, struct usb_interface *intf)
{}

static u16 smsc_crc(const u8 *buffer, size_t len)
{}

static int smsc75xx_write_wuff(struct usbnet *dev, int filter, u32 wuf_cfg,
			       u32 wuf_mask1)
{}

static int smsc75xx_enter_suspend0(struct usbnet *dev)
{}

static int smsc75xx_enter_suspend1(struct usbnet *dev)
{}

static int smsc75xx_enter_suspend2(struct usbnet *dev)
{}

static int smsc75xx_enter_suspend3(struct usbnet *dev)
{}

static int smsc75xx_enable_phy_wakeup_interrupts(struct usbnet *dev, u16 mask)
{}

static int smsc75xx_link_ok_nopm(struct usbnet *dev)
{}

static int smsc75xx_autosuspend(struct usbnet *dev, u32 link_up)
{}

static int smsc75xx_suspend(struct usb_interface *intf, pm_message_t message)
{}

static int smsc75xx_resume(struct usb_interface *intf)
{}

static void smsc75xx_rx_csum_offload(struct usbnet *dev, struct sk_buff *skb,
				     u32 rx_cmd_a, u32 rx_cmd_b)
{}

static int smsc75xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{}

static struct sk_buff *smsc75xx_tx_fixup(struct usbnet *dev,
					 struct sk_buff *skb, gfp_t flags)
{}

static int smsc75xx_manage_power(struct usbnet *dev, int on)
{}

static const struct driver_info smsc75xx_info =;

static const struct usb_device_id products[] =;
MODULE_DEVICE_TABLE(usb, products);

static struct usb_driver smsc75xx_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();