[ale] PCI kernel drivers and IO remapping

Ed Cashin ecashin at noserose.net
Fri Apr 5 20:11:09 EDT 2013


The "bisect" feature of git was created for this situation.  If you do a
git bisect, you can identify the particular commit in the kernel sources
where the behavior changed, barring bad luck.

Making the kernel commits "bisect clean" is a recently adopted discipline,
but your chances are pretty good since the change happened after 3.0.

Kinda makes me wonder why you need such fancy new kernels!  ;)



On Fri, Apr 5, 2013 at 3:33 PM, Alex Carver <agcarver+ale at acarver.net>wrote:

> Anyone familiar with IO remapping for PCI hardware?
>
> My office mate at work has a scientific data collector card in an Ubuntu
> machine.  At some point recently, the kernel (and most likely libraries)
> updated which broke an ioremap_nocache function.  In the code, it attempts:
>
> device->ioaddr = ( unsigned long )ioremap_nocache( memaddr, REGS_SIZE );
>
> But this returns zero instead of an IO address.
>
> He booted an older kernel (3.0.0.12), recompiled the driver and the
> detection works again.  Neither one of us understands what changed in the
> kernel or related code.  The driver code has not changed so it's something
> to do with the kernel.
>
>
>
>
>
> The output messages are below.  The first block is the problematic kernel,
> the second block is the rolled-back kernel with successful detection.
>
> Bad detection:
> [    8.040080] (astropci_init): +-----------------------------**--+
> [    8.040082] (astropci_init): |   ASTROPCI - Initialization   |
> [    8.040083] (astropci_init): +-----------------------------**--+
> [    8.040109] (astropci_probe): looking for ARC PCI boards ...
> [    8.040120] astropci 0000:06:00.0: PCI INT A -> GSI 16 (level, low) ->
> IRQ 16
> [    8.040124] (astropci_probe): memaddr: f9df0000
> [    8.040137] Modules linked in: astropci(O+) psmouse serio_raw shpchp
> ppdev dcdbas soundcore x38_edac snd_page_alloc edac_core parport_pc mac_hid
> lp parport usbhid hid firewire_ohci firewire_core crc_itu_t tg3
> [    8.040180]  [<f84f8201>] ? astropci_probe+0xdb/0x257 [astropci]
> [    8.040187]  [<f84f8201>] ? astropci_probe+0xdb/0x257 [astropci]
> [    8.040190]  [<f84f8201>] astropci_probe+0xdb/0x257 [astropci]
> [    8.040229]  [<f84671ae>] astropci_init+0x1ae/0x1000 [astropci]
> [    8.040246] (astropci_probe): device->ioaddr: 0(astropci_probe):
> IOremap failed for device 0000:06:00.0,         region 0x9C @ 0xF9DF0000
> [    8.040249] (astropci_probe): finished looking for ARC PCI boards
>
>
>
> Good detection:
> [  162.065395] (astropci_init): +-----------------------------**--+
> [  162.065397] (astropci_init): |   ASTROPCI - Initialization   |
> [  162.065399] (astropci_init): +-----------------------------**--+
> [  162.065433] (astropci_probe): looking for ARC PCI boards ...
> [  162.065444] astropci 0000:06:00.0: PCI INT A -> GSI 16 (level, low) ->
> IRQ 16
> [  162.065445] (astropci_probe): successfully enabled device
> (astropci_probe): successfully requested regions
> [  162.065450] (astropci_probe): memaddr: f9df0000(astropci_probe):
> assigned device->ioaddr
> [  162.065460] (astropci_probe): device->ioaddr: f82fe000
> [  162.065461] (astropci_probe): whooop
> [  162.065463] (astropci_probe): ISR name: astropci0 device num: 0
> [  162.065470] (astropci_probe): Successfully probed device 0, irqDevNum:
> 1, has_irq: 1, irq 16, func 0
> [  162.065923] (astropci_probe): finished looking for ARC PCI boards
> ______________________________**_________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/**listinfo/ale<http://mail.ale.org/mailman/listinfo/ale>
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/**listinfo<http://mail.ale.org/mailman/listinfo>
>



-- 
  Ed Cashin <ecashin at noserose.net>
  http://noserose.net/e/
  http://www.coraid.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130405/32f827ac/attachment-0001.html>


More information about the Ale mailing list