USB HDD Debug noise in WP77


#1

Hi,

Does anyone know how to disable the USB SCSI debug messages on a WP7702 with firmware package R9.1?

I plugged in a USB ‘pen drive’ into a mangOH red, mounted it and then and the log filled with kernel debug messages like so:

Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446651] *** thread awakened
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446665] Command WRITE_10 (10 bytes)
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446674] bytes: 
Dec 16 05:57:55 swi-mdm9x28-wp user.warn kernel: [  350.446682]  2a 00 00 02 97 70 00 00 01 00
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446716] Bulk Command S 0x43425355 T 0x2a L 512 F 0 Trg 0 LUN 0 CL 10
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446726] xfer 31 bytes
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446900] Status code 0; transferred 31/31
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446912] -- transfer complete
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446922] Bulk command transfer result=0
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.446933] xfer 512 bytes, 1 entries
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.450955] Status code 0; transferred 512/512
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.450970] -- transfer complete
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.450981] Bulk data transfer result 0x0
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.450991] Attempting to get CSW...
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.451001] xfer 13 bytes
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.451340] Status code 0; transferred 13/13
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.451352] -- transfer complete
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.451362] Bulk status result = 0
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.451374] Bulk Status S 0x53425355 T 0x2a R 0 Stat 0x0
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.451389] scsi cmd done, result=0x0
Dec 16 05:57:55 swi-mdm9x28-wp user.debug kernel: [  350.451411] *** thread sleeping

for every read or write transaction to the USB drive.

How do I disable this?

thanks, Dave


#2

Hi,

logs which are showing is related to usb data transfer and logs are enabled in the function “usb_stor_dbg”(drivers/usb/storage/debug.c).Try to disable the usb_stor_dbg function We can disable by menuconfig in yocto and check.
steps:

  1. source ./poky/oe-init-build-env build_bin/
  2. bitbake linux-yocto -c menuconfig
  3. search “CONFIG_USB_STORAGE_DEBUG”
  4. disable “USB Mass Storage verbose debug”
    This has to remove debug message related to storage operations as mentioned.

#3

Hi @Manukumar,

Ta.

So the only way is to rebuild Yocto? I’ve got to ask why this was left turned on in the release build.

Sigh.

ciao, Dave


#4

Hi,

One thing you can do in the mean time is filter out the messages you do not want. Something along the lines of:

ssh root@192.168.2.2 "/sbin/logread -f" \
    | grep -v "swi-mdm9x28-wp user.debug kernel"

-Chloe


#5

Hi Chloe,

Thanks for that.

In my application there are a couple of issues with that though:

  1. I’ve got an app (in C) that opens a pipe to logread and then writes the contents to a rotating set of text files on the USB storage device. So I have a bit of a circular problem where the act of logging is generating more log info.
    I’ll have a look to see if I can insert the grep into the pipe setup that I’m using in C.
  2. The other issue is that the Busybox provided ash shell implements pipes with a 1k block buffer. This means that the input to the pipe is not passed on to the output of the pipe untile either (a) the buffer is filled; ot (b) the write end (input) is closed. So if there’s not a lot of data then the output from the grep can be significantly delayed in time.
    I’ve been bitten by this before when trying to do scripting work in busybox based systems.

I guess I can look at modifying my C app to parse each line of text and strip out the data I don’t need. That’s effectively what you are suggesting using grep - just have to look at a way of doing that efficiently. Something else to learn!

Thanks for the hints.

ciao, Dave


#6

We hope it has resolved. Can we close this ?


#7

Hiya,

Not resolved.

Gave up with the problem unresolved.


#8

HI @davidc,
I understand your point, and will raise a discussion internally;
anyway, by following the proposal from Manukumar, you should be able to solved your issue;
Best Regards,