From owner-freebsd-multimedia Sun Dec 6 02:48:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA09884 for freebsd-multimedia-outgoing; Sun, 6 Dec 1998 02:48:24 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from reliam.teaser.fr (reliam.teaser.fr [194.51.80.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA09879 for ; Sun, 6 Dec 1998 02:48:22 -0800 (PST) (envelope-from son@teaser.fr) Received: from teaser.fr (ppp1087-ft.teaser.fr [194.206.156.40]) by reliam.teaser.fr (8.9.1a/8.9.1a) with ESMTP id LAA08469; Sun, 6 Dec 1998 11:48:10 +0100 (MET) Received: (from son@localhost) by teaser.fr (8.9.1/8.8.5) id MAA00750; Sun, 6 Dec 1998 12:50:40 GMT Message-ID: <19981206125038.05063@breizh.prism.uvsq.fr> Date: Sun, 6 Dec 1998 12:50:38 +0000 From: Nicolas Souchu To: "Kenneth D. Merry" Cc: multimedia@FreeBSD.ORG Subject: Re: Hauppauge Wincast probe/detection problem References: <199812060829.BAA14639@panzer.plutotech.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=qcHopEYAB45HaUaB X-Mailer: Mutt 0.81e In-Reply-To: <199812060829.BAA14639@panzer.plutotech.com>; from Kenneth D. Merry on Sun, Dec 06, 1998 at 01:29:58AM -0700 X-Operating-System: FreeBSD breizh 3.0-CURRENT FreeBSD 3.0-CURRENT Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=muttDZl427 On Sun, Dec 06, 1998 at 01:29:58AM -0700, Kenneth D. Merry wrote: > > >I've been kinda lazy, and just upgraded my home system from -current as of >October 26th to -current as of about December 3rd. > >My Hauppauge WinCast TV board probed fine with the old kernel, but now it >doesn't probe correctly by default. I was able to get things to work by >hard-coding things in my config file: > >options OVERRIDE_CARD=2 >options OVERRIDE_TUNER=4 > >But I wonder why the autodetection broke. I dug through the bktr >driver a bit, but figured I'd send some mail out and see if someone more >familiar with the driver had some ideas. :) I pretty sure this is due to the boot probe of the I2C bus. Some chips do not accept such random accesses. Please try the patch attached to this mail, it removes boot probe and some unecessary boot logs. > >Here's the probe info from the old kernel: (~October 26th) > >bktr0: rev 0x11 int a irq 17 on pci0.11.0 >Hauppauge WinCast/TV, Philips NTSC tuner, dbx stereo. > >Here's the probe info from the new kernel (~December 3rd), without the >overrides: Thanks for the details. > >And here's a dump of the eeprom: > >{panzer:/usr/home/ken/src/bt848:56:1} ./eeprom 0 48 > >EEProm contents, 0x00 thru 0x2f: > > 84 12 00 00 05 40 09 01 08 05 01 2f db 00 00 8c > 09 00 00 00 00 84 0a 00 01 01 20 77 00 40 fb 17 > 03 00 77 02 01 03 03 43 16 14 79 8c 00 00 00 00 > >The driver wouldn't let me read past 48. (just returned EIO) It should? > >If I can supply more info to help debug this, just let me know. > >Ken >-- >Kenneth Merry >ken@plutotech.com > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-multimedia" in the body of the message > Happy to give you some help, I use CAM code every day ;) Nicholas. -- nsouch@teaser.fr / nsouch@freebsd.org FreeBSD - Turning PCs into workstations - http://www.FreeBSD.org --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="smbus-noprobe.diffs" Index: dev/iicbus/iicbb.c =================================================================== RCS file: /home/ncvs/src/sys/dev/iicbus/iicbb.c,v retrieving revision 1.2 diff -u -r1.2 iicbb.c --- iicbb.c 1998/11/04 22:07:24 1.2 +++ iicbb.c 1998/12/06 12:37:45 @@ -110,7 +110,8 @@ static int iicbb_probe(device_t dev) { - device_set_desc(dev, "I2C generic bit-banging driver"); + if (bootverbose) + device_set_desc(dev, "I2C generic bit-banging driver"); return (0); } Index: dev/iicbus/iicbus.c =================================================================== RCS file: /home/ncvs/src/sys/dev/iicbus/iicbus.c,v retrieving revision 1.5 diff -u -r1.5 iicbus.c --- iicbus.c 1998/11/22 22:01:42 1.5 +++ iicbus.c 1998/12/06 12:41:05 @@ -73,6 +73,8 @@ /* * list of known devices + * + * XXX only one smb driver should exist for each I2C interface */ struct iicbus_device iicbus_children[] = { { "iicsmb", IICBUS_DRIVER_CLASS, "I2C to SMB bridge" }, @@ -121,7 +123,9 @@ static int iicbus_probe(device_t dev) { - /* always present if probed */ + if (bootverbose) + device_set_desc(dev, "Philips I2C bus"); + return (0); } @@ -163,6 +167,12 @@ iicbus_reset(dev, IIC_FASTEST, 0, NULL); + /* device probing is meaningless since the bus is supposed to be + * hot-plug. Moreover, some I2C chips do not appreciate random + * accesses like stop after start to fast, reads for less than + * x bytes... + */ +#if 0 printf("Probing for devices on iicbus%d:", device_get_unit(dev)); /* probe any devices */ @@ -172,14 +182,14 @@ } } printf("\n"); +#endif /* attach known devices */ for (iicdev = iicbus_children; iicdev->iicd_name; iicdev++) { switch (iicdev->iicd_class) { case IICBUS_DEVICE_CLASS: /* check if the devclass exists */ - if (devclass_find(iicdev->iicd_name) && - iic_probe_device(dev, iicdev->iicd_addr)) + if (!devclass_find(iicdev->iicd_name)) iicdev->iicd_alive = 1; break; Index: dev/iicbus/iiconf.c =================================================================== RCS file: /home/ncvs/src/sys/dev/iicbus/iiconf.c,v retrieving revision 1.3 diff -u -r1.3 iiconf.c --- iiconf.c 1998/11/22 22:01:42 1.3 +++ iiconf.c 1998/12/06 12:41:10 @@ -65,9 +65,6 @@ /* add the bus to the parent */ child = device_add_child(parent, "iicbus", -1, NULL); - if (child) - device_set_desc(child, "Philips I2C bus"); - return (child); } Index: dev/smbus/smbconf.c =================================================================== RCS file: /home/ncvs/src/sys/dev/smbus/smbconf.c,v retrieving revision 1.3 diff -u -r1.3 smbconf.c --- smbconf.c 1998/11/22 22:01:42 1.3 +++ smbconf.c 1998/12/06 12:40:22 @@ -65,9 +65,6 @@ /* add the bus to the parent */ child = device_add_child(parent, "smbus", -1, NULL); - if (child) - device_set_desc(child, "System Management Bus"); - return (child); } Index: dev/smbus/smbus.c =================================================================== RCS file: /home/ncvs/src/sys/dev/smbus/smbus.c,v retrieving revision 1.3 diff -u -r1.3 smbus.c --- smbus.c 1998/11/22 22:01:42 1.3 +++ smbus.c 1998/12/02 23:17:28 @@ -54,9 +54,7 @@ * list of known devices */ struct smbus_device smbus_children[] = { -#if 0 - { "smb", 0, "General Call" }, -#endif + { "smb", 0x92, "LM75/78" }, { NULL, 0 } }; @@ -100,7 +98,9 @@ static int smbus_probe(device_t dev) { - device_set_desc(dev, "System Management Bus"); + if (bootverbose) + device_set_desc(dev, "System Management Bus"); + return (0); } @@ -111,19 +111,18 @@ device_t child; char byte; u_short addr; - - bus_generic_attach(dev); -#if 0 - printf("Probing for devices on smbus%d:\n", device_get_unit(dev)); + if (bootverbose) + printf("Adding known devices to smbus%d:\n", + device_get_unit(dev)); - /* probe known devices */ + /* add known devices */ for (smbdev = smbus_children; smbdev->smbd_name; smbdev++) { child = device_add_child(dev, smbdev->smbd_name, -1, smbdev); device_set_desc(child, smbdev->smbd_desc); } -#endif + bus_generic_attach(dev); return (0); } --qcHopEYAB45HaUaB-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message