summaryrefslogtreecommitdiffstats
path: root/sys/dev/txp
Commit message (Collapse)AuthorAgeFilesLines
* Update to latest 3Com firmware image. The latest fimware isyongari2009-02-253-4578/+3802
| | | | | | | | | | | | required to make 3CR990 familiy controllers run on NV flash firmware version 03.001.008. The latest firmware added HMAC digest information so teach txp(4) to pass them to sleep image before downloading is started. While I'm here restore previous IMR/IER register if firmware downloading have failed. PR: kern/89876, kern/132047
* Change the functions to ANSI in those cases where it breaks promotionrdivacky2009-02-241-19/+7
| | | | | | | | to int rule. See ISO C Standard: SS6.7.5.3:15. Approved by: kib (mentor) Reviewed by: warner Tested by: silence on -current
* Read MII_ANAR register and get common denominator ability.yongari2007-11-161-1/+6
| | | | PR: 92599
* IEEE 802.3 Annex 28B.3 explicitly specifies the following relativeyongari2007-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | priorities of the technologies supported by 802.3 Selector Field value. 1000BASE-T full duplex 1000BASE-T 100BASE-T2 full duplex 100BASE-TX full duplex 100BASE-T2 100BASE-T4 100BASE-TX 10BASE-T full duplex 10BAST-T However PHY drivers didn't honor the order such that 100BASE-T4 had higher priority than 100BASE-TX full duplex. Fix that long standing bugs such that have PHY drivers choose the highest common denominator ability. Fix a bug in dcphy which inadvertently aceepts 100BASE-T4. PR: 92599
* Nuke duplicated __FBSDID.yongari2007-06-121-4/+0
|
* Add checks for contigmalloc(9) failure.yongari2007-06-121-0/+10
|
* Catch up the rest of the drivers with the ether_vlan_mtap modifications.csjp2007-03-041-1/+1
| | | | | | | | | | If these drivers are setting M_VLANTAG because they are stripping the layer 2 802.1Q headers, then they need to be re-inserting them so any bpf(4) peers can properly decode them. It should be noted that this is compiled tested only. MFC after: 3 weeks
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | 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@
* Move ethernet VLAN tags from mtags to its own mbuf packet header fieldandre2006-09-171-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content. Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field: m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG; to mark the packet m with the specified VLAN tag. On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid: if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... } VLAN tags are stored in host byte order. Byte swapping may be necessary. (Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.) Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done. Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* - Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag inglebius2005-12-181-2/+3
| | | | | | | | | case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL. In collaboration with: yongari, ru, sam
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-6/+6
| | | | | | | | | | 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.
* Remove call to txp_set_filter() from txp_attach(). txp_set_filter() needswpaul2005-10-291-2/+0
| | | | | | | | | | | | | | | the ifp, so you can't call it before doing if_alloc(). Also, there's really no need to call it here anyway: the code I originally ported from OpenBSD incorrectly set the station address only once at device attach time, instead of setting in txp_init(). This meant you couldn't change the address with ifconfig txp0 ether xx:xx:xx:xx:xx:xx. I added the call to txp_set_filter() in txp_init() to correct this, but forgot to remove the call from txp_attach(). Until now, it never mattered. With this fix, the txp driver tests good: txp0: <3Com 3cR990-TX-97 Etherlink with 3XP Processor> port 0xb800-0xb87f mem 0xe6800000-0xe683ffff irq 12 at device 10.0 on pci0 txp0: Ethernet address: 00:01:03:d4:91:4f
* - Add locking and mark MPSAFE. The driver had a mutex in the softc andjhb2005-10-272-62/+86
| | | | | | | | | | | | | | | even initialized it, but it never used it. - Use callout_*() to manage the callout. - Use m_devget() to copy data out of the rx buffers rather than doing it all by hand. - Use m_getcl() to allocate mbuf clusters rather than doing it all by hand. - Don't free the software descriptor for a rx ring entry if we can't allocate an mbuf cluster for it. We left a dangling pointer and never reallocated the entry anyway. OpenBSD's code (from which this was derived) has the same bug. Tested by: NO ONE (despite repeated requests) Reviewed by: wpaul (5)
* - Use PCIR_BAR().jhb2005-10-031-5/+2
| | | | - Remove unused TXP_PCI_INTLINE and TXP_DEVNAME macros.
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-09-191-3/+3
| | | | | | | 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.
* Fixed a diagnostic message.ru2005-09-151-1/+1
|
* - Only call txp_release_resources() once if attach fails.jhb2005-08-311-38/+31
| | | | | | | - Set errno to ENXIO instead of 0 in several attach failure cases. - Setup the interrupt handler at the very end of txp_attach() after ether_ifattach(). - Various whitespace fixes in function prototypes.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-9/+10
| | | | | | | | | | | | | | 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
* 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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-26/+40
| | | | | | | | | | | | | | | | | | | | 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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnimp2005-03-011-1/+1
| | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-063-3/+3
|
* Since if_txp doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Note: mutexes are initialized in the softc for this driver, but the locking appears inadequate to allow Giant-free operation.
* Remove the setting of the pci config variables on power state changes.imp2004-06-281-23/+0
| | | | The bus does this now.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-3/+3
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-3/+0
|
* 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)
* Use __FBSDID().obrien2003-08-241-0/+3
| | | | Also some minor style cleanups.
* All current uses of pci_set_powerstate are bogus, at least in theory.imp2003-07-031-2/+2
| | | | | | | | | | However, they are presently necessary due to bigger bogusness in the pci bus layer not doing the right thing on suspend/resume or on initial device probe. This is exactly the sort of thing that the BURN_BRIDGES option was invented for. Mark all of them as BURN_BRIDGES. As soon as I have the powerstate stuff properly integrated into the pci bus code, I intend to remove all these workarounds.
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-18/+0
| | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+3
| | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
* Use __FBSDID rather than rcsid[].obrien2003-04-031-1/+3
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-6/+6
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-6/+6
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-11-141-28/+12
| | | | | | | | | | | | | | 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
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+2
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Remove __P.alfred2002-03-201-41/+41
|
* Initialize variables before use. This was needed to pass -Werror.jeff2002-03-191-0/+4
| | | | Reviewed by: jake
* Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from thebrooks2001-12-031-1/+1
| | | | | | mbuf instead. Suggested by: fenner
* Have the driver announce what capabilities it supports. These arejlemon2001-09-181-6/+5
| | | | currently not under user control.
* Make vlan(4) loadable, unloadable, and clonable. As a side effect,brooks2001-09-051-17/+4
| | | | | | | interfaces must now always enable VLAN support. Reviewed by: jlemon MFC after: 3 weeks
* Re-order things slightly in the RX handler for VLAN support: we needwpaul2001-07-311-5/+4
| | | | | | | call vlan_input_tag() after stripping the ether header from the frame with m_adj(), not before. Noticed by: Brooks Davis <brooks@one-eyed-alien.net>
* Remember to zero out certain things that we malloc() and/or contigmalloc().wpaul2001-07-271-0/+4
|
* Uncomment a return(ENXIO) that I commented out for debugging purposes.wpaul2001-07-271-3/+3
|
* Turn on __STRICT_ALIGNMENT. We need this to fix up alignment so the alphawpaul2001-07-231-1/+1
| | | | won't trap.
* AIEEE! Commit the firmware image too. *blush*wpaul2001-07-231-0/+5089
|
OpenPOWER on IntegriCloud