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: <20170208184302.GO16878@collabora.com>
Date:   Wed, 8 Feb 2017 19:43:02 +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 15/19] usb: gadget: amd5536udc: Replace PCI pool old API

On Wed, Feb 08, 2017 at 05:34:53PM +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/usb/gadget/udc/amd5536udc.c | 8 ++++----
>  drivers/usb/gadget/udc/amd5536udc.h | 4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c
> index ea03ca7..270876b 100644
> --- a/drivers/usb/gadget/udc/amd5536udc.c
> +++ b/drivers/usb/gadget/udc/amd5536udc.c
> @@ -583,7 +583,7 @@ udc_alloc_request(struct usb_ep *usbep, gfp_t gfp)
>  
>  	if (ep->dma) {
>  		/* ep0 in requests are allocated from data pool here */
> -		dma_desc = pci_pool_alloc(ep->dev->data_requests, gfp,
> +		dma_desc = dma_pool_alloc(ep->dev->data_requests, gfp,
>  						&req->td_phys);
>  		if (!dma_desc) {
>  			kfree(req);
> @@ -622,7 +622,7 @@ static int udc_free_dma_chain(struct udc *dev, struct udc_request *req)
>  	td = phys_to_virt(td_last->next);
>  
>  	for (i = 1; i < req->chain_len; i++) {
> -		pci_pool_free(dev->data_requests, td,
> +		dma_pool_free(dev->data_requests, td,
>  			      (dma_addr_t)td_last->next);
>  		td_last = td;
>  		td = phys_to_virt(td_last->next);
> @@ -652,7 +652,7 @@ udc_free_request(struct usb_ep *usbep, struct usb_request *usbreq)
>  		if (req->chain_len > 1)
>  			udc_free_dma_chain(ep->dev, req);
>  
> -		pci_pool_free(ep->dev->data_requests, req->td_data,
> +		dma_pool_free(ep->dev->data_requests, req->td_data,
>  							req->td_phys);
>  	}
>  	kfree(req);
> @@ -847,7 +847,7 @@ static int udc_create_dma_chain(
>  	for (i = buf_len; i < bytes; i += buf_len) {
>  		/* create or determine next desc. */
>  		if (create_new_chain) {
> -			td = pci_pool_alloc(ep->dev->data_requests,
> +			td = dma_pool_alloc(ep->dev->data_requests,
>  					    gfp_flags, &dma_addr);
>  			if (!td)
>  				return -ENOMEM;
> diff --git a/drivers/usb/gadget/udc/amd5536udc.h b/drivers/usb/gadget/udc/amd5536udc.h
> index 4638d70..85d5aa5 100644
> --- a/drivers/usb/gadget/udc/amd5536udc.h
> +++ b/drivers/usb/gadget/udc/amd5536udc.h
> @@ -545,8 +545,8 @@ struct udc {
>  	u32 __iomem			*txfifo;
>  
>  	/* DMA desc pools */
> -	struct pci_pool			*data_requests;
> -	struct pci_pool			*stp_requests;
> +	struct dma_pool			*data_requests;
> +	struct dma_pool			*stp_requests;
>  
>  	/* device data */
>  	unsigned long			phys_addr;
> -- 
> 2.9.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ