From: "tony" <hangtoo@163.com>
To: "linuxppc-embedded@ozlabs.org" <linuxppc-embedded@ozlabs.org>
Subject: it8212F pci card problem in ppc405ep bubinga board
Date: Mon, 16 Apr 2007 15:33:47 +0800 [thread overview]
Message-ID: <200704161533464688533@163.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
Dear all
This days I came to a problem like this:
Environment:linux kernel 2.6.20, PPC 405EP bubinga demo board.
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 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 in this funtion in the file linux-2.6.20/drivers/ide/ide-iops.c:
++++++++++++++++++++++++++++++++++++++++++
int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout)
{
u8 stat = 0;
u8 i = 0;
while(timeout--) {
/*
* Turn this into a schedule() sleep once I'm sure
* about locking issues (2.5 work ?).
* hwif->io_ports[IDE_STATUS_OFFSET] = 0xFFEF
*/
mdelay(1);
stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
printk(KERN_INFO "hwif->io_ports[IDE_STATUS_OFFSET] ==> %4x, 222222STAT ==> %4x\n",hwif->io_ports[IDE_STATUS_OFFSET],stat);
if ((stat & BUSY_STAT) == 0){
printk(KERN_INFO "BUSYING................\n");
return 0;
}
/*
* Assume a value of 0xff means nothing is connected to
* the interface and it doesn't implement the pull-down
* resistor on D7.n isa_io_base = e7fee000
*/
if (stat == 0xff){
printk(KERN_INFO "NODEV................ \n");
return -ENODEV;
}
touch_softlockup_watchdog();
touch_nmi_watchdog();
}
return -EBUSY;
}
+++++++++++++++++++++++++++++++++++++++++++++++++++
stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
printk(KERN_INFO "hwif->io_ports[IDE_STATUS_OFFSET] ==> %4x, 222222STAT ==> %4x\n",hwif->io_ports[IDE_STATUS_OFFSET],stat);
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
cards.A card,stat equals to 0x50;B card,stat equals to 0xFF,and it keeps the same,won't change.
I'm puzzled about this.Is it about the driver of IT821x.c in the kernel?or something else?
Any advise is welcomed.Thank you.
Sincerely
Tony
[-- Attachment #2: Type: text/html, Size: 3446 bytes --]
reply other threads:[~2007-04-16 7:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200704161533464688533@163.com \
--to=hangtoo@163.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).