Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102601531
D47353.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D47353.diff
View Options
diff --git a/sys/dev/bnxt/bnxt_re/bnxt_re.h b/sys/dev/bnxt/bnxt_re/bnxt_re.h
--- a/sys/dev/bnxt/bnxt_re/bnxt_re.h
+++ b/sys/dev/bnxt/bnxt_re/bnxt_re.h
@@ -946,8 +946,8 @@
static inline enum ib_port_state bnxt_re_get_link_state(struct bnxt_re_dev *rdev)
{
- if (rdev->netdev->if_drv_flags & IFF_DRV_RUNNING &&
- rdev->netdev->if_link_state == LINK_STATE_UP)
+ if (if_getdrvflags(rdev->netdev) & IFF_DRV_RUNNING &&
+ if_getlinkstate(rdev->netdev) == LINK_STATE_UP)
return IB_PORT_ACTIVE;
return IB_PORT_DOWN;
}
diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c
--- a/sys/dev/bnxt/bnxt_re/ib_verbs.c
+++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c
@@ -299,7 +299,7 @@
if (port_attr->state == IB_PORT_ACTIVE)
port_attr->phys_state = IB_PORT_PHYS_STATE_LINK_UP;
port_attr->max_mtu = IB_MTU_4096;
- port_attr->active_mtu = iboe_get_mtu(rdev->netdev->if_mtu);
+ port_attr->active_mtu = iboe_get_mtu(if_getmtu(rdev->netdev));
port_attr->gid_tbl_len = dev_attr->max_sgid;
port_attr->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_REINIT_SUP |
IB_PORT_DEVICE_MGMT_SUP |
@@ -2118,7 +2118,7 @@
qplqp->max_rd_atomic = dev_attr->max_qp_rd_atom;
qplqp->max_dest_rd_atomic = dev_attr->max_qp_init_rd_atom;
}
- qplqp->mtu = ib_mtu_enum_to_int(iboe_get_mtu(rdev->netdev->if_mtu));
+ qplqp->mtu = ib_mtu_enum_to_int(iboe_get_mtu(if_getmtu(rdev->netdev)));
qplqp->dpi = &rdev->dpi_privileged; /* Doorbell page */
if (init_attr->create_flags) {
dev_dbg(rdev_to_dev(rdev),
@@ -2691,7 +2691,7 @@
/* MTU settings allowed only during INIT -> RTR */
if (qp_attr->qp_state == IB_QPS_RTR) {
- bnxt_re_init_qpmtu(qp, rdev->netdev->if_mtu, qp_attr_mask, qp_attr,
+ bnxt_re_init_qpmtu(qp, if_getmtu(rdev->netdev), qp_attr_mask, qp_attr,
&is_qpmtu_high);
if (udata && !ib_copy_from_udata(&ureq, udata, sizeof(ureq))) {
if (ureq.comp_mask & BNXT_RE_COMP_MASK_MQP_EX_PATH_MTU_MASK) {
diff --git a/sys/dev/bnxt/bnxt_re/main.c b/sys/dev/bnxt/bnxt_re/main.c
--- a/sys/dev/bnxt/bnxt_re/main.c
+++ b/sys/dev/bnxt/bnxt_re/main.c
@@ -4168,8 +4168,8 @@
dev_info(rdev_to_dev(rdev), "%s: Event = %s (0x%lx), rdev %s (real_dev %s)\n",
__func__, bnxt_re_netevent(event), event,
- rdev ? rdev->netdev ? rdev->netdev->if_dname : "->netdev = NULL" : "= NULL",
- (real_dev == netdev) ? "= netdev" : real_dev->if_dname);
+ rdev ? rdev->netdev ? if_getdname(rdev->netdev) : "->netdev = NULL" : "= NULL",
+ (real_dev == netdev) ? "= netdev" : if_getdname(real_dev));
if (!test_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags))
goto exit;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 3:39 PM (11 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14632822
Default Alt Text
D47353.diff (2 KB)
Attached To
Mode
D47353: bnxt: Use IfAPI accessors where able
Attached
Detach File
Event Timeline
Log In to Comment