Re: PCI resource unavailable on mips

2007-12-18 Thread Jon Dufresne
> > Bar0:PHYS=e000 LEN=0400 > > Bar1:PHYS=efa0 LEN=0020 > > Bar2:PHYS=e800 LEN=0400 > > So, two 64MB BARs and a 2MB one? That is right. > Any PCI resource allocation errors in dmesg during the boot process? > Could be the kernel wasn't able to find a place to map all of

Re: PCI resource unavailable on mips

2007-12-18 Thread Jon Dufresne
> Your example doesn't make sense to me so far. Ok, I simplified my driver down to one small C file that does exactly what I want, and that is it. Below is my driver under "driver.c" and the user space program I am using to access it under "user-test.c". When I insmod this driver under

Re: PCI resource unavailable on mips

2007-12-18 Thread Jon Dufresne
Your example doesn't make sense to me so far. Ok, I simplified my driver down to one small C file that does exactly what I want, and that is it. Below is my driver under driver.c and the user space program I am using to access it under user-test.c. When I insmod this driver under mips, it

Re: PCI resource unavailable on mips

2007-12-18 Thread Jon Dufresne
Bar0:PHYS=e000 LEN=0400 Bar1:PHYS=efa0 LEN=0020 Bar2:PHYS=e800 LEN=0400 So, two 64MB BARs and a 2MB one? That is right. Any PCI resource allocation errors in dmesg during the boot process? Could be the kernel wasn't able to find a place to map all of the BARs.

Re: PCI resource unavailable on mips

2007-12-17 Thread Jon Dufresne
I did a bit more work and investigation on this and it turns out I could not read the mmio in kernel space because I had not done a pci_enable_device_bars() on the device. I had never done this on x86 so I didn't realize it was necessary. > The virtual address 0xc030 looks sensible and the

Re: PCI resource unavailable on mips

2007-12-17 Thread Jon Dufresne
I did a bit more work and investigation on this and it turns out I could not read the mmio in kernel space because I had not done a pci_enable_device_bars() on the device. I had never done this on x86 so I didn't realize it was necessary. The virtual address 0xc030 looks sensible and the

Re: PCI resource unavailable on mips

2007-12-14 Thread Jon Dufresne
> Odd. I knew the resource allocation stuff has it's issues for some > non-trivial configuration but that one is a new one. Which makes me > wonder if your platform runs the PCI code in probe-only mode where it > will not actually assign resources but only inherit the whole PCI setup > except

Re: PCI resource unavailable on mips

2007-12-14 Thread Jon Dufresne
> > Odd. I knew the resource allocation stuff has it's issues for some > non-trivial configuration but that one is a new one. Which makes me > wonder if your platform runs the PCI code in probe-only mode where it > will not actually assign resources but only inherit the whole PCI setup >

Re: PCI resource unavailable on mips

2007-12-14 Thread Jon Dufresne
Odd. I knew the resource allocation stuff has it's issues for some non-trivial configuration but that one is a new one. Which makes me wonder if your platform runs the PCI code in probe-only mode where it will not actually assign resources but only inherit the whole PCI setup except

Re: PCI resource unavailable on mips

2007-12-14 Thread Jon Dufresne
Odd. I knew the resource allocation stuff has it's issues for some non-trivial configuration but that one is a new one. Which makes me wonder if your platform runs the PCI code in probe-only mode where it will not actually assign resources but only inherit the whole PCI setup except

PCI resource unavailable on mips

2007-12-13 Thread Jon Dufresne
Hi, I've done a bit of linux driver development on x86 in the past. Currently I am working on my first ever linux driver for a mips box. I started by testing the device in an x86 box and got it reasonable stable and am now testing it in the mips box. There appears to be a major problem, one

PCI resource unavailable on mips

2007-12-13 Thread Jon Dufresne
Hi, I've done a bit of linux driver development on x86 in the past. Currently I am working on my first ever linux driver for a mips box. I started by testing the device in an x86 box and got it reasonable stable and am now testing it in the mips box. There appears to be a major problem, one

Re: Driver question: multiple instances of same char device

2007-07-10 Thread Jon Dufresne
, Vitaliy Ivanov wrote: > On 7/10/07, Jon Dufresne <[EMAIL PROTECTED]> wrote: > > I am relatively new to linux device development. And want to understand > > Linux conventions. > > > > Suppose I have a PCI card that is represented in the system by a > > character

Driver question: multiple instances of same char device

2007-07-10 Thread Jon Dufresne
I am relatively new to linux device development. And want to understand Linux conventions. Suppose I have a PCI card that is represented in the system by a character device. If I have two of those PCI cards in the system when the driver module loads, is it convention to have two different major

Driver question: multiple instances of same char device

2007-07-10 Thread Jon Dufresne
I am relatively new to linux device development. And want to understand Linux conventions. Suppose I have a PCI card that is represented in the system by a character device. If I have two of those PCI cards in the system when the driver module loads, is it convention to have two different major

Re: Driver question: multiple instances of same char device

2007-07-10 Thread Jon Dufresne
, Vitaliy Ivanov wrote: On 7/10/07, Jon Dufresne [EMAIL PROTECTED] wrote: I am relatively new to linux device development. And want to understand Linux conventions. Suppose I have a PCI card that is represented in the system by a character device. If I have two of those PCI cards

Re: allocation failed: out of vmalloc space - use vmalloc= to increase size.

2007-06-18 Thread Jon Dufresne
really don't need to map this in kernel space at all and only in user space, since it will only be manipulated in user space. Thanks, Jon On Tue, 2007-06-12 at 13:22 -0700, H. Peter Anvin wrote: > Jon Dufresne wrote: > > I wasn't completely honest. It is one bar that has 512 MB

Re: allocation failed: out of vmalloc space - use vmalloc=size to increase size.

2007-06-18 Thread Jon Dufresne
really don't need to map this in kernel space at all and only in user space, since it will only be manipulated in user space. Thanks, Jon On Tue, 2007-06-12 at 13:22 -0700, H. Peter Anvin wrote: Jon Dufresne wrote: I wasn't completely honest. It is one bar that has 512 MB, however it is being

Re: allocation failed: out of vmalloc space - use vmalloc= to increase size.

2007-06-12 Thread Jon Dufresne
l J Blueman wrote: > > On 12 Jun, 14:30, Jon Dufresne > > <[EMAIL PROTECTED]> wrote: > >> I am writing a linux kernel driver for a custom pci device. I am > >> developing against the stock fedora 6 kernel on an x86. This device has > >> 512 MB of IO mem

allocation failed: out of vmalloc space - use vmalloc= to increase size.

2007-06-12 Thread Jon Dufresne
I am writing a linux kernel driver for a custom pci device. I am developing against the stock fedora 6 kernel on an x86. This device has 512 MB of IO memory reserved by BAR 3. Whenever I try to ioremap this space I get the error: allocation failed: out of vmalloc space - use vmalloc= to increase

allocation failed: out of vmalloc space - use vmalloc=size to increase size.

2007-06-12 Thread Jon Dufresne
I am writing a linux kernel driver for a custom pci device. I am developing against the stock fedora 6 kernel on an x86. This device has 512 MB of IO memory reserved by BAR 3. Whenever I try to ioremap this space I get the error: allocation failed: out of vmalloc space - use vmalloc=size to

Re: allocation failed: out of vmalloc space - use vmalloc=size to increase size.

2007-06-12 Thread Jon Dufresne
Blueman wrote: On 12 Jun, 14:30, Jon Dufresne [EMAIL PROTECTED] wrote: I am writing a linux kernel driver for a custom pci device. I am developing against the stock fedora 6 kernel on an x86. This device has 512 MB of IO memory reserved by BAR 3. Whenever I try to ioremap this space I get