[GSoC 2018: SDHCI MMC Driver]: Week #4 | Haiku Project

Hey everyone! here I am with another update. Last time I had concluded-“PCI class is not discoverable to device manager”, it was actally a bit wrong. So korli explained that device manager won’t load a driver which system doesn’t know so in order for device manager to consider sdhci bus device, it has to be added under a condition of the devices of same type. So we added it under “disk”1. With that he also committed PoC2 which came out to be very useful but still I took sometime to really understand it.


This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/krish_iyer/2018-06-04_gsoc_2018_sdhci_mmc_driver_week_4/

From @PulkoMandy: you wrote that it is for writing cross platform code, but the idea isn’t that,
the idea is that there is a standard API for modules (or drivers) to do some things. But, it is convenient for the driver to store its own data to keep track of some things (whatever it needs to store in a context to be used across different operations) this is when we use a cookie. The driver allocates its data, and gives a pointer to it then in all following operations, we give it back the same pointer, so it can find its data link: https://en.wikipedia.org/wiki/Magic_cookie