Quantcast

smsc911x driver, debug mode ( howto )

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

smsc911x driver, debug mode ( howto )

kris duff
Hello,

I have issues with a custom board with smsc911x.  u-boot detects the chip, but the kernel does not.

To help me debugging the issue, I recompiled my kernel to add the smsc911x as a kernel module but now, I want to change the debug level in the file smsc911x.h. In my yocto directory there is a lot of files named smsc911x.h ( I uses the gumstix repo ), all in the build/tmp subdirectory. In which directory we have to change the debug level in the file ?

Thank you

Kris


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: smsc911x driver, debug mode ( howto )

Scott Ellis
<OETMPDIR>/work/overo-poky-linux-gnueabi/linux-sakoman-3.2-r0/drivers/net/ethernet/smsc/smsc911x.h

That's if you are using Yocto and Sakoman's 3.2 kernel. Adjust for your system.

Or you could add the below patch to your kernel recipe and rebuild your kernel with bitbake.

For example, the kernel recipe would now look something like

$ cd <some-meta-layer-dir>/recipes-kernel/linux/
$ cat linux-sakoman_3.2.bb
require linux.inc

DESCRIPTION = "Linux kernel for OMAP processors"
KERNEL_IMAGETYPE = "uImage"

COMPATIBLE_MACHINE = "overo"

#BOOT_SPLASH ?= "logo_linux_clut224-generic.ppm"
BOOT_SPLASH = ""

PV = "3.2"

S = "${WORKDIR}/git"

SRCREV = "${AUTOREV}"
SRC_URI = "git://www.sakoman.com/git/linux.git;branch=omap-3.2;protocol=git \
           file://defconfig \
           file://smsc911x-debug-enable.patch \
           "

And the patch would go in <some-meta-layer-dir>/recipes-kernel/linux/linux-sakoman-3.2/

--- smsc911x-debug-enable.patch ---

diff --git git/drivers/net/ethernet/smsc/smsc911x.h-orig git/drivers/net/ethernet/smsc/smsc911x.h
index 8d67aac..624fd37 100644
--- git/drivers/net/ethernet/smsc/smsc911x.h-orig
+++ git/drivers/net/ethernet/smsc/smsc911x.h
@@ -23,7 +23,7 @@
 
 #define TX_FIFO_LOW_THRESHOLD ((u32)1600)
 #define SMSC911X_EEPROM_SIZE ((u32)128)
-#define USE_DEBUG 0
+#define USE_DEBUG 2
 
 /* This is the maximum number of packets to be received every
  * NAPI poll */
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: smsc911x driver, debug mode ( howto )

kris duff
Jumpnow,

Thank you a lot for your great answer !

:-)

Kris


From: jumpnowdev <[hidden email]>
To: [hidden email]
Sent: Thursday, January 31, 2013 10:10:31 AM
Subject: Re: [Gumstix-users] smsc911x driver, debug mode ( howto )

<OETMPDIR>/work/overo-poky-linux-gnueabi/linux-sakoman-3.2-r0/drivers/net/ethernet/smsc/smsc911x.h

That's if you are using Yocto and Sakoman's 3.2 kernel. Adjust for your
system.

Or you could add the below patch to your kernel recipe and rebuild your
kernel with bitbake.

For example, the kernel recipe would now look something like

$ cd <some-meta-layer-dir>/recipes-kernel/linux/
$ cat linux-sakoman_3.2.bb
require linux.inc

DESCRIPTION = "Linux kernel for OMAP processors"
KERNEL_IMAGETYPE = "uImage"

COMPATIBLE_MACHINE = "overo"

#BOOT_SPLASH ?= "logo_linux_clut224-generic.ppm"
BOOT_SPLASH = ""

PV = "3.2"

S = "${WORKDIR}/git"

SRCREV = "${AUTOREV}"
SRC_URI = "git://www.sakoman.com/git/linux.git;branch=omap-3.2;protocol=git
\
      file://defconfig \
          file://smsc911x-debug-enable.patch \
          "

And the patch would go in
<some-meta-layer-dir>/recipes-kernel/linux/linux-sakoman-3.2/

--- smsc911x-debug-enable.patch ---

diff --git git/drivers/net/ethernet/smsc/smsc911x.h-orig
git/drivers/net/ethernet/smsc/smsc911x.h
index 8d67aac..624fd37 100644
--- git/drivers/net/ethernet/smsc/smsc911x.h-orig
+++ git/drivers/net/ethernet/smsc/smsc911x.h
@@ -23,7 +23,7 @@

#define TX_FIFO_LOW_THRESHOLD    ((u32)1600)
#define SMSC911X_EEPROM_SIZE    ((u32)128)
-#define USE_DEBUG        0
+#define USE_DEBUG        2

/* This is the maximum number of packets to be received every
  * NAPI poll */




--
View this message in context: http://gumstix.8.n6.nabble.com/smsc911x-driver-debug-mode-howto-tp4966673p4966675.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...