Re: How to go about debugging usb driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>
>> Does this device have a serial port that can be used as a console?
>
> Well, it does on the board, but I do not have the requisite voltage
> converter, so I'm just relying on the net. At the moment, I ssh into the box
> and track /var/log/messages, which gets populated, as expected.
>
You can get nice little usb/serial devices with 5 and 3.3v outputs.
The one I have is : http://byvac.co.uk/co_serial.php

One advantage of a serial port over netconsole is that it normally
works in the bootloader before the kernel starts.

>>
> I'll try to throw netconsole in. But is it not going to be the same set of
> messages I get via syslog? And why don't I see much in /var/log/messages.
> Can I alter some flags in  to make it more verbose.
>
Normally they are the same yes but not in the case of a crash/
panic.

printk writes synchronously to a circular buffer in memory and
to the console (serial, netconsole or whatever).
Whereas /var/log/messages (or the busybox syslogd) is handled
by a userspace program reading the log buffer asynchronously.

This means that a kernel panic which causes an immediate
system halt / reboot will never get to userspace.

> Usblp is sprinkled around with lots of dbg(...) calls, I'm surprised not any
> of those make it to /var/log/messages.
>
You need to add
#define DEBUG
to usblp (just after the #undef DEBUG)

> There is also busybox's syslogd, which I could redirect to host:port using
> -R :)
>
Same problem for panics

> Will netconsole give anymore insights.?
>
As much as a serial console

cheers,

Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux