4.5-rc3 fixes
- One fix to ipoib - One fix to core sysfs code - Four patches that resolve an oops found in testing of ocrdma and a couple other ocrdma issues -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWu7lOAAoJELgmozMOVy/dDi8QAISZk+WzoTBsfFymoFwo7Yh7 2W9PAdh/Wp9jH2nTFHwIgS70aLt3oMhXYMZi7xZBtICZI3QRNR0nkNl/FAwafFPo FND2j7ftTcDofqD+OTnAE3ZMdgjJhq+z+kjrfrF9pVxdQVOJmpOm6WKZBO7Q9yZJ D6eXmOV6+8TYSlFxbbvB158ddMcBdZXOCoJoK1x/iLtyMvoCGPv7s2eVIeozmD4u +C16WKaDIO4xu1a/k7rULBEz1QrnlOg0r7XeYgA3ubzJgTPmBc32ZL/qv7oD1O0O 4LJLS3/HVZdkH3l94b1mGRquLaOM6TVCYs4BR+EibkB0ndYeESU/mqLaKK91zrba TrKGLGlXo1VszzCIra2pnalYHHfe+t3dizylXB2/vvmnWAkZcBh9enxPIMXTArJq t72ELkj3b6Ln8uuteimYeT5pX1BuxzMPggoSZ1OW19YfUt4UcmJ/RzgaqxFI6fml RRH/7XuavKSD9I1eItg3OFyd77YtvdrWx5VxUFOVPnCaHguDDZGI9l7wP9Vtygj4 Hh5jHB6roS32z4QZ6Z9glQt0i75iXLcznYjfhA8qMRBbph0+qPW9s6gvCkiy5PL1 eWuxenS2jnrDCkAvA5BIi50QIgzezNMHduUM3FB5W5dyrFrWzJtAII+CDcn8o2DO xZKMOpuMPuDXffP66pee =Wpl3 -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "A few more minor fixes for rc3: - One fix to ipoib - One fix to core sysfs code - Four patches that resolve an oops found in testing of ocrdma and a couple other ocrdma issues" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: RDMA/ocrdma: Fixing ocrdma debugfs directory remove RDMA/ocrdma: Fix pkey_index returned by driver in rq work completion RDMA/ocrdma: populate max_sge_rd in device attributes RDMA/ocrdma: Initialize stats resources in the driver before ib device registration. IB/sysfs: remove unused va_list args IB/IPoIB: Do not set skb truesize since using one linearskb
This commit is contained in:
commit
721675fcf2
|
@ -336,7 +336,6 @@ static ssize_t _show_port_gid_attr(struct ib_port *p,
|
|||
union ib_gid gid;
|
||||
struct ib_gid_attr gid_attr = {};
|
||||
ssize_t ret;
|
||||
va_list args;
|
||||
|
||||
ret = ib_query_gid(p->ibdev, p->port_num, tab_attr->index, &gid,
|
||||
&gid_attr);
|
||||
|
@ -348,7 +347,6 @@ static ssize_t _show_port_gid_attr(struct ib_port *p,
|
|||
err:
|
||||
if (gid_attr.ndev)
|
||||
dev_put(gid_attr.ndev);
|
||||
va_end(args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -228,6 +228,11 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev)
|
|||
|
||||
ocrdma_alloc_pd_pool(dev);
|
||||
|
||||
if (!ocrdma_alloc_stats_resources(dev)) {
|
||||
pr_err("%s: stats resource allocation failed\n", __func__);
|
||||
goto alloc_err;
|
||||
}
|
||||
|
||||
spin_lock_init(&dev->av_tbl.lock);
|
||||
spin_lock_init(&dev->flush_q_lock);
|
||||
return 0;
|
||||
|
@ -238,6 +243,7 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev)
|
|||
|
||||
static void ocrdma_free_resources(struct ocrdma_dev *dev)
|
||||
{
|
||||
ocrdma_release_stats_resources(dev);
|
||||
kfree(dev->stag_arr);
|
||||
kfree(dev->qp_tbl);
|
||||
kfree(dev->cq_tbl);
|
||||
|
|
|
@ -64,10 +64,11 @@ static int ocrdma_add_stat(char *start, char *pcur,
|
|||
return cpy_len;
|
||||
}
|
||||
|
||||
static bool ocrdma_alloc_stats_mem(struct ocrdma_dev *dev)
|
||||
bool ocrdma_alloc_stats_resources(struct ocrdma_dev *dev)
|
||||
{
|
||||
struct stats_mem *mem = &dev->stats_mem;
|
||||
|
||||
mutex_init(&dev->stats_lock);
|
||||
/* Alloc mbox command mem*/
|
||||
mem->size = max_t(u32, sizeof(struct ocrdma_rdma_stats_req),
|
||||
sizeof(struct ocrdma_rdma_stats_resp));
|
||||
|
@ -91,13 +92,14 @@ static bool ocrdma_alloc_stats_mem(struct ocrdma_dev *dev)
|
|||
return true;
|
||||
}
|
||||
|
||||
static void ocrdma_release_stats_mem(struct ocrdma_dev *dev)
|
||||
void ocrdma_release_stats_resources(struct ocrdma_dev *dev)
|
||||
{
|
||||
struct stats_mem *mem = &dev->stats_mem;
|
||||
|
||||
if (mem->va)
|
||||
dma_free_coherent(&dev->nic_info.pdev->dev, mem->size,
|
||||
mem->va, mem->pa);
|
||||
mem->va = NULL;
|
||||
kfree(mem->debugfs_mem);
|
||||
}
|
||||
|
||||
|
@ -838,15 +840,9 @@ void ocrdma_add_port_stats(struct ocrdma_dev *dev)
|
|||
&dev->reset_stats, &ocrdma_dbg_ops))
|
||||
goto err;
|
||||
|
||||
/* Now create dma_mem for stats mbx command */
|
||||
if (!ocrdma_alloc_stats_mem(dev))
|
||||
goto err;
|
||||
|
||||
mutex_init(&dev->stats_lock);
|
||||
|
||||
return;
|
||||
err:
|
||||
ocrdma_release_stats_mem(dev);
|
||||
debugfs_remove_recursive(dev->dir);
|
||||
dev->dir = NULL;
|
||||
}
|
||||
|
@ -855,9 +851,7 @@ void ocrdma_rem_port_stats(struct ocrdma_dev *dev)
|
|||
{
|
||||
if (!dev->dir)
|
||||
return;
|
||||
debugfs_remove(dev->dir);
|
||||
mutex_destroy(&dev->stats_lock);
|
||||
ocrdma_release_stats_mem(dev);
|
||||
debugfs_remove_recursive(dev->dir);
|
||||
}
|
||||
|
||||
void ocrdma_init_debugfs(void)
|
||||
|
|
|
@ -65,6 +65,8 @@ enum OCRDMA_STATS_TYPE {
|
|||
|
||||
void ocrdma_rem_debugfs(void);
|
||||
void ocrdma_init_debugfs(void);
|
||||
bool ocrdma_alloc_stats_resources(struct ocrdma_dev *dev);
|
||||
void ocrdma_release_stats_resources(struct ocrdma_dev *dev);
|
||||
void ocrdma_rem_port_stats(struct ocrdma_dev *dev);
|
||||
void ocrdma_add_port_stats(struct ocrdma_dev *dev);
|
||||
int ocrdma_pma_counters(struct ocrdma_dev *dev,
|
||||
|
|
|
@ -125,8 +125,8 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr,
|
|||
IB_DEVICE_SYS_IMAGE_GUID |
|
||||
IB_DEVICE_LOCAL_DMA_LKEY |
|
||||
IB_DEVICE_MEM_MGT_EXTENSIONS;
|
||||
attr->max_sge = min(dev->attr.max_send_sge, dev->attr.max_srq_sge);
|
||||
attr->max_sge_rd = 0;
|
||||
attr->max_sge = dev->attr.max_send_sge;
|
||||
attr->max_sge_rd = attr->max_sge;
|
||||
attr->max_cq = dev->attr.max_cq;
|
||||
attr->max_cqe = dev->attr.max_cqe;
|
||||
attr->max_mr = dev->attr.max_mr;
|
||||
|
@ -2726,8 +2726,7 @@ static int ocrdma_update_ud_rcqe(struct ib_wc *ibwc, struct ocrdma_cqe *cqe)
|
|||
OCRDMA_CQE_UD_STATUS_MASK) >> OCRDMA_CQE_UD_STATUS_SHIFT;
|
||||
ibwc->src_qp = le32_to_cpu(cqe->flags_status_srcqpn) &
|
||||
OCRDMA_CQE_SRCQP_MASK;
|
||||
ibwc->pkey_index = le32_to_cpu(cqe->ud.rxlen_pkey) &
|
||||
OCRDMA_CQE_PKEY_MASK;
|
||||
ibwc->pkey_index = 0;
|
||||
ibwc->wc_flags = IB_WC_GRH;
|
||||
ibwc->byte_len = (le32_to_cpu(cqe->ud.rxlen_pkey) >>
|
||||
OCRDMA_CQE_UD_XFER_LEN_SHIFT);
|
||||
|
|
|
@ -245,8 +245,6 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
|
|||
skb_reset_mac_header(skb);
|
||||
skb_pull(skb, IPOIB_ENCAP_LEN);
|
||||
|
||||
skb->truesize = SKB_TRUESIZE(skb->len);
|
||||
|
||||
++dev->stats.rx_packets;
|
||||
dev->stats.rx_bytes += skb->len;
|
||||
|
||||
|
|
Loading…
Reference in New Issue