Date: Thu, 17 Nov 2005 17:09:39 +0900 From: Pyun YongHyeon <pyunyh@gmail.com> To: Andrew Bliznak <andriko.b@gmail.com> Cc: freebsd-multimedia@freebsd.org Subject: Re: CURRENT Intel ICH5 (82801EB) errors Message-ID: <20051117080938.GA9967@rndsoft.co.kr> In-Reply-To: <21be38170511162349s4db0c178r4533fe369a33b9b@mail.gmail.com> References: <21be38170511160253w1919fa1w71bad77f52cec2b0@mail.gmail.com> <20051117025426.GC8586@rndsoft.co.kr> <21be38170511162349s4db0c178r4533fe369a33b9b@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 17, 2005 at 10:49:20AM +0300, Andrew Bliznak wrote: > On 11/17/05, Pyun YongHyeon <pyunyh@gmail.com> wrote: > > On Wed, Nov 16, 2005 at 01:53:25PM +0300, Andrew Bliznak wrote: > > > Just for information > > > > > > FreeBSD beef.xxxxxx.com 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Nov 15 > > > 13:03:12 EET 2005 > > > andrew@pyvo.xxxxxx.com:/usr/home/andrew/C/obj/usr/home/andrew/C/src/sys/GENERIC > > > i386 > > > > > > from dmesg: > > > --- > > > Nov 15 17:02:31 beef kernel: pcm0: <Intel ICH5 (82801EB)> port > > > 0xd000-0xd0ff,0xe100-0xe13f mem > > > 0xf8201000-0xf82011ff,0xf8202000-0xf82020ff irq 17 at device 31.5 on > > > pci0 > > > Nov 15 17:02:31 beef kernel: pcm0: unable to initialize the card > > > Nov 15 17:02:31 beef kernel: device_attach: pcm0 attach returned 6 > > > > How about attached patch? > > No luck, rebuild module and reload > --- > Nov 17 09:37:50 beef kernel: pcm0: <Intel ICH5 (82801EB)> port > 0xd000-0xd0ff,0xe100-0xe13f mem > 0xf8201000-0xf82011ff,0xf8202000-0xf82020ff irq 17 at device 31.5 on > pci0 > Nov 17 09:37:50 beef kernel: pcm0: primary codec not ready!pcm0: > unable to initialize the card > Nov 17 09:37:50 beef kernel: device_attach: pcm0 attach returned 6 > --- > > Will try late with reboot, thanks anyway. > Hmm, then try this one. It just ignores PCR bit. -- Regards, Pyun YongHyeon --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ich.patch3" --- sys/dev/sound/pci/ich.c.orig Wed Nov 16 09:50:55 2005 +++ sys/dev/sound/pci/ich.c Thu Nov 17 17:06:22 2005 @@ -165,6 +165,8 @@ int use_intrhook; uint16_t vendor; uint16_t devid; + uint32_t flags; +#define IGNORE_PCR 0x01 struct mtx *ich_lock; }; @@ -222,7 +224,10 @@ data = ich_rd(sc, ICH_REG_ACC_SEMA, 1); if ((data & 0x01) == 0) return 0; + DELAY(1); } + if ((sc->flags & IGNORE_PCR) != 0) + return (0); device_printf(sc->dev, "CODEC semaphore timeout\n"); return ETIMEDOUT; } @@ -684,7 +689,8 @@ sc->devid == INTEL_82801DB || sc->devid == INTEL_82801EB || sc->devid == INTEL_6300ESB || sc->devid == INTEL_82801FB || sc->devid == INTEL_82801GB)) { - return ENXIO; + sc->flags |= IGNORE_PCR; + device_printf(sc->dev, "primary codec not ready!\n"); } } @@ -759,28 +765,25 @@ } /* + * Enable bus master. On ich4/5 this may prevent the detection of + * the primary codec becoming ready in ich_init(). + */ + pci_enable_busmaster(dev); + + /* * By default, ich4 has NAMBAR and NABMBAR i/o spaces as * read-only. Need to enable "legacy support", by poking into * pci config space. The driver should use MMBAR and MBBAR, * but doing so will mess things up here. ich4 has enough new * features it warrants it's own driver. */ - if (vendor == INTEL_VENDORID && devid == INTEL_82801DB) { - pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1); - } - - /* - * Enable bus master. On ich4/5 this may prevent the detection of - * the primary codec becoming ready in ich_init(). - */ - pci_enable_busmaster(dev); - - if (vendor == INTEL_VENDORID && (devid == INTEL_82801EB || - devid == INTEL_6300ESB || devid == INTEL_82801FB || - devid == INTEL_82801GB)) { + if (vendor == INTEL_VENDORID && (devid == INTEL_82801DB || + devid == INTEL_82801EB || devid == INTEL_6300ESB || + devid == INTEL_82801FB || devid == INTEL_82801GB)) { sc->nambarid = PCIR_MMBAR; sc->nabmbarid = PCIR_MBBAR; sc->regtype = SYS_RES_MEMORY; + pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1); } else { sc->nambarid = PCIR_NAMBAR; sc->nabmbarid = PCIR_NABMBAR; --OgqxwSJOaUobr8KG--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051117080938.GA9967>