Re: vmware 2.0.3, kernel 2.4.0 and a cdrom

2001-02-24 Thread Rick Richardson

On Sun, Jan 14 2001, Martin Maciaszek wrote: 
> Since I installed Kernel 2.4.0 VMware is no longer able to 
> recognize my cdrom drive. VMware shows a dialog box on power up 
> with following content: 
> [...] 
> CDROM: '/dev/scd0' exists, but does not appear tobe a CDROM device. 

On Mon Jan 15 2001, Jens Axboe wrote:
> Could you try with this patch, so maybe we can get some hints as to what 
> is going on? 

I didn't see any reply to the request to see the debug output from
the patch.  So here is the output when it is applied to kernel 2.4.2:

Feb 24 18:36:11 ipcroe kernel: Detected scsi CD-ROM sr0 at scsi0, channel 0, id 6, lun 0
Feb 24 18:36:11 ipcroe kernel: sr0: scsi-1 drive
Feb 24 18:36:19 ipcroe kernel: sr0: CDROM (ioctl) reports ILLEGAL REQUEST.
Feb 24 18:36:19 ipcroe kernel: Mode Sense (10) 00 0e 00 00 00 00 00 18 00 
Feb 24 18:36:19 ipcroe kernel: [valid=0] Info fld=0x0, Current sr00:00: sense key 
Illegal Request
Feb 24 18:36:19 ipcroe kernel: Additional sense indicates Invalid command operation 
code

-Rick

-- 
Rick Richardson  [EMAIL PROTECTED]  http://home.mn.rr.com/richardsons/
Twins Cities traffic animations are at http://members.nbci.com/tctraffic/

Important data should not be entrusted to Fisher, as it may eat it and make
loud belching noises. -- RH 7.1 beta release notes.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: Whats the rvmalloc() story?

2001-02-17 Thread Rick Richardson

On Sat, Feb 17, 2001 at 06:46:34PM +1100, Anton Blanchard wrote:
>  
> > I note that at least 5 device drivers have similar implementations
> > of rvmalloc()/rvfree() et al:
> > 
> > ieee1394/video1394.c
> > usb/ibmcam.c
> > usb/ov511.c
> > media/video/bttv-driver.c
> > media/video/cpia.c
> > 
> > rvmalloc()/rvfree() are functions that are used to allocate large
> > amounts of physically non-contiguous kernel virtual memory that will
> > then be mmap()'ed into a user process.
> 
> I had to rewrite rvmalloc and friends in the bttv driver to support the
> new pci dynamic mapping interface. This sounds like a good time to clean
> up all these multiple definitions.
> 
> Anton

If you are offering to do this work now, here is a thread worth
reading which includes a patch to start from...

http://www.uwsg.iu.edu/hypermail/linux/kernel/0002.1/0586.html

BTW, Alan Cox sent me the following additional information in a
private email.  Might as well get this in the mailing list archives
for posterity so that the terms "rvmalloc" and "kiovecs" actually
appear in the same post.  This way, at least, we all know what the
plan for 2.6 should be.

On Tue, Feb 13 2001 at 14:21:50 -0500 (EST), Alan Cox wrote:
> > Whats the story behind rvmalloc() et al? From what I could tell,
> > about a year ago there were some patches to move rvmalloc() into
> > vmalloc() as a blessed feature of the kernel. But it looks to
> > me like these patches didn't "take".
>  
> The plan was to move to kiovecs for this but that didnt make 2.4.
>  
> > Is there some other way of doing this now? If so, does somebody
> > need to go into these drivers and patch them for the blessed way?
> > If not, is there some plan in place to bless these functions and
> > remove the code duplication?
>  
> I have no problem with someone verifying they are duplicates and doing
> that work.

-Rick

-- 
Rick Richardson  [EMAIL PROTECTED]  http://home.mn.rr.com/richardsons/
Twins Cities traffic animations are at http://members.nbci.com/tctraffic/#1

High oil prices encourage drilling and alternative energy research.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Whats the rvmalloc() story?

2001-02-10 Thread Rick Richardson


I note that at least 5 device drivers have similar implementations
of rvmalloc()/rvfree() et al:

ieee1394/video1394.c
usb/ibmcam.c
usb/ov511.c
media/video/bttv-driver.c
media/video/cpia.c

rvmalloc()/rvfree() are functions that are used to allocate large
amounts of physically non-contiguous kernel virtual memory that will
then be mmap()'ed into a user process.

I just got done writing a driver that needed rvmalloc() in order to do
chip level simulation.  Yank and put to the rescue.

Whats the story behind rvmalloc() et al?  From what I could tell,
about a year ago there were some patches to move rvmalloc() into
vmalloc() as a blessed feature of the kernel.  But it looks to
me like these patches didn't "take".

Is there some other way of doing this now?  If so, does somebody
need to go into these drivers and patch them for the blessed way?
If not, is there some plan in place to bless these functions and
remvoe the code duplication?

-Rick

-- 
Rick Richardson  [EMAIL PROTECTED]  http://home.mn.rr.com/richardsons/
Twins Cities traffic animations are at http://members.nbci.com/tctraffic/#1
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



kmalloc() of 4MB causes "kernel BUG at slab.c:1542!"

2001-01-17 Thread Rick Richardson


[please cc me on any responses]

Environment: 2.4.0 released, Pentium III with 256MB's of RAM.
Problem:  kmalloc() of 4M causes kernel message "kernel BUG at slab.c:1542"

Here is the dmesg output:

kernel BUG at slab.c:1542!
invalid operand: 
CPU:0
EIP:0010:[]
EFLAGS: 00010282
eax: 001b   ebx: d2922000   ecx: cdf6c000   edx: 
esi: 0007   edi:    ebp: 0806f124   esp: cb1bdef4
ds: 0018   es: 0018   ss: 0018
Process insmod (pid: 24167, stackpage=cb1bd000)
Stack: c02148eb c021498b 0606 0286 0001 c02a75ec 0029 d2922000 
    d2922083 0100 0007 d29221c0 0100 c0116c65  
   cc8a6000 020c cc8a7000 0060 ffea 0003 c2be5420 0060 
Call Trace: [] [] [] [] [] 
[] [] 

Code: 0f 0b 83 c4 0c 31 c0 83 c4 10 5b 5e c3 eb 0d 90 90 90 90 90 

Repeat by:
Compile simple driver attached.
$ insmod test.o Amt=4096


-- 
Rick Richardson  [EMAIL PROTECTED]  http://home.mn.rr.com/richardsons/
Twins Cities traffic animations are at http://members.nbci.com/tctraffic/#1

Most Minnesotans think Global Warming is a good thing.


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

static size_t   Amt = 1;
MODULE_PARM(Amt, "l");
MODULE_PARM_DESC(Amt, "Pages of memory to allocate");

static void *mem;

static int __init
init(void)
{
/* Announce this module has been loaded. */
printk(KERN_INFO "test loading; allocate %d bytes\n", Amt*4096);

mem = kmalloc(Amt*4096, GFP_KERNEL);
if (!mem) return (-ENOMEM);

printk(KERN_INFO "test loaded\n");
return 0;
}

static void __exit
fini(void)
{
printk(KERN_INFO "test unloading\n");
kfree(mem);
}

module_init(init);
module_exit(fini);