PATCH: Alternate pdcraid superblock finder
Hi,
This patch proposes an alternate method of finding the raid superblock on Promise raid devices. It hasn't received much testing, so I left the old routine intact and just check for ideinfo->head == 255 to use my method. I'm not aware of any reasons why my method wouldn't work for all drives, but I thought this was a safer change.
-Walt Holman
drivers/ide/raid/pdcraid.c renamed from usr/src/temp/linux-2.4.21-xfs/linux/drivers/ide/raid/pdcraid.c +7 -3
@@ -361,7 +361,11 @@if (ideinfo->sect==0 )return 0 ; - lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect)); - lba = lba * (ideinfo->head*ideinfo->sect); - lba = lba - ideinfo->sect; +if (ideinfo->head!=255 ) { + lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect)); + lba = lba * (ideinfo->head*ideinfo->sect); + lba = lba - ideinfo->sect; } +else { + lba = ideinfo->capacity - ideinfo->sect; + }return lba;