From owner-freebsd-current Mon Jan 17 12:45:18 2000 Delivered-To: freebsd-current@freebsd.org Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (Postfix) with SMTP id 5E39F1500D for ; Mon, 17 Jan 2000 12:45:12 -0800 (PST) (envelope-from wpaul@skynet.ctr.columbia.edu) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id PAA04866; Mon, 17 Jan 2000 15:48:43 -0500 From: Bill Paul Message-Id: <200001172048.PAA04866@skynet.ctr.columbia.edu> Subject: Re: USB D-Link DSB-650 kue0: failed to load code To: ejh@eas.slu.edu (Eric J. Haug) Date: Mon, 17 Jan 2000 15:48:42 -0500 (EST) Cc: current@FreeBSD.ORG In-Reply-To: <200001172004.OAA01550@ejhslu.eas.slu.edu> from "Eric J. Haug" at Jan 17, 2000 02:04:25 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 2891 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Of all the gin joints in all the towns in all the world, Eric J. Haug had to walk into mine and say: > Hi all, > > I have a Toshiba 2100CDS laptop with an OHCI USB controller > that gives a kue0: failed to load code segment error message > Rather than clutter the list, the conf file and the dmesg boot > file is available at > ftp.eas.slu.edu:/pub/incoming/[usbdmesg, usbbootmsg, usbltaconf] > The usbbootmsg is from yesterdays kernel sources with some of the debug > variables set to 15. > The changes from today did not seem to make any difference. > > the stripped mesg output from a boot follows: > > ohci0: mem 0xf7fff000-0xf7ffffff irq 11 at device 11.0 on pci0 > usb0: OHCI version 1.0 > usb0: on ohci0 > usb0: USB revision 1.0 > uhub0: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub0: 2 ports with 2 removable, self powered > kue0: D-Link Corp 10Mbps ethernet adapter, rev 1.00/0.02, addr 2 > kue0: failed to load code segment: IOERROR > device_probe_and_attach: kue0 attach returned 6 An important point which you neglect to mention is: how long did it take before the IOERROR message appeared? (That is, how much time passed between the first kue0 probe message and the next?) Getting the Kawasaki chip to work requires downloading firmware into it, and the code segment of the firmware is about 3800 bytes, which makes for a fairly large control transfer. I had to set things up with a longer than normal timeout to make this work on my laptop. If the IOERROR message appears after only a second or two (or maybe three), then the timeout may not be long enough for your machine. If it sits there for a long time (ten seconds or longer) then it's probably something else. To see if this in fact the problem, do the following: - Bring up /sys/dev/usb/if_kue.c in your favorite editor. - Find the kue_do_request() function. - Change the timeout from 500000 to 1000000, i.e. change this: usbd_setup_default_xfer(xfer, dev, 0, 500000, req, data, UGETW(req->wLength), USBD_SHORT_XFER_OK, 0); to this: usbd_setup_default_xfer(xfer, dev, 0, 1000000, req, data, UGETW(req->wLength), USBD_SHORT_XFER_OK, 0); Then recompile your kernel/module/whatever and try again. (And let me know what happens, of course.) -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" ============================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message