Date: Wed, 14 Jul 1999 06:42:39 +0900 (JST) From: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/12631: intpm driver update Message-ID: <199907132142.GAA00945@libr.scitec.kobe-u.ac.jp>
next in thread | raw e-mail | index | archive | help
>Number: 12631
>Category: kern
>Synopsis: intpm driver update
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 13 14:50:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Takanori Watanabe
>Release: FreeBSD 4.0-CURRENT
>Organization:
Kobe Universitiy
>Environment:
FreeBSD/i386 4.0-CURRENTFreeBSD/i386
>Description:
When any driver is on smbus and the code probe with polling code in
intpm driver,intrrupt handler of intpm driver is infinitely called
when all device probe is finished.
>How-To-Repeat:
Use with my experimental driver code,depend on mother board.
>Fix:
--- /home/ctm/src/sys/pci/intpm.c Tue May 11 10:23:15 1999
+++ intpm.c Fri Jun 4 00:58:03 1999
@@ -244,16 +244,18 @@
return 1;
}
- if(sc->isbusy&&(status&(PIIX4_SMBHSTSTAT_INTR|
+ if(status&(PIIX4_SMBHSTSTAT_INTR|
PIIX4_SMBHSTSTAT_ERR|
PIIX4_SMBHSTSTAT_BUSC|
- PIIX4_SMBHSTSTAT_FAIL))){
+ PIIX4_SMBHSTSTAT_FAIL)){
int tmp;
- sc->isbusy=0;
tmp=bus_space_read_1(sc->st,sc->sh,PIIX4_SMBHSTCNT);
bus_space_write_1(sc->st,sc->sh,PIIX4_SMBHSTCNT,
tmp&~PIIX4_SMBHSTCNT_INTREN);
- wakeup(sc);
+ if(sc->isbusy){
+ sc->isbusy=0;
+ wakeup(sc);
+ }
return 0;
}
return 1;/* Not Completed*/
@@ -347,6 +349,7 @@
intsmb_stop_poll(device_t dev){
int error,i;
struct intsmb_softc *sc = (struct intsmb_softc *)device_get_softc(dev);
+
/*
* In smbtx driver ,Simply waiting.
* This loops 100-200 times.
@@ -371,7 +374,13 @@
return error;
}
}
- sc->isbusy=0;
+ {
+ int tmp;
+ sc->isbusy=0;
+ tmp=bus_space_read_1(sc->st,sc->sh,PIIX4_SMBHSTCNT);
+ bus_space_write_1(sc->st,sc->sh,PIIX4_SMBHSTCNT,
+ tmp&~PIIX4_SMBHSTCNT_INTREN);
+ }
return EIO;
}
/*
@@ -742,6 +751,7 @@
{
struct _pcsid *ep =pci_ids;
u_int32_t device_id=pci_get_devid(dev);
+
while (ep->type && ep->type != device_id)
++ep;
if(ep->desc!=NULL){
@@ -759,6 +769,7 @@
sc=(struct intpm_pci_softc *)arg;
intsmb_intr(sc->smbus);
intsmb_slvintr(sc->smbus);
+
}
#endif /* NPCI > 0 */
#endif
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907132142.GAA00945>
