From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C32DDA0561; Fri, 5 Mar 2021 03:15:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A73722A34D; Fri, 5 Mar 2021 03:14:58 +0100 (CET) Received: from smtpbg506.qq.com (smtpbg506.qq.com [203.205.250.33]) by mails.dpdk.org (Postfix) with ESMTP id CCEE922A344 for ; Fri, 5 Mar 2021 03:14:55 +0100 (CET) X-QQ-mid: bizesmtp20t1614910487t4b8h881 Received: from jiawenwu.trustnetic.com (unknown [183.129.236.74]) by esmtp6.qq.com (ESMTP) with id ; Fri, 05 Mar 2021 10:14:46 +0800 (CST) X-QQ-SSF: 01400000002000C0D000B00A0000000 X-QQ-FEAT: iw3rh0TbesN+tv5qLiWsE5BjhObLTJcVIb9o/IwPmQbAqWFywLJq4NunzHD0j Cy8UlbJrn7dvKcC9vId1RscAOBNAjxhSzmC1vBGvdocIp9xKPoiPbFqUd200n7AoYK8QMon YVdyZQ4x7Zh/6L2Fh2Nc4qcrRFojD1lV8/6BCzpiGsVOPyl7mBA0GvxxknPM53Jyb0f8Pwj xHQDj2+35syoN4Fz+cfG1X85P5HLR9Ms5bW4wYEX4yIjkloIMQ+9yCgvnFCLW6r9vOZm3iV 70iF0XTpkZ0JpueRbkXDI1+qKP4rDmdk7bnX4a5sAPSw3KJj3GC0UUxiIssLWxGLsQi/Z7Q Ar1nOm2Pk/vYD7VSXldip1zppH/Bg== X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Date: Fri, 5 Mar 2021 10:14:35 +0800 Message-Id: <20210305021438.10144-2-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210305021438.10144-1-jiawenwu@trustnetic.com> References: <20210305021438.10144-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 Subject: [dpdk-dev] [PATCH v2 1/4] net/txgbe: remove unused functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Remove unused functions for EEPROM read and write. Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/txgbe/base/txgbe_eeprom.c | 76 +-------------------------- drivers/net/txgbe/base/txgbe_eeprom.h | 2 - 2 files changed, 2 insertions(+), 76 deletions(-) diff --git a/drivers/net/txgbe/base/txgbe_eeprom.c b/drivers/net/txgbe/base/txgbe_eeprom.c index 72cd3ff30..bcbf3503c 100644 --- a/drivers/net/txgbe/base/txgbe_eeprom.c +++ b/drivers/net/txgbe/base/txgbe_eeprom.c @@ -193,7 +193,7 @@ s32 txgbe_ee_read16(struct txgbe_hw *hw, u32 offset, } /** - * txgbe_ee_read_buffer- Read EEPROM word(s) using hostif + * txgbe_ee_readw_buffer- Read EEPROM word(s) using hostif * @hw: pointer to hardware structure * @offset: offset of word in the EEPROM to read * @words: number of words @@ -274,42 +274,6 @@ s32 txgbe_ee_read32(struct txgbe_hw *hw, u32 addr, u32 *data) return err; } -/** - * txgbe_ee_read_buffer - Read EEPROM byte(s) using hostif - * @hw: pointer to hardware structure - * @addr: offset of bytes in the EEPROM to read - * @len: number of bytes - * @data: byte(s) read from the EEPROM - * - * Reads a 8 bit byte(s) from the EEPROM using the hostif. - **/ -s32 txgbe_ee_read_buffer(struct txgbe_hw *hw, - u32 addr, u32 len, void *data) -{ - const u32 mask = TXGBE_MNGSEM_SWMBX | TXGBE_MNGSEM_SWFLASH; - u8 *buf = (u8 *)data; - int err; - - err = hw->mac.acquire_swfw_sync(hw, mask); - if (err) - return err; - - while (len) { - u32 seg = (len <= TXGBE_PMMBX_DATA_SIZE - ? len : TXGBE_PMMBX_DATA_SIZE); - - err = txgbe_hic_sr_read(hw, addr, buf, seg); - if (err) - break; - - len -= seg; - buf += seg; - } - - hw->mac.release_swfw_sync(hw, mask); - return err; -} - /** * txgbe_ee_write - Write EEPROM word using hostif * @hw: pointer to hardware structure @@ -339,7 +303,7 @@ s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset, } /** - * txgbe_ee_write_buffer - Write EEPROM word(s) using hostif + * txgbe_ee_writew_buffer - Write EEPROM word(s) using hostif * @hw: pointer to hardware structure * @offset: offset of word in the EEPROM to write * @words: number of words @@ -420,42 +384,6 @@ s32 txgbe_ee_write32(struct txgbe_hw *hw, u32 addr, u32 data) return err; } -/** - * txgbe_ee_write_buffer - Write EEPROM byte(s) using hostif - * @hw: pointer to hardware structure - * @addr: offset of bytes in the EEPROM to write - * @len: number of bytes - * @data: word(s) write to the EEPROM - * - * Write a 8 bit byte(s) to the EEPROM using the hostif. - **/ -s32 txgbe_ee_write_buffer(struct txgbe_hw *hw, - u32 addr, u32 len, void *data) -{ - const u32 mask = TXGBE_MNGSEM_SWMBX | TXGBE_MNGSEM_SWFLASH; - u8 *buf = (u8 *)data; - int err; - - err = hw->mac.acquire_swfw_sync(hw, mask); - if (err) - return err; - - while (len) { - u32 seg = (len <= TXGBE_PMMBX_DATA_SIZE - ? len : TXGBE_PMMBX_DATA_SIZE); - - err = txgbe_hic_sr_write(hw, addr, buf, seg); - if (err) - break; - - len -= seg; - buf += seg; - } - - hw->mac.release_swfw_sync(hw, mask); - return err; -} - /** * txgbe_calc_eeprom_checksum - Calculates and returns the checksum * @hw: pointer to hardware structure diff --git a/drivers/net/txgbe/base/txgbe_eeprom.h b/drivers/net/txgbe/base/txgbe_eeprom.h index d0e142dba..78b8af978 100644 --- a/drivers/net/txgbe/base/txgbe_eeprom.h +++ b/drivers/net/txgbe/base/txgbe_eeprom.h @@ -51,14 +51,12 @@ s32 txgbe_ee_readw_sw(struct txgbe_hw *hw, u32 offset, u16 *data); s32 txgbe_ee_readw_buffer(struct txgbe_hw *hw, u32 offset, u32 words, void *data); s32 txgbe_ee_read32(struct txgbe_hw *hw, u32 addr, u32 *data); -s32 txgbe_ee_read_buffer(struct txgbe_hw *hw, u32 addr, u32 len, void *data); s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset, u16 data); s32 txgbe_ee_writew_sw(struct txgbe_hw *hw, u32 offset, u16 data); s32 txgbe_ee_writew_buffer(struct txgbe_hw *hw, u32 offset, u32 words, void *data); s32 txgbe_ee_write32(struct txgbe_hw *hw, u32 addr, u32 data); -s32 txgbe_ee_write_buffer(struct txgbe_hw *hw, u32 addr, u32 len, void *data); #endif /* _TXGBE_EEPROM_H_ */ -- 2.21.0.windows.1