Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2007 22:08:54 +0200
From:      usleepless@gmail.com
To:        "Julian Elischer" <julian@elischer.org>
Cc:        freebsd-multimedia@freebsd.org, Dicky Illing <dicky_illing@hotmail.com>
Subject:   Re: PVR350, and /multimedia/pvr250
Message-ID:  <c39ec84c0707261308n4b8ed190u96759a5c296f16ba@mail.gmail.com>
In-Reply-To: <46A8CD47.5050004@elischer.org>
References:  <BAY128-W2DB41B41F08BC66A446C1E5F20@phx.gbl> <122515.18322.qm@web30311.mail.mud.yahoo.com> <c39ec84c0707260847m10c0b2a6n24bc150945523405@mail.gmail.com> <46A8CD47.5050004@elischer.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Julian,

On 7/26/07, Julian Elischer <julian@elischer.org> wrote:
> usleepless@gmail.com wrote:
> > Dicky,
> >
> > On 7/26/07, Arne Wörner <arne_woerner@yahoo.com> wrote:
> >> --- Dicky Illing <dicky_illing@hotmail.com> wrote:
> >> > I recently bought myself a Huappage PVR350, as I had been playing with
> >> MythTV
> >> > at work, and it was one of the ones that is supported (by report!) on
> >> > FreeBSD, ,however when I try to compile the port, it fails here. Can
> >> anyone
> >> > point me in the right direction please!I definitely have the .sys
> >> file in
> >> >
> >> Hmm...
> >>
> >> Have u patched the kernel already? make patch-iicbb or so?
> >> Maybe that causes that warning?
> >>
> >> Did u try pvrxxx already?
> >>
> >> -Arne
> >
> > Arne is correct. these errors are due to an unpatched kernel-tree.
> >
> > i am not sure if the pvr250 patch will still apply cleanly ( which
> > version of freebsd are you running? )
> >
> > if it doesn't compile/patch cleanly, please report back with the
> > compiler errors.
> >
> > regards,
> >
> > usleepless
>
> Is there a patch I should try get into 7.0 before it gets out?

it would be awesome if the pvr250/pvrxxx ports would not depend on
kernel-patching anymore. it is the most common compile problem for
these drivers. and people come on to the list asking the same old
question over and over again.

the problem with the iicbb-patch of pvr250 is that about a year ago,
only a part of iicbb was patched to what the iicbb-patch is about. so
when patching these kernel-trees, this particular patch is reversed
and the kernel does not compile anymore.

i have attached a patch that should work for Dicky's problems. i hope
it applies cleanly to the 7-branch as well ( i don't know ).

@Dicky:
fetch a fresh kernel-tree, and then:

#cd /usr/ports/multimedia
#rm -rf pvrxxx
#fetch http://usleepless.110mb.com/pvrxxx_port.tgz
#tar xzf pvrxxx_port
#cd pvrxxx
#make patch-iicbb
#make
etc....

and recompile and reinstall your kernel.

this port should patch your kernel with the aforementioned patch (with
any reverses). it doesn't need any firmware files in distfiles since
it loads the firmware from ivtvdriver.org. i should update the
pvrxxx-port with this version, i know.

Julian, if you need any help with the attached patch, or it doesn't
apply, plz contact me. thanks!

regards,

usleep

[-- Attachment #2 --]
*** dev/iicbus/iicbb.c.ORIGINAL	Sun Aug 24 13:49:13 2003
--- dev/iicbus/iicbb.c	Fri Jul  1 15:55:21 2005
*************** struct iicbb_softc {
*** 66,71 ****
--- 66,72 ----
  static int iicbb_probe(device_t);
  static int iicbb_attach(device_t);
  static int iicbb_detach(device_t);
+ static void iicbb_child_detached(device_t, device_t);
  static int iicbb_print_child(device_t, device_t);
  
  static int iicbb_callback(device_t, int, caddr_t);
*************** static device_method_t iicbb_methods[] =
*** 82,87 ****
--- 83,89 ----
  	DEVMETHOD(device_detach,	iicbb_detach),
  
  	/* bus interface */
+ 	DEVMETHOD(bus_child_detached,	iicbb_child_detached),
  	DEVMETHOD(bus_print_child,	iicbb_print_child),
  
  	/* iicbus interface */
*************** static int iicbb_attach(device_t dev)
*** 130,144 ****
  static int iicbb_detach(device_t dev)
  {
  	struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
  
! 	if (sc->iicbus) {
! 		bus_generic_detach(dev);
! 		device_delete_child(dev, sc->iicbus);
! 	}
  
  	return (0);
  }
  
  static int
  iicbb_print_child(device_t bus, device_t dev)
  {
--- 132,165 ----
  static int iicbb_detach(device_t dev)
  {
  	struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
+ 	device_t child;
  
! 	/*
! 	 * Detach the children before recursively deleting
! 	 * in case a child has a pointer to a grandchild
! 	 * which is used by the child's detach routine.
! 	 *
! 	 * Remember the child before detaching so we can
! 	 * delete it (bus_generic_detach indirectly zeroes
! 	 * sc->child_dev).
! 	 */
! 	child = sc->iicbus;
! 	bus_generic_detach(dev);
! 	if (child)
! 		device_delete_child(dev, child);
  
  	return (0);
  }
  
+ static void
+ iicbb_child_detached( device_t dev, device_t child )
+ {
+ 	struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
+ 
+ 	if (child == sc->iicbus)
+ 		sc->iicbus = NULL;
+ }
+ 
  static int
  iicbb_print_child(device_t bus, device_t dev)
  {
*************** static int iicbb_read(device_t dev, char
*** 383,388 ****
--- 404,410 ----
  }
  
  DRIVER_MODULE(iicbb, bktr, iicbb_driver, iicbb_devclass, 0, 0);
+ DRIVER_MODULE(iicbb, cxm_iic, iicbb_driver, iicbb_devclass, 0, 0);
  DRIVER_MODULE(iicbb, lpbb, iicbb_driver, iicbb_devclass, 0, 0);
  DRIVER_MODULE(iicbb, viapm, iicbb_driver, iicbb_devclass, 0, 0);
  
*** dev/iicbus/iiconf.h.ORIGINAL	Wed Jun 16 22:51:57 2004
--- dev/iicbus/iiconf.h	Mon Oct 24 00:43:41 2005
*************** extern int iicbus_started(device_t);
*** 114,120 ****
  extern int iicbus_start(device_t, u_char, int);
  extern int iicbus_stop(device_t);
  extern int iicbus_repeated_start(device_t, u_char, int);
! extern int iicbus_write(device_t, char *, int, int *, int);
  extern int iicbus_read(device_t, char *, int, int *, int, int);
  
  /* single byte read/write functions, start/stop not managed */
--- 114,120 ----
  extern int iicbus_start(device_t, u_char, int);
  extern int iicbus_stop(device_t);
  extern int iicbus_repeated_start(device_t, u_char, int);
! extern int iicbus_write(device_t, const char *, int, int *, int);
  extern int iicbus_read(device_t, char *, int, int *, int, int);
  
  /* single byte read/write functions, start/stop not managed */
*** dev/iicbus/iiconf.c.ORIGINAL	Wed Jun 16 22:51:57 2004
--- dev/iicbus/iiconf.c	Mon Oct 24 00:47:32 2005
*************** iicbus_stop(device_t bus)
*** 234,240 ****
   * iicbus_start() call
   */
  int
! iicbus_write(device_t bus, char *buf, int len, int *sent, int timeout)
  {
  	struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus);
  	
--- 234,240 ----
   * iicbus_start() call
   */
  int
! iicbus_write(device_t bus, const char *buf, int len, int *sent, int timeout)
  {
  	struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus);
  	
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c39ec84c0707261308n4b8ed190u96759a5c296f16ba>