From: Aaron Conole Date: Tue, 26 Sep 2017 18:53:28 +0000 (-0400) Subject: net/enic: remove unused code X-Git-Tag: spdx-start~1470 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d15ae1c37225e1c163d7d463a4401d6d762c6109;p=dpdk.git net/enic: remove unused code The functions here aren't called anywhere in code, at least according to both the compiler, and some greps. Signed-off-by: Aaron Conole Reviewed-by: John Daley --- diff --git a/drivers/net/enic/base/vnic_cq.c b/drivers/net/enic/base/vnic_cq.c index 33db10fd0e..3549fece9c 100644 --- a/drivers/net/enic/base/vnic_cq.c +++ b/drivers/net/enic/base/vnic_cq.c @@ -35,16 +35,6 @@ #include "vnic_dev.h" #include "vnic_cq.h" -int vnic_cq_mem_size(struct vnic_cq *cq, unsigned int desc_count, - unsigned int desc_size) -{ - int mem_size; - - mem_size = vnic_dev_desc_ring_size(&cq->ring, desc_count, desc_size); - - return mem_size; -} - void vnic_cq_free(struct vnic_cq *cq) { vnic_dev_free_desc_ring(cq->vdev, &cq->ring); diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c index da8a464e36..806467999e 100644 --- a/drivers/net/enic/base/vnic_dev.c +++ b/drivers/net/enic/base/vnic_dev.c @@ -443,24 +443,6 @@ static int vnic_dev_cmd_no_proxy(struct vnic_dev *vdev, return err; } -void vnic_dev_cmd_proxy_by_index_start(struct vnic_dev *vdev, u16 index) -{ - vdev->proxy = PROXY_BY_INDEX; - vdev->proxy_index = index; -} - -void vnic_dev_cmd_proxy_by_bdf_start(struct vnic_dev *vdev, u16 bdf) -{ - vdev->proxy = PROXY_BY_BDF; - vdev->proxy_index = bdf; -} - -void vnic_dev_cmd_proxy_end(struct vnic_dev *vdev) -{ - vdev->proxy = PROXY_NONE; - vdev->proxy_index = 0; -} - int vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd, u64 *a0, u64 *a1, int wait) { @@ -672,15 +654,6 @@ int vnic_dev_close(struct vnic_dev *vdev) return vnic_dev_cmd(vdev, CMD_CLOSE, &a0, &a1, wait); } -/** Deprecated. @see vnic_dev_enable_wait */ -int vnic_dev_enable(struct vnic_dev *vdev) -{ - u64 a0 = 0, a1 = 0; - int wait = 1000; - - return vnic_dev_cmd(vdev, CMD_ENABLE, &a0, &a1, wait); -} - int vnic_dev_enable_wait(struct vnic_dev *vdev) { u64 a0 = 0, a1 = 0; @@ -725,31 +698,6 @@ int vnic_dev_open_done(struct vnic_dev *vdev, int *done) return 0; } -int vnic_dev_soft_reset(struct vnic_dev *vdev, int arg) -{ - u64 a0 = (u32)arg, a1 = 0; - int wait = 1000; - - return vnic_dev_cmd(vdev, CMD_SOFT_RESET, &a0, &a1, wait); -} - -int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done) -{ - u64 a0 = 0, a1 = 0; - int wait = 1000; - int err; - - *done = 0; - - err = vnic_dev_cmd(vdev, CMD_SOFT_RESET_STATUS, &a0, &a1, wait); - if (err) - return err; - - *done = (a0 == 0); - - return 0; -} - int vnic_dev_get_mac_addr(struct vnic_dev *vdev, u8 *mac_addr) { u64 a0 = 0, a1 = 0; @@ -840,19 +788,6 @@ int vnic_dev_set_ig_vlan_rewrite_mode(struct vnic_dev *vdev, return 0; } -int vnic_dev_raise_intr(struct vnic_dev *vdev, u16 intr) -{ - u64 a0 = intr, a1 = 0; - int wait = 1000; - int err; - - err = vnic_dev_cmd(vdev, CMD_IAR, &a0, &a1, wait); - if (err) - pr_err("Failed to raise INTR[%d], err %d\n", intr, err); - - return err; -} - void vnic_dev_set_reset_flag(struct vnic_dev *vdev, int state) { vdev->in_reset = state; @@ -985,14 +920,6 @@ int vnic_dev_init(struct vnic_dev *vdev, int arg) return r; } -int vnic_dev_deinit(struct vnic_dev *vdev) -{ - u64 a0 = 0, a1 = 0; - int wait = 1000; - - return vnic_dev_cmd(vdev, CMD_DEINIT, &a0, &a1, wait); -} - void vnic_dev_intr_coal_timer_info_default(struct vnic_dev *vdev) { /* Default: hardware intr coal timer is in units of 1.5 usecs */ @@ -1018,18 +945,6 @@ u32 vnic_dev_port_speed(struct vnic_dev *vdev) return vdev->notify_copy.port_speed; } -void vnic_dev_set_intr_mode(struct vnic_dev *vdev, - enum vnic_dev_intr_mode intr_mode) -{ - vdev->intr_mode = intr_mode; -} - -enum vnic_dev_intr_mode vnic_dev_get_intr_mode( - struct vnic_dev *vdev) -{ - return vdev->intr_mode; -} - u32 vnic_dev_intr_coal_timer_usec_to_hw(struct vnic_dev *vdev, u32 usec) { return (usec * vdev->intr_coal_timer_info.mul) / @@ -1100,23 +1015,6 @@ err_out: return NULL; } -struct rte_pci_device *vnic_dev_get_pdev(struct vnic_dev *vdev) -{ - return vdev->pdev; -} - -int vnic_dev_set_mac_addr(struct vnic_dev *vdev, u8 *mac_addr) -{ - u64 a0, a1 = 0; - int wait = 1000; - int i; - - for (i = 0; i < ETH_ALEN; i++) - ((u8 *)&a0)[i] = mac_addr[i]; - - return vnic_dev_cmd(vdev, CMD_SET_MAC_ADDR, &a0, &a1, wait); -} - /* * vnic_dev_classifier: Add/Delete classifier entries * @vdev: vdev of the device diff --git a/drivers/net/enic/base/vnic_rq.c b/drivers/net/enic/base/vnic_rq.c index 776a6f7684..ea297eeff2 100644 --- a/drivers/net/enic/base/vnic_rq.c +++ b/drivers/net/enic/base/vnic_rq.c @@ -118,11 +118,6 @@ void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index, rq->pkt_last_seg = NULL; } -void vnic_rq_error_out(struct vnic_rq *rq, unsigned int error) -{ - iowrite32(error, &rq->ctrl->error_status); -} - unsigned int vnic_rq_error_status(struct vnic_rq *rq) { return ioread32(&rq->ctrl->error_status); diff --git a/drivers/net/enic/base/vnic_rss.c b/drivers/net/enic/base/vnic_rss.c index 1cf055b0ca..87d40c0dc1 100644 --- a/drivers/net/enic/base/vnic_rss.c +++ b/drivers/net/enic/base/vnic_rss.c @@ -50,35 +50,3 @@ void vnic_set_rss_key(union vnic_rss_key *rss_key, u8 *key) } } -void vnic_set_rss_cpu(union vnic_rss_cpu *rss_cpu, u8 *cpu) -{ - u32 i; - u32 *p = (u32 *)cpu; - - for (i = 0; i < 32; ++i) - iowrite32(*p++, &rss_cpu->cpu[i].b[0]); -} - -void vnic_get_rss_key(union vnic_rss_key *rss_key, u8 *key) -{ - u32 i; - u32 *p; - u16 *q; - - for (i = 0; i < 4; ++i) { - p = (u32 *)(key + (10 * i)); - *p++ = ioread32(&rss_key->key[i].b[0]); - *p++ = ioread32(&rss_key->key[i].b[4]); - q = (u16 *)p; - *q = (u16)ioread32(&rss_key->key[i].b[8]); - } -} - -void vnic_get_rss_cpu(union vnic_rss_cpu *rss_cpu, u8 *cpu) -{ - u32 i; - u32 *p = (u32 *)cpu; - - for (i = 0; i < 32; ++i) - *p++ = ioread32(&rss_cpu->cpu[i].b[0]); -} diff --git a/drivers/net/enic/base/vnic_wq.c b/drivers/net/enic/base/vnic_wq.c index 273e3dba07..0a1247f46f 100644 --- a/drivers/net/enic/base/vnic_wq.c +++ b/drivers/net/enic/base/vnic_wq.c @@ -145,11 +145,6 @@ void vnic_wq_init(struct vnic_wq *wq, unsigned int cq_index, wq->last_completed_index = 0; } -void vnic_wq_error_out(struct vnic_wq *wq, unsigned int error) -{ - iowrite32(error, &wq->ctrl->error_status); -} - unsigned int vnic_wq_error_status(struct vnic_wq *wq) { return ioread32(&wq->ctrl->error_status); diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index e28f22352f..9dc86dfb1b 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h @@ -227,11 +227,6 @@ static inline unsigned int enic_cq_wq(struct enic *enic, unsigned int wq) return enic->rq_count + wq; } -static inline unsigned int enic_msix_err_intr(__rte_unused struct enic *enic) -{ - return 0; -} - static inline struct enic *pmd_priv(struct rte_eth_dev *eth_dev) { return (struct enic *)eth_dev->data->dev_private; diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h index fc58bb41d1..1cb5686f8f 100644 --- a/drivers/net/enic/enic_compat.h +++ b/drivers/net/enic/enic_compat.h @@ -99,11 +99,6 @@ static inline uint32_t ioread32(volatile void *addr) return rte_read32(addr); } -static inline uint16_t ioread16(volatile void *addr) -{ - return rte_read16(addr); -} - static inline uint8_t ioread8(volatile void *addr) { return rte_read8(addr); @@ -119,26 +114,11 @@ static inline void iowrite32_relaxed(uint32_t val, volatile void *addr) rte_write32_relaxed(val, addr); } -static inline void iowrite16(uint16_t val, volatile void *addr) -{ - rte_write16(val, addr); -} - -static inline void iowrite8(uint8_t val, volatile void *addr) -{ - rte_write8(val, addr); -} - static inline unsigned int readl(volatile void __iomem *addr) { return rte_read32(addr); } -static inline unsigned int readl_relaxed(volatile void __iomem *addr) -{ - return rte_read32_relaxed(addr); -} - static inline void writel(unsigned int val, volatile void __iomem *addr) { rte_write32(val, addr);