mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ching Huang <ching2048@areca.com.tw>
To: Joe Perches <joe@perches.com>
Cc: 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,
	hch@lst.de
Subject: Re: [PATCH 2/2] arcmsr: adds code for support areca new adapter ARC1203
Date: Tue, 24 Nov 2015 17:53:18 +0800	[thread overview]
Message-ID: <1448358798.14472.3.camel@Centos6.3-64> (raw)
In-Reply-To: <1448357586.14504.12.camel@perches.com>

On Tue, 2015-11-24 at 01:33 -0800, Joe Perches wrote:
> 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?

That's right. It's need to release the allocated resource for failed condition.
> 
> 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:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24  8:17 Ching Huang
2015-11-24  9:33 ` Joe Perches
2015-11-24  9:53   ` Ching Huang [this message]
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=1448358798.14472.3.camel@Centos6.3-64 \
    --to=ching2048@areca.com.tw \
    --cc=agordeev@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=jbottomley@parallels.com \
    --cc=joe@perches.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

all inboxes | Powered by JetHome®