mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
scsi: libcxgbi: find cxgbi device by MAC address
If cxgbi_device_find_by_netdev() returns NULL then find cxgbi device by MAC address. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
18c4f0a42b
commit
ffcd686b91
1 changed files with 2 additions and 2 deletions
|
@ -282,7 +282,6 @@ struct cxgbi_device *cxgbi_device_find_by_netdev_rcu(struct net_device *ndev,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(cxgbi_device_find_by_netdev_rcu);
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
static struct cxgbi_device *cxgbi_device_find_by_mac(struct net_device *ndev,
|
||||
int *port)
|
||||
{
|
||||
|
@ -315,7 +314,6 @@ static struct cxgbi_device *cxgbi_device_find_by_mac(struct net_device *ndev,
|
|||
ndev, ndev->name);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
void cxgbi_hbas_remove(struct cxgbi_device *cdev)
|
||||
{
|
||||
|
@ -653,6 +651,8 @@ cxgbi_check_route(struct sockaddr *dst_addr, int ifindex)
|
|||
}
|
||||
|
||||
cdev = cxgbi_device_find_by_netdev(ndev, &port);
|
||||
if (!cdev)
|
||||
cdev = cxgbi_device_find_by_mac(ndev, &port);
|
||||
if (!cdev) {
|
||||
pr_info("dst %pI4, %s, NOT cxgbi device.\n",
|
||||
&daddr->sin_addr.s_addr, ndev->name);
|
||||
|
|
Loading…
Reference in a new issue