~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/infiniband/hw/ehca/hcp_if.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
269
269
                             struct ehca_cq *cq,
270
270
                             struct ehca_alloc_cq_parms *param)
271
271
{
 
272
        int rc;
272
273
        u64 ret;
273
274
        unsigned long outs[PLPAR_HCALL9_BUFSIZE];
274
275
 
283
284
        param->act_nr_of_entries = (u32)outs[3];
284
285
        param->act_pages = (u32)outs[4];
285
286
 
286
 
        if (ret == H_SUCCESS)
287
 
                hcp_galpas_ctor(&cq->galpas, 0, outs[5], outs[6]);
 
287
        if (ret == H_SUCCESS) {
 
288
                rc = hcp_galpas_ctor(&cq->galpas, 0, outs[5], outs[6]);
 
289
                if (rc) {
 
290
                        ehca_gen_err("Could not establish HW access. rc=%d paddr=%#lx",
 
291
                                     rc, outs[5]);
 
292
 
 
293
                        ehca_plpar_hcall_norets(H_FREE_RESOURCE,
 
294
                                                adapter_handle.handle,     /* r4 */
 
295
                                                cq->ipz_cq_handle.handle,  /* r5 */
 
296
                                                0, 0, 0, 0, 0);
 
297
                        ret = H_NO_MEM;
 
298
                }
 
299
        }
288
300
 
289
301
        if (ret == H_NOT_ENOUGH_RESOURCES)
290
302
                ehca_gen_err("Not enough resources. ret=%lli", ret);
295
307
u64 hipz_h_alloc_resource_qp(const struct ipz_adapter_handle adapter_handle,
296
308
                             struct ehca_alloc_qp_parms *parms, int is_user)
297
309
{
 
310
        int rc;
298
311
        u64 ret;
299
312
        u64 allocate_controls, max_r10_reg, r11, r12;
300
313
        unsigned long outs[PLPAR_HCALL9_BUFSIZE];
358
371
        parms->rqueue.queue_size =
359
372
                (u32)EHCA_BMASK_GET(H_ALL_RES_QP_RQUEUE_SIZE_PAGES, outs[4]);
360
373
 
361
 
        if (ret == H_SUCCESS)
362
 
                hcp_galpas_ctor(&parms->galpas, is_user, outs[6], outs[6]);
 
374
        if (ret == H_SUCCESS) {
 
375
                rc = hcp_galpas_ctor(&parms->galpas, is_user, outs[6], outs[6]);
 
376
                if (rc) {
 
377
                        ehca_gen_err("Could not establish HW access. rc=%d paddr=%#lx",
 
378
                                     rc, outs[6]);
 
379
 
 
380
                        ehca_plpar_hcall_norets(H_FREE_RESOURCE,
 
381
                                                adapter_handle.handle,     /* r4 */
 
382
                                                parms->qp_handle.handle,  /* r5 */
 
383
                                                0, 0, 0, 0, 0);
 
384
                        ret = H_NO_MEM;
 
385
                }
 
386
        }
363
387
 
364
388
        if (ret == H_NOT_ENOUGH_RESOURCES)
365
389
                ehca_gen_err("Not enough resources. ret=%lli", ret);