diff options
Diffstat (limited to 'drivers/net/enic/vnic_dev.c')
-rw-r--r-- | drivers/net/enic/vnic_dev.c | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c index 08d5d42da260..f99ddeed1c4f 100644 --- a/drivers/net/enic/vnic_dev.c +++ b/drivers/net/enic/vnic_dev.c | |||
@@ -186,21 +186,6 @@ void __iomem *vnic_dev_get_res(struct vnic_dev *vdev, enum vnic_res_type type, | |||
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
189 | dma_addr_t vnic_dev_get_res_bus_addr(struct vnic_dev *vdev, | ||
190 | enum vnic_res_type type, unsigned int index) | ||
191 | { | ||
192 | switch (type) { | ||
193 | case RES_TYPE_WQ: | ||
194 | case RES_TYPE_RQ: | ||
195 | case RES_TYPE_CQ: | ||
196 | case RES_TYPE_INTR_CTRL: | ||
197 | return vdev->res[type].bus_addr + | ||
198 | index * VNIC_RES_STRIDE; | ||
199 | default: | ||
200 | return vdev->res[type].bus_addr; | ||
201 | } | ||
202 | } | ||
203 | |||
204 | unsigned int vnic_dev_desc_ring_size(struct vnic_dev_ring *ring, | 189 | unsigned int vnic_dev_desc_ring_size(struct vnic_dev_ring *ring, |
205 | unsigned int desc_count, unsigned int desc_size) | 190 | unsigned int desc_count, unsigned int desc_size) |
206 | { | 191 | { |
@@ -384,18 +369,6 @@ static int vnic_dev_cmd_no_proxy(struct vnic_dev *vdev, | |||
384 | return err; | 369 | return err; |
385 | } | 370 | } |
386 | 371 | ||
387 | void vnic_dev_cmd_proxy_by_bdf_start(struct vnic_dev *vdev, u16 bdf) | ||
388 | { | ||
389 | vdev->proxy = PROXY_BY_BDF; | ||
390 | vdev->proxy_index = bdf; | ||
391 | } | ||
392 | |||
393 | void vnic_dev_cmd_proxy_end(struct vnic_dev *vdev) | ||
394 | { | ||
395 | vdev->proxy = PROXY_NONE; | ||
396 | vdev->proxy_index = 0; | ||
397 | } | ||
398 | |||
399 | int vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, | 372 | int vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, |
400 | u64 *a0, u64 *a1, int wait) | 373 | u64 *a0, u64 *a1, int wait) |
401 | { | 374 | { |
@@ -488,13 +461,6 @@ int vnic_dev_spec(struct vnic_dev *vdev, unsigned int offset, unsigned int size, | |||
488 | return err; | 461 | return err; |
489 | } | 462 | } |
490 | 463 | ||
491 | int vnic_dev_stats_clear(struct vnic_dev *vdev) | ||
492 | { | ||
493 | u64 a0 = 0, a1 = 0; | ||
494 | int wait = 1000; | ||
495 | return vnic_dev_cmd(vdev, CMD_STATS_CLEAR, &a0, &a1, wait); | ||
496 | } | ||
497 | |||
498 | int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats) | 464 | int vnic_dev_stats_dump(struct vnic_dev *vdev, struct vnic_stats **stats) |
499 | { | 465 | { |
500 | u64 a0, a1; | 466 | u64 a0, a1; |
@@ -528,19 +494,6 @@ int vnic_dev_enable(struct vnic_dev *vdev) | |||
528 | return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait); | 494 | return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait); |
529 | } | 495 | } |
530 | 496 | ||
531 | int vnic_dev_enable_wait(struct vnic_dev *vdev) | ||
532 | { | ||
533 | u64 a0 = 0, a1 = 0; | ||
534 | int wait = 1000; | ||
535 | int err; | ||
536 | |||
537 | err = vnic_dev_cmd(vdev, CMD_ENABLE_WAIT, &a0, &a1, wait); | ||
538 | if (err == ERR_ECMDUNKNOWN) | ||
539 | return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait); | ||
540 | |||
541 | return err; | ||
542 | } | ||
543 | |||
544 | int vnic_dev_disable(struct vnic_dev *vdev) | 497 | int vnic_dev_disable(struct vnic_dev *vdev) |
545 | { | 498 | { |
546 | u64 a0 = 0, a1 = 0; | 499 | u64 a0 = 0, a1 = 0; |
@@ -680,26 +633,6 @@ int vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast, | |||
680 | return err; | 633 | return err; |
681 | } | 634 | } |
682 | 635 | ||
683 | int vnic_dev_packet_filter_all(struct vnic_dev *vdev, int directed, | ||
684 | int multicast, int broadcast, int promisc, int allmulti) | ||
685 | { | ||
686 | u64 a0, a1 = 0; | ||
687 | int wait = 1000; | ||
688 | int err; | ||
689 | |||
690 | a0 = (directed ? CMD_PFILTER_DIRECTED : 0) | | ||
691 | (multicast ? CMD_PFILTER_MULTICAST : 0) | | ||
692 | (broadcast ? CMD_PFILTER_BROADCAST : 0) | | ||
693 | (promisc ? CMD_PFILTER_PROMISCUOUS : 0) | | ||
694 | (allmulti ? CMD_PFILTER_ALL_MULTICAST : 0); | ||
695 | |||
696 | err = vnic_dev_cmd(vdev, CMD_PACKET_FILTER_ALL, &a0, &a1, wait); | ||
697 | if (err) | ||
698 | pr_err("Can't set packet filter\n"); | ||
699 | |||
700 | return err; | ||
701 | } | ||
702 | |||
703 | int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr) | 636 | int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr) |
704 | { | 637 | { |
705 | u64 a0 = 0, a1 = 0; | 638 | u64 a0 = 0, a1 = 0; |
@@ -748,19 +681,6 @@ int vnic_dev_set_ig_vlan_rewrite_mode(struct vnic_dev *vdev, | |||
748 | return err; | 681 | return err; |
749 | } | 682 | } |
750 | 683 | ||
751 | int vnic_dev_raise_intr(struct vnic_dev *vdev, u16 intr) | ||
752 | { | ||
753 | u64 a0 = intr, a1 = 0; | ||
754 | int wait = 1000; | ||
755 | int err; | ||
756 | |||
757 | err = vnic_dev_cmd(vdev, CMD_IAR, &a0, &a1, wait); | ||
758 | if (err) | ||
759 | pr_err("Failed to raise INTR[%d], err %d\n", intr, err); | ||
760 | |||
761 | return err; | ||
762 | } | ||
763 | |||
764 | int vnic_dev_notify_setcmd(struct vnic_dev *vdev, | 684 | int vnic_dev_notify_setcmd(struct vnic_dev *vdev, |
765 | void *notify_addr, dma_addr_t notify_pa, u16 intr) | 685 | void *notify_addr, dma_addr_t notify_pa, u16 intr) |
766 | { | 686 | { |
@@ -954,30 +874,6 @@ u32 vnic_dev_mtu(struct vnic_dev *vdev) | |||
954 | return vdev->notify_copy.mtu; | 874 | return vdev->notify_copy.mtu; |
955 | } | 875 | } |
956 | 876 | ||
957 | u32 vnic_dev_link_down_cnt(struct vnic_dev *vdev) | ||
958 | { | ||
959 | if (!vnic_dev_notify_ready(vdev)) | ||
960 | return 0; | ||
961 | |||
962 | return vdev->notify_copy.link_down_cnt; | ||
963 | } | ||
964 | |||
965 | u32 vnic_dev_notify_status(struct vnic_dev *vdev) | ||
966 | { | ||
967 | if (!vnic_dev_notify_ready(vdev)) | ||
968 | return 0; | ||
969 | |||
970 | return vdev->notify_copy.status; | ||
971 | } | ||
972 | |||
973 | u32 vnic_dev_uif(struct vnic_dev *vdev) | ||
974 | { | ||
975 | if (!vnic_dev_notify_ready(vdev)) | ||
976 | return 0; | ||
977 | |||
978 | return vdev->notify_copy.uif; | ||
979 | } | ||
980 | |||
981 | void vnic_dev_set_intr_mode(struct vnic_dev *vdev, | 877 | void vnic_dev_set_intr_mode(struct vnic_dev *vdev, |
982 | enum vnic_dev_intr_mode intr_mode) | 878 | enum vnic_dev_intr_mode intr_mode) |
983 | { | 879 | { |