Re: RFI: Ethernet driver ported from Linux

2007-04-21 Thread Alan Garfield
Peter Jeremy wrote: On 2007-Apr-21 03:20:08 +0400, Yar Tikhiy [EMAIL PROTECTED] wrote: components forming the main system (CPU, RAM, bus, etc) it contains an additional small embedded-style computer (seems to be m68k based) PPC actually. And very limited in what they've included in it's

Re: RFI: Ethernet driver ported from Linux

2007-04-21 Thread Alan Garfield
Yar Tikhiy wrote: On Thu, Apr 19, 2007 at 12:34:16PM -0700, Julian Elischer wrote: What is on the other side of this connection? Alan may be busy debugging the driver, so let me answer for him, as he said my notion of the thing was correct. Sun Fire 20z is a Nope sorry not debugging, I

Re: RFI: Ethernet driver ported from Linux

2007-04-19 Thread Alan Garfield
On Thu, 2007-04-19 at 11:56 +0400, Yar Tikhiy wrote: Apart from using fake MAC addresses, I don't think so. I don't understand the concept of a fake MAC address, sorry. The classic Ethernet is a broadcast medium by design, so a very primitive NIC can just receive all traffic and let the

Re: RFI: Ethernet driver ported from Linux

2007-04-18 Thread Alan Garfield
On Wed, 2007-04-18 at 11:44 +0400, Yar Tikhiy wrote: Anyway, back to figuring out arp. UGH! As a rule, an Ethernet driver needn't worry about ARP by itself because ARP has own separate module in the network stack. Does your driver have a partucular reason to? Apart from using fake MAC

Re: RFI: Ethernet driver ported from Linux

2007-04-17 Thread Alan Garfield
On Tue, 2007-04-17 at 21:16 +0400, Yar Tikhiy wrote: In addition to the other advise, you might also look at if_ed.c. It is a little complicated since it talks to real hardware, and that hardware is, ummm, a little icky. That little thing Alan is writing a driver for should be simpler

mbuf and IP frame lengths

2007-04-16 Thread Alan Garfield
Hi all! A question, is it ok to just say pass an entire rx buffer of your ethernet device up the chain and let the ip stack figure out the frame size. I have a device that can only ever receive 255 bytes of data, I receive this data from a buffer in the PRS. On an interrupt I read this data out

Resources and ACPI

2007-04-11 Thread Alan Garfield
Hi all, When you have say :- static int jnet_probe(device_t dev) { static char *jnet_ids[] = { NWS8001, NULL };

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
[EMAIL PROTECTED] wrote: If the resources are allocated how do I access/see them? sc-sc_rid1 = 0; sc-sc_res1 = bus_alloc_resource_any(self, SYS_RES_IOPORT, sc-sc_rid, RF_ACTIVE); sc-sc_rid2 = 0; sc-sc_res2 = bus_alloc_resource_any(self, SYS_RES_IOPORT, sc-sc_rid, RF_ACTIVE);

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
[EMAIL PROTECTED] wrote: and when the device is kldload'ed you get :- jnet0: JNet Ethernet System Interface port 0xa8,0xae-0xaf irq 19 on acpi0 are these resources automagically allocated for me? Or do I have to allocate them myself? You have to allocate the resource. Ok cool,

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
On Wed, 2007-04-11 at 09:02 -0500, Craig Boston wrote: This means that your driver will work regardless if the resources are specified by ACPI, or if in the future if some mad scientist attaches the hardware to the PCI bus on a SPARC64 instead (with only minimal driver changes). Ok now I'm

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
On Wed, 2007-04-11 at 10:37 -0500, Craig Boston wrote: Ok, well just for the record it's been a while since I've worked with busdma so my knowledge is more of a high level overview. Hopefully if I get anything wrong someone will step in and correct me. :) You da man! jnet0: JNet

Re: Resources and ACPI

2007-04-11 Thread Alan Garfield
On Wed, 2007-04-11 at 11:40 -0500, Craig Boston wrote: Looking back at the thread I see that you're porting a Linux driver, that explains a lot of the confusion. It's been a while since I've worked with the Linux kernel in depth, but I seem to remember that a lot of drivers (especially

Re: Finding an IRQ mapping in APIC

2007-04-10 Thread Alan Garfield
On Tue, 2007-04-10 at 15:30 +1000, Alan Garfield wrote: On Tue, 2007-04-10 at 12:20 +1000, Alan Garfield wrote: Hello all! I'm wondering if someone can point me in the direction of a solution to my little problem. I've been porting a Linux driver across to FreeBSD and I've come

Finding an IRQ mapping in APIC

2007-04-09 Thread Alan Garfield
Hello all! I'm wondering if someone can point me in the direction of a solution to my little problem. I've been porting a Linux driver across to FreeBSD and I've come against this lovely little hack in it's code. I've tried to bus_alloc_resource() the IOAPIC_DEFAULT_ADDR and IOAPIC_WINDOW but I

Re: Finding an IRQ mapping in APIC

2007-04-09 Thread Alan Garfield
On Tue, 2007-04-10 at 12:20 +1000, Alan Garfield wrote: Hello all! I'm wondering if someone can point me in the direction of a solution to my little problem. I've been porting a Linux driver across to FreeBSD and I've come against this lovely little hack in it's code. I've tried

RFI: Ethernet driver ported from Linux

2007-04-08 Thread Alan Garfield
simple. Any help would be gratefully appreciated. Many thanks, Alan Garfield. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]