From owner-freebsd-hackers Sun Dec 19 17: 0: 7 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by hub.freebsd.org (Postfix) with SMTP id A48C715118; Sun, 19 Dec 1999 16:59:58 -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 UAA04092; Sun, 19 Dec 1999 20:04:07 -0500 From: Bill Paul Message-Id: <199912200104.UAA04092@skynet.ctr.columbia.edu> Subject: Re: USB ethernet hacking To: msmith@freebsd.org (Mike Smith) Date: Sun, 19 Dec 1999 20:04:05 -0500 (EST) Cc: hackers@freebsd.org In-Reply-To: <199912200034.QAA03909@mass.cdrom.com> from "Mike Smith" at Dec 19, 99 04:34:37 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 2036 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Of all the gin joints in all the towns in all the world, Mike Smith had to walk into mine and say: > > > why not use the async method? > > > > Because this is not an asynchronous task that I'm trying to do here. > > I'm talking about reading and writing registers from the ethernet > > controller. If this was a PCI device, I'd be using > > bus_space_read_X()/bus_space_write_X() to read the registers directly. I > > don't want to start reading a register and then come back a while later > > to read the results. The code isn't meant to work like that. > > Unfortunately, given that your 'register read request' is being queued > over what is basically a packet-switched network, you're going to have to > change the way the code works so that it _can_ work like that. If you > don't like it now, imagine how much less you're going to like, say, I2O > or SystemIO... I need to be able to read/write registers in the MAC at interrupt context. I'm not trying to be stubborn: there's just no other way to do the things I need to do. If I get a transmit timeout and I need to flip the 'reset MAC' bit in one of the control registers, how am I supposed to do it? When a timeout fires and I have to check the PHY's link state or read the MAC stats counter registers, how am I supposed to do it? The hack that I made to usbdi.c seems to have fixed that problem for now, however I'm still not sure why I can't seem to transfer full 1500 byte frames without getting an I/O error. -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-hackers" in the body of the message