First, this problem seems to be specific to the 10ec:5208 PCI device which has an explicit udev rule to set the ID_DISK_FLASH environment variable. The problem with detecting this variable is that it is only defined for the block which is a child of the actual physical device. Since the udev parser reads the output of udevadm as a stream, state must somehow be preserved between devices. In other words, somekind of support needs to be added for the attributes of a device to be gathered across multiple parts of the udevadm output.
First, this problem seems to be specific to the 10ec:5208 PCI device which has an explicit udev rule to set the ID_DISK_FLASH environment variable. The problem with detecting this variable is that it is only defined for the block which is a child of the actual physical device. Since the udev parser reads the output of udevadm as a stream, state must somehow be preserved between devices. In other words, somekind of support needs to be added for the attributes of a device to be gathered across multiple parts of the udevadm output.