Lines Matching refs:sgp
570 struct scsi_host_sg_pool *sgp; in scsi_sg_free() local
572 sgp = scsi_sg_pools + scsi_sgtable_index(nents); in scsi_sg_free()
573 mempool_free(sgl, sgp->pool); in scsi_sg_free()
578 struct scsi_host_sg_pool *sgp; in scsi_sg_alloc() local
580 sgp = scsi_sg_pools + scsi_sgtable_index(nents); in scsi_sg_alloc()
581 return mempool_alloc(sgp->pool, gfp_mask); in scsi_sg_alloc()
2279 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; in scsi_init_queue() local
2280 int size = sgp->size * sizeof(struct scatterlist); in scsi_init_queue()
2282 sgp->slab = kmem_cache_create(sgp->name, size, 0, in scsi_init_queue()
2284 if (!sgp->slab) { in scsi_init_queue()
2286 sgp->name); in scsi_init_queue()
2290 sgp->pool = mempool_create_slab_pool(SG_MEMPOOL_SIZE, in scsi_init_queue()
2291 sgp->slab); in scsi_init_queue()
2292 if (!sgp->pool) { in scsi_init_queue()
2294 sgp->name); in scsi_init_queue()
2303 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; in scsi_init_queue() local
2304 if (sgp->pool) in scsi_init_queue()
2305 mempool_destroy(sgp->pool); in scsi_init_queue()
2306 if (sgp->slab) in scsi_init_queue()
2307 kmem_cache_destroy(sgp->slab); in scsi_init_queue()
2321 struct scsi_host_sg_pool *sgp = scsi_sg_pools + i; in scsi_exit_queue() local
2322 mempool_destroy(sgp->pool); in scsi_exit_queue()
2323 kmem_cache_destroy(sgp->slab); in scsi_exit_queue()