spi/m68knommu: Coldfire QSPI platform support
authorJate Sujjavanich <jsujjavanich@syntech-fuelmaster.com>
Wed, 29 Sep 2010 13:44:32 +0000 (09:44 -0400)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 30 Dec 2010 06:28:25 +0000 (23:28 -0700)
After grabbing a msg from the msgq, the mcfqspi_work function calls
list_del_init on the mcfqspi->msgq which unintentionally deletes the rest
of the list before it can be processed. If qspi call was made using
spi_sync, this can result in a process hang.

Signed-off-by: Jate Sujjavanich <jsujjavanich@syntech-fuelmaster.com>
Acked-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/coldfire_qspi.c

index 052b3c7fa6a0f644d26c613e67e69ffe00ad05be..8856bcca9d2933db4a8f98526bc716c6640bb075 100644 (file)
@@ -317,7 +317,7 @@ static void mcfqspi_work(struct work_struct *work)
                msg = container_of(mcfqspi->msgq.next, struct spi_message,
                                   queue);
 
-               list_del_init(&mcfqspi->msgq);
+               list_del_init(&msg->queue);
                spin_unlock_irqrestore(&mcfqspi->lock, flags);
 
                spi = msg->spi;