• Home
  • Raw
  • Download

Lines Matching refs:netdev

114 static bool fcoe_match(struct net_device *netdev);
115 static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode);
116 static int fcoe_destroy(struct net_device *netdev);
117 static int fcoe_enable(struct net_device *netdev);
118 static int fcoe_disable(struct net_device *netdev);
121 static int fcoe_ctlr_alloc(struct net_device *netdev);
302 struct net_device *netdev) in fcoe_interface_setup() argument
310 fcoe->netdev = netdev; in fcoe_interface_setup()
313 ops = netdev->netdev_ops; in fcoe_interface_setup()
315 if (ops->ndo_fcoe_enable(netdev)) in fcoe_interface_setup()
316 FCOE_NETDEV_DBG(netdev, "Failed to enable FCoE" in fcoe_interface_setup()
321 if (netdev->priv_flags & IFF_BONDING && netdev->flags & IFF_MASTER) { in fcoe_interface_setup()
322 FCOE_NETDEV_DBG(netdev, "Bonded interfaces not supported\n"); in fcoe_interface_setup()
328 real_dev = (netdev->priv_flags & IFF_802_1Q_VLAN) ? in fcoe_interface_setup()
329 vlan_dev_real_dev(netdev) : netdev; in fcoe_interface_setup()
344 memcpy(fip->ctl_src_addr, netdev->dev_addr, netdev->addr_len); in fcoe_interface_setup()
352 dev_uc_add(netdev, flogi_maddr); in fcoe_interface_setup()
354 dev_uc_add(netdev, fip->ctl_src_addr); in fcoe_interface_setup()
356 dev_mc_add(netdev, FIP_ALL_VN2VN_MACS); in fcoe_interface_setup()
357 dev_mc_add(netdev, FIP_ALL_P2P_MACS); in fcoe_interface_setup()
359 dev_mc_add(netdev, FIP_ALL_ENODE_MACS); in fcoe_interface_setup()
367 fcoe->fcoe_packet_type.dev = netdev; in fcoe_interface_setup()
372 fcoe->fip_packet_type.dev = netdev; in fcoe_interface_setup()
385 static struct fcoe_interface *fcoe_interface_create(struct net_device *netdev, in fcoe_interface_create() argument
395 FCOE_NETDEV_DBG(netdev, in fcoe_interface_create()
402 ctlr_dev = fcoe_ctlr_device_add(&netdev->dev, &fcoe_sysfs_templ, in fcoe_interface_create()
413 dev_hold(netdev); in fcoe_interface_create()
423 err = fcoe_interface_setup(fcoe, netdev); in fcoe_interface_create()
427 dev_put(netdev); in fcoe_interface_create()
448 struct net_device *netdev = fcoe->netdev; in fcoe_interface_remove() local
465 dev_uc_del(netdev, flogi_maddr); in fcoe_interface_remove()
467 dev_uc_del(netdev, fip->ctl_src_addr); in fcoe_interface_remove()
469 dev_mc_del(netdev, FIP_ALL_VN2VN_MACS); in fcoe_interface_remove()
470 dev_mc_del(netdev, FIP_ALL_P2P_MACS); in fcoe_interface_remove()
472 dev_mc_del(netdev, FIP_ALL_ENODE_MACS); in fcoe_interface_remove()
475 ops = netdev->netdev_ops; in fcoe_interface_remove()
477 if (ops->ndo_fcoe_disable(netdev)) in fcoe_interface_remove()
478 FCOE_NETDEV_DBG(netdev, "Failed to disable FCoE" in fcoe_interface_remove()
491 struct net_device *netdev = fcoe->netdev; in fcoe_interface_cleanup() local
503 dev_put(netdev); in fcoe_interface_cleanup()
517 static int fcoe_fip_recv(struct sk_buff *skb, struct net_device *netdev, in fcoe_fip_recv() argument
550 skb->dev = fcoe_from_ctlr(fip)->netdev; in fcoe_fip_send()
568 dev_uc_del(fcoe->netdev, port->data_src_addr); in fcoe_update_src_mac()
570 dev_uc_add(fcoe->netdev, addr); in fcoe_update_src_mac()
623 struct net_device *netdev) in fcoe_netdev_features_change() argument
627 if (netdev->features & NETIF_F_SG) in fcoe_netdev_features_change()
632 if (netdev->features & NETIF_F_FCOE_CRC) { in fcoe_netdev_features_change()
634 FCOE_NETDEV_DBG(netdev, "Supports FCCRC offload\n"); in fcoe_netdev_features_change()
639 if (netdev->features & NETIF_F_FSO) { in fcoe_netdev_features_change()
641 lport->lso_max = netdev->gso_max_size; in fcoe_netdev_features_change()
642 FCOE_NETDEV_DBG(netdev, "Supports LSO for max len 0x%x\n", in fcoe_netdev_features_change()
649 if (netdev->fcoe_ddp_xid) { in fcoe_netdev_features_change()
651 lport->lro_xid = netdev->fcoe_ddp_xid; in fcoe_netdev_features_change()
652 FCOE_NETDEV_DBG(netdev, "Supports LRO for max xid 0x%x\n", in fcoe_netdev_features_change()
671 static int fcoe_netdev_config(struct fc_lport *lport, struct net_device *netdev) in fcoe_netdev_config() argument
689 mfs = netdev->mtu; in fcoe_netdev_config()
690 if (netdev->features & NETIF_F_FCOE_MTU) { in fcoe_netdev_config()
692 FCOE_NETDEV_DBG(netdev, "Supports FCOE_MTU of %d bytes\n", mfs); in fcoe_netdev_config()
699 fcoe_netdev_features_change(lport, netdev); in fcoe_netdev_config()
708 if (fcoe_get_wwn(netdev, &wwnn, NETDEV_FCOE_WWNN)) in fcoe_netdev_config()
711 if (fcoe_get_wwn(netdev, &wwpn, NETDEV_FCOE_WWPN)) in fcoe_netdev_config()
771 static void fcoe_fdmi_info(struct fc_lport *lport, struct net_device *netdev) in fcoe_fdmi_info() argument
907 if (fcoe->netdev->priv_flags & IFF_802_1Q_VLAN) in fcoe_em_config()
908 cur_real_dev = vlan_dev_real_dev(fcoe->netdev); in fcoe_em_config()
910 cur_real_dev = fcoe->netdev; in fcoe_em_config()
913 if (oldfcoe->netdev->priv_flags & IFF_802_1Q_VLAN) in fcoe_em_config()
914 old_real_dev = vlan_dev_real_dev(oldfcoe->netdev); in fcoe_em_config()
916 old_real_dev = oldfcoe->netdev; in fcoe_em_config()
928 fcoe->oem, fcoe->netdev->name); in fcoe_em_config()
938 fcoe->netdev->name); in fcoe_em_config()
951 "allocate em on interface %s\n", fcoe->netdev->name); in fcoe_em_config()
967 struct net_device *netdev = fcoe->netdev; in fcoe_if_destroy() local
969 FCOE_NETDEV_DBG(netdev, "Destroying interface\n"); in fcoe_if_destroy()
985 dev_uc_del(netdev, port->data_src_addr); in fcoe_if_destroy()
1028 struct net_device *netdev = fcoe_netdev(lport); in fcoe_ddp_setup() local
1030 if (netdev->netdev_ops->ndo_fcoe_ddp_setup) in fcoe_ddp_setup()
1031 return netdev->netdev_ops->ndo_fcoe_ddp_setup(netdev, in fcoe_ddp_setup()
1050 struct net_device *netdev = fcoe_netdev(lport); in fcoe_ddp_target() local
1052 if (netdev->netdev_ops->ndo_fcoe_ddp_target) in fcoe_ddp_target()
1053 return netdev->netdev_ops->ndo_fcoe_ddp_target(netdev, xid, in fcoe_ddp_target()
1069 struct net_device *netdev = fcoe_netdev(lport); in fcoe_ddp_done() local
1071 if (netdev->netdev_ops->ndo_fcoe_ddp_done) in fcoe_ddp_done()
1072 return netdev->netdev_ops->ndo_fcoe_ddp_done(netdev, xid); in fcoe_ddp_done()
1090 struct net_device *netdev = fcoe->netdev; in fcoe_if_create() local
1101 FCOE_NETDEV_DBG(netdev, "Create Interface\n"); in fcoe_if_create()
1109 FCOE_NETDEV_DBG(netdev, "Could not allocate host structure\n"); in fcoe_if_create()
1130 FCOE_NETDEV_DBG(netdev, "Could not configure lport for the " in fcoe_if_create()
1136 FCOE_NETDEV_DBG(netdev, "Setting vport names, " in fcoe_if_create()
1144 rc = fcoe_netdev_config(lport, netdev); in fcoe_if_create()
1146 FCOE_NETDEV_DBG(netdev, "Could not configure netdev for the " in fcoe_if_create()
1154 FCOE_NETDEV_DBG(netdev, "Could not configure shost for the " in fcoe_if_create()
1162 FCOE_NETDEV_DBG(netdev, "Could not configure libfc for the " in fcoe_if_create()
1168 fcoe_fdmi_info(lport, netdev); in fcoe_if_create()
1189 FCOE_NETDEV_DBG(netdev, "Could not configure the EM\n"); in fcoe_if_create()
1423 static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, in fcoe_rcv() argument
1439 FCOE_NETDEV_DBG(netdev, "Cannot find hba structure"); in fcoe_rcv()
1445 FCOE_NETDEV_DBG(netdev, "skb_info: len:%d data_len:%d head:%p " in fcoe_rcv()
1455 FCOE_NETDEV_DBG(netdev, "wrong source mac address:%pM\n", in fcoe_rcv()
1472 FCOE_NETDEV_DBG(netdev, "FC frame d_id mismatch with MAC:%pM\n", in fcoe_rcv()
1507 FCOE_NETDEV_DBG(netdev, "CPU is online, but no receive thread " in fcoe_rcv()
1657 if (fcoe->netdev->priv_flags & IFF_802_1Q_VLAN && in fcoe_xmit()
1662 vlan_dev_vlan_id(fcoe->netdev)); in fcoe_xmit()
1666 skb->dev = fcoe->netdev; in fcoe_xmit()
1908 fcoe_hostlist_lookup_realdev_port(struct net_device *netdev) in fcoe_hostlist_lookup_realdev_port() argument
1914 if (fcoe->netdev->priv_flags & IFF_802_1Q_VLAN) in fcoe_hostlist_lookup_realdev_port()
1915 real_dev = vlan_dev_real_dev(fcoe->netdev); in fcoe_hostlist_lookup_realdev_port()
1917 real_dev = fcoe->netdev; in fcoe_hostlist_lookup_realdev_port()
1919 if (netdev == real_dev) in fcoe_hostlist_lookup_realdev_port()
1931 struct net_device *netdev; in fcoe_dcb_app_notification() local
1937 netdev = dev_get_by_index(&init_net, entry->ifindex); in fcoe_dcb_app_notification()
1938 if (!netdev) in fcoe_dcb_app_notification()
1941 fcoe = fcoe_hostlist_lookup_realdev_port(netdev); in fcoe_dcb_app_notification()
1942 dev_put(netdev); in fcoe_dcb_app_notification()
1981 struct net_device *netdev = ptr; in fcoe_device_notification() local
1991 if (fcoe->netdev == netdev) { in fcoe_device_notification()
2011 if (netdev->features & NETIF_F_FCOE_MTU) in fcoe_device_notification()
2013 mfs = netdev->mtu - (sizeof(struct fcoe_hdr) + in fcoe_device_notification()
2027 fcoe_netdev_features_change(lport, netdev); in fcoe_device_notification()
2030 FCOE_NETDEV_DBG(netdev, "Unknown event %ld " in fcoe_device_notification()
2074 static int fcoe_disable(struct net_device *netdev) in fcoe_disable() argument
2083 fcoe = fcoe_hostlist_lookup_port(netdev); in fcoe_disable()
2105 static int fcoe_enable(struct net_device *netdev) in fcoe_enable() argument
2113 fcoe = fcoe_hostlist_lookup_port(netdev); in fcoe_enable()
2145 struct net_device *netdev = fcoe_netdev(lport); in fcoe_ctlr_enabled() local
2149 return fcoe_enable(netdev); in fcoe_ctlr_enabled()
2151 return fcoe_disable(netdev); in fcoe_ctlr_enabled()
2166 static int fcoe_destroy(struct net_device *netdev) in fcoe_destroy() argument
2176 fcoe = fcoe_hostlist_lookup_port(netdev); in fcoe_destroy()
2250 static bool fcoe_match(struct net_device *netdev) in fcoe_match() argument
2266 struct net_device *netdev = fcoe->realdev; in fcoe_dcb_create() local
2274 if (netdev && netdev->dcbnl_ops && netdev->dcbnl_ops->getdcbx) { in fcoe_dcb_create()
2275 dcbx = netdev->dcbnl_ops->getdcbx(netdev); in fcoe_dcb_create()
2279 up = dcb_ieee_getapp_mask(netdev, &app); in fcoe_dcb_create()
2281 fup = dcb_ieee_getapp_mask(netdev, &app); in fcoe_dcb_create()
2284 up = dcb_getapp(netdev, &app); in fcoe_dcb_create()
2286 fup = dcb_getapp(netdev, &app); in fcoe_dcb_create()
2313 static int _fcoe_create(struct net_device *netdev, enum fip_state fip_mode, in _fcoe_create() argument
2326 if (fcoe_hostlist_lookup(netdev)) { in _fcoe_create()
2331 fcoe = fcoe_interface_create(netdev, fip_mode); in _fcoe_create()
2342 netdev->name); in _fcoe_create()
2402 static int fcoe_create(struct net_device *netdev, enum fip_state fip_mode) in fcoe_create() argument
2404 return _fcoe_create(netdev, fip_mode, FCOE_CREATE_LINK_UP); in fcoe_create()
2418 static int fcoe_ctlr_alloc(struct net_device *netdev) in fcoe_ctlr_alloc() argument
2420 return _fcoe_create(netdev, FIP_MODE_FABRIC, in fcoe_ctlr_alloc()
2433 struct net_device *netdev = fcoe_netdev(lport); in fcoe_link_ok() local
2435 if (netif_oper_up(netdev)) in fcoe_link_ok()
2511 fcoe_hostlist_lookup_port(const struct net_device *netdev) in fcoe_hostlist_lookup_port() argument
2516 if (fcoe->netdev == netdev) in fcoe_hostlist_lookup_port()
2531 static struct fc_lport *fcoe_hostlist_lookup(const struct net_device *netdev) in fcoe_hostlist_lookup() argument
2536 fcoe = fcoe_hostlist_lookup_port(netdev); in fcoe_hostlist_lookup()
2803 struct net_device *netdev = fcoe->netdev; in fcoe_vport_create() local
2825 netdev->name); in fcoe_vport_create()
2921 fcf_dev->vlan_id = vlan_dev_vlan_id(fcoe->netdev); in fcoe_fcf_get_vlan_id()