mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavan Savoy <pavan.savoy@gmail.com>
To: greg@kroah.com, linux-kernel@vger.kernel.org
Cc: pavan_savoy@sify.com, Victor Goldenshtein <victorg@ti.com>,
	Pavan Savoy <pavan_savoy@ti.com>
Subject: [PATCH] drivers:misc:ti-st: fix skip remote baud logic
Date: Sat, 23 Apr 2011 10:38:17 +0530	[thread overview]
Message-ID: <1303535297-2586-1-git-send-email-pavan_savoy@ti.com> (raw)

From: Victor Goldenshtein <victorg@ti.com>

Texas Instruments WiLink connectivity combo chipsets support custom baud
rates over its UART interface.
This can be achieved by sending the change remote baud rate command.
Since the baud rate can be properly set by the user-space on shared
transport the remote chip-side and local host-side baud rate is change
by the User Space Init Manager.

This patch when encounters the same command inside the firmware,
attempts to skip such command since it is handled by the user-space.
The logic to skip the command when it is un-commented is fixed by this
patch.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Author:    Victor Goldenshtein <victorg@ti.com>
---
 drivers/misc/ti-st/st_kim.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index b4488c8..57c71fa 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -244,9 +244,9 @@ void skip_change_remote_baud(unsigned char **ptr, long *len)
 		pr_err("invalid action after change remote baud command");
 	} else {
 		*ptr = *ptr + sizeof(struct bts_action) +
-			((struct bts_action *)nxt_action)->size;
+			((struct bts_action *)cur_action)->size;
 		*len = *len - (sizeof(struct bts_action) +
-				((struct bts_action *)nxt_action)->size);
+				((struct bts_action *)cur_action)->size);
 		/* warn user on not commenting these in firmware */
 		pr_warn("skipping the wait event of change remote baud");
 	}
@@ -385,6 +385,8 @@ static long download_firmware(struct kim_data_s *kim_gdata)
 	}
 	/* fw download complete */
 	release_firmware(kim_gdata->fw_entry);
+	if (len != 0)
+		pr_err("%s:failed, script not parsed completely", __func__);
 	return 0;
 }
 
-- 
1.7.0.4


             reply	other threads:[~2011-04-23  5:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-23  5:08 Pavan Savoy [this message]
2011-04-23  5:41 ` Greg KH
2011-04-23 11:14   ` Pavan Savoy

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=1303535297-2586-1-git-send-email-pavan_savoy@ti.com \
    --to=pavan.savoy@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavan_savoy@sify.com \
    --cc=pavan_savoy@ti.com \
    --cc=victorg@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®