Re: Porting the Digi driver

Alan Cox (
Thu, 6 Feb 1997 22:14:53 +0000 (GMT)

> (In this case 2.1.24). The driver works find under 2.0.28 but running under
> the new kernel it fails. In particular it fails the first time it actually
> attempts to access the board.

Ok first guess is you are assuming physical==virtual

> ch->txptr = memaddr + (((bc->tseg) << 4) & 0x1fffff);

ch->txptr = virt_to_bus(....)

if you want the pointer to contain the bus address to your memory. Or
phys_to_virt() to get the virtual (ie kernel mode) address of the
physical space.

> So the address below 000d1008 looks correct to me. We are trying to address
> the physical location on our board address 0x0d1008.

You need to do a phys_to_virt() on it.

Nothing has changed on the programming API. The kernel now isnt physically
mapped which broke a few drivers. However in theory people should always
have used those macros. On the alpha for example they are all needed
as the physical and virtual maps are different. Worse still the I/O
devices see main memory in a different place again!