From owner-freebsd-new-bus Mon May 8 11:50:47 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from alsatian.cslab.vt.edu (alsatian.cslab.vt.edu [198.82.184.21]) by hub.freebsd.org (Postfix) with ESMTP id C677237BB51; Mon, 8 May 2000 11:50:40 -0700 (PDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from snowcow.cslab.vt.edu (root@snowcow.cslab.vt.edu [198.82.184.27]) by alsatian.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id OAA21114; Mon, 8 May 2000 14:50:40 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from localhost (jobaldwi@localhost) by snowcow.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id OAA34995; Mon, 8 May 2000 14:42:28 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) X-Authentication-Warning: snowcow.cslab.vt.edu: jobaldwi owned process doing -bs Date: Mon, 8 May 2000 14:42:28 -0400 (EDT) From: "John H. Baldwin" To: Doug Rabson Cc: freebsd-new-bus@freebsd.org, jhb@freebsd.org, n_hibma@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: <200005081451.KAA03253@server.baldwin.cx> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 8 May 2000, John Baldwin wrote: > On Sat, 6 May 2000, John Baldwin wrote: > > > Well, I know this is rather a long shot, but I have a test > > machine that can be beat on for a week to try to get some Alpha > > stuff nailed down, and one of the things I wanted to test was > > USB. The machine in question is a brand new Alphastation XP900. > > SRM doesn't support USB at the moment, but I figured that our > > support should function at least. Here's what I get when I boot > > the system up: > > > > FreeBSD 4.0-RELEASE #0: Fri May 5 22:54:02 EDT 2000 > > jhb@doberman.cslab.vt.edu:/usr/src/sys/compile/DOBERMAN > > ST6600 > > COMPAQ AlphaStation XP900 466 MHz, 462MHz > > 8192 byte page size, 1 processor. > > CPU: EV6 (21264) major=8 minor=4 extensions=0x303 > > OSF PAL rev: 0x100360002013e > > .... > > pcib0: <21271 PCI host bus adapter> on tsunami0 > > pci0: on pcib0 > > ohci0: mem 0x20d0000-0x20d0fff irq 234 at device 1.0 on > pci0 > > ohci0: could not allocate irq > > device_probe_and_attach: ohci0 attach returned 12 > > > > Thus, it seems to be the classic problem that is solved on PC > > systems by toggling the PnP OS support in the BIOS. Mike > > Smith said that we don't currently know how to allocate an IRQ > > to a device on the Alpha, but I thought I'd run this by you since > > I do have access to a test machine that can be beat up for a week. > > The USB hardware on this platform interrupts via the ISA pic. SRM > represents this as an interrupt pin of 0xe0 + isa irq no. Unfortunately I > have not put in support in the alpha pci code to recognise this so the > interrupt allocation fails. The place to add this support is probably > pci_alloc_resource() in sys/alpha/pci/pcibus.c. Well, I have a patch that does this at least somewhat. It is available at www.freebsd.org/~jhb/patches/alpha.usb.patch. It assumes that all Alpha's use the range 0xe0 - 0xef for ISA IRQ's, or rather, that if a set of IRQ's fall in that range on an Alpha, then they are really hints for ISA IRQ's. However, it seems that although I can now get this far: ohci0: mem 0x20d0000-0x20d0fff irq 234 at device 1.0 on pci0 ohci0: interrupting at TSUNAMI irq 10 usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhub1: ALCOR STRONG MAN KBD HUB, class 9/0, rev 1.10/1.01, addr 2 uhub1: 3 ports with 2 removable, bus powered ukbd0: ALCOR STRONG MAN KBD HUB, rev 1.00/1.01, addr 3, iclass 3/1 kbd1 at ukbd0 ums0: Logitech USB-PS/2 Mouse, rev 1.00/1.10, addr 4, iclass 3/1 ums0: 3 buttons and Z dir. The interrupts don't seem to be delivered properly. Thus, I can't get the keyboard to work, usbd takes a while (several seconds) to start, usbdevs also runs with delays, and no kernel messages are generated when I add/delete items to the USB tree. Any ideas, suggetions, etc. would be greatly appreciated. I lose access to this machine on Friday, so.... :) > -- > Doug Rabson Mail: dfr@nlsystems.com > Nonlinear Systems Ltd. Phone: +44 20 8442 9037 John Baldwin jhb@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Mon May 8 13: 4:20 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from overcee.netplex.com.au (peter1.yahoo.com [208.48.107.4]) by hub.freebsd.org (Postfix) with ESMTP id 3D99837BC5D; Mon, 8 May 2000 13:04:15 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 264FE1CE3; Mon, 8 May 2000 13:04:10 -0700 (PDT) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: "John H. Baldwin" Cc: Doug Rabson , freebsd-new-bus@FreeBSD.ORG, jhb@FreeBSD.ORG, n_hibma@FreeBSD.ORG Subject: Re: Alpha USB difficulties... In-Reply-To: Message from "John H. Baldwin" of "Mon, 08 May 2000 14:42:28 EDT." Date: Mon, 08 May 2000 13:04:10 -0700 From: Peter Wemm Message-Id: <20000508200410.264FE1CE3@overcee.netplex.com.au> Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "John H. Baldwin" wrote: > On Mon, 8 May 2000, John Baldwin wrote: > > > On Sat, 6 May 2000, John Baldwin wrote: > > > > > Well, I know this is rather a long shot, but I have a test > > > machine that can be beat on for a week to try to get some Alpha > > > stuff nailed down, and one of the things I wanted to test was > > > USB. The machine in question is a brand new Alphastation XP900. > > > SRM doesn't support USB at the moment, but I figured that our > > > support should function at least. Here's what I get when I boot > > > the system up: > > > > > > FreeBSD 4.0-RELEASE #0: Fri May 5 22:54:02 EDT 2000 > > > jhb@doberman.cslab.vt.edu:/usr/src/sys/compile/DOBERMAN > > > ST6600 > > > COMPAQ AlphaStation XP900 466 MHz, 462MHz > > > 8192 byte page size, 1 processor. > > > CPU: EV6 (21264) major=8 minor=4 extensions=0x303 > > > OSF PAL rev: 0x100360002013e > > > .... > > > pcib0: <21271 PCI host bus adapter> on tsunami0 > > > pci0: on pcib0 > > > ohci0: mem 0x20d0000-0x20d0ff f irq 234 at device 1.0 on > > pci0 > > > ohci0: could not allocate irq > > > device_probe_and_attach: ohci0 attach returned 12 > > > > > > Thus, it seems to be the classic problem that is solved on PC > > > systems by toggling the PnP OS support in the BIOS. Mike > > > Smith said that we don't currently know how to allocate an IRQ > > > to a device on the Alpha, but I thought I'd run this by you since > > > I do have access to a test machine that can be beat up for a week. > > > > The USB hardware on this platform interrupts via the ISA pic. SRM > > represents this as an interrupt pin of 0xe0 + isa irq no. Unfortunately I > > have not put in support in the alpha pci code to recognise this so the > > interrupt allocation fails. The place to add this support is probably > > pci_alloc_resource() in sys/alpha/pci/pcibus.c. > > Well, I have a patch that does this at least somewhat. It is available at > www.freebsd.org/~jhb/patches/alpha.usb.patch. It assumes that all Alpha's > use the range 0xe0 - 0xef for ISA IRQ's, or rather, that if a set of IRQ's > fall in that range on an Alpha, then they are really hints for ISA > IRQ's. However, it seems that although I can now get this far: > > ohci0: mem 0x20d0000-0x20d0fff > irq 234 at device 1.0 on pci0 > ohci0: interrupting at TSUNAMI irq 10 > usb0: OHCI version 1.0, legacy support > usb0: on ohci0 > usb0: USB revision 1.0 > uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub0: 2 ports with 2 removable, self powered > uhub1: ALCOR STRONG MAN KBD HUB, class 9/0, rev 1.10/1.01, addr 2 > uhub1: 3 ports with 2 removable, bus powered > ukbd0: ALCOR STRONG MAN KBD HUB, rev 1.00/1.01, addr 3, iclass 3/1 > kbd1 at ukbd0 > ums0: Logitech USB-PS/2 Mouse, rev 1.00/1.10, addr 4, iclass 3/1 > ums0: 3 buttons and Z dir. > > The interrupts don't seem to be delivered properly. Thus, I can't get the > keyboard to work, usbd takes a while (several seconds) to start, usbdevs > also runs with delays, and no kernel messages are generated when I > add/delete items to the USB tree. Any ideas, suggetions, etc. would be > greatly appreciated. I lose access to this machine on Friday, so.... :) I have a different problem. On a PC164SX, I get told to turn off PNP OS, which is kinda funny since it's an Alpha and not an x86... :-) isab0: at device 8.0 on pci0 ... ohci0: mem 0x82081000-0x82081fff at device 8.3 on pci0 ohci0: Invalid irq 255 ohci0: Please switch on USB support and switch PNP-OS to 'No' in BIOS device_probe_and_attach: ohci0 attach returned 6 ... dc0: port 0x1180-0x11ff mem 0x82082000-0x820823ff irq 8 at device 9.0 on pci0 dc0: interrupting at CIA irq 8 Everything else works except for that ohci. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Mon May 8 14:20:45 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 64E1237BD85; Mon, 8 May 2000 14:20:40 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id RAA03694; Mon, 8 May 2000 17:20:30 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-Id: <200005082120.RAA03694@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_=XFMail.1.4.0.FreeBSD:000508172026:21180=_" In-Reply-To: <20000508200410.264FE1CE3@overcee.netplex.com.au> Date: Mon, 08 May 2000 17:20:30 -0400 (EDT) From: John Baldwin To: Peter Wemm Subject: Re: Alpha USB difficulties... Cc: n_hibma@FreeBSD.org, freebsd-new-bus@FreeBSD.org Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format --_=XFMail.1.4.0.FreeBSD:000508172026:21180=_ Content-Type: text/plain; charset=us-ascii On 08-May-00 Peter Wemm wrote: > I have a different problem. On a PC164SX, I get told to turn off PNP OS, > which is kinda funny since it's an Alpha and not an x86... :-) It just seems that the printf() for that message needs to be made x86 specific. The attached patch should fix it. > isab0: at device 8.0 on pci0 > ... > ohci0: mem 0x82081000-0x82081fff at device 8.3 on pci0 > ohci0: Invalid irq 255 > ohci0: Please switch on USB support and switch PNP-OS to 'No' in BIOS > device_probe_and_attach: ohci0 attach returned 6 > ... > dc0: port 0x1180-0x11ff mem 0x82082000-0x820823ff irq 8 at device 9.0 on > pci0 > dc0: interrupting at CIA irq 8 > > Everything else works except for that ohci. > > Cheers, > -Peter -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ --_=XFMail.1.4.0.FreeBSD:000508172026:21180=_ Content-Disposition: attachment; filename="pnpos.alpha.patch" Content-Transfer-Encoding: base64 Content-Description: pnpos.alpha.patch Content-Type: application/octet-stream; name=pnpos.alpha.patch; SizeOnDisk=1090 SW5kZXg6IG9oY2lfcGNpLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL3Vzci9jdnMvc3JjL3N5cy9w Y2kvb2hjaV9wY2kuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4xNwpkaWZmIC11IC1yMS4xNyBv aGNpX3BjaS5jCi0tLSBvaGNpX3BjaS5jCTIwMDAvMDMvMTUgMjI6MjY6MTcJMS4xNworKysgb2hj aV9wY2kuYwkyMDAwLzA1LzA4IDIwOjM4OjU4CkBAIC0xNTcsNyArMTU3LDkgQEAKIAlpbnRyID0g cGNpX3JlYWRfY29uZmlnKHNlbGYsIFBDSVJfSU5UTElORSwgMSk7CiAJaWYgKGludHIgPT0gMCB8 fCBpbnRyID09IDI1NSkgewogCQlkZXZpY2VfcHJpbnRmKHNlbGYsICJJbnZhbGlkIGlycSAlZFxu IiwgaW50cik7CisjaWZkZWYgaTM4NgogCQlkZXZpY2VfcHJpbnRmKHNlbGYsICJQbGVhc2Ugc3dp dGNoIG9uIFVTQiBzdXBwb3J0IGFuZCBzd2l0Y2ggUE5QLU9TIHRvICdObycgaW4gQklPU1xuIik7 CisjZW5kaWYKIAkJcmV0dXJuIEVOWElPOwogCX0KIApJbmRleDogdWhjaV9wY2kuYwo9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09ClJDUyBmaWxlOiAvdXNyL2N2cy9zcmMvc3lzL3BjaS91aGNpX3BjaS5jLHYKcmV0cmlldmlu ZyByZXZpc2lvbiAxLjI3CmRpZmYgLXUgLXIxLjI3IHVoY2lfcGNpLmMKLS0tIHVoY2lfcGNpLmMJ MjAwMC8wMy8xNSAyMjoyNjoxNwkxLjI3CisrKyB1aGNpX3BjaS5jCTIwMDAvMDUvMDggMjA6Mzk6 MjAKQEAgLTE3MSw3ICsxNzEsOSBAQAogCWludHIgPSBwY2lfcmVhZF9jb25maWcoc2VsZiwgUENJ Ul9JTlRMSU5FLCAxKTsKIAlpZiAoaW50ciA9PSAwIHx8IGludHIgPT0gMjU1KSB7CiAJCWRldmlj ZV9wcmludGYoc2VsZiwgIkludmFsaWQgaXJxICVkXG4iLCBpbnRyKTsKKyNpZmRlZiBpMzg2CiAJ CWRldmljZV9wcmludGYoc2VsZiwgIlBsZWFzZSBzd2l0Y2ggb24gVVNCIHN1cHBvcnQgYW5kIHN3 aXRjaCBQTlAtT1MgdG8gJ05vJyBpbiBCSU9TXG4iKTsKKyNlbmRpZgogCQlyZXR1cm4gRU5YSU87 CiAJfQogCg== --_=XFMail.1.4.0.FreeBSD:000508172026:21180=_-- End of MIME message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 1:41:19 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net [194.217.242.20]) by hub.freebsd.org (Postfix) with ESMTP id E559837B56A; Tue, 9 May 2000 01:41:08 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2) id 12p5Zi-000NxC-0K; Tue, 9 May 2000 08:41:07 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id JAA19039; Tue, 9 May 2000 09:44:12 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 9 May 2000 09:45:49 +0100 (BST) From: Doug Rabson To: "John H. Baldwin" Cc: freebsd-new-bus@freebsd.org, jhb@freebsd.org, n_hibma@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 8 May 2000, John H. Baldwin wrote: > On Mon, 8 May 2000, John Baldwin wrote: > > > On Sat, 6 May 2000, John Baldwin wrote: > > > > > Well, I know this is rather a long shot, but I have a test > > > machine that can be beat on for a week to try to get some Alpha > > > stuff nailed down, and one of the things I wanted to test was > > > USB. The machine in question is a brand new Alphastation XP900. > > > SRM doesn't support USB at the moment, but I figured that our > > > support should function at least. Here's what I get when I boot > > > the system up: > > > > > > FreeBSD 4.0-RELEASE #0: Fri May 5 22:54:02 EDT 2000 > > > jhb@doberman.cslab.vt.edu:/usr/src/sys/compile/DOBERMAN > > > ST6600 > > > COMPAQ AlphaStation XP900 466 MHz, 462MHz > > > 8192 byte page size, 1 processor. > > > CPU: EV6 (21264) major=8 minor=4 extensions=0x303 > > > OSF PAL rev: 0x100360002013e > > > .... > > > pcib0: <21271 PCI host bus adapter> on tsunami0 > > > pci0: on pcib0 > > > ohci0: mem 0x20d0000-0x20d0fff irq 234 at device 1.0 on > > pci0 > > > ohci0: could not allocate irq > > > device_probe_and_attach: ohci0 attach returned 12 > > > > > > Thus, it seems to be the classic problem that is solved on PC > > > systems by toggling the PnP OS support in the BIOS. Mike > > > Smith said that we don't currently know how to allocate an IRQ > > > to a device on the Alpha, but I thought I'd run this by you since > > > I do have access to a test machine that can be beat up for a week. > > > > The USB hardware on this platform interrupts via the ISA pic. SRM > > represents this as an interrupt pin of 0xe0 + isa irq no. Unfortunately I > > have not put in support in the alpha pci code to recognise this so the > > interrupt allocation fails. The place to add this support is probably > > pci_alloc_resource() in sys/alpha/pci/pcibus.c. > > Well, I have a patch that does this at least somewhat. It is available at > www.freebsd.org/~jhb/patches/alpha.usb.patch. It assumes that all Alpha's > use the range 0xe0 - 0xef for ISA IRQ's, or rather, that if a set of IRQ's > fall in that range on an Alpha, then they are really hints for ISA > IRQ's. However, it seems that although I can now get this far: > > ... > > The interrupts don't seem to be delivered properly. Thus, I can't get the > keyboard to work, usbd takes a while (several seconds) to start, usbdevs > also runs with delays, and no kernel messages are generated when I > add/delete items to the USB tree. Any ideas, suggetions, etc. would be > greatly appreciated. I lose access to this machine on Friday, so.... :) There is already a function isa_alloc_intr() which does most of what you need so perhaps you don't need to add isa_alloc_intrs(). On the other hand, your function is slightly more general. To make interrupt delivery work, you also need to hook pci_setup_intr and pci_teardown_intr and vector them to the isa functions too. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 1:44:51 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 3502737BA81; Tue, 9 May 2000 01:44:41 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 12p5d9-0002TN-0Y; Tue, 9 May 2000 09:44:40 +0100 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id JAA19383; Tue, 9 May 2000 09:47:34 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 9 May 2000 09:49:11 +0100 (BST) From: Doug Rabson To: Peter Wemm Cc: "John H. Baldwin" , freebsd-new-bus@freebsd.org, jhb@freebsd.org, n_hibma@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: <20000508200410.264FE1CE3@overcee.netplex.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 8 May 2000, Peter Wemm wrote: > > I have a different problem. On a PC164SX, I get told to turn off PNP OS, > which is kinda funny since it's an Alpha and not an x86... :-) > > isab0: at device 8.0 on pci0 > ... > ohci0: mem 0x82081000-0x82081fff at device 8.3 on pci0 > ohci0: Invalid irq 255 > ohci0: Please switch on USB support and switch PNP-OS to 'No' in BIOS > device_probe_and_attach: ohci0 attach returned 6 > ... > dc0: port 0x1180-0x11ff mem 0x82082000-0x820823ff irq 8 at device 9.0 on pci0 > dc0: interrupting at CIA irq 8 > > Everything else works except for that ohci. I have no idea how to figure out where the ohci interrupt is vectored. It seems likely that it goes via ISA like the other pci functions on that device (IDE etc) but I don't know what interrupt number it would use without looking at the datasheet. Perhaps if you upgrade your firmware, a more recent SRM will program the intline with a better value than 255? -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 4:17:31 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by hub.freebsd.org (Postfix) with ESMTP id A837637BE31; Tue, 9 May 2000 04:17:25 -0700 (PDT) (envelope-from n_hibma@calcaphon.com) Received: from calcaphon.demon.co.uk ([193.237.19.5] helo=bluebottle.qubesoft.com) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 12p80v-00074F-0V; Tue, 9 May 2000 12:17:23 +0100 Received: from henny.webweaving.org (henny.qubesoft.com [192.168.1.5]) by bluebottle.qubesoft.com (8.9.3/8.9.1) with ESMTP id MAA59187; Tue, 9 May 2000 12:17:20 +0100 (BST) (envelope-from n_hibma@calcaphon.com) Received: from localhost (localhost [127.0.0.1]) by henny.webweaving.org (8.9.3/8.9.3) with ESMTP id MAA62508; Tue, 9 May 2000 12:14:00 +0100 (BST) (envelope-from n_hibma@calcaphon.com) Date: Tue, 9 May 2000 12:13:59 +0100 (BST) From: Nick Hibma X-Sender: n_hibma@localhost Reply-To: Nick Hibma To: "John H. Baldwin" Cc: Doug Rabson , freebsd-new-bus@freebsd.org, jhb@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The interrupts don't seem to be delivered properly. Thus, I can't get the > keyboard to work, usbd takes a while (several seconds) to start, usbdevs > also runs with delays, and no kernel messages are generated when I > add/delete items to the USB tree. Any ideas, suggetions, etc. would be > greatly appreciated. I lose access to this machine on Friday, so.... :) Interrupts are not delivered. If you check usbd you will see that the first thing it does is to enumerate the tree and that stalls at not getting interrupts after sending the requests to the hub. The timeout is 5 seconds I think and it does several requests, so 30 seconds to a minute sounds plausible. You need to dig around in the interrupt routing. Nick -- n_hibma@webweaving.org n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 5:52:49 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from alsatian.cslab.vt.edu (alsatian.cslab.vt.edu [198.82.184.21]) by hub.freebsd.org (Postfix) with ESMTP id 03A7E37BDF6; Tue, 9 May 2000 05:52:46 -0700 (PDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from snowcow.cslab.vt.edu (root@snowcow.cslab.vt.edu [198.82.184.27]) by alsatian.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id IAA23564; Tue, 9 May 2000 08:52:44 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from localhost (jobaldwi@localhost) by snowcow.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id IAA68577; Tue, 9 May 2000 08:44:26 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) X-Authentication-Warning: snowcow.cslab.vt.edu: jobaldwi owned process doing -bs Date: Tue, 9 May 2000 08:44:26 -0400 (EDT) From: "John H. Baldwin" To: Doug Rabson Cc: freebsd-new-bus@freebsd.org, jhb@freebsd.org, n_hibma@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 9 May 2000, Doug Rabson wrote: > There is already a function isa_alloc_intr() which does most of what you > need so perhaps you don't need to add isa_alloc_intrs(). On the other > hand, your function is slightly more general. I did see the isa_alloc_intr() function, it was what I modeled my function on. I did use the intrs() function solely for the general case. I figured it would be bad to assume that all IRQ requests would always contain just one IRQ. If that is the case, however, then I'll change it to use isa_alloc_intr() instead. > To make interrupt delivery work, you also need to hook pci_setup_intr and > pci_teardown_intr and vector them to the isa functions too. Hmmm, it looks like I'll need to override this /sys/pci/pcisupport.c conditional on #ifdef alpha? Or is this only a USB thing and thus should only be done for the ohci and uhci drivers? I was assuming that this was a general problem with SRM and PCI devices with ISA IRQ's. > -- > Doug Rabson Mail: dfr@nlsystems.com > Nonlinear Systems Ltd. Phone: +44 20 8442 9037 John Baldwin jhb@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 7:42:54 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from alsatian.cslab.vt.edu (alsatian.cslab.vt.edu [198.82.184.21]) by hub.freebsd.org (Postfix) with ESMTP id 82D0437BE26; Tue, 9 May 2000 07:42:49 -0700 (PDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from snowcow.cslab.vt.edu (root@snowcow.cslab.vt.edu [198.82.184.27]) by alsatian.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id KAA23583; Tue, 9 May 2000 10:42:48 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from localhost (jobaldwi@localhost) by snowcow.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id KAA70761; Tue, 9 May 2000 10:34:30 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) X-Authentication-Warning: snowcow.cslab.vt.edu: jobaldwi owned process doing -bs Date: Tue, 9 May 2000 10:34:30 -0400 (EDT) From: "John H. Baldwin" To: Doug Rabson Cc: freebsd-new-bus@freebsd.org, jhb@freebsd.org, n_hibma@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 9 May 2000, Doug Rabson wrote: > To make interrupt delivery work, you also need to hook pci_setup_intr and > pci_teardown_intr and vector them to the isa functions too. Ok, I added in alpha_platform_pci_{setup,teardown}_intr(), stuck them in machine/md_var.h, and then used them as the DEV_METHOD() for bus_{setup,teardown}_intr for the pci device in /sys/pci/pci.c. This worked for the most part. I can now use the USB keyboard and mouse fine, and the floppy drive I have to test with is recognized, but only as a generic ugen0 instead of a umass0: ugen0: Y-E DATA FlashBuster-U, rev 1.00/3.04, addr 5 The patch for all this ugliness is at www.freebsd.org/~jhb/patches/alpha.usb.patch. > -- > Doug Rabson Mail: dfr@nlsystems.com > Nonlinear Systems Ltd. Phone: +44 20 8442 9037 John Baldwin jobaldwi@cslab.vt.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 9: 4:10 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 57E8337B5D0 for ; Tue, 9 May 2000 09:03:58 -0700 (PDT) (envelope-from n_hibma@calcaphon.com) Received: from calcaphon.demon.co.uk ([193.237.19.5] helo=bluebottle.qubesoft.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 12pCUB-00047S-0Y; Tue, 9 May 2000 17:03:53 +0100 Received: from henny.webweaving.org (henny.qubesoft.com [192.168.1.5]) by bluebottle.qubesoft.com (8.9.3/8.9.1) with ESMTP id RAA68691; Tue, 9 May 2000 17:03:36 +0100 (BST) (envelope-from n_hibma@calcaphon.com) Received: from localhost (localhost [127.0.0.1]) by henny.webweaving.org (8.9.3/8.9.3) with ESMTP id RAA63112; Tue, 9 May 2000 17:01:15 +0100 (BST) (envelope-from n_hibma@calcaphon.com) Date: Tue, 9 May 2000 17:01:15 +0100 (BST) From: Nick Hibma X-Sender: n_hibma@localhost Reply-To: Nick Hibma To: "John H. Baldwin" Cc: Doug Rabson , freebsd-new-bus@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Could you run a usbdevs -v ? Maybe they changed the Id? Nick On Tue, 9 May 2000, John H. Baldwin wrote: > On Tue, 9 May 2000, Doug Rabson wrote: > > > To make interrupt delivery work, you also need to hook pci_setup_intr and > > pci_teardown_intr and vector them to the isa functions too. > > Ok, I added in alpha_platform_pci_{setup,teardown}_intr(), stuck them > in machine/md_var.h, and then used them as the DEV_METHOD() for > bus_{setup,teardown}_intr for the pci device in /sys/pci/pci.c. This > worked for the most part. I can now use the USB keyboard and mouse fine, > and the floppy drive I have to test with is recognized, but only as a > generic ugen0 instead of a umass0: > > ugen0: Y-E DATA FlashBuster-U, rev 1.00/3.04, addr 5 > > The patch for all this ugliness is at > www.freebsd.org/~jhb/patches/alpha.usb.patch. > > > -- > > Doug Rabson Mail: dfr@nlsystems.com > > Nonlinear Systems Ltd. Phone: +44 20 8442 9037 > > John Baldwin > jobaldwi@cslab.vt.edu > > -- n_hibma@webweaving.org n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 12:10:59 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net [194.217.242.20]) by hub.freebsd.org (Postfix) with ESMTP id 58A2637BEC8; Tue, 9 May 2000 12:10:54 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by tele-post-20.mail.demon.net with esmtp (Exim 2.12 #2) id 12pFP7-000OK4-0K; Tue, 9 May 2000 19:10:50 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id UAA48000; Tue, 9 May 2000 20:14:06 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 9 May 2000 20:15:36 +0100 (BST) From: Doug Rabson To: "John H. Baldwin" Cc: freebsd-new-bus@freebsd.org, jhb@freebsd.org, n_hibma@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 9 May 2000, John H. Baldwin wrote: > On Tue, 9 May 2000, Doug Rabson wrote: > > > There is already a function isa_alloc_intr() which does most of what you > > need so perhaps you don't need to add isa_alloc_intrs(). On the other > > hand, your function is slightly more general. > > I did see the isa_alloc_intr() function, it was what I modeled my function > on. I did use the intrs() function solely for the general case. I > figured it would be bad to assume that all IRQ requests would always > contain just one IRQ. If that is the case, however, then I'll change it > to use isa_alloc_intr() instead. > > > To make interrupt delivery work, you also need to hook pci_setup_intr and > > pci_teardown_intr and vector them to the isa functions too. > > Hmmm, it looks like I'll need to override this /sys/pci/pcisupport.c > conditional on #ifdef alpha? Or is this only a USB thing and thus should > only be done for the ohci and uhci drivers? I was assuming that this was > a general problem with SRM and PCI devices with ISA IRQ's. Hmm. I forgot that each chipset provides its own setup/teardown code. You don't need to change any mi code but you probably need to add some extra logic to cia_setup_intr() and tsunami_setup_intr(). Those are the main chipsets which are affected although really this should happen for all chipsets which don't use the ISA pic for routing all interrupts. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 12:12:37 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by hub.freebsd.org (Postfix) with ESMTP id 8F45437BED7; Tue, 9 May 2000 12:12:27 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1) id 12pFQd-000HuS-0B; Tue, 9 May 2000 19:12:23 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id UAA48011; Tue, 9 May 2000 20:15:40 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Tue, 9 May 2000 20:17:09 +0100 (BST) From: Doug Rabson To: "John H. Baldwin" Cc: freebsd-new-bus@freebsd.org, jhb@freebsd.org, n_hibma@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 9 May 2000, John H. Baldwin wrote: > On Tue, 9 May 2000, Doug Rabson wrote: > > > To make interrupt delivery work, you also need to hook pci_setup_intr and > > pci_teardown_intr and vector them to the isa functions too. > > Ok, I added in alpha_platform_pci_{setup,teardown}_intr(), stuck them > in machine/md_var.h, and then used them as the DEV_METHOD() for > bus_{setup,teardown}_intr for the pci device in /sys/pci/pci.c. This > worked for the most part. I can now use the USB keyboard and mouse fine, > and the floppy drive I have to test with is recognized, but only as a > generic ugen0 instead of a umass0: > > ugen0: Y-E DATA FlashBuster-U, rev 1.00/3.04, addr 5 > > The patch for all this ugliness is at > www.freebsd.org/~jhb/patches/alpha.usb.patch. As I just mentioned in another reply, perhaps a cleaner place to hook the setup/teardown_intr bits is in the chipset drivers, probably making them call some generic code in alpha/pci/pcibus.c to do the work. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 13: 0:41 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 9C21237C22F; Tue, 9 May 2000 12:46:41 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id PAA05232; Tue, 9 May 2000 15:46:20 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-Id: <200005091946.PAA05232@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Tue, 09 May 2000 15:46:19 -0400 (EDT) From: John Baldwin To: Doug Rabson Subject: Re: Alpha USB difficulties... Cc: n_hibma@FreeBSD.org, freebsd-new-bus@FreeBSD.org, "John H. Baldwin" Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 09-May-00 Doug Rabson wrote: > On Tue, 9 May 2000, John H. Baldwin wrote: > >> On Tue, 9 May 2000, Doug Rabson wrote: >> >> > To make interrupt delivery work, you also need to hook pci_setup_intr and >> > pci_teardown_intr and vector them to the isa functions too. >> >> Ok, I added in alpha_platform_pci_{setup,teardown}_intr(), stuck them >> in machine/md_var.h, and then used them as the DEV_METHOD() for >> bus_{setup,teardown}_intr for the pci device in /sys/pci/pci.c. This >> worked for the most part. I can now use the USB keyboard and mouse fine, >> and the floppy drive I have to test with is recognized, but only as a >> generic ugen0 instead of a umass0: >> >> ugen0: Y-E DATA FlashBuster-U, rev 1.00/3.04, addr 5 >> >> The patch for all this ugliness is at >> www.freebsd.org/~jhb/patches/alpha.usb.patch. > > As I just mentioned in another reply, perhaps a cleaner place to hook > the setup/teardown_intr bits is in the chipset drivers, probably making > them call some generic code in alpha/pci/pcibus.c to do the work. Ok, I'll update it to do that, then. > -- > Doug Rabson Mail: dfr@nlsystems.com > Nonlinear Systems Ltd. Phone: +44 20 8442 9037 -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Tue May 9 14: 3:28 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 012AD37BF66; Tue, 9 May 2000 14:03:23 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id RAA05315; Tue, 9 May 2000 17:03:08 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-Id: <200005092103.RAA05315@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Tue, 09 May 2000 17:03:08 -0400 (EDT) From: John Baldwin To: Doug Rabson Subject: Re: Alpha USB difficulties... Cc: n_hibma@FreeBSD.org, freebsd-new-bus@FreeBSD.org, "John H. Baldwin" Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 09-May-00 Doug Rabson wrote: > On Tue, 9 May 2000, John H. Baldwin wrote: > >> On Tue, 9 May 2000, Doug Rabson wrote: >> >> > There is already a function isa_alloc_intr() which does most of what you >> > need so perhaps you don't need to add isa_alloc_intrs(). On the other >> > hand, your function is slightly more general. >> >> I did see the isa_alloc_intr() function, it was what I modeled my function >> on. I did use the intrs() function solely for the general case. I >> figured it would be bad to assume that all IRQ requests would always >> contain just one IRQ. If that is the case, however, then I'll change it >> to use isa_alloc_intr() instead. If you prefer the more general interface, I'll go through and convert all of the calls to isa_alloc_intr() to the isa_alloc_intrs() interface, and rename isa_alloc_intrs() to isa_alloc_intr() if that is preferred as well. That way we would only have one interface in the tree. >> > To make interrupt delivery work, you also need to hook pci_setup_intr and >> > pci_teardown_intr and vector them to the isa functions too. >> >> Hmmm, it looks like I'll need to override this /sys/pci/pcisupport.c >> conditional on #ifdef alpha? Or is this only a USB thing and thus should >> only be done for the ohci and uhci drivers? I was assuming that this was >> a general problem with SRM and PCI devices with ISA IRQ's. > > Hmm. I forgot that each chipset provides its own setup/teardown code. You > don't need to change any mi code but you probably need to add some extra > logic to cia_setup_intr() and tsunami_setup_intr(). Those are the main > chipsets which are affected although really this should happen for all > chipsets which don't use the ISA pic for routing all interrupts. Ok, done. For lack of a better name, I just renamed the functions to cia_tsunami_{setup,teardown}_intr(), and patched the cia and tsunami driver appropriately. Latest patch is at the same place as the others. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Wed May 10 1: 3: 9 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by hub.freebsd.org (Postfix) with ESMTP id 912F737B598; Wed, 10 May 2000 01:03:03 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1) id 12pRSJ-000ChQ-0W; Wed, 10 May 2000 09:02:56 +0100 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id JAA08440; Wed, 10 May 2000 09:06:03 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Wed, 10 May 2000 09:07:24 +0100 (BST) From: Doug Rabson To: John Baldwin Cc: n_hibma@freebsd.org, freebsd-new-bus@freebsd.org, "John H. Baldwin" Subject: Re: Alpha USB difficulties... In-Reply-To: <200005092103.RAA05315@server.baldwin.cx> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 9 May 2000, John Baldwin wrote: > > On 09-May-00 Doug Rabson wrote: > > On Tue, 9 May 2000, John H. Baldwin wrote: > > > >> On Tue, 9 May 2000, Doug Rabson wrote: > >> > >> > There is already a function isa_alloc_intr() which does most of what you > >> > need so perhaps you don't need to add isa_alloc_intrs(). On the other > >> > hand, your function is slightly more general. > >> > >> I did see the isa_alloc_intr() function, it was what I modeled my function > >> on. I did use the intrs() function solely for the general case. I > >> figured it would be bad to assume that all IRQ requests would always > >> contain just one IRQ. If that is the case, however, then I'll change it > >> to use isa_alloc_intr() instead. > > If you prefer the more general interface, I'll go through and convert all > of the calls to isa_alloc_intr() to the isa_alloc_intrs() interface, and > rename isa_alloc_intrs() to isa_alloc_intr() if that is preferred as well. > That way we would only have one interface in the tree. > > >> > To make interrupt delivery work, you also need to hook pci_setup_intr and > >> > pci_teardown_intr and vector them to the isa functions too. > >> > >> Hmmm, it looks like I'll need to override this /sys/pci/pcisupport.c > >> conditional on #ifdef alpha? Or is this only a USB thing and thus should > >> only be done for the ohci and uhci drivers? I was assuming that this was > >> a general problem with SRM and PCI devices with ISA IRQ's. > > > > Hmm. I forgot that each chipset provides its own setup/teardown code. You > > don't need to change any mi code but you probably need to add some extra > > logic to cia_setup_intr() and tsunami_setup_intr(). Those are the main > > chipsets which are affected although really this should happen for all > > chipsets which don't use the ISA pic for routing all interrupts. > > Ok, done. For lack of a better name, I just renamed the functions to > cia_tsunami_{setup,teardown}_intr(), and patched the cia and tsunami > driver appropriately. Latest patch is at the same place as the others. The patch looks good. I'm not too keen on the name cia_tsunami_*_intr(). Maybe something more generic like alpha_pci_{setup,teardown}_intr(). The code in pci_alloc_resource which looks for the ISA range should be conditional on NISA>0 so that the file can work even if ISA is not built. Apart from that, it looks ready to commit. With this fix, it should be possible to simplify some of the alpha-specific hacks in the ata driver which have to work around the same interrupt mapping hassle. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Wed May 10 7:41:49 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from alsatian.cslab.vt.edu (alsatian.cslab.vt.edu [198.82.184.21]) by hub.freebsd.org (Postfix) with ESMTP id E5DD237B601; Wed, 10 May 2000 07:41:40 -0700 (PDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from snowcow.cslab.vt.edu (root@snowcow.cslab.vt.edu [198.82.184.27]) by alsatian.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id KAA26528; Wed, 10 May 2000 10:41:39 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) Received: from localhost (jobaldwi@localhost) by snowcow.cslab.vt.edu (8.9.3/8.9.3) with ESMTP id KAA96984; Wed, 10 May 2000 10:33:09 -0400 (EDT) (envelope-from jobaldwi@cslab.vt.edu) X-Authentication-Warning: snowcow.cslab.vt.edu: jobaldwi owned process doing -bs Date: Wed, 10 May 2000 10:33:09 -0400 (EDT) From: "John H. Baldwin" To: Doug Rabson Cc: John Baldwin , n_hibma@freebsd.org, freebsd-new-bus@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 10 May 2000, Doug Rabson wrote: > On Tue, 9 May 2000, John Baldwin wrote: > > Ok, done. For lack of a better name, I just renamed the functions to > > cia_tsunami_{setup,teardown}_intr(), and patched the cia and tsunami > > driver appropriately. Latest patch is at the same place as the others. > > The patch looks good. I'm not too keen on the name > cia_tsunami_*_intr(). Maybe something more generic like > alpha_pci_{setup,teardown}_intr(). alpha_platform_pci_*_intr is what I went with similar to the IDE intr functions. > The code in pci_alloc_resource which looks for the ISA range should be > conditional on NISA>0 so that the file can work even if ISA is not > built. Apart from that, it looks ready to commit. Well.... I did this, but probably NISA should be checked in alpha_platform_pci_*_intr. I tried to test it, but right now you can't build a kernel without ISA support. I did manage to pair down GENERIC to a kernel without any ISA devices or ISA support, but I still get several link errors at the end of the build in several chipset drivers, and also for things like 'comconsole' in a lt of drivers. So, getting a non-ISA compile will take a good chunk of work after this if people want it. Unless there are any objections, I'll commit the latest patch (at the normal place) when I get back from my last final in a few hours. > With this fix, it should be possible to simplify some of the > alpha-specific hacks in the ata driver which have to work around the same > interrupt mapping hassle. > -- > Doug Rabson Mail: dfr@nlsystems.com > Nonlinear Systems Ltd. Phone: +44 20 8442 9037 John Baldwin jobaldwi@cslab.vt.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Wed May 10 12:40:39 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by hub.freebsd.org (Postfix) with ESMTP id 4145137B93E; Wed, 10 May 2000 12:40:35 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1) id 12pcLR-0007DO-0B; Wed, 10 May 2000 19:40:33 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id UAA70107; Wed, 10 May 2000 20:44:03 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Wed, 10 May 2000 20:45:16 +0100 (BST) From: Doug Rabson To: "John H. Baldwin" Cc: John Baldwin , n_hibma@freebsd.org, freebsd-new-bus@freebsd.org Subject: Re: Alpha USB difficulties... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 10 May 2000, John H. Baldwin wrote: > On Wed, 10 May 2000, Doug Rabson wrote: > > > On Tue, 9 May 2000, John Baldwin wrote: > > > Ok, done. For lack of a better name, I just renamed the functions to > > > cia_tsunami_{setup,teardown}_intr(), and patched the cia and tsunami > > > driver appropriately. Latest patch is at the same place as the others. > > > > The patch looks good. I'm not too keen on the name > > cia_tsunami_*_intr(). Maybe something more generic like > > alpha_pci_{setup,teardown}_intr(). > > alpha_platform_pci_*_intr is what I went with similar to the IDE intr > functions. > > > The code in pci_alloc_resource which looks for the ISA range should be > > conditional on NISA>0 so that the file can work even if ISA is not > > built. Apart from that, it looks ready to commit. > > Well.... I did this, but probably NISA should be checked in > alpha_platform_pci_*_intr. I tried to test it, but right now you can't > build a kernel without ISA support. I did manage to pair down GENERIC to > a kernel without any ISA devices or ISA support, but I still get several > link errors at the end of the build in several chipset drivers, and also > for things like 'comconsole' in a lt of drivers. So, getting a non-ISA > compile will take a good chunk of work after this if people want > it. Unless there are any objections, I'll commit the latest patch (at the > normal place) when I get back from my last final in a few hours. I think the only platform which is likely to be able to work without ISA is the 8200. I only mentioned it since people have been trying to keep that file working with NISA==0. Thanks for working on this. Its been one of those irritating small jobs that I never got around to doing. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message