sdide: fix lba48 transition bug

front
cinap_lenrek 2012-02-12 04:02:33 +01:00
parent 0388ad2339
commit 84b8be31d0
1 changed files with 2 additions and 2 deletions

View File

@ -1275,7 +1275,7 @@ static uchar cmd48[256] = {
}; };
enum{ enum{
Last28 = (1<<28) - 1 - 1, Last28 = (1<<28) - 1,
}; };
static int static int
@ -1286,7 +1286,7 @@ atageniostart(Drive* drive, uvlong lba)
int as, c, cmdport, ctlport, h, len, s, use48; int as, c, cmdport, ctlport, h, len, s, use48;
use48 = 0; use48 = 0;
if((drive->flags&Lba48always) || lba > Last28 || drive->count > 256){ if((drive->flags&Lba48always) || (lba+drive->count) > Last28 || drive->count > 256){
if((drive->feat & Dllba) == 0) if((drive->feat & Dllba) == 0)
return -1; return -1;
use48 = 1; use48 = 1;