summaryrefslogtreecommitdiffstats
path: root/sys/dev/dc
Commit message (Collapse)AuthorAgeFilesLines
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-25/+31
| | | | | | | | | | | | | | | | | | | | 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-293-6/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Fix newer Xircom CBE2-100 cards that were reportingimp2005-04-181-13/+14
| | | | | | | | dc0: MII without any PHY! We have to enable the connection to the MII first. Doing so fixes the problem cards without breaking the older, working cards. Bad card provided by: deischen
* Bugger, wiped out a needed comma in the previous commit.scottl2005-03-091-1/+1
|
* The DC driver asks for an alignment of PAGE_SIZE for data buffers, but alsoscottl2005-03-081-3/+3
| | | | | | | | | | asks that each buffer be (2048 * 256) bytes long. I suspect that alignment isn't a real requirement since busdma only recently started honoring it. The size is also bogus. Fix both of these and stop busdma from trying to exhaust the system memory pool with bounce pages. Submitted by: Kevin Oberman MFC After: 7 days
* Fix style(9) issues with __P removal.imp2005-02-241-71/+67
| | | | Noticed by: bde
* Return BUS_PROBE_DEFAULT instead of 0.imp2005-02-241-1/+1
|
* /* -> /*- for license, minor formatting changesimp2005-01-072-2/+2
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Read the MAC address in the EEPROM in the correct byte order. Thismux2004-10-011-4/+4
| | | | | | | | | | is a no-op on little endian architectures, but fixes getting the MAC address for some dc(4) cards on big endian architectures. This is a RELENG_5 candidate. Tested by: gallatin (powerpc), marius (sparc64) First version of the patch written by: gallatin
* Add ALTQ support for dc(4), based upon a mostly-working patch from mlaier.green2004-10-011-15/+21
|
* Conditionalize IFF_NEEDSGIANT, like everything else here, on IS_MPSAFE.green2004-10-011-2/+3
| | | | | The driver doesn't look any less safe without Giant than with, and works with IS_MPSAFE set to 1 here, so others should probably test it as such.
* if_dc includes locking, but that locking is disabled by a #ifdefrwatson2004-08-251-1/+2
| | | | | | | | by default. As such, mark if_dc as IFF_NEEDSGIANT until such time as appropriate locking review and testing can take place, and the locking can be enabled by default. RELENG_5 candidate.
* - Make OF_getetheraddr() honour the "local-mac-address?" system configmarius2004-08-141-1/+1
| | | | | | | | | | | | | | | variable. If set to "true" OF_getetheraddr() will now return the unique MAC address stored in the "local-mac-address" property of the device's OFW node if present and the host address/system default MAC address if the node doesn't doesn't have such a property. If set to "false" the host address will be returned for all devices like before this change. This brings the behaviour of device drivers for NICs with OFW support/ FCode, i.e. dc(4) for on-board DM9102A on Sun machines, gem(4) and hme(4), regarding "local-mac-address?" in line with NetBSD and Solaris. The man pages of the respective drivers will be updated separately to reflect this change. - Remove OF_getetheraddr2() which was used as a stopgap in dc(4). Its functionality is now part of OF_getetheraddr().
* Whitespace nitsbms2004-07-051-6/+6
|
* Remove saved_* from dc_softc. They are now no longer needed.imp2004-06-291-5/+0
| | | | Submitted by: Marius Strobl
* Remove burn bridges code that saved/restored the pci config registersimp2004-06-281-63/+3
| | | | | that are now handled in the pci bus layer. They are no longer necessary.
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-23/+3
|
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Spelling fix in a comment.marius2004-05-291-1/+1
|
* Remove double __FBSDID and move the remaining one into a common place aftermarius2004-05-292-6/+0
| | | | | the license(s) and before the driver comment (the latter only in drivers not having __FBSDID at that location).
* A handler for ioctl(SIOCSIFCAP) should not alter a bit inyar2004-05-231-1/+2
| | | | | | | if_capenable unless the interface driver is actually able to toggle the respective capability on and off. Reviewed by: ru
* Correct the phy_service() routine case MII_TICK to correctly trackandre2004-05-031-1/+1
| | | | | | | | | | the falling edge of a media state change. This is in preparation for media state change notification to the routing socket. No objections by: sam, wpaul, ru, bms Brucification by: bde
* First driver with user-configurable polling(4).ru2004-04-111-1/+13
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-3/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-5/+0
|
* Some integrated Davicom cards in sparc64 boxes have an all zerosmux2004-01-081-0/+18
| | | | | | | | | | MAC address in the EEPROM, and we need to get it from OpenFirmware. This isn't very pretty but time is lacking to do this in a better way this near 5.2-RELEASE. This is a RELENG_5_2 candidate. Original version by: Marius Strobl <marius@alchemy.franken.de> Tested by: Pete Bentley <pete@sorted.org> Reviewed by: jake
* The transmit frame status is stored in the last transmit descriptor for thetruckman2004-01-082-3/+5
| | | | | | | | | | | | | | | | | | | | | frame, not the first. It is probably also not safe to free the mbuf chain as soon as the OWN bit is cleared on the first descriptor since the chip may not be done copying the frame into the transmit FIFO. Revert the part of of busdma conversion (if_dc.c rev 1.115) which changed dc_txeof() to look for the status in the first descriptor and free the mbuf chain when processing the first descriptor for the frame, and revert the matching changes elsewhere in the driver. This part of the busdma change caused the driver to report spurious collisions and output errors, even when running in full-duplex mode. Reverting the mbuf chain handling slightly complicates dc_dma_map_txbuf(), since it is responsible for setting the OWN bits on the descriptors, but does not normally have direct access to the mbuf chain. Tested by: Dejan Lesjak <dejan.lesjak at ijs.si> alpha/<Intel 21143 10/100BaseTX> "Xin LI" <delphij at frontfree.net> i386/<Macronix 98713 10/100BaseTX> Wiktor Niesiobedzki <bsd at w.evip.pl> i386/<3Com OfficeConnect 10/100B> Reviewed by: mux
* Add support for ELECOM/Laneed CardBus FastEtherner Card(LD-CBL/TXA)sanpei2003-12-062-0/+3
| | | | | Submitted by: Masahiro Yamagishi <night@pluto.dti.ne.jp> Approved by: re (scottl)
* Sometimes cardbus attachments don't attach, so while we track downimp2003-11-281-0/+1
| | | | | | | | this problem put these lines back in. While they should be unnecessary, they appear to be sometimes necessary. Reviewed in concept: dfr Approved by: re (scottl@)
* Drop the driver lock around calls to if_input to avoid a LOR whensam2003-11-142-1/+10
| | | | | | | | 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
* Remove duplicate FBSDID's, move others to their right place.obrien2003-11-141-4/+3
|
* reconst poisonimp2003-11-141-10/+10
| | | | re-de u_intXX_t
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-20/+23
| | | | | | | 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).
* Remove explicit cardbus attachments from drivers where this is identicaldfr2003-11-031-1/+0
| | | | | | | to the pci attachment. Cardbus is a derived class of pci so all pci drivers are automatically available for matching against cardbus devices. Reviewed by: imp
* Correct the spelling of m_devget() in the sysctl variable description.ru2003-11-021-1/+1
|
* 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)
* Const poison crc routines (why these aren't centralized, I'm not sure).imp2003-10-231-9/+9
|
* Fix a problem where m_defrag would allocate a new mbuf to replace thesilby2003-10-191-8/+8
| | | | | | | chain passed into dc_encap, which dc_start was unaware of. This caused the old (now invalid) mbuf to be passed to BPF_MTAP. Spotted by: Kenjiro Cho <kjc@csl.sony.co.jp>
* Ignore CSR13, CSR14, CSR15 'Media Specific Data' registersmbr2003-10-052-12/+37
| | | | | | | | | | | | | | | for 21143 based cards which use SIA mode. This fixes 10mbit mode for ZNYX ZX346Q cards and other 21143 based cards. PR: 32118 Submitted by: Rene de Vries <rene@tunix.nl> Geert Jan de Groot <GeertJan.deGroot@tunix.nl> Obtained from: BSDI MFC after: 2 weeks
* Don't read the MAC address from a copy of the EEPROM in the softcmbr2003-09-161-4/+3
| | | | | | | | | | | | | | | that has been recorded earlier and overwrite it again later by reading it directly from the EEPROM again. Read the MAC address from the PAR0/PAR1 registers instead, which are autoloaded on reboot. Tested on AN985, AN983B. According to the datasheets, it should also work for the AL981 (I don't have such a chip on a card at home) PR: 52988 Submitted by: Andrew Gordon <arg-bsd@arg.me.uk> MFC after: 2 weeks
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-2/+2
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* All davicom cards seem to need DC_TX_ALIGN.mbr2003-08-271-2/+1
|
* Make TX on davicom 9102A working again. This chip needsmbr2003-08-241-0/+2
| | | | | | | its mbufs aligned on TX. PR: 53656, 42714 MFC after: 3 days
* Use __FBSDID().obrien2003-08-242-0/+6
| | | | Also some minor style cleanups.
* 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.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-1/+1
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Change instances of callout_init that specify MPSAFE behaviour tosam2003-08-191-1/+1
| | | | | use CALLOUT_MPSAFE instead of "1" for the second parameter. This does not change the behaviour; it just makes the intent more clear.
* Use the BUS_DMA_ZERO flag.mux2003-07-271-2/+1
|
* Add support for FA-511; Submitted by: Kenneth P. Stox; Pr 42858imp2003-07-192-0/+5
|
OpenPOWER on IntegriCloud