Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 1999 20:04:05 -0500 (EST)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        msmith@freebsd.org (Mike Smith)
Cc:        hackers@freebsd.org
Subject:   Re: USB ethernet hacking
Message-ID:  <199912200104.UAA04092@skynet.ctr.columbia.edu>
In-Reply-To: <199912200034.QAA03909@mass.cdrom.com> from "Mike Smith" at Dec 19, 99 04:34:37 pm

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912200104.UAA04092>