[lkml]   [2000]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectBug in "ide-pci.c"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>ide-pci.c bug:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>ide_setup_pci_baseregs()&nbsp;may inappropriately
report device as not capable of full native PCI:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>//&nbsp; BUGGY LINE: ============</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; if (pci_read_config_byte(dev,
PCI_CLASS_PROG, &amp;progif) || (progif &amp; 5) != 5)
{<BR>//&nbsp;&nbsp;=========&nbsp;&nbsp; TWO CONDITIONS USING PROGIF
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; if ((progif &amp;
0xa) != 0xa) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; printk("%s:
device not capable of full native PCI mode\n",
name);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; return
1;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;In the first line of code above there is no
guarantee that the first condition will be&nbsp;executed</DIV>
<DIV>before the second.&nbsp; As progif is set to 0 before this block of code,
the second test will always</DIV>
<DIV>be true if it is executed prior to the first.</DIV>
 \ /
  Last update: 2005-03-22 12:39    [W:1.028 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site