lkml.org 
[lkml]   [2000]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectBug in "ide-pci.c"
Date
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<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
</FONT></DIV>
<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;</DIV>
<DIV>&nbsp;...</DIV>
<DIV>&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>
<DIV>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV></BODY></HTML>
\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.097 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site