Commit:     65e213cdb2e52ba03e61c4d855293054bd8de632
Parent:     9c3013e9b91ad23ecae88e45405e98208cce455d
Author:     Jan Andersson <[EMAIL PROTECTED]>
AuthorDate: Tue Sep 11 15:23:30 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Sep 11 17:21:19 2007 -0700

    spi_mpc83xx: hang fix
    When the spi_mpc83xx driver receives a tx_buf pointer which is NULL, it
    only writes one zero filled word to the transmit register.  If the driver
    expects to receive more than one word it will wait forever for a second
    receive interrupt.  With this patch the controller will shift out zeroes
    until all words have been received.
    Signed-off-by: Jan Andersson <[EMAIL PROTECTED]>
    Tested-by: Anton Vorontsov <[EMAIL PROTECTED]>
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Acked-by: Kumar Gala <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/spi/spi_mpc83xx.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index fcbf1b8..32cda77 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -384,11 +384,8 @@ irqreturn_t mpc83xx_spi_irq(s32 irq, void *context_data)
        mpc83xx_spi->count -= 1;
        if (mpc83xx_spi->count) {
-               if (mpc83xx_spi->tx) {
-                       u32 word = mpc83xx_spi->get_tx(mpc83xx_spi);
-                       mpc83xx_spi_write_reg(&mpc83xx_spi->base->transmit,
-                                             word);
-               }
+               u32 word = mpc83xx_spi->get_tx(mpc83xx_spi);
+               mpc83xx_spi_write_reg(&mpc83xx_spi->base->transmit, word);
        } else {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to