summaryrefslogtreecommitdiffstats
path: root/sys/dev/ep/if_epvar.h
Commit message (Collapse)AuthorAgeFilesLines
* Spell destroy in a more traditional wayimp2005-07-191-1/+1
|
* Nitsimp2005-07-131-1/+0
|
* Minor cleanup of ep driver and pccard attachment:imp2005-07-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Grab the MAC address out of the CIS if the card has the special 3Com 0x88 tuple. Most 3Com cards don't have this tuple, but we prefer it to the eeprom since it only appears to be present when the eeprom doesn't have the info. So far, I've only observed this on my 3C362 and 3C362B cards, but the NetBSD driver implies that the 3C362C also has this tuple, and that some 3C574 cards do too (none of mine do). ep_pccard_mac was written after looking at the NetBSD code. o Store the enet addr in the softc for this device, so we can use the overridden MAC to set the station address. o Create a routine to set the station address and use it where we need it. o setup the cmd shitfs and such before we call ep_alloc(), and remove setting up the cmd shift value there. It initializes to 0, and those attachments that need to frob it do so before calling ep_alloc. o Remove some obsolete comments o No longer a need to export ep_get_macaddr, so make it static o ep_alloc already grabs the EEPROM id, so we don't need to grab it again in ep_pccard_attach. o eliminate unit, it isn't needed, fix some printfs to be device_printf instead. # All my pccards except the 3C1 work now. Didn't test ISA or cbus cards # that I have: 3C509B-TP or 3C569B-J-TPO Tested on: 3C589B, 3C589C, 3C589D, 3C589D-TP, 3C562, 3C562B/3C563B, 3C562D/3C563D, 3CCFE574BT, 3CXEM556, 3CCSH572BT, 3C574-TX, 3CCE589EC, 3CXE589EC, 3CCFEM556, 3C1 Approved by: re (scottl)
* o When calling ep_get_macaddr(), provide it a local buffer. Add a commentimp2005-06-261-1/+1
| | | | | | | | | that says why we do this (or rather, explains that it is some voodoo magic that's poorly understood). The local buffer fixes the crash on attach. o Rename get_e() to ep_get_e() to avoid namespace pollution. Submitted by: mux Approved by: re (scottl)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* u_intXX_t -> uintXX_t while I'm here.imp2005-01-201-1/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Minor style nits suggested by sam and mdodd:imp2003-10-251-0/+6
| | | | | | o give an argument to EP_BUSY_WAIT o use foo_locked rather than foo_body o Add locking assertions for extra safety.
* Whole grab-bag of changes:imp2003-10-251-10/+14
| | | | | | | | o Make the driver MPSAFE o Some changes due to diff reduction effort with vx. o Removed some obsolete junk. Reviewed by: sam, modd
* Finish the removal of the bst/bsh confusion.imp2003-10-191-10/+10
|
* Don't confuse tags and handles.imp2003-10-191-2/+2
|
* Transition to using bus_space macros rather than the inb/outb/etc.imp2003-10-181-4/+21
| | | | | | | | | | | | Use EP_{READ,WRITE}{,_MULTI}_{1,2,4} instead. I've had several people submit patches like this over the years of varying qualities, markm being the last. The names were chosen in consulation with mdodd on irc. I've tested this with only PCMCIA cards: 3CCE589EC and 3CCSH572BT. I've not tried with my more extensive ISA, EISA and cbus collection. Reviewed by: mdodd
* Style(9) cleanup. There was no consistent style in this driver, andmarkm2003-07-171-35/+35
| | | | | | | The next round of commits will be to fix up locking in it. This lot is to at least give a consistent base to work off. OK'ed by: imp, mdodd
* - Free interrupt handler in ep_free().mdodd2003-03-291-0/+1
| | | | | - Move ep_pccard_detach() to if_ep.c and rename to ep_detach() - Specify detach methods for all bus frontends.
* - Return error status instead of value in get_e().mdodd2003-03-291-2/+2
| | | | | - Modify ep_get_macaddr() to return an error status. - Reverse the return value logic of eeprom_rdy().
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-1/+0
| | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
* Fix driver to restore function on 3c574 adapters. The panic onmdodd2000-01-151-0/+1
| | | | | | | ifconfig and bogus ethernet address (4b:57:4b:57:4b:57) has been hacked around. I'll revisit this when I have a clue whats going on. Reviewed by: obrien
* HEADS UP! All 3c5x9 users!mdodd1999-10-271-37/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rip out all the static softc stuff and do softc allocation the right way. - Rewrite most of the ISA code so that it provides a DEVICE_IDENTIFY method to enumerate all non-PnP ISA devices. This has the following consequences: - No 'ep' devices may be hardwired. - All hardwired devices will probably be detected twice. By hardwired I mean: device ep0 at isa? port 0x300 irq 10 - 'ep' devices are ordered by bus, slot, and then MAC address. - Make 3c509B cards work in PnP mode. Yes, they really work. - Convert over to using ifmedia for media selection. No more of this lame 'linkX' stuff. - Consolidate a lot of duplicated code. - Make a stab at not breaking MII based PCCARD devices. I doubt that the PCCARD stuff works any more than it did before my changes but theres hope. My PCCARD hardware should arrive in a week or so. - Retreive the media settings from the card EEPROM rather than guessing. I've got a 3c509-TPO that thinks its got an AUI port and if others can report similar problems I'll write a bit of clever code that will fix this but right now it works correctly on all but 1 card. - Clean up a few things and make some cosmetic changes. - Add myself as the MAINTAINER since nobody else wants to. I'm in the best position to do this as I've got an example of most of the cards: EISA 3c579 bnc/aui MCA 3c529 tp/aui ISA 3c509 tpo ISA-PnP 3c509B combo If someone wants to send me a any cards I don't have I'd appriciate it. Also welcome are 3c59x boards since I'll be folding if_vx and if_ep at some point.
* Add newbus attachment for pccard driver. Heavily tested by me, andimp1999-10-251-0/+2
| | | | | | | | | | | I'm committing this from a laptop running this driver. Have only one devclass for all ep devices (at least for pccard and eisa) so unit numbering is sane. Might not work with both isa and non-isa devices on the same system until ep is updated (Matt has some patches in the pipeline which should resolve this, he wanted me to commit this so he can resolve any conflicts against cvs rather than my patches). Reviewed by: Matt Dodd <mdodd@freebsd.org>
* - Split out the ISA and PCCARD specific code.mdodd1999-09-261-0/+78
- Split out the prototypes, externs and struct decls from if_epreg.h into if_epvar.h. - Add support for MCA based Etherlink III (3c529) devices. None of this code is used right now; the old if_ep driver is still in place and used. I will eventually get around to converting if_ep_isa.c to newbus once I've had a talk with Peter and DFR about the DEVICE_IDENTIFY() method. I have tested this code on my PS/2. It works. I would like EISA and ISA testers since my example hardware hasn't arrived yet. Add: dev/ep/if_ep.c optional ep dev/ep/if_ep_isa.c optional ep isa dev/ep/if_ep_eisa.c optional ep eisa dev/ep/if_ep_mca.c optional ep mca dev/ep/if_ep_pccard.c optional ep card to sys/conf/files Remove: i386/eisa/3c5x9.c optional ep i386/isa/if_ep.c optional ep from sys/i386/conf/files.i386 PCCARD testers wanted! I will switch off and cvs rm the old driver in favor of this copy once I've had positive feedback or have the hardware to verify that it works.
OpenPOWER on IntegriCloud