While trying to identify/read a 8KB FeRAM device MB85RS64V, the JEDEC ID is properly identified (0x04 0x7F 0x03), but the python code then goes into an infinite loop grabbing JEDEC ID again and again instead of determining memory size (which is 64 kbit / 8KB).
Product was purchased here: https://www.adafruit.com/product/1897
Datasheet here: http://www.adafruit.com/datasheets/MB85RS64V-DS501-00015-4v0-E.pdf
Likewise, a 128KB FeRAM MR45V100A was properly identified as (0xae 0x83 0x09), but was improperly identified as 512 bytes (actual size = 1Mbit / 128KB).