diff options
author | Vasu Dev <vasu.dev@intel.com> | 2015-02-09 13:00:30 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-02-25 01:26:00 -0500 |
commit | ccafbce41b55e6c3726b5b2ee561e1bf6659d279 (patch) | |
tree | 2c81b2bbfe655f55eed656aedc7a3567de7bfc49 | |
parent | a6db5a4d011097ae16449f25f51d2fbbc2942fc8 (diff) |
i40e: setup FCoE device type
Setup FCoE netdev device type as "fcoe", so that it shows up in
sysfs as FCoE device.
Change-ID: Ie13a1a332dba4d5802586926104ee01ef20da44f
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c index cc11868c92ad..05d883e4d4ac 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c +++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c | |||
@@ -1474,6 +1474,11 @@ static const struct net_device_ops i40e_fcoe_netdev_ops = { | |||
1474 | .ndo_set_features = i40e_fcoe_set_features, | 1474 | .ndo_set_features = i40e_fcoe_set_features, |
1475 | }; | 1475 | }; |
1476 | 1476 | ||
1477 | /* fcoe network device type */ | ||
1478 | static struct device_type fcoe_netdev_type = { | ||
1479 | .name = "fcoe", | ||
1480 | }; | ||
1481 | |||
1477 | /** | 1482 | /** |
1478 | * i40e_fcoe_config_netdev - prepares the VSI context for creating a FCoE VSI | 1483 | * i40e_fcoe_config_netdev - prepares the VSI context for creating a FCoE VSI |
1479 | * @vsi: pointer to the associated VSI struct | 1484 | * @vsi: pointer to the associated VSI struct |
@@ -1507,6 +1512,7 @@ void i40e_fcoe_config_netdev(struct net_device *netdev, struct i40e_vsi *vsi) | |||
1507 | strlcpy(netdev->name, "fcoe%d", IFNAMSIZ-1); | 1512 | strlcpy(netdev->name, "fcoe%d", IFNAMSIZ-1); |
1508 | netdev->mtu = FCOE_MTU; | 1513 | netdev->mtu = FCOE_MTU; |
1509 | SET_NETDEV_DEV(netdev, &pf->pdev->dev); | 1514 | SET_NETDEV_DEV(netdev, &pf->pdev->dev); |
1515 | SET_NETDEV_DEVTYPE(netdev, &fcoe_netdev_type); | ||
1510 | /* set different dev_port value 1 for FCoE netdev than the default | 1516 | /* set different dev_port value 1 for FCoE netdev than the default |
1511 | * zero dev_port value for PF netdev, this helps biosdevname user | 1517 | * zero dev_port value for PF netdev, this helps biosdevname user |
1512 | * tool to differentiate them correctly while both attached to the | 1518 | * tool to differentiate them correctly while both attached to the |