From owner-freebsd-hackers Sun Dec 19 17: 5:35 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.cdrom.com (castles501.castles.com [208.214.165.65]) by hub.freebsd.org (Postfix) with ESMTP id 1482814C04 for ; Sun, 19 Dec 1999 17:05:33 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id RAA04120; Sun, 19 Dec 1999 17:09:05 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <199912200109.RAA04120@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Bill Paul Cc: hackers@freebsd.org Subject: Re: USB ethernet hacking In-reply-to: Your message of "Sun, 19 Dec 1999 20:04:05 EST." <199912200104.UAA04092@skynet.ctr.columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Dec 1999 17:09:05 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > 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? Build and queue the request, and have the callback handle completion. Use a state machine, or just fragment your code along the async boundaries. > 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. I wonder if it's a limit on the payload size in a USB frame. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message