public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ching Huang <ching2048@areca.com.tw>,
	hch@infradead.org, thenzl@redhat.com, jbottomley@parallels.com,
	dan.carpenter@oracle.com, agordeev@redhat.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: hch@lst.de
Subject: Re: [PATCH 2/2] arcmsr: adds code for support areca new adapter ARC1203
Date: Tue, 24 Nov 2015 01:33:06 -0800	[thread overview]
Message-ID: <1448357586.14504.12.camel@perches.com> (raw)
In-Reply-To: <1448353024.12861.56.camel@Centos6.3-64>

On Tue, 2015-11-24 at 16:17 +0800, Ching Huang wrote:
> From: Ching Huang <ching2048@areca.com.tw>
> 
> Support areca new PCIe to SATA RAID adapter ARC1203

Why add the dma_free_coherent to an old data path?
Is that a general bug fix that should be backported?

btw: the printk above the dma_free_coherent use
     shouldn't use a \ line continuation.
     it adds undesired whitespace to the format.

> diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
[]
> @@ -2660,10 +2670,19 @@ static bool arcmsr_hbaB_get_config(struc
>  	iop_firm_version = (char __iomem *)(®->message_rwbuffer[17]);> 	> /*firm_version,17,68-83*/
>  	iop_device_map = (char __iomem *)(®->message_rwbuffer[21]);> 	> /*firm_version,21,84-99*/
>  
> +	arcmsr_wait_firmware_ready(acb);
> +	writel(ARCMSR_MESSAGE_START_DRIVER_MODE, reg->drv2iop_doorbell);
> +	if (!arcmsr_hbaB_wait_msgint_ready(acb)) {
> +		printk(KERN_ERR "arcmsr%d: can't set driver mode.\n", acb->host->host_no);
> +		goto gcfg1;
> +	}
>  	writel(ARCMSR_MESSAGE_GET_CONFIG, reg->drv2iop_doorbell);
>  	if (!arcmsr_hbaB_wait_msgint_ready(acb)) {
>  		printk(KERN_NOTICE "arcmsr%d: wait 'get adapter firmware \
>  			miscellaneous data' timeout \n", acb->host->host_no);
> +gcfg1:
> +		dma_free_coherent(&acb->pdev->dev, acb->roundup_ccbsize,
> +			acb->dma_coherent2, acb->dma_coherent_handle2);
>  		return false;
>  	}
>  	count = 8;


  reply	other threads:[~2015-11-24  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24  8:17 [PATCH 2/2] arcmsr: adds code for support areca new adapter ARC1203 Ching Huang
2015-11-24  9:33 ` Joe Perches [this message]
2015-11-24  9:53   ` Ching Huang
2015-11-24 10:24     ` Joe Perches
2015-11-24 11:20       ` Ching Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448357586.14504.12.camel@perches.com \
    --to=joe@perches.com \
    --cc=agordeev@redhat.com \
    --cc=ching2048@areca.com.tw \
    --cc=dan.carpenter@oracle.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox