smsc95xx.c (9434628fcee63b1f3c6a6881b70e8f69a1f68e88) smsc95xx.c (7c8b1e855f94f88a0c569be6309fc8d5c8844cd1)
1// SPDX-License-Identifier: GPL-2.0-or-later
2 /***************************************************************************
3 *
4 * Copyright (C) 2007-2008 SMSC
5 *
6 *****************************************************************************/
7
8#include <linux/module.h>

--- 1273 unchanged lines hidden (view full) ---

1282
1283 dev->net->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
1284 set_bit(EVENT_NO_IP_ALIGN, &dev->flags);
1285
1286 smsc95xx_init_mac_address(dev);
1287
1288 /* Init all registers */
1289 ret = smsc95xx_reset(dev);
1// SPDX-License-Identifier: GPL-2.0-or-later
2 /***************************************************************************
3 *
4 * Copyright (C) 2007-2008 SMSC
5 *
6 *****************************************************************************/
7
8#include <linux/module.h>

--- 1273 unchanged lines hidden (view full) ---

1282
1283 dev->net->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
1284 set_bit(EVENT_NO_IP_ALIGN, &dev->flags);
1285
1286 smsc95xx_init_mac_address(dev);
1287
1288 /* Init all registers */
1289 ret = smsc95xx_reset(dev);
1290 if (ret)
1291 goto free_pdata;
1290
1291 /* detect device revision as different features may be available */
1292 ret = smsc95xx_read_reg(dev, ID_REV, &val);
1293 if (ret < 0)
1294 return ret;
1295 val >>= 16;
1296 pdata->chip_id = val;
1297 pdata->mdix_ctrl = get_mdix_status(dev->net);

--- 14 unchanged lines hidden (view full) ---

1312 dev->net->max_mtu = ETH_DATA_LEN;
1313 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
1314
1315 pdata->dev = dev;
1316 INIT_DELAYED_WORK(&pdata->carrier_check, check_carrier);
1317 schedule_delayed_work(&pdata->carrier_check, CARRIER_CHECK_DELAY);
1318
1319 return 0;
1292
1293 /* detect device revision as different features may be available */
1294 ret = smsc95xx_read_reg(dev, ID_REV, &val);
1295 if (ret < 0)
1296 return ret;
1297 val >>= 16;
1298 pdata->chip_id = val;
1299 pdata->mdix_ctrl = get_mdix_status(dev->net);

--- 14 unchanged lines hidden (view full) ---

1314 dev->net->max_mtu = ETH_DATA_LEN;
1315 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
1316
1317 pdata->dev = dev;
1318 INIT_DELAYED_WORK(&pdata->carrier_check, check_carrier);
1319 schedule_delayed_work(&pdata->carrier_check, CARRIER_CHECK_DELAY);
1320
1321 return 0;
1322
1323free_pdata:
1324 kfree(pdata);
1325 return ret;
1320}
1321
1322static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf)
1323{
1324 struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
1325
1326 if (pdata) {
1327 cancel_delayed_work_sync(&pdata->carrier_check);

--- 887 unchanged lines hidden ---
1326}
1327
1328static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf)
1329{
1330 struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
1331
1332 if (pdata) {
1333 cancel_delayed_work_sync(&pdata->carrier_check);

--- 887 unchanged lines hidden ---