please pull infiniband.git
Subsystems (3)
Linus, please pull from
master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus
This tree is also available from kernel.org mirrors at:
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus
This will get some small fixes for 2.6.23:
Dave Olson (4):
IB/ipath: Remove unsafe fastrcvint code from interrupt handler IB/ipath: Use faster put_tid_2 routine after initialization IB/ipath: Fix some issues with buffer cancel and sendctrl register update IB/ipath: Workaround problem of errormask register being overwritten
Hoang-Nam Nguyen (2):
IB/ehca: Fix include order to better match kernel style IB/ehca: Move extern declarations from .c files to .h files
Jack Morgenstein (1):
mlx4_core: Remove kfree() in mlx4_mr_alloc() error flow
Roland Dreier (1):
IB/mlx4: Whitespace fix
Tom Tucker (1):
RDMA/amso1100: Initialize the wait_queue_head_t in the c2_qp structure
drivers/infiniband/hw/amso1100/c2_qp.c | 1 + drivers/infiniband/hw/ehca/ehca_classes.h | 1 + drivers/infiniband/hw/ehca/ehca_mrmw.c | 6 +-- drivers/infiniband/hw/ehca/ehca_pd.c | 1 - drivers/infiniband/hw/ehca/hcp_if.c | 1 - drivers/infiniband/hw/ehca/ipz_pt_fn.h | 2 + drivers/infiniband/hw/ipath/ipath_common.h | 3 +- drivers/infiniband/hw/ipath/ipath_driver.c | 11 +++-- drivers/infiniband/hw/ipath/ipath_iba6120.c | 20 +++++--- drivers/infiniband/hw/ipath/ipath_init_chip.c | 7 ++- drivers/infiniband/hw/ipath/ipath_intr.c | 63 ++++++------------------ drivers/infiniband/hw/ipath/ipath_kernel.h | 13 +---- drivers/infiniband/hw/ipath/ipath_stats.c | 54 +++++++++++++++++++-- drivers/infiniband/hw/mlx4/qp.c | 1 - drivers/net/mlx4/mr.c | 15 +----- 15 files changed, 101 insertions(+), 98 deletions(-)
drivers/infiniband/hw/amso1100/c2_qp.c +1 -0
@@ -506,6 +506,7 @@ int c2_alloc_qp(struct c2_dev *c2dev, qp->send_sgl_depth = qp_attrs->cap.max_send_sge; qp->rdma_write_sgl_depth = qp_attrs->cap.max_send_sge; qp->recv_sgl_depth = qp_attrs->cap.max_recv_sge; +init_waitqueue_head (&qp->wait);/* Initialize the SQ MQ */ q_size =be32_to_cpu (reply->sq_depth);
drivers/infiniband/hw/ehca/ehca_classes.h +1 -0
@@ -322,6 +322,7 @@ extern int ehca_static_rate;extern int ehca_port_act_time;extern int ehca_use_hp_mr;extern int ehca_scaling_code; +extern int ehca_mr_largepage;struct ipzu_queue_resp {u32 qe_size;/* queue entry size */
drivers/infiniband/hw/ehca/ehca_mrmw.c +2 -4
@@ -40,10 +40,10 @@* POSSIBILITY OF SUCH DAMAGE. */ -#include <rdma/ib_umem.h> -#include <asm/current.h> +#include <rdma/ib_umem.h> +#include "ehca_iverbs.h" #include "ehca_mrmw.h" #include "hcp_if.h"
@@ -64,8 +64,6 @@ enum ehca_mr_pgsize { EHCA_MR_PGSIZE16M = 0x1000000L }; -extern int ehca_mr_largepage; -static u32 ehca_encode_hwpage_size (u32 pgsize) {u32 idx =0 ;
drivers/infiniband/hw/ehca/ehca_pd.c +0 -1
@@ -88,7 +88,6 @@ int ehca_dealloc_pd(struct ib_pd *pd)u32 cur_pid = current->tgid; struct ehca_pd *my_pd = container_of(pd, struct ehca_pd, ib_pd);int i, leftovers =0 ; -extern struct kmem_cache *small_qp_cache;struct ipz_small_queue_page *page, *tmp; if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
drivers/infiniband/hw/ehca/hcp_if.c +0 -1
@@ -758,7 +758,6 @@ u64 hipz_h_register_rpage_mr(const struct ipz_adapter_handle adapter_handle,const u64 logical_address_of_page, const u64 count) { - extern int ehca_debug_level; u64 ret;if (unlikely (ehca_debug_level >=2 )) {
drivers/infiniband/hw/ehca/ipz_pt_fn.h +2 -0
@@ -54,6 +54,8 @@struct ehca_pd ;struct ipz_small_queue_page ; +extern struct kmem_cache *small_qp_cache; +/* struct generic ehca page */ struct ipz_page {u8 entries[EHCA_PAGESIZE ];
drivers/infiniband/hw/ipath/ipath_common.h +1 -2
@@ -100,8 +100,7 @@ struct infinipath_stats {__u64 sps_hwerrs;/* number of times IB link changed state unexpectedly */ __u64 sps_iblink; -/* kernel receive interrupts that didn't read intstat */ -__u64 sps_fastrcvint; +__u64 sps_unused;/* was fastrcvint, no longer implemented */ /* number of kernel (port0) packets received */ __u64 sps_port0pkts;/* number of "ethernet" packets sent by driver */
drivers/infiniband/hw/ipath/ipath_driver.c +7 -4
@@ -740,7 +740,7 @@ void ipath_disarm_piobufs(struct ipath_devdata *dd, unsigned first,* pioavail updates to memory to stop. */ ipath_write_kreg (dd, dd->ipath_kregs->kr_sendctrl, - sendorig & ~IPATH_S_PIOBUFAVAILUPD ); + sendorig & ~INFINIPATH_S_PIOBUFAVAILUPD ); sendorig =ipath_read_kreg64 (dd, dd->ipath_kregs->kr_scratch);ipath_write_kreg (dd, dd->ipath_kregs->kr_sendctrl, dd->ipath_sendctrl);
@@ -1614,7 +1614,7 @@ int ipath_waitfor_mdio_cmdready(struct ipath_devdata *dd)* it's safer to always do it. * PIOAvail bits are updated by the chip as if normal send had happened. */ -void ipath_cancel_sends (struct ipath_devdata *dd) +void ipath_cancel_sends (struct ipath_devdata *dd,int restore_sendctrl) {ipath_dbg ("Cancelling all in-progress send buffers\n" ); dd->ipath_lastcancel = jiffies+HZ /2 ;/* skip armlaunch errs a bit */
@@ -1627,6 +1627,9 @@ void ipath_cancel_sends(struct ipath_devdata *dd)ipath_read_kreg64 (dd, dd->ipath_kregs->kr_scratch);ipath_disarm_piobufs (dd,0 , (unsigned )(dd->ipath_piobcnt2k + dd->ipath_piobcnt4k)); +if (restore_sendctrl)/* else done by caller later */ +ipath_write_kreg (dd, dd->ipath_kregs->kr_sendctrl, + dd->ipath_sendctrl);/* and again, be sure all have hit the chip */ ipath_read_kreg64 (dd, dd->ipath_kregs->kr_scratch);
@@ -1655,7 +1658,7 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)/* flush all queued sends when going to DOWN or INIT, to be sure that * they don't block MAD packets */ if (!linkcmd || linkcmd ==INFINIPATH_IBCC_LINKCMD_INIT ) -ipath_cancel_sends (dd); +ipath_cancel_sends (dd,1 );ipath_write_kreg (dd, dd->ipath_kregs->kr_ibcctrl, dd->ipath_ibcctrl | which);
@@ -2000,7 +2003,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd)ipath_set_ib_lstate (dd,INFINIPATH_IBCC_LINKINITCMD_DISABLE <<INFINIPATH_IBCC_LINKINITCMD_SHIFT ); -ipath_cancel_sends (dd); +ipath_cancel_sends (dd,0 );/* disable IBC */ dd->ipath_control &= ~INFINIPATH_C_LINKENABLE ;
drivers/infiniband/hw/ipath/ipath_iba6120.c +13 -7
@@ -321,6 +321,8 @@ static const struct ipath_hwerror_msgs ipath_6120_hwerror_msgs[] = { << INFINIPATH_HWE_TXEMEMPARITYERR_SHIFT) static int ipath_pe_txe_recover(struct ipath_devdata *); +static void ipath_pe_put_tid_2 (struct ipath_devdata *,u64 __iomem *, +u32 ,unsigned long );/** * ipath_pe_handle_hwerrors - display hardware errors.
@@ -555,8 +557,11 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name,ipath_dev_err (dd,"Unsupported InfiniPath hardware revision %u.%u!\n" , dd->ipath_majrev, dd->ipath_minrev); ret =1 ; - }else + }else { ret =0 ; +if (dd->ipath_minrev >=2 ) + dd->ipath_f_put_tid = ipath_pe_put_tid_2; + }return ret; }
@@ -1220,7 +1225,7 @@ static void ipath_pe_clear_tids(struct ipath_devdata *dd, unsigned port) port * dd->ipath_rcvtidcnt * sizeof(*tidbase));for (i =0 ; i < dd->ipath_rcvtidcnt; i++) -ipath_pe_put_tid (dd, &tidbase[i],RCVHQ_RCV_TYPE_EXPECTED , + dd->ipath_f_put_tid (dd, &tidbase[i],RCVHQ_RCV_TYPE_EXPECTED , tidinv); tidbase = (u64 __iomem *)
@@ -1229,7 +1234,7 @@ static void ipath_pe_clear_tids(struct ipath_devdata *dd, unsigned port) port * dd->ipath_rcvegrcnt * sizeof(*tidbase));for (i =0 ; i < dd->ipath_rcvegrcnt; i++) -ipath_pe_put_tid (dd, &tidbase[i],RCVHQ_RCV_TYPE_EAGER , + dd->ipath_f_put_tid (dd, &tidbase[i],RCVHQ_RCV_TYPE_EAGER , tidinv); }
@@ -1395,10 +1400,11 @@ void ipath_init_iba6120_funcs(struct ipath_devdata *dd) dd->ipath_f_quiet_serdes = ipath_pe_quiet_serdes; dd->ipath_f_bringup_serdes = ipath_pe_bringup_serdes; dd->ipath_f_clear_tids = ipath_pe_clear_tids; -if (dd->ipath_minrev >=2 ) - dd->ipath_f_put_tid = ipath_pe_put_tid_2; -else - dd->ipath_f_put_tid = ipath_pe_put_tid; +/* +* this may get changed after we read the chip revision, +* but we start with the safe version for all revs +*/ + dd->ipath_f_put_tid = ipath_pe_put_tid; dd->ipath_f_cleanup = ipath_setup_pe_cleanup; dd->ipath_f_setextled = ipath_setup_pe_setextled; dd->ipath_f_get_base_info = ipath_pe_get_base_info;
drivers/infiniband/hw/ipath/ipath_init_chip.c +4 -3
@@ -782,7 +782,7 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)* Follows early_init because some chips have to initialize * PIO buffers in early_init to avoid false parity errors. */ -ipath_cancel_sends (dd); +ipath_cancel_sends (dd,0 );/* early_init sets rcvhdrentsize and rcvhdrsize, so this must be * done after early_init */
@@ -851,13 +851,14 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)ipath_write_kreg (dd, dd->ipath_kregs->kr_hwerrmask, dd->ipath_hwerrmask); - dd->ipath_maskederrs = dd->ipath_ignorederrs;/* clear all */ ipath_write_kreg (dd, dd->ipath_kregs->kr_errorclear,-1LL );/* enable errors that are masked, at least this first time. */ ipath_write_kreg (dd, dd->ipath_kregs->kr_errormask, ~dd->ipath_maskederrs); -/* clear any interrups up to this point (ints still not enabled) */ + dd->ipath_errormask =ipath_read_kreg64 (dd, + dd->ipath_kregs->kr_errormask); +/* clear any interrupts up to this point (ints still not enabled) */ ipath_write_kreg (dd, dd->ipath_kregs->kr_intclear,-1LL );/*
drivers/infiniband/hw/ipath/ipath_intr.c +16 -47
135 lines not on this page · raw message
drivers/infiniband/hw/ipath/ipath_kernel.h +3 -10
@@ -261,18 +261,10 @@ struct ipath_devdata {* limiting of hwerror reporting */ ipath_err_t ipath_lasthwerror; -/* -* errors masked because they occur too fast, also includes errors -* that are always ignored (ipath_ignorederrs) -*/ +/* errors masked because they occur too fast */ ipath_err_t ipath_maskederrs;/* time in jiffies at which to re-enable maskederrs */ unsigned long ipath_unmasktime; -/* -* errors always ignored (masked), at least for a given -* chip/device, because they are wrong or not useful -*/ -ipath_err_t ipath_ignorederrs;/* count of egrfull errors, combined for all ports */ u64 ipath_last_tidfull;/* for ipath_qcheck() */
@@ -436,6 +428,7 @@ struct ipath_devdata {u64 ipath_lastibcstat;/* hwerrmask shadow */ ipath_err_t ipath_hwerrmask; +ipath_err_t ipath_errormask;/* errormask shadow */ /* interrupt config reg shadow */ u64 ipath_intconfig;/* kr_sendpiobufbase value */
@@ -683,7 +676,7 @@ int ipath_unordered_wc(void);void ipath_disarm_piobufs (struct ipath_devdata *,unsigned first,unsigned cnt); -void ipath_cancel_sends (struct ipath_devdata *); +void ipath_cancel_sends (struct ipath_devdata *,int );int ipath_create_rcvhdrq (struct ipath_devdata *,struct ipath_portdata *);void ipath_free_pddata (struct ipath_devdata *,struct ipath_portdata *);
drivers/infiniband/hw/ipath/ipath_stats.c +48 -6
83 lines not on this page · raw message
drivers/infiniband/hw/mlx4/qp.c +0 -1
@@ -1209,7 +1209,6 @@ static void set_datagram_seg(struct mlx4_wqe_datagram_seg *dseg,memcpy (dseg->av, &to_mah (wr->wr.ud.ah)->av,sizeof (struct mlx4_av )); dseg->dqpn =cpu_to_be32 (wr->wr.ud.remote_qpn); dseg->qkey =cpu_to_be32 (wr->wr.ud.remote_qkey); - } static void set_data_seg(struct mlx4_wqe_data_seg *dseg,
drivers/net/mlx4/mr.c +3 -12
@@ -255,10 +255,8 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access,int err; index =mlx4_bitmap_alloc (&priv->mr_table.mpt_bitmap); -if (index ==-1 ) { - err = -ENOMEM ; - goto err; - } +if (index ==-1 ) +return -ENOMEM ; mr->iova = iova; mr->size = size;
@@ -269,15 +267,8 @@ int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, err =mlx4_mtt_init (dev, npages, page_shift, &mr->mtt);if (err) - goto err_index; - -return 0 ; - -err_index: -mlx4_bitmap_free (&priv->mr_table.mpt_bitmap, index); +mlx4_bitmap_free (&priv->mr_table.mpt_bitmap, index); -err: -kfree (mr);return err; }EXPORT_SYMBOL_GPL (mlx4_mr_alloc);