Commit e152aa13 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] powernow-k8 frequency handling fix

From: Pavel Machek <pavel@ucw.cz>

In 2.6.3, cleanups arrived, and they got test for invalid frequencies
wrong.

Only first frequency is allowed to be < FID_TABLE_BOTTOM, but due to
bug it cleanups it allowed no frequencies < FID_TABLE_BOTTOM. This
fixes it.
parent 24048086
...@@ -521,7 +521,8 @@ static int check_pst_table(struct pst_s *pst, u8 maxvid) ...@@ -521,7 +521,8 @@ static int check_pst_table(struct pst_s *pst, u8 maxvid)
} }
if ((pst[j].fid > MAX_FID) if ((pst[j].fid > MAX_FID)
|| (pst[j].fid & 1) || (pst[j].fid & 1)
|| (pst[j].fid < HI_FID_TABLE_BOTTOM)){ || (j && (pst[j].fid < HI_FID_TABLE_BOTTOM))) {
/* Only first fid is allowed to be in "low" range */
printk(KERN_ERR PFX "fid %d invalid : 0x%x\n", j, pst[j].fid); printk(KERN_ERR PFX "fid %d invalid : 0x%x\n", j, pst[j].fid);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment