From: Robert Hancock <hancockr@shaw.ca>
To: ats <atita84@gmail.com>, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: character driver over PCI
Date: Sun, 24 Jun 2007 13:44:06 -0600 [thread overview]
Message-ID: <467EC986.7040300@shaw.ca> (raw)
In-Reply-To: <1182686296.981507.296500@z28g2000prd.googlegroups.com>
ats wrote:
> have a wireless network card over PCMCIA....i need to just access
> the registers of this card and pass this register details to the user
> application.Since i will not connect to the network at this stage i
> preferred bypassing the network stack.Hence instead of a network
> driver i went ahead writing a character driver.
>
>
> I inserted the PCI module using insmod..That called PCI
> probe....Inside PCI probe i registered by character driver by calling
> register_chrdev().And i remapped the card memory by calling the
> following sequence of functions.
>
>
> pci_resource_start
> request_mem_region
> ioremap
>
> Then i created a device using mknod and called the open function of
> the character driver.....Till here everything works fine....
>
>
> Once the device opened i made a readl call to read the mapped
> memory..This fails..It gives me a segmentation fault.....If i call
> readl in the probe function it works fine and reads the memory at that
> location..However this call fails in open..What can be the reason...
>
> Have i proceeded the right way....Are there any additional things to
> be set..Am working on linux 2.6 kernel
>
> Attached below is my prog
I don't see where it is trying to read anything in this code. The way in
which you're doing that is likely the problem..
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
parent reply other threads:[~2007-06-24 19:44 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1182686296.981507.296500@z28g2000prd.googlegroups.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=467EC986.7040300@shaw.ca \
--to=hancockr@shaw.ca \
--cc=atita84@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox