Subject: Re: Panic with Vodafone 3G card (ucom device) - FIXED
To: netbsd-help@netbsd.org <netbsd-help@netbsd.org>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: netbsd-help
Date: 11/05/2004 18:03:44
On Fri, 05 Nov 2004 15:50:08 -0000, Stephen Borrill  
<netbsd@precedence.co.uk> wrote:

> I've been hacking around trying to get a Vodafone 3G cardbus card to
> work. I've got what seems like most of the way, but it's not yet working.
>  The card is (or appears to the computer to be) a cardbus ohci controller
> with a USB serial port:
>  ohci0 at cardbus0 dev 0 function 0: Opti RM861HA (rev. 0x10)
> ohci0: interrupting at 3
> ohci0: OHCI version 1.0, legacy support
> usb4 at ohci0: USB revision 1.0
> uhub4 at usb4
> uhub4: Opti OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub4: 2 ports with 2 removable, self powered
> ubsa0 at uhub4 port 1
> ubsa0: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
> ubsa0: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
> ucom0 at ubsa0
>  Any attempt to send data to the device causes a panic:
>  kernel: page fault trap, code=0
> usbd_open_pipe_ival(0,81,1,cb168c88,64) at
[snip]

Tracked down the problem to a bug in ubsa.c with an unset pointer. That  
first parameter
to usbd_open_pipe_ival shouldn't be a zero. Looking throughCVS this has  
always been the
case, so I can't see that ubsa has ever worked on NetBSD.

Patch is here:

--- ubsa.c.orig	Mon Jan  5 13:28:18 2004
+++ ubsa.c	Fri Nov  5 16:57:12 2004
@@ -346,6 +348,9 @@
  		goto error;
  	}

+	/* Keep interface for interrupt */
+	sc->sc_intr_iface = sc->sc_iface;
+
  	if (uca.bulkin == -1) {
  		printf("%s: Could not find data bulk in\n", devname);
  		sc->sc_dying = 1;

-- 
Stephen