Messages in this thread | | | Date | Wed, 13 Oct 1999 20:48:54 -0500 | From | "Major'Trips'" <> | Subject | Possible new Block device and one kernel bug |
| |
I have been working at getting the PMC551 card from Ramix supported under Linux as a block device. We are using the cards at Nortel Networks for an embeded telecommunications project. Anyway .. while working with the devices we ran across an interesting bug in the oldproc.c at around line 910 or so in the linux-2.2.12 kernel source.
str = 0; /* to keep gcc shut... */ switch (status & PCI_STATUS_DEVSEL_MASK) { case PCI_STATUS_DEVSEL_FAST: str = "Fast devsel. "; break; case PCI_STATUS_DEVSEL_MEDIUM: str = "Medium devsel. "; break; case PCI_STATUS_DEVSEL_SLOW: str = "Slow devsel. "; break; }
Anyway .. the Ramix PMC551 is a PCI Ram card, and before the dram has been initialized by the device driver the cards onboard memory is in a write-protected state, which means that when linux goes to configure the device the device asserts DEVSEL to all high. Unfortunately this case statement has no default: tag so while the card was in the system a simple without the driver loaded 'cat /proc/pci' would cause a kernel panic. Also .. the whole str = 0; at the beginning of that only causes gcc to complain because the switch has no default. I sent email to Martin Mares about this but havn't gotten a response back. I am sorta amazed that this problem didn't show up earlier really.
Okay .. with that mess of crap said I also have one question .. since this is a cPCI Ram device .. I am hoping to implement it as a full block device in the system so that it can be used as either a psuedo drive device or swap space or both. Should I use the /dev/hd* namespacing for the device or should it be assigned some new namespacing?
-- "That is precisely what common sense is for, to be jarred into uncommon sense." ++ Eric Temple Bell, Mathmatics: Queen of the Sciences
Mark Ferrell : Major'Trips' Lead Programmer : Chaotic Dreams Development Team URL : http://www.planetquake.com/chaotic E-Mail : major@planetquake.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |