aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_init_chip.c
diff options
context:
space:
mode:
authorArthur Jones <arthur.jones@qlogic.com>2008-04-16 21:09:31 -0700
committerRoland Dreier <rolandd@cisco.com>2008-04-16 21:09:31 -0700
commitbb9171448deb1f7ece27674e2e431e4f267fd453 (patch)
treeb042155205bbbe3deb317d65a53a4180fb512435 /drivers/infiniband/hw/ipath/ipath_init_chip.c
parent8babfa4fb9bfe93d57c700410a4f8be9fbd3edd7 (diff)
downloadkernel_samsung_smdk4412-bb9171448deb1f7ece27674e2e431e4f267fd453.zip
kernel_samsung_smdk4412-bb9171448deb1f7ece27674e2e431e4f267fd453.tar.gz
kernel_samsung_smdk4412-bb9171448deb1f7ece27674e2e431e4f267fd453.tar.bz2
IB/ipath: Misc changes to prepare for IB7220 introduction
The patch adds a number of minor changes to support newer HCAs: - New send buffer control bits - New error condition bits - Locking and initialization changes - More send buffers Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_init_chip.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_init_chip.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c
index 8d8e572..c012e05 100644
--- a/drivers/infiniband/hw/ipath/ipath_init_chip.c
+++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c
@@ -230,6 +230,15 @@ static int init_chip_first(struct ipath_devdata *dd)
int ret = 0;
u64 val;
+ spin_lock_init(&dd->ipath_kernel_tid_lock);
+ spin_lock_init(&dd->ipath_user_tid_lock);
+ spin_lock_init(&dd->ipath_sendctrl_lock);
+ spin_lock_init(&dd->ipath_sdma_lock);
+ spin_lock_init(&dd->ipath_gpio_lock);
+ spin_lock_init(&dd->ipath_eep_st_lock);
+ spin_lock_init(&dd->ipath_sdepb_lock);
+ mutex_init(&dd->ipath_eep_lock);
+
/*
* skip cfgports stuff because we are not allocating memory,
* and we don't want problems if the portcnt changed due to
@@ -319,12 +328,6 @@ static int init_chip_first(struct ipath_devdata *dd)
else ipath_dbg("%u 2k piobufs @ %p\n",
dd->ipath_piobcnt2k, dd->ipath_pio2kbase);
- spin_lock_init(&dd->ipath_user_tid_lock);
- spin_lock_init(&dd->ipath_sendctrl_lock);
- spin_lock_init(&dd->ipath_gpio_lock);
- spin_lock_init(&dd->ipath_eep_st_lock);
- mutex_init(&dd->ipath_eep_lock);
-
done:
return ret;
}
@@ -553,7 +556,7 @@ static void enable_chip(struct ipath_devdata *dd, int reinit)
static int init_housekeeping(struct ipath_devdata *dd, int reinit)
{
- char boardn[32];
+ char boardn[40];
int ret = 0;
/*
@@ -800,7 +803,12 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)
dd->ipath_pioupd_thresh = kpiobufs;
}
- dd->ipath_f_early_init(dd);
+ ret = dd->ipath_f_early_init(dd);
+ if (ret) {
+ ipath_dev_err(dd, "Early initialization failure\n");
+ goto done;
+ }
+
/*
* Cancel any possible active sends from early driver load.
* Follows early_init because some chips have to initialize