diff options
author | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-02-12 04:02:33 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-02-12 04:02:33 +0100 |
commit | 84b8be31d0c9c613d3c98e8db58dd5861ae58cac (patch) | |
tree | 3c4ccaf8fea48d820d88521f97e0eb22cec29122 /sys/src | |
parent | 0388ad23395228fc0772343dbe7a294ab6c9d679 (diff) |
sdide: fix lba48 transition bug
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/9/pc/sdide.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/pc/sdide.c b/sys/src/9/pc/sdide.c index d70b06a1f..58a86b8af 100644 --- a/sys/src/9/pc/sdide.c +++ b/sys/src/9/pc/sdide.c @@ -1275,7 +1275,7 @@ static uchar cmd48[256] = { }; enum{ - Last28 = (1<<28) - 1 - 1, + Last28 = (1<<28) - 1, }; static int @@ -1286,7 +1286,7 @@ atageniostart(Drive* drive, uvlong lba) int as, c, cmdport, ctlport, h, len, s, use48; 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) return -1; use48 = 1; |