Lines Matching refs:sgp
580 struct scsi_host_sg_pool *sgp; in scsi_sg_free() local
582 sgp = scsi_sg_pools + scsi_sgtable_index(nents); in scsi_sg_free()
583 mempool_free(sgl, sgp->pool); in scsi_sg_free()
588 struct scsi_host_sg_pool *sgp; in scsi_sg_alloc() local
590 sgp = scsi_sg_pools + scsi_sgtable_index(nents); in scsi_sg_alloc()
591 return mempool_alloc(sgp->pool, gfp_mask); in scsi_sg_alloc()
2178 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; in scsi_init_queue() local
2179 int size = sgp->size * sizeof(struct scatterlist); in scsi_init_queue()
2181 sgp->slab = kmem_cache_create(sgp->name, size, 0, in scsi_init_queue()
2183 if (!sgp->slab) { in scsi_init_queue()
2185 sgp->name); in scsi_init_queue()
2189 sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, in scsi_init_queue()
2190 sgp->slab); in scsi_init_queue()
2191 if (!sgp->pool) { in scsi_init_queue()
2193 sgp->name); in scsi_init_queue()
2202 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; in scsi_init_queue() local
2203 if (sgp->pool) in scsi_init_queue()
2204 mempool_destroy(sgp->pool); in scsi_init_queue()
2205 if (sgp->slab) in scsi_init_queue()
2206 kmem_cache_destroy(sgp->slab); in scsi_init_queue()
2220 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; in scsi_exit_queue() local
2221 mempool_destroy(sgp->pool); in scsi_exit_queue()
2222 kmem_cache_destroy(sgp->slab); in scsi_exit_queue()