lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170208182839.GH16878@collabora.com>
Date:   Wed, 8 Feb 2017 19:28:39 +0100
From:   Peter Senna Tschudin <peter.senna@...labora.com>
To:     Romain Perier <romain.perier@...labora.com>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Doug Ledford <dledford@...hat.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        jeffrey.t.kirsher@...el.com,
        "David S. Miller" <davem@...emloft.net>, stas.yakovlev@...il.com,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Peter Senna Tschudin <peter.senna@...labora.co.uk>
Subject: Re: [RFC 08/19] scsi: be2iscsi: Replace PCI pool old API

On Wed, Feb 08, 2017 at 05:34:46PM +0100, Romain Perier wrote:
> The PCI pool API is deprecated. This commits replaces the PCI pool old
> API by the appropriated function with the DMA pool API.
> 
Tested by compilation only.

Acked-by: Peter Senna Tschudin <peter.senna@...labora.com>
Tested-by: Peter Senna Tschudin <peter.senna@...labora.com>
> Signed-off-by: Romain Perier <romain.perier@...labora.com>
> ---
>  drivers/scsi/be2iscsi/be_iscsi.c | 6 +++---
>  drivers/scsi/be2iscsi/be_main.c  | 6 +++---
>  drivers/scsi/be2iscsi/be_main.h  | 2 +-
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
> index a484457..d76ef77 100644
> --- a/drivers/scsi/be2iscsi/be_iscsi.c
> +++ b/drivers/scsi/be2iscsi/be_iscsi.c
> @@ -87,8 +87,8 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
>  		return NULL;
>  	sess = cls_session->dd_data;
>  	beiscsi_sess = sess->dd_data;
> -	beiscsi_sess->bhs_pool =  pci_pool_create("beiscsi_bhs_pool",
> -						   phba->pcidev,
> +	beiscsi_sess->bhs_pool =  dma_pool_create("beiscsi_bhs_pool",
> +						   &phba->pcidev->dev,
>  						   sizeof(struct be_cmd_bhs),
>  						   64, 0);
>  	if (!beiscsi_sess->bhs_pool)
> @@ -113,7 +113,7 @@ void beiscsi_session_destroy(struct iscsi_cls_session *cls_session)
>  	struct beiscsi_session *beiscsi_sess = sess->dd_data;
>  
>  	printk(KERN_INFO "In beiscsi_session_destroy\n");
> -	pci_pool_destroy(beiscsi_sess->bhs_pool);
> +	dma_pool_destroy(beiscsi_sess->bhs_pool);
>  	iscsi_session_teardown(cls_session);
>  }
>  
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 32b2713..dd43480 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -4307,7 +4307,7 @@ static void beiscsi_cleanup_task(struct iscsi_task *task)
>  	pwrb_context = &phwi_ctrlr->wrb_context[cri_index];
>  
>  	if (io_task->cmd_bhs) {
> -		pci_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
> +		dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
>  			      io_task->bhs_pa.u.a64.address);
>  		io_task->cmd_bhs = NULL;
>  		task->hdr = NULL;
> @@ -4424,7 +4424,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  	struct beiscsi_session *beiscsi_sess = beiscsi_conn->beiscsi_sess;
>  	dma_addr_t paddr;
>  
> -	io_task->cmd_bhs = pci_pool_alloc(beiscsi_sess->bhs_pool,
> +	io_task->cmd_bhs = dma_pool_alloc(beiscsi_sess->bhs_pool,
>  					  GFP_ATOMIC, &paddr);
>  	if (!io_task->cmd_bhs)
>  		return -ENOMEM;
> @@ -4551,7 +4551,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  	if (io_task->pwrb_handle)
>  		free_wrb_handle(phba, pwrb_context, io_task->pwrb_handle);
>  	io_task->pwrb_handle = NULL;
> -	pci_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
> +	dma_pool_free(beiscsi_sess->bhs_pool, io_task->cmd_bhs,
>  		      io_task->bhs_pa.u.a64.address);
>  	io_task->cmd_bhs = NULL;
>  	return -ENOMEM;
> diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
> index 2188579..cf58d31 100644
> --- a/drivers/scsi/be2iscsi/be_main.h
> +++ b/drivers/scsi/be2iscsi/be_main.h
> @@ -446,7 +446,7 @@ struct beiscsi_hba {
>  	 test_bit(BEISCSI_HBA_ONLINE, &phba->state))
>  
>  struct beiscsi_session {
> -	struct pci_pool *bhs_pool;
> +	struct dma_pool *bhs_pool;
>  };
>  
>  /**
> -- 
> 2.9.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ