All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Philip J. Kelleher" <pjk1939@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, klebers@linux.vnet.ibm.com,
	brking@linux.vnet.ibm.com
Subject: Re: [PATCH 9/9] rsxx: Disallows DMA transfer during format.
Date: Wed, 1 May 2013 13:43:26 +0200	[thread overview]
Message-ID: <20130501114326.GW7800@kernel.dk> (raw)
In-Reply-To: <20130430200158.GB15930@oc6784271780.ibm.com>

On Tue, Apr 30 2013, Philip J. Kelleher wrote:
> From: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
> 
> Verifies the card is not formatting before DMAs are
> transferred.
> 
> Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
> -------------------------------------------------------------------------------
> 
> 
> diff -uprN -X linux-block-vanilla/Documentation/dontdiff linux-block-vanilla/drivers/block/rsxx/dma.c linux-block/drivers/block/rsxx/dma.c
> --- linux-block-vanilla/drivers/block/rsxx/dma.c	2013-04-29 16:06:49.997249172 -0500
> +++ linux-block/drivers/block/rsxx/dma.c	2013-04-29 16:10:46.960184429 -0500
> @@ -721,7 +721,8 @@ int rsxx_dma_queue_bio(struct rsxx_cardi
>  		}
>  	}
>  
> -	if (unlikely(card->halt))
> +	if (unlikely(card->halt) ||
> +	    unlikely(card->state == CARD_STATE_FORMATTING))
>  		goto bvec_err;
>  
>  	for (i = 0; i < card->n_targets; i++) {

What happens if card->state is set to formatting right after this check?

-- 
Jens Axboe


  reply	other threads:[~2013-05-01 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30 20:01 [PATCH 9/9] rsxx: Disallows DMA transfer during format Philip J. Kelleher
2013-05-01 11:43 ` Jens Axboe [this message]
2013-05-01 14:13   ` Philip J. Kelleher

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=20130501114326.GW7800@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=brking@linux.vnet.ibm.com \
    --cc=klebers@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjk1939@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.