<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV>Dear <SPAN id=_FoxTONAME>all</SPAN></DIV>
<DIV><SPAN> This days I came to a problem
like this:</SPAN></DIV>
<DIV><SPAN> Environment:linux kernel
2.6.20, PPC 405EP bubinga demo board.</SPAN></DIV>
<DIV><SPAN> We have tested two PCI2IDE
cards in this board,A)silicon Image's (cpu:cmd649);B)IT8212F's.The A card with a
harddisk,which is well recognised by the demo </SPAN><SPAN>board;but the same
harddisk in B card, can't be recognised by the board,only recognised the PCI
card.We trace the kernel,found something different </SPAN><SPAN>in this funtion
in the file linux-2.6.20/drivers/ide/ide-iops.c:</SPAN></DIV>
<DIV><SPAN>++++++++++++++++++++++++++++++++++++++++++</SPAN></DIV>
<DIV><SPAN>int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long
timeout)<BR>{<BR> u8 stat = 0;<BR> u8 i = 0;<BR> while(timeout--)
{<BR> /*<BR> * Turn this into a schedule() sleep once I'm
sure<BR> * about locking issues (2.5 work ?).<BR> *
hwif->io_ports[IDE_STATUS_OFFSET] = 0xFFEF<BR>
*/<BR> mdelay(1);<BR> <BR> stat =
hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);<BR> printk(KERN_INFO
"hwif->io_ports[IDE_STATUS_OFFSET] ==> %4x, 222222STAT ==>
%4x\n",hwif->io_ports[IDE_STATUS_OFFSET],stat);<BR> if ((stat
& BUSY_STAT) == 0){<BR> printk(KERN_INFO
"BUSYING................\n");<BR> return
0;<BR> }<BR> /*<BR> * Assume a value of 0xff
means nothing is connected to<BR> * the interface and it doesn't
implement the pull-down<BR> * resistor on
D7.n isa_io_base =
e7fee000<BR> */<BR> if (stat ==
0xff){<BR> printk(KERN_INFO "NODEV................
\n");<BR> return
-ENODEV;<BR> }<BR> touch_softlockup_watchdog();<BR> touch_nmi_watchdog();<BR> }<BR> return
-EBUSY;<BR>}</SPAN></DIV>
<DIV><SPAN>+++++++++++++++++++++++++++++++++++++++++++++++++++</SPAN></DIV>
<DIV>stat =
hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);<BR> printk(KERN_INFO
"hwif->io_ports[IDE_STATUS_OFFSET] ==> %4x, 222222STAT ==>
%4x\n",hwif->io_ports[IDE_STATUS_OFFSET],stat);</DIV>
<DIV>By printing this two parameters, we found that the former parameter is the
same in two cards,but the value of "stat" varies between the two </DIV>
<DIV>cards.A card,stat equals to 0x50;B card,stat equals to 0xFF,and it keeps
the same,won't change.</DIV>
<DIV> I'm puzzled about this.Is it about
the driver of IT821x.c in the kernel?or something else?</DIV>
<DIV> Any advise is welcomed.Thank
you.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Sincerely</DIV>
<DIV>Tony</DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>