mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-21 01:18:52 +09:00
![]() The intention with block devices is that the device number (devnum field in its descriptor) matches the alias of its parent device. For example, with: aliases { mmc0 = "/sdhci@700b0600"; mmc1 = "/sdhci@700b0400"; } we expect that the block devices for mmc0 and mmc1 would have device numbers of 0 and 1 respectively. Unfortunately this does not currently always happen. If there is another MMC device earlier in the driver model data structures its block device will be created first. It will therefore get device number 0 and mmc0 will therefore miss out. In this case the MMC device will have sequence number 0 but its block device will not. To avoid this, allow a device to request a device number and bump any existing device number that is using it. This all happens during the binding phase so it is safe to change these numbers around. This allows device numbers to match the aliases in all circumstances. Add a test to verify the behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> |
||
---|---|---|
.. | ||
ahci-uclass.c | ||
ahci.c | ||
blk_legacy.c | ||
blk-uclass.c | ||
blkcache.c | ||
dwc_ahci.c | ||
dwc_ahsata.c | ||
dwc_ahsata.h | ||
fsl_sata.c | ||
fsl_sata.h | ||
ftide020.c | ||
ftide020.h | ||
ide.c | ||
Kconfig | ||
libata.c | ||
Makefile | ||
mvsata_ide.c | ||
mxc_ata.c | ||
sandbox_scsi.c | ||
sandbox.c | ||
sata_ceva.c | ||
sata_dwc.c | ||
sata_dwc.h | ||
sata_mv.c | ||
sata_sandbox.c | ||
sata_sil3114.c | ||
sata_sil3114.h | ||
sata_sil.c | ||
sata_sil.h | ||
scsi-uclass.c | ||
sil680.c | ||
sym53c8xx.c | ||
systemace.c |