From owner-svn-src-all@freebsd.org Tue Mar 8 08:13:39 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84E5AAC3E71; Tue, 8 Mar 2016 08:13:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6053C2CE; Tue, 8 Mar 2016 08:13:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u288Dc2q079659; Tue, 8 Mar 2016 08:13:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u288Dca5079656; Tue, 8 Mar 2016 08:13:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201603080813.u288Dca5079656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 8 Mar 2016 08:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296490 - in head/sys/dev/cxgbe: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2016 08:13:39 -0000 Author: np Date: Tue Mar 8 08:13:37 2016 New Revision: 296490 URL: https://svnweb.freebsd.org/changeset/base/296490 Log: cxgbe(4): Remove __devinit and SPEED_ as part of catch up with internal shared code. Obtained from: Chelsio Communications Modified: head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/osdep.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Tue Mar 8 07:48:55 2016 (r296489) +++ head/sys/dev/cxgbe/common/t4_hw.c Tue Mar 8 08:13:37 2016 (r296490) @@ -5359,7 +5359,7 @@ void t4_tp_wr_bits_indirect(struct adapt * * Initialize the congestion control parameters. */ -static void __devinit init_cong_ctrl(unsigned short *a, unsigned short *b) +static void init_cong_ctrl(unsigned short *a, unsigned short *b) { a[0] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = 1; a[9] = 2; @@ -7400,13 +7400,13 @@ int t4_handle_fw_rpl(struct adapter *ada if (stat & F_FW_PORT_CMD_TXPAUSE) fc |= PAUSE_TX; if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_100M)) - speed = SPEED_100; + speed = 100; else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_1G)) - speed = SPEED_1000; + speed = 1000; else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_10G)) - speed = SPEED_10000; + speed = 10000; else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_40G)) - speed = SPEED_40000; + speed = 40000; for_each_port(adap, i) { pi = adap2pinfo(adap, i); @@ -7450,7 +7450,7 @@ int t4_handle_fw_rpl(struct adapter *ada * Determines a card's PCI mode and associated parameters, such as speed * and width. */ -static void __devinit get_pci_mode(struct adapter *adapter, +static void get_pci_mode(struct adapter *adapter, struct pci_params *p) { u16 val; @@ -7472,8 +7472,7 @@ static void __devinit get_pci_mode(struc * Initializes the SW state maintained for each link, including the link's * capabilities and default speed/flow-control/autonegotiation settings. */ -static void __devinit init_link_config(struct link_config *lc, - unsigned int caps) +static void init_link_config(struct link_config *lc, unsigned int caps) { lc->supported = caps; lc->requested_speed = 0; @@ -7546,7 +7545,7 @@ int t4_get_flash_params(struct adapter * return 0; } -static void __devinit set_pcie_completion_timeout(struct adapter *adapter, +static void set_pcie_completion_timeout(struct adapter *adapter, u8 range) { u16 val; Modified: head/sys/dev/cxgbe/osdep.h ============================================================================== --- head/sys/dev/cxgbe/osdep.h Tue Mar 8 07:48:55 2016 (r296489) +++ head/sys/dev/cxgbe/osdep.h Tue Mar 8 08:13:37 2016 (r296490) @@ -85,16 +85,15 @@ typedef boolean_t bool; #define mdelay(x) DELAY((x) * 1000) #define udelay(x) DELAY(x) -#define __devinit #define simple_strtoul strtoul #define DIV_ROUND_UP(x, y) howmany(x, y) #define ARRAY_SIZE(x) nitems(x) #define container_of(p, s, f) ((s *)(((uint8_t *)(p)) - offsetof(s, f))) -#define swab16(x) bswap16(x) -#define swab32(x) bswap32(x) -#define swab64(x) bswap64(x) +#define swab16(x) bswap16(x) +#define swab32(x) bswap32(x) +#define swab64(x) bswap64(x) #define le16_to_cpu(x) le16toh(x) #define le32_to_cpu(x) le32toh(x) #define le64_to_cpu(x) le64toh(x) @@ -108,11 +107,6 @@ typedef boolean_t bool; #define cpu_to_be32(x) htobe32(x) #define cpu_to_be64(x) htobe64(x) -#define SPEED_10 10 -#define SPEED_100 100 -#define SPEED_1000 1000 -#define SPEED_10000 10000 -#define SPEED_40000 40000 #define DUPLEX_HALF 0 #define DUPLEX_FULL 1 #define AUTONEG_DISABLE 0 Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Mar 8 07:48:55 2016 (r296489) +++ head/sys/dev/cxgbe/t4_main.c Tue Mar 8 08:13:37 2016 (r296490) @@ -1783,13 +1783,13 @@ cxgbe_media_status(struct ifnet *ifp, st return; ifmr->ifm_active = IFM_ETHER | IFM_FDX; - if (speed == SPEED_10000) + if (speed == 10000) ifmr->ifm_active |= IFM_10G_T; - else if (speed == SPEED_1000) + else if (speed == 1000) ifmr->ifm_active |= IFM_1000_T; - else if (speed == SPEED_100) + else if (speed == 100) ifmr->ifm_active |= IFM_100_TX; - else if (speed == SPEED_10) + else if (speed == 10) ifmr->ifm_active |= IFM_10_T; else KASSERT(0, ("%s: link up but speed unknown (%u)", __func__,