public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 9/9] rsxx: Disallows DMA transfer during format.
@ 2013-04-30 20:01 Philip J. Kelleher
  2013-05-01 11:43 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Philip J. Kelleher @ 2013-04-30 20:01 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel, klebers, brking

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++) {


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-01 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-30 20:01 [PATCH 9/9] rsxx: Disallows DMA transfer during format Philip J. Kelleher
2013-05-01 11:43 ` Jens Axboe
2013-05-01 14:13   ` Philip J. Kelleher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox