~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/scsi/lpfc/lpfc_mem.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
lpfc_mem_alloc(struct lpfc_hba *phba, int align)
63
63
{
64
64
        struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool;
65
 
        int longs;
66
65
        int i;
67
66
 
68
67
        if (phba->sli_rev == LPFC_SLI_REV4)
138
137
                phba->lpfc_hrb_pool = NULL;
139
138
                phba->lpfc_drb_pool = NULL;
140
139
        }
141
 
        /* vpi zero is reserved for the physical port so add 1 to max */
142
 
        longs = ((phba->max_vpi + 1) + BITS_PER_LONG - 1) / BITS_PER_LONG;
143
 
        phba->vpi_bmask = kzalloc(longs * sizeof(unsigned long), GFP_KERNEL);
144
 
        if (!phba->vpi_bmask)
145
 
                goto fail_free_dbq_pool;
146
140
 
147
141
        return 0;
148
 
 
149
 
 fail_free_dbq_pool:
150
 
        pci_pool_destroy(phba->lpfc_drb_pool);
151
 
        phba->lpfc_drb_pool = NULL;
152
142
 fail_free_hrb_pool:
153
143
        pci_pool_destroy(phba->lpfc_hrb_pool);
154
144
        phba->lpfc_hrb_pool = NULL;
191
181
        int i;
192
182
        struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool;
193
183
 
194
 
        /* Free VPI bitmask memory */
195
 
        kfree(phba->vpi_bmask);
196
 
 
197
184
        /* Free HBQ pools */
198
185
        lpfc_sli_hbqbuf_free_all(phba);
199
186
        if (phba->lpfc_drb_pool)