summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
Commit message (Collapse)AuthorAgeFilesLines
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-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...).
* Grammar nit.ru2006-12-011-1/+1
|
* - Instead of if_watchdog/if_timer interface use our own timerglebius2006-11-302-13/+19
| | | | that piggybacks on fxp_tick() callout.
* Added yet another extra fxp(4) PCI ID.rink2006-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
* Added PCI ID's for:rink2006-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
* fix fxp so that it will reset the link when you change the speed... Thisjmg2006-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
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Whitespace fixmatteo2006-04-141-1/+1
| | | | Pointed out by: Nate Lawson
* Add device ID for Intel Pro/100 VE Network Connection cardmatteo2006-04-141-0/+1
| | | | | | PR: kern/95729 Submitted by: Nicky Bulthuis MFC after: 1 day
* Do not touch ifp->if_baudrate in miibus aware drivers.glebius2006-02-141-1/+0
|
* Check for 10BaseT media correctly. Before we were confusingimp2006-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...
* Add the device ID of fxp(4) NICs found in Sony Vaio VGN-TX1XP laptops.mux2005-12-121-0/+1
| | | | | | PR: kern/90024 Submitted by: Thomas Hurst <tom@hur.st> MFC after: 3 days
* - 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.
* Catch up with IFP2ENADDR() type change (array -> pointer).ru2005-11-111-2/+1
|
* - Don't pollute opt_global.h with DEVICE_POLLING and introduceglebius2005-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
* Big polling(4) cleanup.glebius2005-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
* Convert fxp(4) to use the new bus_alloc_resources() API, it simplifiesmux2005-09-272-60/+42
| | | | the resource allocation code significantly.
* Fix an unaligned I/O memory access in the event that a SCB times out.marcel2005-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
* Add callout_drain()'s to foo_detach() after calling foo_stop() to make surejhb2005-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
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-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
* - Use callout_init_mtx() to close a small race between callout_stop() andjhb2005-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
* 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
* Add a new PCI id for fxp(4) cards found on ICH7-based systems.mux2005-07-291-0/+1
| | | | | | This commit is a RELENG_6 candidate. Submitted by: Martin Nilsson <martin@gneto.com>
* Move if_alloc() up in fxp_attach() so there's an ifp beforebrooks2005-06-111-6/+7
| | | | | | mii_phy_probe() is called. Committed via: fxp0
* Avoid deadlock in fxp driver when system runs out of mbufs.wes2005-06-101-1/+6
| | | | | MFC after: 1 week Provided by: Ernie Smallis <esmallis@stbernard.com>
* Revert the unnecessicary addition of some braces in fxp_attach(). Don'tbrooks2005-06-101-3/+1
| | | | | explicitly free the ifp in fxp_detach(), the call to fxp_release() takes care of it.
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-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
* Correct commentimp2005-06-061-2/+1
|
* Remove some variables the last commit stopped using so the code compiles.brooks2005-06-061-2/+2
|
* The PCI bus code saves/restores these config registers now.imp2005-06-052-20/+0
|
* Be more conservative when enabling extended features. There are fxp(4)mux2005-04-222-3/+7
| | | | | | NICs out there that have an utterly bogus revision ID. Reported by: Denis Shaposhnikov <dsh@vlink.ru>
* Add a microcode to implement receive bundling for 82551 chipsets withmux2005-04-213-20/+152
| | | | | | | a revision ID of 0x0f (D102 E-step). MFC after: 2 weeks Tested by: pav
* Enable extended RFDs and TCBs, and thus checksum offloading, formux2005-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
* Unload and destroy the TX DMA maps before destroying the DMA tagmux2005-03-161-4/+3
| | | | | | they're attached to, not after. Spotted by: Coverity via sam
* - Encapsulate the code responsible for initializing a new TX descriptormux2005-03-072-191/+190
| | | | | | | 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().
* Cleanup: u_intXX_t -> uintX_t conversion.mux2005-03-063-110/+110
|
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Add support for fxp(4) cards found in Sony FS570 laptops.mux2005-03-051-0/+1
| | | | Submitted by: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
* Fix the panic recently reported on -current@ occuring when configuringmux2005-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
* Fix a stupid bogon from myself, sc->revision wasn't initialized whenmux2005-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
* Remove an outdated comment about ifnet not being locked.ru2005-02-151-3/+0
| | | | OK'ed by: njl, rwatson, sam
* Disable ethernet flow control in if_fxp by default, in order to preventrwatson2005-01-291-1/+1
| | | | | | | unexpected surprises when a system panics or is left in the debugger. Requested by: kris MFC after: 3 days
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-063-3/+3
|
* Allow fxp(4) cards with a revision id of 0 to use the 82503 serialmux2005-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>
* Only try to use the 82503 serial interface for the 82557 chipsets. Themux2004-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
* Make interrupt coalescing work on big endian systems.yongari2004-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
* Add support for the fxp(4) based card in ICH6 (i915) chipsets.mux2004-09-181-0/+1
| | | | | | This is a RELENG_5 candidate. Submitted by: Mike Tancsa <mike@sentex.net>
* Deorbit the fxp tuning hint (hint.fxp.UNIT_NUMBER.ipcbxmit_disable)truckman2004-08-111-26/+4
| | | | | introduced in if_fxp.c revision 1.180. The bug fix committed in revision 1.180 fixed the packet truncation problem.
* Bring in the first chunk of altq driver modifications. This covers themlaier2004-07-021-4/+9
| | | | | | | | | | | following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4), sis(4) and xl(4) More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take a look and tell me if "your" driver is missing, so I can fix this. Tested-by: many No-objection: -current, -net
* Remove the setting of the pci config variables on power state changes.imp2004-06-281-37/+2
| | | | The bus does this now.
OpenPOWER on IntegriCloud