summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_alc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make room for media types of the future. Extend the ifmedia word to 64 bits.stsp2015-09-111-3/+3
| | | | | | | | | | | | | | | | This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and grows struct ifmediareq. Old ifconfig and dhclient binaries can still assign addresses, however the 'media' subcommand stops working. Recompiling ifconfig and dhclient with new headers before a reboot should not be necessary unless in very special circumstances where non-default media settings must be used to get link and console access is not available. There may be some MD fallout but that will be cleared up later. ok deraadt miod with help and suggestions from several sharks attending l2k15
* Increment if_ipackets in if_input().mpi2015-06-241-3/+1
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Convert to if_input(), thanks to krw@ for testing.mpi2015-03-201-11/+5
|
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* unifdef INETtedu2014-12-221-5/+1
|
* Fix a long standing bug in MAC statistics register access. Onebrad2014-11-271-12/+4
| | | | | | | | | additional register was erroneously added in the MAC register set such that 7 TX statistics counters were wrong. From FreeBSD ok mikeb@
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-3/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* Fewer <netinet/in_systm.h>mpi2014-07-221-3/+1
|
* The few network drivers that called their children's (ie. mii PHYderaadt2013-12-281-2/+1
| | | | | drivers) activate functions at DVACT_RESUME time do not need to do so, since their PHYs are repaired by IFF_UP.
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-4/+4
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* Remove unneeded include.mpi2013-11-211-2/+1
| | | | ok deraadt@
* Most network drivers include netinet/in_var.h, but apparently theybluhm2013-08-071-2/+1
| | | | | don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
* Remove setting an initial assumed baudrate upon driver attach which is notbrad2012-11-291-2/+1
| | | | | | necessarily correct, there might not even be a link when attaching. ok mikeb@ reyk@
* Add some missing bus_dmamap_sync()'s and sync the others withkevlo2011-10-191-12/+26
| | | | | | | | | the FreeBSD code. age(4) tested by Thomas Pfaff; alc(4) tested by Gabriel Linder; ale(4) tested by Johan Torin. From Brad
* Some minor clean up to the _start funtions to make the code read a littlekevlo2011-09-211-5/+5
| | | | | | better. No functional change. From Brad
* Fix up alc_encap() / alc_start():kevlo2011-09-131-34/+23
| | | | | | | | | | | | | | | | | | - Remove unnecessary nsegs variable from alc_encap() and use map->dm_nsegs. Also remove unnecessary FreeBSD check for 0 DMA segments check. - Remove printfs in alc_encap() failure paths that shouldn't be there. - Add missing IF_PREPEND() from failure path coming off of alc_encap() within alc_start(). - Fix error handling within alc_encap(). Previously alc_encap() was attempting to unload a DMA map upon failure from bus_dmamap_load_mbuf() even though one wasn't loaded at that point and then always forcing mbufs through the EFBIG path. Tested by Gabriel Linder. From Brad
* Disable PHY hibernation. The PHY will go into sleep state when itkevlo2011-09-031-7/+21
| | | | | | | | | | | | | | detects no established link and it will re-establish link when the cable is plugged in. Previously it failed to re-establish link when the cable was plugged in such that it required turning the interface down and then up to make it work. This was caused by incorrectly programmed hibernation parameters. Further details regarding PHY setup are necessary to be able to re-enable this feature. Tested by Matteo Filippetto and Gabriel Linder From FreeBSD via Brad
* Move the comment outside of the VLAN section of code and above thatkevlo2011-08-261-2/+2
| | | | | | chunk to where it should be. From Brad
* Help with the watchdog timeouts seen when unplugging the cable fromkevlo2011-08-211-11/+14
| | | | | | | the alc(4) NIC while running or the NIC not working if the cable is not plugged in upon boot up. From Brad; tested by matteo filippetto, Gabriel Linder and edd@
* Enable MSI support; tested by krw@, Mark Peoples, andkevlo2011-06-171-2/+2
| | | | | | Abel Abraham Camarillo Ojeda. From Brad
* Whitespace nits; from Bradkevlo2011-05-271-4/+4
|
* - For AR8132 fast ethernet controller, do not report 1000baseTkevlo2011-05-251-6/+23
| | | | | | | | | | | | | | | | capability to mii(4). - Limit DMA burst size to be less than or equal to 1024 bytes. Controller does not seem to support more than 1024 bytes DMA burst. - Do not touch CMB TX threshold register when CMB is not used. From FreeBSD via Brad - Properly initialize sc_product and alc_rev early enough in alc_attach() with the PCI product id and PCI revision. - Further sync if_alcvar.h changes from FreeBSD for L2C/L1D addition commit which in OpenBSD has been merged into if_alcreg.h From Brad; tested by Gabriel Linder and edd@.
* Support additional L2C variants and L1D (AR813x/AR815x chips).sthen2011-05-181-98/+345
| | | | | | Tested on L1C by Abel Abraham Camarillo Ojeda, thank you. From FreeBSD via kevlo@, ok jsg@
* mechanic rename M_{TCP|UDP}V4_CSUM_OUT -> M_{TCP|UDP}_CSUM_OUThenning2011-04-051-2/+2
| | | | ok claudio krw
* alc_newbuf is always called from the interrupt context so it can't sleep;mikeb2011-02-181-18/+8
| | | | tested by Gabriel Linder, ok kevlo, miod
* Fix two logic errors:kevlo2011-01-291-3/+3
| | | | | - "could not disable Rx/Tx MAC" from FreeBSD - "could not disable RxQ/TxQ" from Gabriel Linder
* Add DVACT_QUIECE support. This is called before splhigh() and beforederaadt2010-08-311-2/+5
| | | | | | | | DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
* remove the unused if_init callback in struct ifnetjsg2010-08-271-2/+1
| | | | ok deraadt@ henning@ claudio@
* ca_activate handler for suspend/resume. untested -- if someone testsderaadt2010-07-271-2/+26
| | | | this let me know.
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* Fix multicast handling. All Atheros controllers use big-endian formkevlo2010-02-271-2/+4
| | | | | | when computing multicast hash. From Brad via FreeBSD
* Rename _rxfilter functions to _iff for consistency. From Brad, ok kevlo@sthen2010-01-071-5/+6
|
* M_DUP_PKTHDR() define -> m_dup_pkthdr() function to properly dealkrw2009-09-131-27/+2
| | | | | | | | | | | | | with m_tag_copy_chain() failures. Use m_defrag() to eliminate hand rolled defragging of mbufs and some uses of M_DUP_PKTHDR(). Original diff from thib@, claudio@'s feedback integrated by me. Tests kevlo@ claudio@, "reads ok" blambert@ ok thib@ claudio@, "m_defrag() bits ok" kettenis@
* alc(4) is a driver for the Atheros AR8131/AR8132 ethernet chip.kevlo2009-08-081-0/+2404
this driver was written by Pyun YongHyeon from FreeBSD. "go ahead" deraadt@