aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/xe
Commit message (Collapse)AuthorAgeFilesLines
* Style(9) xe(4). The MD5 sums are different, but comparing the dissassembliesJohn Baldwin2008-06-043-1566/+1621
| | | | | | | the only changes are from gcc moving some global variables around slightly. Notes: svn path=/head/; revision=179551
* Gah, always reset the timer for the watchdog check.John Baldwin2008-06-041-1/+1
| | | | Notes: svn path=/head/; revision=179548
* - Split the interrupt handler up into separate subroutines for rx, tx, andJohn Baldwin2008-06-042-61/+79
| | | | | | | | | | MAC events. - Use bus_*() rather than bus_space_*() and remove the bus space tag and handle from the softc. - Retire unused macros for examining CIS tuples. Notes: svn path=/head/; revision=179543
* - Change the watchdog timer logic to match other drivers that use their ownJohn Baldwin2008-06-032-10/+17
| | | | | | | | | | timer by keeping a once-a-second timer running that decrements a counter similar to if_timer and reset the chip if it gets down to zero via the decrement. - Use IFQ_SET_MAXLEN(). Notes: svn path=/head/; revision=179527
* Add locking and make xe(4) MPSAFE:John Baldwin2008-06-023-73/+104
| | | | | | | | | | | | | | - Add a mutex to protect the softc and device hardware. - Use a callout rather than a callout_handle for the media timer. - Use a dedicated timer for managing the tx watchdog rather than if_timer. - Fix some resource leaks if xe_attach() fails. - Shutdown the device before detaching the driver. - Setup the interrupt handler after ether_ifattach(). Tested by: Ian FREISLICH ianf of clue.co.za Notes: svn path=/head/; revision=179492
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-2/+2
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* o Fix printf(9) formatting: do not use hardcode "0x" and "#" flagsMaxim Konovalov2006-04-151-1/+1
| | | | | | | | | | | simultaneously. Remove "#' flag to match a style of the rest of file. PR: kern/85477 Submitted by: Oliver Fromme Notes: svn path=/head/; revision=157772
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-111-2/+2
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Catch up with IFP2ENADDR() type change (array -> pointer).Ruslan Ermilov2005-11-111-1/+1
| | | | Notes: svn path=/head/; revision=152311
* Fix a nasty typo. Change:Pawel Jakub Dawidek2005-10-061-1/+1
| | | | | | | | | | | | | | | if (foo); bar(); to: if (foo) bar(); Really, really nasty bug and a very nice catch of mine. Unfortunately, I'll not become a hero of the day, because the code is commented out. Notes: svn path=/head/; revision=150989
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weWarner Losh2005-09-191-1/+1
| | | | | | | | | | could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call. Notes: svn path=/head/; revision=150306
* MFp4:Warner Losh2005-09-131-37/+13
| | | | | | | | | o Use pccard_cis_scan o use pccard_attr_write_1 o Update comments Notes: svn path=/head/; revision=150109
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-092-16/+16
| | | | | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days Notes: svn path=/head/; revision=148887
* Other changes to this driver preclude its use on 4.x, so remove 4.x compatWarner Losh2005-08-071-4/+0
| | | | | | | code elsewhere in the driver. Notes: svn path=/head/; revision=148838
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-08-031-0/+2
| | | | | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week Notes: svn path=/head/; revision=148654
* Use the new cis scanning code to look for the proper MAC address. TheWarner Losh2005-07-151-74/+44
| | | | | | | | | | offset varies between models of these cards. # this gets the MAC address right for my CEM-2, but it doesn't detect # the media attached correctly. Notes: svn path=/head/; revision=148031
* Fix a couple of leaking situations when errors happen.Warner Losh2005-07-151-0/+2
| | | | Notes: svn path=/head/; revision=148030
* Fix the xircom match routine. In it we were always return a matchWarner Losh2005-07-151-0/+3
| | | | | | | | when the base vendor/id didn't match. Some cards woudl bogusly match and would cause other downstream problems. Notes: svn path=/head/; revision=148029
* Stop using OLDCARD shims. rename xe_pccard_match to xe_pccard_probeWarner Losh2005-07-132-100/+61
| | | | | | | | | | | | | and combine the old xe_pccard_{probe,attach} into one routine _attach. Create a lookup function to lookup items in the table. Eliminate the check for network cards, since many modems were eliminated by it. Tweak a few printfs as well. This gets many of my older cards working again CEM2, CEM28, CEM36, etc. Notes: svn path=/head/; revision=147961
* Add a boatload of new device ids, gleaned from the pcmcia-cs-3.2.8Warner Losh2005-07-101-1/+2
| | | | | | | | | | distribution. Add the appropriate devices to the man pages. Obtained from: pcmcia-cs Approved by: re (scottl) Notes: svn path=/head/; revision=147872
* Eliminate unused argument in PCMCIA_CARD macro.Warner Losh2005-06-241-20/+20
| | | | | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite) Notes: svn path=/head/; revision=147580
* Remove a duplicate assignment.Brooks Davis2005-06-141-1/+1
| | | | | | | | Reported by: delphij Approved by: re (ifnet blanket) Notes: svn path=/head/; revision=147382
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-103-15/+19
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=147256
* u_intXX_t -> uintXX_tWarner Losh2005-01-201-9/+9
| | | | | | | Fix a comment Notes: svn path=/head/; revision=140521
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-062-2/+2
| | | | Notes: svn path=/head/; revision=139749
* Since if_xe doesn't contain locking or run with INTR_MPSAFE, markRobert Watson2004-08-141-1/+2
| | | | | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Notes: svn path=/head/; revision=133703
* MFp4:Warner Losh2004-06-271-1/+13
| | | | | | | | | | | Add Intel Pro100Lan56 card. Also integrate changes from Carlos Velasco. Only attch if we're a network device (to filter out the serial devices). Also, increment vpmatch if we match to conform to the pccard match function api. Notes: svn path=/head/; revision=131193
* Replace convoluted and broken CRC calcuation with ether_crc32_le().Christian Weisgerber2004-06-091-41/+6
| | | | | | | This should fix multicast reception. Notes: svn path=/head/; revision=130255
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewWarner Losh2004-05-271-5/+4
| | | | | | | | | redundant includes and fix some of the include disordering. Submitted by: bde Notes: svn path=/head/; revision=129764
* Move to generating pccarddevs.h on the fly, both for the kernel andWarner Losh2004-05-261-1/+1
| | | | | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment. Notes: svn path=/head/; revision=129740
* We don't need to initialize if_output, ether_ifattach() does itMaxime Henrion2004-05-231-1/+0
| | | | | | | for us. Notes: svn path=/head/; revision=129616
* Remove improper use of if_addrhead in device drivers to checkLuigi Rizzo2004-04-151-2/+0
| | | | | | | | | | | | | | | if the link-level address has been initialized already. The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers. This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part. Notes: svn path=/head/; revision=128293
* Stop xe claiming ownership of every card passed to xe_pccard_match.Scott Mitchell2004-04-111-1/+1
| | | | | | | | | Found by: Pete Carss <itinerant at mac dot com> Reviewed by: imp (mentor) Pointy hat to: rsm Notes: svn path=/head/; revision=128123
* Band-aid fix to extract MAC address from some CEM2/CEM28 cards with brokenScott Mitchell2004-04-091-0/+93
| | | | | | | | | CIS. Really needs a better interface to the CIS in pccard driver. Reviewed by: imp (mentor) Notes: svn path=/head/; revision=128070
* Fix probe routine to use card IDs from pccarddevs for NEWCARD and OLDCARD.Scott Mitchell2004-04-092-147/+99
| | | | | | | | | Should now correctly probe and attach all supported cards in either mode. Reviewed by: imp (mentor) Notes: svn path=/head/; revision=128068
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-2/+2
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd2004-03-141-1/+0
| | | | Notes: svn path=/head/; revision=126966
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.David E. O'Brien2003-12-081-4/+4
| | | | | | | Requested by: bde,imp Notes: svn path=/head/; revision=123289
* Try to create some sort of consistency in how the routings to find theDavid E. O'Brien2003-11-131-27/+28
| | | | | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument). Notes: svn path=/head/; revision=122625
* Disable the (currently unused) xe_reg_dump() function, until I know forScott Mitchell2003-11-061-1/+9
| | | | | | | | | sure that it's not needed any more. Reviewed by: imp (mentor) Notes: svn path=/head/; revision=122170
* Make xe_reg_dump non-static to avoid warnings (and tinerbox mail)Warner Losh2003-11-051-2/+2
| | | | | | | for now. Notes: svn path=/head/; revision=122106
* Convert XE_DEBUG define to hw.xe.debug sysctl, to set debug logging levelScott Mitchell2003-11-042-206/+128
| | | | | | | | | | | from the xe driver. Should probably be removed when current probe/attach problems with the driver are fixed, but is useful now when requesting diagnostic information from users. Reviewed by: imp (mentor) Notes: svn path=/head/; revision=122081
* Constify a few more strings that were hidden behind XE_DEBUG define.Scott Mitchell2003-11-021-14/+8
| | | | | | | | | Remove XE_VENDOR_ID_* defines in favour of PCMCIA_VENDOR_*. Reviewed by: imp (mentor) Notes: svn path=/head/; revision=121916
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-2/+1
| | | | | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname) Notes: svn path=/head/; revision=121816
* There is no way to enter the attach routine twice with the same softcBrooks Davis2003-10-301-16/+14
| | | | | | | | | | without a detach call in between so don't try to deal with that possiability. This is a diff-reduction commit for the upcoming if_xname conversion. Notes: svn path=/head/; revision=121752
* Const poison string accessor functions.Warner Losh2003-10-261-1/+1
| | | | Notes: svn path=/head/; revision=121521
* Major update to xe driver:Scott Mitchell2003-10-144-585/+790
| | | | | | | | | | | | | | | | | | | | - Make multicast work - Fix (some of) the watchdog timeouts after card reset - Add support for CE2, CEM28 and CEM33 cards - General code cleanup Any card that worked previously should still work, as well as a lot that didn't. The driver is not yet style(9) compliant; those changes are forthcoming, once the functional changes are done. PR: kern/50644 Reviewed by: imp Approved by: imp Notes: svn path=/head/; revision=121099
* Use __FBSDID().David E. O'Brien2003-08-242-5/+8
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Add a comment saying it might be ParalonWarner Losh2003-08-211-1/+1
| | | | Notes: svn path=/head/; revision=119237