Steven, I have multiple qspi devices on my system, and I was getting a hang on certain processes that were making spi_sync calls. There completion callbacks were never being called because the messages weren't being processed. See the patch.
- Jate --------- 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<jsujjavan...@syntech-fuelmaster.com> --------- diff --git a/drivers/spi/coldfire_qspi.c b/drivers/spi/coldfire_qspi.c index 05d4cfa..23822bb 100644 --- a/drivers/spi/coldfire_qspi.c +++ b/drivers/spi/coldfire_qspi.c @@ -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(mcfqspi->msgq.next); spin_unlock_irqrestore(&mcfqspi->lock, flags); spi = msg->spi; -----Original Message----- From: Greg Ungerer [mailto:g...@snapgear.com] Sent: Tuesday, July 27, 2010 11:36 PM To: Steven King Cc: Jate Sujjavanich; uclinux-dev@uclinux.org Subject: Re: [uClinux-dev] [PATCH] m68knommu: Coldfire QSPI platform support Steven King wrote: > On Tuesday 13 July 2010 01:30:09 Jate Sujjavanich wrote: >> I just tried the 2.6.35-rc tree. I tried 527x and 5329 configurations in >> addition to my current 523x one. >> >> What toolchain are you using? I am running 4.4.1 (Sourcery G++ Lite >> 4.4-216). > > Ah, it looks like Jate is correct. I tried .35-rc6's m5275evb_defconfig with > qspi enabled and indeed the build does fail; whereas with my 'kitchen > sink' .config it succeeds. A little further investigation finds that along > with enabling various spi devices and whatnot, my kitchen sink .config also > set CONFIG_PREEMPT=yes (why, I dont know, I'm sure it seemed like a good idea > at the time); changing that to CONFIG_PREEMPT_NONE=yes like the > m5275evb_defconfig and the build fails... > > Since I dont think we want to make QSPI depend upon CONFIG_PREEMPT ;) we do > need that include of sched.h. > > Thanks Jate for catching that. Ok, patch included in the m68knommu git tree again :-) Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Principal Engineer EMAIL: g...@snapgear.com SnapGear Group, McAfee PHONE: +61 7 3435 2888 8 Gardner Close FAX: +61 7 3217 5323 Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev