8250_hp300: initialisation ordering bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've noticed that 8250_hp300 is buggy wrt the ordering of hardware
initialisation to the visibility of devices to user space.  Namely,
8250_hp300 does the following:

        line = serial8250_register_port(&port);
...
        /* Enable board-interrupts */
        out_8(d->resource.start + DIO_VIRADDRBASE + DCA_IC, DCA_IC_IE);
        dio_set_drvdata(d, (void *)line);

        /* Reset the DCA */
        out_8(d->resource.start + DIO_VIRADDRBASE + DCA_ID, 0xff);
        udelay(100);

serial8250_register_port() makes the port visible to userspace, so
from that point on it could be opened.  However, if it's opened
prior to the remainder of the above completing, we will be missing
interrupts (and what effect does "reset the DCA" have?)

Surely this hardware fiddling should be completed before we register
the port?


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux