projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: hns: delete redundancy ring enable operations
[deliverable/linux.git]
/
drivers
/
net
/
ethernet
/
hisilicon
/
hns
/
hnae.c
diff --git
a/drivers/net/ethernet/hisilicon/hns/hnae.c
b/drivers/net/ethernet/hisilicon/hns/hnae.c
index d630acdb07495d966dc92496a02c5b3089ebe005..c54c6fac0d1de065cc891fe9103bba027c6f2df8 100644
(file)
--- a/
drivers/net/ethernet/hisilicon/hns/hnae.c
+++ b/
drivers/net/ethernet/hisilicon/hns/hnae.c
@@
-96,7
+96,13
@@
static int __ae_match(struct device *dev, const void *data)
{
struct hnae_ae_dev *hdev = cls_to_ae_dev(dev);
{
struct hnae_ae_dev *hdev = cls_to_ae_dev(dev);
- return (data == &hdev->dev->of_node->fwnode);
+ if (dev_of_node(hdev->dev))
+ return (data == &hdev->dev->of_node->fwnode);
+ else if (is_acpi_node(hdev->dev->fwnode))
+ return (data == hdev->dev->fwnode);
+
+ dev_err(dev, "__ae_match cannot read cfg data from OF or acpi\n");
+ return 0;
}
static struct hnae_ae_dev *find_ae(const struct fwnode_handle *fwnode)
}
static struct hnae_ae_dev *find_ae(const struct fwnode_handle *fwnode)
@@
-394,7
+400,6
@@
int hnae_ae_register(struct hnae_ae_dev *hdev, struct module *owner)
if (!hdev->ops || !hdev->ops->get_handle ||
!hdev->ops->toggle_ring_irq ||
if (!hdev->ops || !hdev->ops->get_handle ||
!hdev->ops->toggle_ring_irq ||
- !hdev->ops->toggle_queue_status ||
!hdev->ops->get_status || !hdev->ops->adjust_link)
return -EINVAL;
!hdev->ops->get_status || !hdev->ops->adjust_link)
return -EINVAL;
This page took
0.05102 seconds
and
5
git commands to generate.