Re: Why "lsusb" return nothing?

2012-10-03 Thread Peter Teoh
THank you for your help.   This is the result:

mount -t usbdevfs none /proc/bus/usb
mount: mount point /proc/bus/usb does not exist

mkdir /proc/bus/usb
mkdir: cannot create directory `/proc/bus/usb': No such file or directory

And supposed I tried a directory that exist:

mount -t usbdevfs none /proc/bus
mount: unknown filesystem type 'usbdevfs'

The exact mirror (before the problem start I mirrored the system) is still
working today, and I have not find any difference between the two version
so far.

On Mon, Oct 1, 2012 at 12:51 PM,  wrote:

> This steps helped me when I had same problem in SUSE9.
>
> The Reason is "/proc/bus/usb/ doesn't has any entry where actually lsusb
> searches to show USB BUS devices.To make that happen you have to manually .
> Mount the Bus devices using below command.
>
> mount -t usbdevfs none /proc/bus/usb/
>
> And you are done.
> Now lsusb should show all USB BUS devies.
>
> Thanks
> Ashish Bunkar
>
> -Original Message-
> From: kernelnewbies-boun...@kernelnewbies.org [mailto:
> kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Peter Teoh
> Sent: Saturday, September 29, 2012 7:12 AM
> To: kernelnewbies@kernelnewbies.org
> Subject: Why "lsusb" return nothing?
>
> I entered "lsusb" at the command line (as root) and nothing is return, not
> even any error message.
>
> Doing a strace the last few lines are:
>
> open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1
> ENOENT (No such file or directory) open("/proc/bus/usb",
> O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or
> directory)
>
> What happened?
>
> This is Ubuntu 10.04 (it used NOT to be like that, not sure I what did
> wrong last time).   But running a VirtualBox INSIDE this same OS, I
> was able to get result from "lsusb" (after enabling the USB devices in
> VirtualBox interface) and strace gives result:
>
> open("/dev/bus/usb/001/002", O_RDWR)= 3
> ioctl(3, USBDEVFS_IOCTL, 0xbff6f75c)= -1 ENOTTY (Inappropriate
> ioctl for device)
> close(3)= 0
> open("/dev/bus/usb/001/001", O_RDWR)= 3
>
> Why the difference?
>
> --
> Regards,
> Peter Teoh
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
Regards,
Peter Teoh
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Advice on first patch

2012-10-03 Thread Peter Senna Tschudin
Matthew,

The file

drivers/net/wan/cosa.c

has many lines like:
return -1;

and
err = -1;
goto err_out;

Returning -1 is not the default way of returning error codes. Take a
look at http://lxr.free-electrons.com/source/include/asm-generic/errno-base.h
for a small list of error codes. There is also
http://lxr.free-electrons.com/source/include/asm-generic/errno.h.

If you decide to propose the use of error codes instead of -1, make
sure to update include section if needed. You can see how other
functions use return codes...

Peter

On Tue, Oct 2, 2012 at 12:56 PM,   wrote:
>
> I'm hopefully going to be submitting the attached patch to the mainline 
> kernel tree, and as it's my first patch, I figured it would be wise to run it 
> past KN first in case I'd done something monumentally stupid! I found it 
> through a checkpatch run, from the excellent talk by GregKH at FOSDEM a year 
> or so back.
>
> Any input would be greatly appreciated!
>
> Matthew Walster
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Peter

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: [PATCH] net: ethernet: clean out braces / old code (found via checkpatch)

2012-10-03 Thread Scott Lovenberg
On Wed, Oct 3, 2012 at 5:13 AM, Matthew Walster  wrote:
>
>
> On 2 October 2012 17:16, Scott Lovenberg  wrote:
>>
>> Looks good to me.
>
>
> Maintainer didn't think so :(
>
> On 2 October 2012 19:46, David Miller  wrote:
>>
>> That comment and that unconditional if() are documentation.
>>
>> Don't be an automaton and blindly make changes based upon
>> checkpatch.pl output.
>
>
> Perhaps I'll just clean up some of drivers/staging while I learn the process
> before I dive in to "net" again.
>
> Matthew Walster

Sorry, man.  I'm not going to mix it up with Dave Miller, but really
if he wanted that to stay in there a comment suggesting so would have
been nice.

-- 
Peace and Blessings,
-Scott.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Advice on first patch

2012-10-03 Thread Bjørn Mork
...but davem wanted to keep it as documentation.  Who could have
imagined that?  That's how things work. Just find something else to fix.
Sooner or later you will get a patch accepted :-)

But you might consider taking his (hidden) advise and look for something
more challenging than checkpatch output.  There are plenty of bugs to
fix and drivers to write.  You might already own some hardware which
isn't fully supported? Try to find out why, and see if you can fix it.
Not everything is fixable this way, as lack of documentation often is
the problem.  But there are more than enough things that are.


Bjørn

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: [PATCH] net: ethernet: clean out braces / old code (found via checkpatch)

2012-10-03 Thread Matthew Walster
On 2 October 2012 17:16, Scott Lovenberg  wrote:
>
> Looks good to me.
>

Maintainer didn't think so :(

On 2 October 2012 19:46, David Miller  wrote:
>
> That comment and that unconditional if() are documentation.
>
> Don't be an automaton and blindly make changes based upon
> checkpatch.pl output.


Perhaps I'll just clean up some of drivers/staging while I learn the
process before I dive in to "net" again.

Matthew Walster
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies