aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fxp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the volatile qualifier to apply to fxp_miibus_readreg().Kevin Lo2007-05-301-2/+2
| | | | Notes: svn path=/head/; revision=170125
* Add support for the 82562GX chip within if_fxp.Remko Lodder2007-03-281-0/+1
| | | | | | | | | | PR: 110251 Submitted by: Vyacheslav Vovk Approved by: imp (mentor) MFC After: 3 days Notes: svn path=/head/; revision=167998
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-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@ Notes: svn path=/head/; revision=166901
* Change the remainder of the drivers for DMA'ing devices enabled in theMarius Strobl2007-01-211-15/+16
| | | | | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...). Notes: svn path=/head/; revision=166165
* Grammar nit.Ruslan Ermilov2006-12-011-1/+1
| | | | Notes: svn path=/head/; revision=164792
* - Instead of if_watchdog/if_timer interface use our own timerGleb Smirnoff2006-11-302-13/+19
| | | | | | | that piggybacks on fxp_tick() callout. Notes: svn path=/head/; revision=164771
* Added yet another extra fxp(4) PCI ID.Rink Springer2006-11-141-0/+1
| | | | | | | | | | | PR: kern/104896 Submitted by: Yoshihiko Sarumaru <mistral@imasy.or.jp> Reviewed by: imp (mentor), jfv Approved by: imp (mentor) MFC after: 3 days Notes: svn path=/head/; revision=164283
* Added PCI ID's for:Rink Springer2006-11-061-0/+2
| | | | | | | | | | | | | | | | - 0x1065: Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet [1], as found on Tyan GS14 barebones. - 0x1094: Intel Pro/100 946GZ (ICH7) Network Connection [2], as found on Intel 946GZis motherboards. [1] Submitted by: myself [2] Submitted by: Mike Tancsa <mike@sentex.net> Reviewed by: imp (mentor), jfv Approved by: imp (mentor) MFC after: 3 days Notes: svn path=/head/; revision=164031
* fix fxp so that it will reset the link when you change the speed... ThisJohn-Mark Gurney2006-10-061-0/+5
| | | | | | | | | | | | | | will fix a problem where you boot w/ the default of autoselect, but then set the speed to 100/full, the switch will keep the autoselect/100/full negotiation... This will continue to work till someone resets the switch or unplugs the cable resulting in the switch failing to autoneg and falling back to 100/half, causing a hard to track down duplex mismatch.. Submitted by: nCircle Network Security, Inc. MFC after: 1 week Notes: svn path=/head/; revision=163061
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-161-1/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* Whitespace fixMatteo Riondato2006-04-141-1/+1
| | | | | | | Pointed out by: Nate Lawson Notes: svn path=/head/; revision=157757
* Add device ID for Intel Pro/100 VE Network Connection cardMatteo Riondato2006-04-141-0/+1
| | | | | | | | | PR: kern/95729 Submitted by: Nicky Bulthuis MFC after: 1 day Notes: svn path=/head/; revision=157747
* Do not touch ifp->if_baudrate in miibus aware drivers.Gleb Smirnoff2006-02-141-1/+0
| | | | Notes: svn path=/head/; revision=155671
* Check for 10BaseT media correctly. Before we were confusingWarner Losh2006-01-041-1/+2
| | | | | | | | | | | ifm_status and ifm_active. IFM_10_T gets set in the ifm_active field, not in the ifm_status field, as far as I can tell. Note: this was to enable a workaround that's rarely enabled. I don't know how to corrupt my eeprom to test it, and would rather not know... Notes: svn path=/head/; revision=154042
* Add the device ID of fxp(4) NICs found in Sony Vaio VGN-TX1XP laptops.Maxime Henrion2005-12-121-0/+1
| | | | | | | | | PR: kern/90024 Submitted by: Thomas Hurst <tom@hur.st> MFC after: 3 days Notes: svn path=/head/; revision=153339
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-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. Notes: svn path=/head/; revision=152315
* Catch up with IFP2ENADDR() type change (array -> pointer).Ruslan Ermilov2005-11-111-2/+1
| | | | Notes: svn path=/head/; revision=152311
* - Don't pollute opt_global.h with DEVICE_POLLING and introduceGleb Smirnoff2005-10-051-0/+4
| | | | | | | | | | | | opt_device_polling.h - Include opt_device_polling.h into appropriate files. - Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that can be compiled as loadable modules. Reviewed by: bde Notes: svn path=/head/; revision=150968
* Big polling(4) cleanup.Gleb Smirnoff2005-10-011-24/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Axe poll in trap. o Axe IFF_POLLING flag from if_flags. o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handler. This fixes problem with idle polling. o Make registration and deregistration from polling in a functional way, insted of next tick/interrupt. o Obsolete kern.polling.enable. Polling is turned on/off with ifconfig. Detailed kern_poll.c changes: - Remove polling handler flags, introduced in 1.21. The are not needed now. - Forget and do not check if_flags, if_capenable and if_drv_flags. - Call all registered polling handlers unconditionally. - Do not drop poll_mtx, when entering polling handlers. - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx. - In netisr_poll() axe the block, where polling code asks drivers to unregister. - In netisr_poll() and ether_poll() do polling always, if any handlers are present. - In ether_poll_[de]register() remove a lot of error hiding code. Assert that arguments are correct, instead. - In ether_poll_[de]register() use standard return values in case of error or success. - Introduce poll_switch() that is a sysctl handler for kern.polling.enable. poll_switch() goes through interface list and enabled/disables polling. A message that kern.polling.enable is deprecated is printed. Detailed driver changes: - On attach driver announces IFCAP_POLLING in if_capabilities, but not in if_capenable. - On detach driver calls ether_poll_deregister() if polling is enabled. - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING flag. If there is no, then unlocks and returns. - In ioctl handler driver checks for IFCAP_POLLING flag requested to be set or cleared. Driver first calls ether_poll_[de]register(), then obtains driver lock and [dis/en]ables interrupts. - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable. If present, then returns.This is important to protect from spurious interrupts. Reviewed by: ru, sam, jhb Notes: svn path=/head/; revision=150789
* Convert fxp(4) to use the new bus_alloc_resources() API, it simplifiesMaxime Henrion2005-09-272-60/+42
| | | | | | | the resource allocation code significantly. Notes: svn path=/head/; revision=150610
* Fix an unaligned I/O memory access in the event that a SCB times out.Marcel Moolenaar2005-09-211-3/+9
| | | | | | | | | | | The FXP_SCR_FLOWCONTROL registers is at offset 0x19, but 2 bytes wide. It cannot be read as a word without causing a panic on architectures that enforce strict alignment. MFC after: 3 days Notes: svn path=/head/; revision=150408
* Add callout_drain()'s to foo_detach() after calling foo_stop() to make sureJohn Baldwin2005-08-171-0/+1
| | | | | | | | | | | | that if softclock is running on another CPU and is blocked on our driver lock, we will wait until it has acquired the lock, seen that it was cancelled, dropped the lock, and awakened us so that we can safely destroy the mutex. MFC after: 3 days Notes: svn path=/head/; revision=149203
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-4/+4
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=148887
* - Use callout_init_mtx() to close a small race between callout_stop() andJohn Baldwin2005-08-082-71/+25
| | | | | | | | | | | | | | | | the timeout routine. - Fix locking in detach. - Add locking in shutdown. - Don't mess with the PCI command register in resume, the PCI bus driver already does this for us. - Add locking to the non-serial ifmedia routines. - Fix locking in ioctl. - Remove spls and support for 4.x. MFC after: 1 week Notes: svn path=/head/; revision=148872
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-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 Notes: svn path=/head/; revision=148654
* Add a new PCI id for fxp(4) cards found on ICH7-based systems.Maxime Henrion2005-07-291-0/+1
| | | | | | | | | This commit is a RELENG_6 candidate. Submitted by: Martin Nilsson <martin@gneto.com> Notes: svn path=/head/; revision=148546
* Move if_alloc() up in fxp_attach() so there's an ifp beforeBrooks Davis2005-06-111-6/+7
| | | | | | | | | mii_phy_probe() is called. Committed via: fxp0 Notes: svn path=/head/; revision=147289
* Avoid deadlock in fxp driver when system runs out of mbufs.Wes Peters2005-06-101-1/+6
| | | | | | | | MFC after: 1 week Provided by: Ernie Smallis <esmallis@stbernard.com> Notes: svn path=/head/; revision=147282
* Revert the unnecessicary addition of some braces in fxp_attach(). Don'tBrooks Davis2005-06-101-3/+1
| | | | | | | | explicitly free the ifp in fxp_detach(), the call to fxp_release() takes care of it. Notes: svn path=/head/; revision=147269
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-102-24/+32
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=147256
* Correct commentWarner Losh2005-06-061-2/+1
| | | | Notes: svn path=/head/; revision=147042
* Remove some variables the last commit stopped using so the code compiles.Brooks Davis2005-06-061-2/+2
| | | | Notes: svn path=/head/; revision=147038
* The PCI bus code saves/restores these config registers now.Warner Losh2005-06-052-20/+0
| | | | Notes: svn path=/head/; revision=147029
* Be more conservative when enabling extended features. There are fxp(4)Maxime Henrion2005-04-222-3/+7
| | | | | | | | | NICs out there that have an utterly bogus revision ID. Reported by: Denis Shaposhnikov <dsh@vlink.ru> Notes: svn path=/head/; revision=145401
* Add a microcode to implement receive bundling for 82551 chipsets withMaxime Henrion2005-04-213-20/+152
| | | | | | | | | | a revision ID of 0x0f (D102 E-step). MFC after: 2 weeks Tested by: pav Notes: svn path=/head/; revision=145368
* Enable extended RFDs and TCBs, and thus checksum offloading, forMaxime Henrion2005-04-211-2/+1
| | | | | | | | | | | | | | latest 82550 and 82551 chipsets (revision IDs 0x0e, 0x0f and 0x10). We were only enabling it for revisions 0x0c and 0x0d, now it's enabled for any 8255x NIC with a revision ID bigger than 0x0c. It should be safe, and this is what Intel does in their open source driver. MFC after: 2 weeks Tested by: Pavel Lobach lobach_pavel at mail dot ru Notes: svn path=/head/; revision=145359
* Unload and destroy the TX DMA maps before destroying the DMA tagMaxime Henrion2005-03-161-4/+3
| | | | | | | | | they're attached to, not after. Spotted by: Coverity via sam Notes: svn path=/head/; revision=143705
* - Encapsulate the code responsible for initializing a new TX descriptorMaxime Henrion2005-03-072-190/+189
| | | | | | | | | | from an mbuf into the fxp_encap() function, as done in other drivers. - Don't waste time calling bus_dmamap_load_mbuf() if we know the mbuf chain is too long to fit in a TX descriptor, call m_defrag() first. - Convert fxp(4) to use bus_dmamap_load_mbuf_sg(). Notes: svn path=/head/; revision=143243
* Cleanup: u_intXX_t -> uintX_t conversion.Maxime Henrion2005-03-063-110/+110
| | | | Notes: svn path=/head/; revision=143167
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-1/+1
| | | | Notes: svn path=/head/; revision=143161
* Add support for fxp(4) cards found in Sony FS570 laptops.Maxime Henrion2005-03-051-0/+1
| | | | | | | Submitted by: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk> Notes: svn path=/head/; revision=143150
* Fix the panic recently reported on -current@ occuring when configuringMaxime Henrion2005-03-031-8/+13
| | | | | | | | | | | | | | | a vlan interface attached to a fxp(4) card when it has not been initialized yet. We now set the links from our internel TX descriptor structure to the TX command blocks at attach time rather than at init time. While I'm here, slightly improve the style in fxp_attach(). PR: kern/78112 Reported by: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk> and others Tested by: flz, Gavin Atkinson <gavin.atkinson@ury.york.ac.uk> MFC after: 1 week Notes: svn path=/head/; revision=143069
* Fix a stupid bogon from myself, sc->revision wasn't initialized whenMaxime Henrion2005-02-271-10/+10
| | | | | | | | | | | | | | | | testing it to know whether we should enable the 82503 serial mode... Move code to the right location and disallow the use of the 82503 serial mode if the sc->revision field is 0 again. This makes fxp(4) work correctly with ATMEL 350 93C46 cards (3 port 82559 based with a 82555 PHY), as well as with the older ATMEL 220 93C46 (same flavour) and with the even older 10Mbps-only 82557 cards with the 82503 serial interface. Tested by: Andre Albsmeier <andrer@albsmeier.net>, krion MFC after: 2 weeks Notes: svn path=/head/; revision=142655
* Remove an outdated comment about ifnet not being locked.Ruslan Ermilov2005-02-151-3/+0
| | | | | | | OK'ed by: njl, rwatson, sam Notes: svn path=/head/; revision=141950
* Disable ethernet flow control in if_fxp by default, in order to preventRobert Watson2005-01-291-1/+1
| | | | | | | | | | unexpected surprises when a system panics or is left in the debugger. Requested by: kris MFC after: 3 days Notes: svn path=/head/; revision=140993
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-063-3/+3
| | | | Notes: svn path=/head/; revision=139749
* Allow fxp(4) cards with a revision id of 0 to use the 82503 serialMaxime Henrion2005-01-041-1/+1
| | | | | | | | | | | | interface as well. This is not an expected revision id per the datasheet, but unfortunately there are such cards out there with a 82557 chipset, and they want to use the 82503. PR: kern/75739 Reported by: Andre Albsmeier <andre.albsmeier@siemens.com> Notes: svn path=/head/; revision=139683
* Only try to use the 82503 serial interface for the 82557 chipsets. TheMaxime Henrion2004-12-201-2/+2
| | | | | | | | | | | | datasheet says it is only valid for such chipsets and shouldn't be used with others. This fixes some 82559 based cards which otherwise only work at 10Mbit. MFC after: 5 days Tested by: krion Notes: svn path=/head/; revision=139063
* Make interrupt coalescing work on big endian systems.Pyun YongHyeon2004-11-171-2/+4
| | | | | | | | | | Also change struct ucode.length to be in number of elements (u_int32_t) to help endian handling. MFC after: 2 weeks Notes: svn path=/head/; revision=137795
* Add support for the fxp(4) based card in ICH6 (i915) chipsets.Maxime Henrion2004-09-181-0/+1
| | | | | | | | | This is a RELENG_5 candidate. Submitted by: Mike Tancsa <mike@sentex.net> Notes: svn path=/head/; revision=135439