summaryrefslogtreecommitdiffstats
path: root/sys/dev/cs
Commit message (Collapse)AuthorAgeFilesLines
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-232-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@
* - Consistently use if_printf() only in interface methods: if_start(),glebius2006-09-152-12/+15
| | | | | | | | if_watchdog, etc., or in functions used only in these methods. In all other functions in the driver use device_printf(). - Use __func__ instead of typing function name. Submitted by: Alex Lyashkov <umka sevcity.net>
* Fix multicast support for cs89x0 chips. Just setting the RX_MULTCAST_ACCEPTphilip2006-03-101-18/+56
| | | | | | | | flag isn't enough - the filter needs to be set up too, or no multicast frames are accepted. Sponsored by: Philips Industrial Applications (indirectly) MFC after: 3 days
* Use ETHER_ADDR_LEN rather than 6.imp2006-02-111-1/+1
|
* Remove oldcard support by removing the compat shims.imp2005-09-201-21/+5
|
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-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.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-12/+12
| | | | | | | | | | | | | | 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
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-06-241-1/+1
| | | | | | | | 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)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-29/+39
| | | | | | | | | | | | | | | | | | | | 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
* Fix the worst offenders of style(9) with a small style sweep.imp2005-01-281-48/+36
|
* Cleanup tabs vs spaces.imp2005-01-283-215/+213
|
* For the PC Card implementation of the CS8920M that's in my IBMimp2005-01-283-3/+8
| | | | | | | | | | | | | EtherJet, the interrupt is selected in the eeprom based on the layout of the PC Card board. Since this is encoded into the EEPROM, and has no relationship to the IRQ that the pccard bridge routes the PC Card's interrupt pin to. As such, stop writing to that register. This gets my EtherJet working. # The eeprom reading code appears to be totally wrong for my EtherJet # card. This causes the card to bogusly detect the media options # available.
* Setting hw.cs.recv_delay should set the delay, not the ignore theimp2005-01-281-1/+1
| | | | eeprom checksum.
* error = is needed before ether_ioctl() so that unsupported/unknownimp2005-01-281-1/+1
| | | | | | | IOCLTs are properly handled. This gets the cs driver properly reporting things via ifconfig. # my pccard still doesn't work.
* Write cs_detach() and use it. This resolves the twin problems of theimp2005-01-273-2/+17
| | | | | cs1 interface linger on card eject, as well as the warnings about the card still using resources. Ooops.
* Only attach to network functions (unlikely to matter since I'm notimp2005-01-201-0/+10
| | | | aware of any multi-function cs cards, but it doesn't hurt).
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-065-5/+5
|
* Since if_cs 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.
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewimp2004-05-271-1/+1
| | | | | | redundant includes and fix some of the include disordering. Submitted by: bde
* Move to generating pccarddevs.h on the fly, both for the kernel andimp2004-05-261-1/+1
| | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment.
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* We don't need the dependency on the pccard module here.imp2004-05-081-1/+0
|
* Remove improper use of if_addrhead in device drivers to checkluigi2004-04-151-4/+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-4/+0
|
* o Add sysctl to allow ignoring checksum of eeprom.imp2003-11-042-53/+77
| | | | | | | | | | | | o Fix minor type problems o Fix minor problem with a couple debug printfs. o Default to a sane media type when none is reported. o Minor style changes The PR complains this will fix the IBM 300GL cards. Submitted by: Max Gotlib PR: 11462
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-314-11/+9
| | | | | | | | | | | | | 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-68/+66
| | | | | | | 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.
* Use __FBSDID().obrien2003-08-243-3/+9
| | | | Also some minor style cleanups.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-152-3/+6
| | | | | | | | 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.)
* Make sure that pp_name is non-null before setting the deviceimp2003-04-101-1/+2
| | | | | description. This allows us to rely entirely on the CIS entries if necessary...
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* 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.
* network interface driver changes:sam2002-11-141-18/+6
| | | | | | | | | | | | | | 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, "blah") instead ofbrooks2002-10-011-23/+18
| | | | printf(CS_NAME"%d: blah", ifp->if_unit);
* Migrate to PCMCIA_CARD() macrosimp2001-11-151-3/+1
|
* s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharingimp2001-11-111-3/+3
|
* Additional enhancments to allow IBM Etherjet cards to be probed,imp2001-02-234-111/+137
| | | | | | | | | | | | | | | | | attached and ifconfigable. The card doesn't interrupt yet. Also, move towards bus space by introducing new macros/inline functions which make such a move much easier than before. These inline functions are setup now to work around an IBM EtherJet pccard cardbus bridge incompatibility. The card works in 8 bit mode, but not in 16-bit mode when it is connected to a cardbus bridge for reasons unknown. The Linux driver also has a similar workaround in it. Future work will include making the above workaround runtime conditional rather than compile time conditional, as well as fixing the interrupts in pccards and converting it to bus space.
* Break the isa attachment of the Crystal Semiconductor 89x0 into twoimp2001-01-214-144/+344
| | | | | | | | | parts: isa and pccard. The isa one is known to work with an IBM EtherJet ISA card. The pccard one isn't known to work because the EtherJet pccard I purchased recently arrived DOA :-(. I'll commit the pccard.conf entry when the replacement card arrives. I plan on MFC this in a week or two.
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-3/+1
| | | | | | | | | 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
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-7/+0
| | | | | | | | | | | | | | | 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
* NewBus the cs driver.imp2000-03-302-276/+299
| | | | Submitted by: max@rsu.ru
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-251-9/+0
| | | | | | | | | | | | This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags.
* Stub out the old pnp code till these are converted so GENERIC builds again.peter1999-09-021-1/+2
|
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Rename bpfilter to bpf.des1999-07-061-6/+6
|
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-5/+2
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-3/+3
| | | | kernel compile
* Clean up warnings; a couple of these came because of genuine errors ineivind1999-01-121-4/+6
| | | | | parameter passing (passing a pointer to u_short where a pointer to int is expected), for which the bugs have been fixed.
OpenPOWER on IntegriCloud