Paulo da Silva | 1 Nov 01:36 2008
Picon

Strange problems identifing HDs!

Hi!

After some badblocks problems on my sdb drive, I did a reboot.
My system has 2 SATA HDs (sda and sdb), but now the HDs are identified
as sda and sdc!
Log files show that something (kernel?) is trying to access a non
existant sdb and after several unsuccessful accesses (the disk does not
exist) it stops this "disk" and begin to access my second disk "calling"
it  scd!

Why is this?

Additional info:

Booting from a live CD or from a good partition on the "error" disk
(sdb) correctly identifies the disks as sda and sdb. So, I copied this
good partition to my good disk (sda) and booted from it. No way! Still
identifies the disks as sda and sdc!!!

Any help? Thanks.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis <at> nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Hans J. Koch | 1 Nov 02:35 2008
Picon

Re: UIO: mapping UIO_MEM_LOGICAL fails for size < PAGE_SIZE

On Fri, Oct 31, 2008 at 05:29:25PM +0100, Christoph Gysin wrote:

Hi Christoph,

> I'm playing around with UIO, and got problems getting the following to work:
> 
> dev_info.mem[0].memtype = UIO_MEM_LOGICAL;
> dev_info.mem[0].addr = (unsigned long) kmalloc(16, GFP_KERNEL);
> dev_info.mem[0].size = 16;
> 
> If I increase size to PAGE_SIZE, everything works as expected.
> 
> Is this a bug or just not documented? Does size have to be a multiple
> of PAGE_SIZE?

No, you can pick any size you like. You run into the following problem:

If you kmalloc 16 bytes, kmalloc might return an address that is
somewhere in the middle of a page. But the mmap mechanism works for full
pages only, so any address returned by mmap() in userspace will be on a
page boundary. To get a pointer to your 16 bytes, you need to add an
offset to the pointer returned by mmap().

To address this problem, we recently added a sysfs file called "offset",
that gives you exactly the value you need to add. If you use a recent
kernel (2.6.28-rcX), you'll find that file under
/sys/class/uio/uioX/memY/.

As a workaround (if you need to use an older kernel), you can look at
the sysfs file "addr" in the same directory. It contains the value you
(Continue reading)

J.H.Kim | 1 Nov 06:41 2008
Picon

USB ECHI hub dection

Hi, everyone

In kernel 2.6.26, when the root hub of ECHI is added to usb subsytem, 
which driver probe routine is called, generic_usb_driver or hub_driver?

I guess it is right for probe() of hub_driver to be called.
However, I see the device type of root hub is usb_device_type.
It is allocated by usb_alloc_dev().

struct usb_device *usb_alloc_dev(struct usb_device *parent, struct 
usb_bus *bus, unsigned port1)
{
	.......
	dev->dev.type = &usb_device_type;
	.......
}

The hub driver is registered by usb_register_driver(), so it is not for 
usb devices.

int usb_register_driver(struct usb_driver *new_driver, struct module 
*owner, const char *mod_name)
{
	.......

	new_driver->drvwrap.for_devices = 0;

         ........
}

(Continue reading)

loody | 1 Nov 08:45 2008
Picon

how to ask grep to search specific file recurisively?

Dear all:
"grep 'test' *.h" will search pattern "test" in all header file at the
current folder.
if I want grep do the same thing recursively, I try to use "grep -r
'test' *.h" and it complains no *.h such file.
Would anyone know how to use grep to search specific file recursively?
appreciate your help,
miloody

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis <at> nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Manish Katiyar | 1 Nov 09:21 2008
Picon

Re: how to ask grep to search specific file recurisively?

On Sat, Nov 1, 2008 at 1:15 PM, loody <miloody <at> gmail.com> wrote:
> Dear all:
> "grep 'test' *.h" will search pattern "test" in all header file at the
> current folder.
> if I want grep do the same thing recursively, I try to use "grep -r
> 'test' *.h" and it complains no *.h such file.
> Would anyone know how to use grep to search specific file recursively?

This is really not a kernel question......but anyway the following
command should be good enough for you.

find . -name '*.h' -exec grep test {} /dev/null \;

Thanks -
Manish

> appreciate your help,
> miloody
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis <at> nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis <at> nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ
(Continue reading)

Peter Teoh | 1 Nov 09:34 2008
Picon

Re: how to ask grep to search specific file recurisively?

"grep -r" is the way.

if u use git, it is git-grep -r etc.   (git know where are all the C
files - via git-ls-files)

On Sat, Nov 1, 2008 at 4:21 PM, Manish Katiyar <mkatiyar <at> gmail.com> wrote:
> On Sat, Nov 1, 2008 at 1:15 PM, loody <miloody <at> gmail.com> wrote:
>> Dear all:
>> "grep 'test' *.h" will search pattern "test" in all header file at the
>> current folder.
>> if I want grep do the same thing recursively, I try to use "grep -r
>> 'test' *.h" and it complains no *.h such file.
>> Would anyone know how to use grep to search specific file recursively?
>
> This is really not a kernel question......but anyway the following
> command should be good enough for you.
>
> find . -name '*.h' -exec grep test {} /dev/null \;
>
> Thanks -
> Manish
>
>
>> appreciate your help,
>> miloody
>>
>> --
>> To unsubscribe from this list: send an email with
>> "unsubscribe kernelnewbies" to ecartis <at> nl.linux.org
>> Please read the FAQ at http://kernelnewbies.org/FAQ
(Continue reading)

Vimal | 1 Nov 09:23 2008
Picon

Re: how to ask grep to search specific file recurisively?

Hello,

> if I want grep do the same thing recursively, I try to use "grep -r
> 'test' *.h" and it complains no *.h such file.
> Would anyone know how to use grep to search specific file recursively?
> appreciate your help,

You could use find and it's exec option. Or, you could also use find and xargs.

$ find . -type f -iname '*.h' -exec grep -H 'test' {} \;
or
$ find . -type f -iname '*.h' | xargs grep -H 'test'

Explanation:
find: the program that does the job :)
-type f: Check only for files. -type d will check for directories.
Similarly, you can search for pipes, char devices, etc.
-iname regex: case insensitive match regex. You can also invert the regex.
-exec grep -H 'test': for each found file, exec the command
{}: Replace this by the file that is found
\;: Escape the semicolon (so that it's understood by find, and not
your shell); which indicates the end of -exec command.

`xargs program-with-options' does something like this:

for each line in stdin:
  invoke program-with-options $line

Hope that helps,
Regards,
(Continue reading)

loody | 1 Nov 10:09 2008
Picon

Re: how to ask grep to search specific file recurisively?

2008/11/1 Peter Teoh <htmldeveloper <at> gmail.com>:
> "grep -r" is the way.
>
> if u use git, it is git-grep -r etc.   (git know where are all the C
> files - via git-ls-files)
>
hi:
actually I am tracing uclinux kernel source code, which I get it not from git.
so~~
As other friends suggest, I should use "find" to help me list out the
files I want grep to search.
thanks for your help,
miloody

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis <at> nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Stuart Jansen | 1 Nov 14:37 2008

Re: how to ask grep to search specific file recurisively?

On Sat, 2008-11-01 at 13:53 +0530, Vimal wrote:
> You could use find and it's exec option. Or, you could also use find and xargs.
> 
> $ find . -type f -iname '*.h' -exec grep -H 'test' {} \;
> or
> $ find . -type f -iname '*.h' | xargs grep -H 'test'

xargs is going to be the more efficient option

> `xargs program-with-options' does something like this:
> 
> for each line in stdin:
>   invoke program-with-options $line

Actually, it's more like

while stdin not empty:
  args_list = []
  while arg_list < maximum length:
     push a line from stdin into arg_list
  invoke program with arg_list

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis <at> nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

pragnesh radadia | 1 Nov 17:04 2008
Picon

Re: i can't find "Debug slab memory allocations" option in menuconfig.

On Sat, Nov 1, 2008 at 9:04 PM, Enes Albay <albayenes <at> gmail.com> wrote:
> Hi all,
> I want to enable "Debug slab memory allocations" option while i'm compiling
> new kernel, but i couldn't find this option. When i serached it in
> menuconfig, it shows me that
>
> Symbol: DEBUG_SLAB_LEAK [=n]
> │
>  │ Prompt: Memory leak debugging
> │
>  │   Defined at lib/Kconfig.debug:263
> │
>  │   Depends on: DEBUG_SLAB
> │
>  │   Location:
> │
>  │     -> Kernel hacking
> │
>  │       -> Kernel debugging (DEBUG_KERNEL [=y])
> │
>  │         -> Debug slab memory allocations (DEBUG_SLAB [=n])
> │
>  │
> │
>  │
> │
>  │ Symbol: DEBUG_SLAB [=n]
> │
>  │ Prompt: Debug slab memory allocations
> │
(Continue reading)


Gmane