summaryrefslogtreecommitdiffstats
path: root/sys/dev/xe/if_xe.c
Commit message (Collapse)AuthorAgeFilesLines
* o break newbus api: add a new argument of type driver_filter_t topiso2007-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@
* o Fix printf(9) formatting: do not use hardcode "0x" and "#" flagsmaxim2006-04-151-1/+1
| | | | | | | | simultaneously. Remove "#' flag to match a style of the rest of file. PR: kern/85477 Submitted by: Oliver Fromme
* - Store pointer to the link-level address right in "struct ifnet"ru2005-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.
* Catch up with IFP2ENADDR() type change (array -> pointer).ru2005-11-111-1/+1
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-15/+15
| | | | | | | | | | | | | | 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
* Other changes to this driver preclude its use on 4.x, so remove 4.x compatimp2005-08-071-4/+0
| | | | code elsewhere in the driver.
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-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
* Fix a couple of leaking situations when errors happen.imp2005-07-151-0/+2
|
* Stop using OLDCARD shims. rename xe_pccard_match to xe_pccard_probeimp2005-07-131-9/+4
| | | | | | | | | | 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.
* Remove a duplicate assignment.brooks2005-06-141-1/+1
| | | | | Reported by: delphij Approved by: re (ifnet blanket)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-7/+10
| | | | | | | | | | | | | | | | | | | | 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
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Since if_xe doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-141-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* Replace convoluted and broken CRC calcuation with ether_crc32_le().naddy2004-06-091-41/+6
| | | | This should fix multicast reception.
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Remove improper use of if_addrhead in device drivers to checkluigi2004-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.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-1/+0
|
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-4/+4
| | | | Requested by: bde,imp
* Try to create some sort of consistency in how the routings to find theobrien2003-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).
* Disable the (currently unused) xe_reg_dump() function, until I know forrsm2003-11-061-1/+9
| | | | | | sure that it's not needed any more. Reviewed by: imp (mentor)
* Make xe_reg_dump non-static to avoid warnings (and tinerbox mail)imp2003-11-051-2/+2
| | | | for now.
* Convert XE_DEBUG define to hw.xe.debug sysctl, to set debug logging levelrsm2003-11-041-175/+91
| | | | | | | | 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)
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-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)
* There is no way to enter the attach routine twice with the same softcbrooks2003-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.
* Major update to xe driver:rsm2003-10-141-550/+697
| | | | | | | | | | | | | | | | | - 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
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Remove unused variable(s).phk2003-05-311-6/+2
| | | | | | Put XXX comment where intent is unclear. Found by: FlexeLint
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* The Xircom hardware always delivers received packets with the FCS appended.joerg2003-01-291-0/+2
| | | | | Thus, mark the M_HASFCS flag so the generic ethernet layers will account for this.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* When reading PHY regs over the i2c bus, the turnaround ACK bitmbr2003-01-101-1/+1
| | | | | | | | | | is read one clock edge too late. This bit is driven low by slave (as any other input data bits from slave) when the clock is LOW. The current code did read the bit after the clock was driven high again. Reviewed by: luoqi MFC after: 2 weeks
* network interface driver changes:sam2002-11-141-17/+5
| | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re
* Use if_printf(ifp, "foo") instead of printf("xe%d: foo", ifp->it_unit).brooks2002-10-011-2/+2
|
* Remove an unused variable.imp2002-02-261-1/+0
|
* Update xe driver to probe and attach in a NEWCARD kernel.shiba2002-02-201-310/+3
| | | | | | | And separate probe and attach routine for PC Card from if_xe.c to if_xe_pccard.c. Reviewed by: imp
* Add some seat belts. If we set the error rc, then return it and don'timp2001-08-291-1/+3
| | | | | | pretend things succeeded. This can happen if the address returned form bus_alloc_resource for the cis memory is occupied by some of thing.
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-4/+4
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-4/+4
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Tag unused functions with __unused.jhb2001-01-231-2/+2
|
* select() DKI is now in <sys/selinfo.h>.wollman2001-01-091-1/+0
|
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-9/+2
| | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
* Remove the XE_DEBUG define. It shouldn't be defined now that thingsimp2000-07-101-2/+3
| | | | | | | are working. Add a small blurb about XE_DEBUG as it might be useful to some people troubelshooting problems in the future. Submitted by: "Kevin Oberman" <oberman@es.net>
* Add support for the modem side of the 56k combo card.imp2000-05-301-77/+77
| | | | Submitted by: Duncan Barclay <dmlb@ragnet.demon.co.uk>
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-23/+1
| | | | | | | | | | | | | | | 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
* Now that I've got reports that this works, let's turn the debugging off.imp2000-05-011-4/+0
| | | | | | MIHIRA-san pointed out that debugging is rather big for tcpdump... Submitted by: sanpei@sanpei.org (MIHIRA Yoshiro)
* Return 0 from attach.imp2000-04-291-1/+1
| | | | Submitted by: mihira-san <sanpei@sanpei.org>
* First cut at adding CIS reading to xe driver. I don't have a cardimp2000-04-251-6/+13
| | | | | | that seems to be working (I have a MF card that has a 336 modem and ethernet that the probe routine finds, but the attach fails on because pccardd doesn't do what you'd like with MF cards all the time).
* o Preliminary support for mapping the CIS by the driver.imp2000-04-201-4/+6
| | | | | | | | o Modify xe driver to use this. There's still some issues with this code, so xe can't map the cis just yet. I'm thinking about how to resolve the issue. pccard_nbk's pccard_alloc_resource is getting in the way.
OpenPOWER on IntegriCloud