summaryrefslogtreecommitdiffstats
path: root/sys/dev/ti
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the Tigon I/II driver to support 64-bit DMA. In the process, convert itscottl2005-12-142-99/+347
| | | | | | | | | | | | | | | | | | | | to use busdma. Unlike most of the other drivers, but similar to the if_em driver, pre-allocate the dmamaps at init time instead of allocating them on the fly when descriptors need to be filled. This isn't ideal right now because a map is allocated for every descriptor slot in the tx, rx, mini, and jumbo rings (which is a lot!) in order to simplify the bookkeeping, even though the driver might support filling only a subset of those slots. Luckily, maps are typically NULL on i386 and amd64, so the cost isn't very high. It could be an issue with sparc64, but the driver isn't endian clean either, and that is a much bigger problem to solve first. Note that jumbo frame support is under-tested, and I'm not even sure if it till really works correctly given the evil VM magic that is does. The changes here attempt to preserve the existing semanitcs. Thanks to Martin Nillson for contributing the Netgear card for this work. MFC-After: 3 weeks
* Allocate the jumbo rx frame buffer with busdma.scottl2005-12-102-15/+28
|
* if_ti has been operating with locks for a while, so remove the GIANT markers.scottl2005-12-101-20/+29
| | | | Also fix man potential locking problems in the cdev ioctl handler.
* The if_ti Tigon I/II driver has moved to /sys/dev/tiscottl2005-12-101-3/+3
|
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-1/+1
| | | | | | | | | | 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.
* In detach method, move if_free() after bus_teardown_intr().ru2005-10-131-2/+2
|
* Use if_printf() and device_printf().jhb2005-09-291-90/+92
|
* Typo.jhb2005-09-291-1/+1
|
* Fix "struct ifnet" leaks when attach() fails in the middle, e.g.ru2005-09-161-2/+2
| | | | | | when mii_phy_probe() or bus_setup_intr() fails. For drivers that call their detach() in this case, call if_free() there to cover this case too.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-13/+14
| | | | | | | | | | | | | | 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
* Fix ifnet fallout in if_ti.scottl2005-07-071-8/+7
| | | | | Reviewed by: brooks Approved by: re
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-29/+37
| | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* If resource allocation fails, we could wind up freeing the cdev without itscottl2005-03-311-1/+2
| | | | | | being allocated. Add a simple check for this. Submitted by: yongari
* deal with malloc failure when setting up the multicast filtersam2005-03-261-0/+4
| | | | Noticed by: Coverity Prevent analysis tool
* Start the process of modernizing the Tigon driver by using busdma for thescottl2005-03-212-21/+92
| | | | | descriptor and configuration data. Thanks to Martin Nilsson for providing hardware.
* Fix style(9) issues with __P removal.imp2005-02-241-59/+55
| | | | Noticed by: bde
* Return BUS_PROBE_DEFAULT instead of 0.imp2005-02-241-1/+1
|
* /* -> /*- for license, minor formatting changesimp2005-01-072-2/+2
|
* Update the Tigon 1 and 2 driver to use the sf_buf API for implementingalc2004-12-061-15/+23
| | | | | | | | | | | | zero-copy receive of jumbo frames. This eliminates the need for the jumbo frame allocator implemented in kern/uipc_jumbo.c and sys/jumbo.h. Remove it. Note: Zero-copy receive of jumbo frames did not work without these changes; I believe there was insufficient locking on the jumbo vm object. Tested by: ken@ Discussed with: gallatin@
* Tag a last set of PCI network interfaces as IFF_NEEDSGIANT until theyrwatson2004-08-281-1/+2
| | | | are either locked down or demonstrated MPSAFE.
* Whitespace pass.bms2004-07-051-40/+39
|
* style(9):bms2004-07-051-75/+75
| | | | | - Space before bracketized non-void function returns. - Space before condition for conditional blocks.
* Eliminate redundant return keywords.bms2004-07-051-48/+0
|
* Whitespace nitsbms2004-07-051-23/+23
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-4/+4
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* 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-6/+0
|
* Stop setting ifp->if_output to ether_output() since ether_ifattach()mux2004-03-111-1/+0
| | | | does it for us already.
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-211-2/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Drop the driver lock around calls to if_input to avoid a LOR whensam2003-11-142-0/+5
| | | | | | | | the packets are immediately returned for sending (e.g. when bridging or packet forwarding). There are more efficient ways to do this but for now use the least intrusive approach. Reviewed by: imp, rwatson
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-3/+2
| | | | | | | | | | | | | 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)
* Sanitize the code relating to the /dev/ti%d entries. In particular evictphk2003-10-101-68/+6
| | | | the evil vnode sniffing code and use destroy_dev() instead.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Enable IFCAP_VLAN_MTU and increase MTU for it.simokawa2003-08-051-2/+3
| | | | Reviewed by: wpaul
* Remove code that tries to detect if the MCLSHIFT and MSIZE macrosmux2003-06-131-46/+0
| | | | | | | are the same that those of the kernel in the KLD_MODULE case. If we ever want to detect that kind of problems, this is not the right place to do this since every network driver would be affected by such desynchronisation.
* Remove now unused pointer to etherheader.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* Use newly minted device_is_attached rather than device_is_alive to seeimp2003-04-211-1/+1
| | | | | | | | | if attach succeeded. device_is_alive just tells us that probe succeeded. Since we were using it to do things like detach net interfaces, this caused problems when there were errors in the attach routine. Symptoms of problem reported by: martin blapp
* Revise attach/detach resource cleanupnjl2003-04-171-5/+13
| | | | | | | | | | | | | | | - Unconditionally call *_stop() if device is in the tree. This is to prevent callouts from happening after the device is gone. Checks for bus_child_present() should be added in the future to keep from touching potentially non-existent hardware in *_detach(). Found by iedowse@. - Always check for and free miibus children, even if the device is not in the tree since some failure cases could have gotten here. - Call ether_ifdetach() in the irq setup failure case - ti(4), xl(4): move ifmedia_init() calls to the beginning of attach so that ifmedia_removeall() can be unconditionally called on detach. There is no way to detect whether ifmedia has been initialized without using a separate variable (as tl(4) does). - Add comments to indicate assumptions of code path
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-9/+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-7/+3
|
* Fix KASSERT syntax error.phk2003-04-011-1/+1
|
* Clean up locking and resource management for pci/if_*njl2003-03-311-50/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove locking of the softc in the attach method, instead depending on bus_setup_intr being at the end of attach (delaying interrupt enable until after ether_ifattach is called) - Call *_detach directly in the error case of attach, depending on checking in detach to only free resources that were allocated. This puts all resource freeing in one place, avoiding thinkos that lead to memory leaks. - Add bus_child_present check to calls to *_stop in the detach method to be sure hw is present before touching its registers. - Remove bzero softc calls since device_t should do this for us. - dc: move interrupt allocation back where it was before. It was unnecessary to move it. This reverts part of 1.88 - rl: move irq allocation before ether_ifattach. Problems might have been caused by allocating the irq after enabling interrupts on the card. - rl: call rl_stop before ether_ifdetach - sf: call sf_stop before ether_ifdetach - sis: add missed free of sis_tag - sis: check errors from tag creation - sis: move dmamem_alloc and dmamap_load to happen at same time as tag creation - sk: remove duplicate initialization of sk_dev - ste: add missed bus_generic_detach - ti: call ti_stop before ether_ifdetach - ti: add missed error setting in ti_rdata alloc failure - vr: add missed error setting in I/O, memory mapping cases - xl: add missed error setting in I/O, memory mapping cases - xl: remove multi-level goto on attach failure - xl: move dmamem_alloc and dmamap_load to happen at same time as tag creation - Calls to free(9) are unconditional because it is valid to call free with a null pointer. Reviewed by: imp, mdodd
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+5
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Spell noread() and nowrite() correctly (ie: not "NULL")phk2003-03-021-2/+2
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-8/+8
| | | | Approved by: trb
OpenPOWER on IntegriCloud