svn commit: r296490 - in head/sys/dev/cxgbe: . common
Navdeep Parhar
np at FreeBSD.org
Tue Mar 8 08:13:39 UTC 2016
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_<foo> 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__,
More information about the svn-src-all
mailing list