Code: Select all
if ((nsector != 1) || (nsector != 1))
return;
Code: Select all
if ((nsector != 1) || (nsector != 1))
return;
The second check should be "sector" instead of "nsector". The ATA spec should have more info.R0 wrote:I managed to find a suspicious code in PS2ATAD module. There is a function ata_device_probe() in the file ps2atad.c with possible bug in it. I think following code is incorrect:It seems one of variables was left unchecked.Code: Select all
if ((nsector != 1) || (nsector != 1)) return;
Is our ps2atad really so closely related to the Sony atad module, that we can expect code snippets like this to even exist in similar form ?pixel wrote:Checking into sony's atad.irx should help. Somebody have it somewhere ? I don't think I do, apart of my bios, no ?
Both ps2dev9 and ps2atad are very close to SCE's modules. ps2dev9 differs from dev9 in some functions: dma transfer (sema vs polling), initialization (ps2dev9 has no some smap-initialization code), exports (dev9 has two additional functions). ps2atad also differs from atad in some cases - exports (last function), initialization (no check for SCE genuine hdd) and few other minor differences.Is our ps2atad really so closely related to the Sony atad module, that we can expect code snippets like this to even exist in similar form ?