--- zzzz-none-000/linux-2.6.28.10/drivers/mtd/maps/physmap.c 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/drivers/mtd/maps/physmap.c 2012-02-14 14:37:49.000000000 +0000 @@ -91,6 +91,7 @@ if (physmap_data == NULL) return -ENODEV; + printk("[%s] line=%d, doing probes\n" ,__FUNCTION__, __LINE__); info = devm_kzalloc(&dev->dev, sizeof(struct physmap_flash_info), GFP_KERNEL); if (info == NULL) { @@ -133,6 +134,7 @@ probe_type = rom_probe_types; for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++) info->mtd[i] = do_map_probe(*probe_type, &info->map[i]); + if (info->mtd[i] == NULL) { dev_err(&dev->dev, "map_probe failed\n"); err = -ENXIO; @@ -165,10 +167,21 @@ #ifdef CONFIG_MTD_PARTITIONS err = parse_mtd_partitions(info->cmtd, part_probe_types, &info->parts, 0); if (err > 0) { + printk("[%s] line=%d, err=%d \n" ,__FUNCTION__, __LINE__, err); + add_mtd_partitions(info->cmtd, info->parts, err); return 0; } + if (physmap_data->probes) { + /*--- printk("[%s] line=%d, doing individual probes\n" ,__FUNCTION__, __LINE__); ---*/ + err = parse_mtd_partitions(info->cmtd, physmap_data->probes, &info->parts, 0); + /*--- printk("[%s] line=%d, doing individual probes\n" ,__FUNCTION__, __LINE__); ---*/ + if (err > 0) { + add_mtd_partitions(info->cmtd, info->parts, err); + return 0; + } + } if (physmap_data->nr_parts) { printk(KERN_NOTICE "Using physmap partition information\n"); add_mtd_partitions(info->cmtd, physmap_data->parts,