Re: porting a webcam
On Fri, Aug 08, 2003 at 07:56:26AM -0700, Paulo Roberto wrote: > Hello, > > I am about to code my first kmod. I am trying to port an usb camera to > FreeBSD, and since I am new at system development, I hope you don't > mind helping me out. If this is not the correct list I should post, > please point me what list I should post to. > > I got a few questions: > > * Does the 5 series differs too much to from the 4-stable to write a > device driver? I am planning to code for 4.8 (the one I am using now) > and I wonder how hard would it be to port it later to the 5 series. > > * I am reading the developers handbook, is there another good reference > recommended? Any good point of reference for usb/camera > protocols/device drivers? > > * You guys think it is too difficult and I should just give up due to > my lack of experience? And if I manage to code properly, is it too > bureaucratic to get it into the FreeBSD kernel? I wouldn't write a kernel driver for a camera and use ugen(4) instead. The state of ugen is similar in 4.x and 5.x so you don't have to worry about a special version. The most important part is getting informations about the protocol used by your camera. -- B.Walter BWCThttp://www.bwct.de [EMAIL PROTECTED] [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: How to get a device_t
On Sat, Aug 09, 2003 at 01:38:05PM +0200, Bernd Walter wrote: > After adding you patch and some includes (, > ) > > [...] > pci_open(1):mode 1 addr port (0x0cf8) is 0x > pci_open(1a): mode1res=0x8000 (0x8000) > pci_cfgcheck: device 0 [class=06] [hdr=00] is there (id=30001022) > pcibios: BIOS version 2.00 > Doing h0h0magic for AMD Elan sc520 > sysctl machdep.i8254_freq=1189161 returns 0 > Timecounter "ELAN" frequency 833 Hz > > > Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x78363029 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xc029d05b > stack pointer = 0x10:0xc03cdcc4 > frame pointer = 0x10:0xc03cdcd4 > code segment= base 0x0, limit 0xf, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags= interrupt enabled, resume, IOPL = 0 > current process = 0 (swapper) > kernel: type 12 trap, code=0 > Stopped at BUS_ADD_CHILD+0x2b: pushl 0x4(%eax) > db> trace The number of arguments to elanbb_identify was wrong. Now things work better. I will now split it into elanmmcr and elanbb driver and then publish the finished work. -- B.Walter BWCThttp://www.bwct.de [EMAIL PROTECTED] [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BSD make question
Ruslan Ermilov writes: > > > Ah, didn't notice it. Try this: > > .for f in $(LIB) > $(f:.c=.o): $(f) > gcc -DLIB -c $< -o $@ > .endfor Thanks! That works. Drew ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: How to get a device_t
On Fri, Aug 08, 2003 at 04:32:43PM -0400, John Baldwin wrote: > On 08-Aug-2003 Bernd Walter wrote: > > On Fri, Aug 08, 2003 at 03:48:22PM -0400, John Baldwin wrote: > >> On 08-Aug-2003 Bernd Walter wrote: > >> > However - I would still like to know why > >> > device_add_child(nexus, "elanbb", -1); > >> > results in an elanbb instance numer 1 connected to pci0. > >> > And why I don't get any iicbb childs. > >> > >> I would have to see your code changes in order to try to tell you that. > > > > http://www.cosmo-project.de/~bernd/elanbb.diff > > First off, the iicbb driver does not know have an elanbb attachment. > You need a set of driver methods and corresponding > > DRIVER_MODULE(iicbb, elanbb, ...) I really should have known, because I made the same mistake in one of my first versions for ehci and hunted for the usb bus not coming up... > For the iicbb child of elanbb to get a driver that probes it and attaches > to it. OK. > Hmm, what you want to do is not hijack the legacy/pcib identify > routine I think, but add an identify routine to your elanbb driver > and have elanbb live off the nexus (so DRIVER_MODULE(elan, nexus)) > and have its identify routine use pci_cfgreg() to get the devid for > device 0 and if it is the right one call init_AMD_Elan_sc520() and > add it's probe routine. Or rather. I've fixed all this and you can Agreed - it was just the quick and dirty - get it running way. I also might want new files for a new driver as well... > get the changes (whcih should fix bogus elanbb0 and make iicbb0 show > up) at http://www.freebsd.org/~jhb/patches/elan.patch It includes > your patch above but fixes a few things. One other bug I fixed is > that since yout elan was hung off of pci and had an empty probe > routine, any unclaimed PCI device got "claimed" by your elanbb driver, > hence your bogus elanbb0. Note that the version of elanbb in OK - I still don't now the exact bug, but I got an idea. The elanbb part was build with viapm as sample. > elan.patch uses a private identify routine that calls > init_AMD_Elan_sc250(), so it will work both with and without ACPI. Thank you for the work. Well elanbb is the wrong driver for calling init_AMD_Elan_sc250. It is just one of many possible users of elan mmcr extensions. > However, the warning printf about CPU_ELAN won't show up with ACPI. > I left the printf in pci_bus.c for now. A better place to put it would > be in the hostb driver itself. Well, I went ahead and did that too, > so now the warning will show up both for ACPI and non-ACPI systems. :) -- B.Walter BWCThttp://www.bwct.de [EMAIL PROTECTED] [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: panic during nfs operations in 4.8S on Dell 2650
On Thu, 7 Aug 2003, Kip Macy wrote: > Can you get a backtrace? Isn't that what I included at the bottom of my first message? > Not knowing anything at this point, > bumping up the number of mbuf clusters *might* help. Doh. Will try that first. Been a long time since I had a panic :( Cheers. > > > -Kip > > > FYI: I'm not representing NetApp in any official capacity on this, > I just happen to have a vested interest in both OnTap and FreeBSD. > > > > On Thu, 7 Aug 2003, Mark Powell wrote: > > > On Thu, 7 Aug 2003, Mark Powell wrote: > > > We've recently got a couple of Dell Poweredge 2650's with 2x2.8GHz > > > Xeons, 4GB RAM, PERC 3/Di (aac) RAID controller. They are mounting a 700GB > > > fs over NFS from a NetAPP. They are connected to a Cisco 3550-12T gigabit > > > over copper switch. I tried them first on the intel em cards and they > > > panicked and also the internal bge adapters with the same result. > > > Thought everything was fine until I was rsyncing the POP3 mail stores > > > from the old machines onto these. Rsync runs for about an hour or so and > > > get's large. In the 300M-600M region the system will always panic. This > > > happens on both systems, so doesn't seem a hardware fault. > > > > This is a 4.8S kernel and world rebuilt as of today. > > > > -- > > Mark Powell - UNIX System Administrator - The University of Salford > > Information Services Division, Clifford Whitworth Building, > > Salford University, Manchester, M5 4WT, UK. > > Tel: +44 161 295 5936 Fax: +44 161 295 5888 www.pgp.com for PGP key > > ___ > > [EMAIL PROTECTED] mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > > > > > -- Mark Powell - UNIX System Administrator - The University of Salford Information Services Division, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 5936 Fax: +44 161 295 5888 www.pgp.com for PGP key ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"