usb support revisted

Sevan / Venture37 <[email protected]>
Newsgroups gmane.os.netbsd.ports.cobalt
Message-ID <[email protected]>
Hi Guys
I still can't seem to get usb support working on my Qube2, the kernel picks up the prolific controller but there is no device file in /dev
I've made a new MAKEDEV script & tried sh MAKEDEV usbs, but upon inspection I found there was no makedev enteries for ucom & uplcom.
I've been using 
http://mail-index.netbsd.org/port-cobalt/2007/09/08/0000.html  &
http://mail-index.netbsd.org/port-cobalt/2008/05/24/msg000114.html
as the source material for getting this going as previously instructed on here.

dmesg & patches below


Sevan / Venture37


cpu0: 32KB/32B 2-way set-associative write-back L1 Data cache
mcclock0 at mainbus0 addr 0x10000070: mc146818 compatible time-of-day clock
panel0 at mainbus0 addr 0x1f000000
gt0 at mainbus0 addr 0x14000000
pci0 at gt0
pci0: i/o space, memory space enabled, rd/line, wr/inv ok
pchb0 at pci0 dev 0 function 0: Galileo GT-64111 System Controller, rev 1
tlp0 at pci0 dev 7 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at level 1
tlp0: Ethernet address 00:10:e0:
lxtphy0 at tlp0 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 9 function 0
pcib0: VIA Technologies VT82C586 PCI-ISA Bridge, rev 39
viaide0 at pci0 dev 9 function 1
viaide0: VIA Technologies VT82C586 (Apollo VP) ATA33 controller
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at irq 14
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel interrupting at irq 15
atabus1 at viaide0 channel 1
uhci0 at pci0 dev 9 function 2: VIA Technologies VT83C572 USB Controller (rev. 0x02)
uhci0: can't map i/o space
ohci0 at pci0 dev 10 function 0: Acer Labs M5237 USB 1.1 Host Controller (rev. 0x03)
ohci0: interrupting at irq 9
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Acer Labs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ohci1 at pci0 dev 10 function 1: Acer Labs M5237 USB 1.1 Host Controller (rev. 0x03)
ohci1: interrupting at irq 9
ohci1: OHCI version 1.0, legacy support
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: Acer Labs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ohci2 at pci0 dev 10 function 2: Acer Labs M5237 USB 1.1 Host Controller (rev. 0x03)
ohci2: interrupting at irq 9
ohci2: OHCI version 1.0, legacy support
usb2 at ohci2: USB revision 1.0
uhub2 at usb2
uhub2: Acer Labs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 10 function 3: Acer Labs M5239 USB 2.0 Host Controller (rev. 0x01)
ehci0: interrupting at irq 9
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: ohci0 ohci1 ohci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: Acer Labs EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
fwohci0 at pci0 dev 10 function 4: Acer Labs product 0x5253 (rev. 0x00)
fwohci0: interrupting at irq 9
fwohci0: OHCI version 1.10 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:90:e6:39:00:00:06:09
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
tlp1 at pci0 dev 12 function 0: DECchip 21143 Ethernet, pass 4.1
tlp1: interrupting at level 2
tlp1: Ethernet address 00:10:e0:
lxtphy1 at tlp1 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "mips3_cp0_counter" frequency 125000000 Hz quality 100
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
ieee1394if0: bus manager 0 (me)
Kernelized RAIDframe activated
uplcom0 at uhub0 port 2
uplcom0: Prolific Technology Inc. USB-Serial Controller, rev 1.10/3.00, addr 2
ucom0 at uplcom0
wd0 at atabus0 drive 0: 
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 78532 MB, 159557 cyl, 16 head, 63 sec, 512 bytes/sect x 160834367 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs



--- sys/arch/cobalt/pci/pci_machdep.c.orig	2008-08-31 19:55:10.000000000 +0100
+++ sys/arch/cobalt/pci/pci_machdep.c	2008-08-31 19:56:56.000000000 +0100
@@ -160,6 +160,8 @@
 		*ihp = 16 + 1;
 	else if (bus == 0 && dev == 12 && pin == PCI_INTERRUPT_PIN_A)
 		*ihp = 16 + 2;
+	else if (bus == 0 && dev == 10 && line == 0)
+		*ihp = 9;
 	else
 		*ihp = line;
 

--- sys/arch/cobalt/cobalt/machdep.c.bak	2008-08-31 19:27:51.000000000 +0100
+++ sys/arch/cobalt/cobalt/machdep.c	2008-08-31 19:54:49.000000000 +0100
@@ -66,6 +66,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -519,8 +520,8 @@
 
 	ih = &icu_intrtab[irq];
 	if (ih->ih_func != NULL) {
-		printf("%s: irq %d is already in use¥n", __func__, irq);
-		return NULL;
+		ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT);
+		LIST_INSERT_AFTER(&icu_intrtab[irq], ih, ih_q);
 	}
 
 	ih->ih_cookie_type = COBALT_COOKIE_TYPE_ICU;
@@ -599,11 +600,12 @@
 
 	handled = 0;
 
+poll:
 	/* check requested irq */
 	ICU1_WRITE(PIC_OCW3, OCW3_SELECT | OCW3_POLL);
 	irq = ICU1_READ(PIC_OCW3);
 	if ((irq & OCW3_POLL_PENDING) == 0)
-		goto out;
+		return handled;	
 
 	irq = OCW3_POLL_IRQ(irq);
 	if (irq == IRQ_SLAVE) {
@@ -611,12 +613,14 @@
 		irq = OCW3_POLL_IRQ(ICU2_READ(PIC_OCW3)) + 8;
 	}
 
-	ih = &icu_intrtab[irq];
-	if (__predict_false(ih->ih_func == NULL)) {
-		printf("icu_intr(): spurious interrupt (irq = %d)¥n", irq);
-	} else if (__predict_true((*ih->ih_func)(ih->ih_arg))) {
-		ih->ih_evcnt.ev_count++;
-		handled = 1;
+	for (ih = &icu_intrtab[irq]; ih != NULL; ih = LIST_NEXT(ih, ih_q)) {
+		if (__predict_false(ih->ih_func == NULL))
+			printf("icu_intr(): spurious interrupt (irq = %d)¥n",
+			    irq);
+		else if (__predict_true((*ih->ih_func)(ih->ih_arg))) {
+			ih->ih_evcnt.ev_count++;
+			handled = 1;
+		}
 	}
 
 	/* issue EOI to ack */
@@ -627,8 +631,8 @@
 	}
 	ICU1_WRITE(PIC_OCW2, OCW2_SELECT | OCW2_SL | OCW2_EOI | OCW2_ILS(irq));
 
- out:
-	return handled;
+	goto poll;
+	/* NOTREACHED */
 }
 
 void *

--- sys/arch/cobalt/conf/GENERIC.orig	2007-06-05 21:50:03.000000000 +0100
+++ sys/arch/cobalt/conf/GENERIC	2008-08-31 21:11:36.000000000 +0100
@@ -374,3 +374,130 @@
 #options VERIFIED_EXEC_FP_SHA512
 #options VERIFIED_EXEC_FP_SHA1
 #options VERIFIED_EXEC_FP_MD5
+
+# PCI USB controllers
+ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
+ohci*	at pci?	dev ? function ?	# Open Host Controller
+uhci*	at pci?	dev ? function ?	# Universal Host Controller (Intel)
+
+# USB bus support
+usb*	at ehci?
+usb*	at ohci?
+usb*	at uhci?
+
+# USB Hubs
+uhub*	at usb?
+uhub*	at uhub? port ?
+
+# USB HID device
+uhidev*	at uhub? port ? configuration ? interface ?
+
+# USB serial adapter
+ucycom*	at uhidev? reportid ?
+
+# USB Generic HID devices
+uhid*	at uhidev? reportid ?
+
+# USB Printer
+ulpt*	at uhub? port ? configuration ? interface ?
+
+# USB Modem
+umodem*	at uhub? port ? configuration ?
+ucom*	at umodem?
+
+# USB Mass Storage
+umass*	at uhub? port ? configuration ? interface ?
+wd*	at umass?
+
+# USB IrDA
+# USB-IrDA bridge spec
+uirda* at uhub? port ? configuration ? interface ?
+irframe* at uirda?
+
+# SigmaTel STIr4200 USB/IrDA Bridge
+ustir* at uhub? port ?
+irframe* at ustir?
+
+# USB Ethernet adapters
+aue*	at uhub? port ?		# ADMtek AN986 Pegasus based adapters
+axe*	at uhub? port ?		# ASIX AX88172 based adapters
+cdce*	at uhub? port ?		# CDC, Ethernet Networking Control Model
+cue*	at uhub? port ?		# CATC USB-EL1201A based adapters
+kue*	at uhub? port ?		# Kawasaki LSI KL5KUSB101B based adapters
+udav*	at uhub? port ?		# Davicom DM9601 based adapters
+url*	at uhub? port ?		# Realtek RTL8150L based adapters
+
+# USB 802.11 adapters
+atu*	at uhub? port ?		# Atmel AT76C50XX based adapters
+ral*	at uhub? port ?		# Ralink Technology RT25x0 802.11a/b/g
+rum*	at uhub? port ?		# Ralink Technology RT2501/RT2601 802.11a/b/g
+
+# Prolific PL2301/PL2302 host-to-host adapter
+upl*	at uhub? port ?
+
+# Serial adapters
+ubsa*	at uhub? port ?		# Belkin serial adapter
+ucom*	at ubsa? portno ?
+
+uftdi*	at uhub? port ?		# FTDI FT8U100AX serial adapter
+ucom*	at uftdi? portno ?
+
+uipaq*	at uhub? port ?		# iPAQ PDAs
+ucom*	at uipaq? portno ?
+
+umct*	at uhub? port ?		# MCT USB-RS232 serial adapter
+ucom*	at umct? portno ?
+
+uplcom* at uhub? port ? 	# I/O DATA USB-RSAQ2 serial adapter
+ucom*	at uplcom? portno ?
+
+uslsa*	at uhub? port ?		# Silicon Labs USB-RS232 serial adapter
+ucom*	at uslsa? portno ?
+
+uvscom* at uhub? port ? 	# SUNTAC Slipper U VS-10U serial adapter
+ucom*	at uvscom? portno ?
+
+# Diamond Multimedia Rio 500
+urio*	at uhub? port ?
+
+# USB Handspring Visor
+uvisor*	at uhub? port ?
+ucom*	at uvisor?
+
+# Kyocera AIR-EDGE PHONE
+ukyopon* at uhub? port ?
+ucom*	at ukyopon? portno ?
+
+# USB scanners
+uscanner* at uhub? port ?
+
+# USB scanners that use SCSI emulation, e.g., HP5300
+usscanner* at uhub? port ?
+
+# Topfield TF5000PVR range of DVB recorders
+utoppy*	at uhub? port ?
+
+# Y@P firmware loader
+uyap* at uhub? port ?
+
+# D-Link DSB-R100 USB radio
+udsbr*	at uhub? port ?
+radio*	at udsbr?
+
+# USB Generic driver
+ugen*	at uhub? port ?
+# On ugen bulk endpoints, perform read-ahead and write-behind.
+options UGEN_BULK_RA_WB
+
+# USB generic serial port (e.g., data over cellular)
+ugensa*	at uhub? port ?
+ucom*	at ugensa?
+
+# PCI IEEE1394 controllers
+fwohci*	at pci? dev ? function ?	# IEEE1394 Open Host Controller
+
+ieee1394if* at fwohci?
+fwip*	at ieee1394if?			# IP over IEEE1394
+sbp*	at ieee1394if? euihi ? euilo ?	# SCSI over IEEE1394
+
+

--- sys/arch/cobalt/conf/majors.cobalt.bak	2008-08-31 19:19:25.000000000 +0100
+++ sys/arch/cobalt/conf/majors.cobalt	2008-08-31 19:27:06.000000000 +0100
@@ -41,6 +41,15 @@
 device-major	cgd		char 35  block 11	cgd
 device-major	panel		char 36			panel
 device-major	ksyms		char 37			ksyms
+device-major   pci             char 38                 pci
+#device-major  zstty           char 39                 zstty
+device-major   usb             char 40                 usb
+device-major   uhid            char 41                 uhid
+device-major   ulpt            char 42                 ulpt
+device-major   ugen            char 43                 ugen
+device-major   ucom            char 44                 ucom
+device-major   urio            char 45                 urio
+device-major   uscanner        char 46                 uscanner
 device-major	altq		char 77			altq
 
 device-major	nsmb		char 98			nsmb

_________________________________________________________________
Get all your favourite content with the slick new MSN Toolbar - FREE
http://clk.atdmt.com/UKM/go/111354027/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.