Re: A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
thanks guys, got it to work. the receive interrupt was somehow getting disabled.

On Tue, Aug 7, 2012 at 4:12 PM, Jiri Slaby  wrote:
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> On 08/07/2012 11:51 AM, Shashidhar Hiremath wrote:
>> the code is a bit unclean to send directly.
>
> Whatever, just send it out. Otherwise sorry, you are on your own.
>
> regards,
> --
> js
> suse labs



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
the code is a bit unclean to send directly. But any information like
"does driver change modes once it prompts for login"
can be helpful for debugging since my code does not seem to work after login .

Behaviour : Driver prints charecter untill devel login on console. It
accepts characters before login prompt but doesnot accept the
charecters after it prompts for login. I enter the username and it is
not displayed.

On Tue, Aug 7, 2012 at 2:38 PM, Jiri Slaby  wrote:
> On 08/07/2012 10:26 AM, Dan Luedtke wrote:
>> On Tue, 2012-08-07 at 13:52 +0530, Shashidhar Hiremath wrote:
>>> The driver for some reason does not
>>> print the content  I type on console after login prompt. Any reason
>>> why this might be happening ?
>>
>> I don't know if it is just me, but a code snippet might help
>> understanding what happens in your driver.
>
> Yea, without that we can barely help you.
>
> regards,
> --
> js
> suse labs



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
Hi Richard,
   I am new to serial framework. Can you please elaborate on what you
mean by implementing a hangup ?
On Tue, Aug 7, 2012 at 2:06 PM, richard -rw- weinberger
 wrote:
> On Tue, Aug 7, 2012 at 10:22 AM, Shashidhar Hiremath
>  wrote:
>> Hi,
>>  I have written a console driver where I also do the serial driver
>> registration and handling. The driver seems to work fine till the
>> login point(reads and writes). The driver for some reason does not
>> print the content  I type on console after login prompt. Any reason
>> why this might be happening ?
>
> login and getty do a lot of TTY black magic, maybe you forgot to implement
> something like hangup()...
> Use strace to find out what the login programs are doing.
>
> --
> Thanks,
> //richard



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
Hi,
 I have written a console driver where I also do the serial driver
registration and handling. The driver seems to work fine till the
login point(reads and writes). The driver for some reason does not
print the content  I type on console after login prompt. Any reason
why this might be happening ?

--
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
Hi,
 I have written a console driver where I also do the serial driver
registration and handling. The driver seems to work fine till the
login point(reads and writes). The driver for some reason does not
print the content  I type on console after login prompt. Any reason
why this might be happening ?

--
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
Hi Richard,
   I am new to serial framework. Can you please elaborate on what you
mean by implementing a hangup ?
On Tue, Aug 7, 2012 at 2:06 PM, richard -rw- weinberger
richard.weinber...@gmail.com wrote:
 On Tue, Aug 7, 2012 at 10:22 AM, Shashidhar Hiremath
 shashidh...@vayavyalabs.com wrote:
 Hi,
  I have written a console driver where I also do the serial driver
 registration and handling. The driver seems to work fine till the
 login point(reads and writes). The driver for some reason does not
 print the content  I type on console after login prompt. Any reason
 why this might be happening ?

 login and getty do a lot of TTY black magic, maybe you forgot to implement
 something like hangup()...
 Use strace to find out what the login programs are doing.

 --
 Thanks,
 //richard



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
the code is a bit unclean to send directly. But any information like
does driver change modes once it prompts for login
can be helpful for debugging since my code does not seem to work after login .

Behaviour : Driver prints charecter untill devel login on console. It
accepts characters before login prompt but doesnot accept the
charecters after it prompts for login. I enter the username and it is
not displayed.

On Tue, Aug 7, 2012 at 2:38 PM, Jiri Slaby jsl...@suse.cz wrote:
 On 08/07/2012 10:26 AM, Dan Luedtke wrote:
 On Tue, 2012-08-07 at 13:52 +0530, Shashidhar Hiremath wrote:
 The driver for some reason does not
 print the content  I type on console after login prompt. Any reason
 why this might be happening ?

 I don't know if it is just me, but a code snippet might help
 understanding what happens in your driver.

 Yea, without that we can barely help you.

 regards,
 --
 js
 suse labs



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on serial driver

2012-08-07 Thread Shashidhar Hiremath
thanks guys, got it to work. the receive interrupt was somehow getting disabled.

On Tue, Aug 7, 2012 at 4:12 PM, Jiri Slaby jsl...@suse.cz wrote:
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
 A: Top-posting.
 Q: What is the most annoying thing in e-mail?

 On 08/07/2012 11:51 AM, Shashidhar Hiremath wrote:
 the code is a bit unclean to send directly.

 Whatever, just send it out. Otherwise sorry, you are on your own.

 regards,
 --
 js
 suse labs



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on printascii

2012-07-20 Thread Shashidhar Hiremath
thanks a lot Chris. Will try it out.

On Fri, Jul 20, 2012 at 9:24 AM, Chris Ball  wrote:
> Hi Shashidhar,
>
> On Wed, Jul 18 2012, Shashidhar Hiremath wrote:
>>   I want to use printascii to debug my serial driver. How do I enable
>> it and use the feature.
>>   Currently I have enabled in menuconfig and done an extern on the
>> printascii api, this doesn't seem to work, So any hints for debugging
>> serial drivers ?
>
> Sounds like you want this patch, against linux-next:
>
> diff --git a/kernel/printk.c b/kernel/printk.c
> index 3991862..36abce8 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -45,6 +45,8 @@
>
>  #include 
>
> +extern void printascii(char *);
> +
>  #define CREATE_TRACE_POINTS
>  #include 
>
> @@ -1542,6 +1544,8 @@ asmlinkage int vprintk_emit(int facility, int level,
>  */
> text_len = vscnprintf(text, sizeof(textbuf), fmt, args);
>
> +   printascii(text);
> +
> /* mark and strip a trailing newline */
> if (text_len && text[text_len-1] == '\n') {
>     text_len--;
>
> --
> Chris Ball  <http://printf.net/>
> One Laptop Per Child



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on printascii

2012-07-20 Thread Shashidhar Hiremath
thanks a lot Chris. Will try it out.

On Fri, Jul 20, 2012 at 9:24 AM, Chris Ball c...@laptop.org wrote:
 Hi Shashidhar,

 On Wed, Jul 18 2012, Shashidhar Hiremath wrote:
   I want to use printascii to debug my serial driver. How do I enable
 it and use the feature.
   Currently I have enabled in menuconfig and done an extern on the
 printascii api, this doesn't seem to work, So any hints for debugging
 serial drivers ?

 Sounds like you want this patch, against linux-next:

 diff --git a/kernel/printk.c b/kernel/printk.c
 index 3991862..36abce8 100644
 --- a/kernel/printk.c
 +++ b/kernel/printk.c
 @@ -45,6 +45,8 @@

  #include asm/uaccess.h

 +extern void printascii(char *);
 +
  #define CREATE_TRACE_POINTS
  #include trace/events/printk.h

 @@ -1542,6 +1544,8 @@ asmlinkage int vprintk_emit(int facility, int level,
  */
 text_len = vscnprintf(text, sizeof(textbuf), fmt, args);

 +   printascii(text);
 +
 /* mark and strip a trailing newline */
 if (text_len  text[text_len-1] == '\n') {
 text_len--;

 --
 Chris Ball   c...@laptop.org   http://printf.net/
 One Laptop Per Child



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on printascii

2012-07-19 Thread Shashidhar Hiremath
I am working on ARM architecture.

On Wed, Jul 18, 2012 at 9:33 PM, Randy Dunlap  wrote:
> On 07/18/2012 06:03 AM, Shashidhar Hiremath wrote:
>
>> HI,
>>   I want to use printascii to debug my serial driver. How do I enable
>> it and use the feature.
>>   Currently I have enabled in menuconfig and done an extern on the
>> printascii api, this doesn't seem to work, So any hints for debugging
>> serial drivers ?
>>
>
>
> Enabled what/where in menuconfig?
>
> It looks like only a few CPU architecures or platforms
> implement "printascii".  What architecture/platform are you trying
> to use it on?
>
> --
> ~Randy



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: A question on printascii

2012-07-19 Thread Shashidhar Hiremath
I am working on ARM architecture.

On Wed, Jul 18, 2012 at 9:33 PM, Randy Dunlap rdun...@xenotime.net wrote:
 On 07/18/2012 06:03 AM, Shashidhar Hiremath wrote:

 HI,
   I want to use printascii to debug my serial driver. How do I enable
 it and use the feature.
   Currently I have enabled in menuconfig and done an extern on the
 printascii api, this doesn't seem to work, So any hints for debugging
 serial drivers ?



 Enabled what/where in menuconfig?

 It looks like only a few CPU architecures or platforms
 implement printascii.  What architecture/platform are you trying
 to use it on?

 --
 ~Randy



-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


A question on printascii

2012-07-18 Thread Shashidhar Hiremath
HI,
  I want to use printascii to debug my serial driver. How do I enable
it and use the feature.
  Currently I have enabled in menuconfig and done an extern on the
printascii api, this doesn't seem to work, So any hints for debugging
serial drivers ?

-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


A question on printascii

2012-07-18 Thread Shashidhar Hiremath
HI,
  I want to use printascii to debug my serial driver. How do I enable
it and use the feature.
  Currently I have enabled in menuconfig and done an extern on the
printascii api, this doesn't seem to work, So any hints for debugging
serial drivers ?

-- 
regards,
Shashidhar Hiremath
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/