summaryrefslogtreecommitdiffstats
path: root/sys/dev/sk
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-22/+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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Deal with failed malloc calls[1].bz2005-04-251-0/+22
| | | | | | | | | While there also check for failed device_add_child calls. Found by: Coventry Analysis tool[1]. Submitted by: sam[1] Approved by: pjd (mentor) MFC after: 1 week
* handle malloc failure and sk_vpd_prodname potentially being null forsam2005-03-261-5/+8
| | | | | | | other reasons Noticed by: Coverity Prevent analysis tool Reviewed by: bz, jmg
* Do not try to free non allocated memory in error case.bz2005-03-172-13/+61
| | | | | | | | | | | | | | | | Do our best to plug some memory leaks (VPD data, jumbo memory buffer,...). Log if we cannot free because memory still in use[1]. Change locking to avoid ''acquiring duplicate lock of same type: "network driver"'' and potential deadlock. Also seems to fix LOR #063. [1] This change does not solve problems if buffers are still in use when unloading if_sk.ko. There is ongoing work which will address jumbogram allocations in a more general way. PR: kern/75677 (with changes, no mii fixes in here) Tested by: net, Antoine Brodin (slightly different version) Approved by: rwatson (mentor) MFC after: 5 days
* * Lower interrupt moderation timer 200->100.bz2005-03-172-1/+65
| | | | | | | | Obtained from: NetBSD if_sk.c rev. 1.11 * Make interrupt moderation configurable via sysctl/tuneable. PR: kern/41220 Approved by: rwatson (mentor)
* * Improve chip identification.bz2005-03-172-32/+142
| | | | | | | | | | | Obtained from: NetBSD if_sk.c rev. 1.11 * Take PHY out of reset for Yukon Lite Rev. A3. Submitted by: postings on net@ in thread "skc0: no PHY found", 2005-02-22 Tested by: net Approved by: rwatson (mentor) MFC after: 5 days
* * When adding/deleting multicast addresses, only whack the address filterbz2005-03-171-6/+15
| | | | | | | | | | | | | | | | if the interface is marked RUNNING. Obtained from: NetBSD if_sk.c rev. 1.12 * Don't initialize the card (and start an autonegotiation) every time the IP address changes. Makes 'dhclient sk0' invocations way faster and more consistant. i.e. one DHCPREQUEST elicits the DHCPACK. Obtained from: OpenBSD if_sk.c rev. 1.56 * Additional locking changes in sk_ioctl. PR: kern/61296 should see improvements by the last two. Approved by: rwatson (mentor) MFC after: 5 days
* Fix style(9) issues with __P removal.imp2005-02-241-56/+56
| | | | Noticed by: bde
* Return BUS_PROBE_DEFAULT instead of 0.imp2005-02-241-2/+2
|
* Cleanup debugging code and put it under bootverbosebz2005-01-291-35/+36
| | | | | | (includes minor style polishing). Approved by: rwatson (mentor)
* /* -> /*- for license, minor formatting changesimp2005-01-074-6/+6
|
* Enable sk(4) for ATLQ.mlaier2004-12-241-5/+7
| | | | | Thoroughly tested by: Ender <ender NO tog SPAM net> MFC after: 4 weeks
* Enable jumbo frames on Yukon variants of sk(4).bz2004-12-201-2/+9
| | | | | | | | | | In contrast to OpenBSD we enable jumbo frame support depending on MTU setting (like done for xmac). Approved by: pjd (mentor) Obtained from: OpenBSD if_sk.c r1.52 (YU_SMR_MFL_JUMBO flag) Tested by: Heinz Knocke <knockefreebsd at o2 dot pl> MFC after: 5 days
* only clear the IFF_OACTIVE flag when we have a chance of being able tojmg2004-11-171-4/+4
| | | | | | | | | queue a packet to the hardware... instead of when the hardware queue is empty.. don't initalize cur_tx now that it doesn't need to be... Pointed out by: bde
* move the lock after the NULL check so we don't have a hard(er) to diagnosejmg2004-11-151-2/+2
| | | | | | panic... Pointed out by: Bjoern A. Zeeb
* fix the missing lock in sk_jfree (verified w/ an assert)jmg2004-11-152-10/+23
| | | | | | | | also fix up handling and proding of the tx, _OACTIVE is now handled better... Submitted by: Peter Edwards (sk_jfree) Obtained from: OpenBSD and/or NetBSD (tx prod)
* Commit more debugging output. This is a little bit of using a large hammer,obrien2004-11-141-0/+10
| | | | | | | | | but sk(4) is so prevalent on AMD64 motherboards we need to reduce the number of round trips in the mailing lists trying to get sufficient information to make sure we've got a handle on all the problems and are working towards making sk(4) solid. Submitted by: bz
* Set ramsize depending on a value from eprom instead of usingbz2004-11-131-3/+9
| | | | | | | | | | hardcoded 128k for Yukon devices. 88E8001 only has 64k of on-chip RAM[1]. [1] http://www.marvell.com/products/pcconn/yukon/Yukon_88E8001_10_073103_final.pdf Tested by: amd64, current Approved by: rwatson (mentor) MFC after: 1 week
* * Correct an off-by-one reading vpd ro data.obrien2004-11-012-3/+33
| | | | | | | * Announce some more fields from ro area for better debugging of broken sk(4)s on various boards. Submitted by: Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net>
* fix LOR's in sk. Original patch from dwhite. This moves the memoryjmg2004-08-202-44/+56
| | | | | | | allocation earlier on in sk_attach so we don't have to lock until a bit later. PR: 69752
* put function's name at begining of column...jmg2004-08-201-1/+2
|
* add pci id for Belkin F5D5005 Gigabit ethernet card.jmg2004-08-202-0/+11
|
* Remove burn bridges code that saved/restored the pci config registersimp2004-06-281-24/+0
| | | | | 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
|
* Replace the lame big endian crc with wpaul's standard big endian crcimp2004-05-191-23/+9
| | | | | | | | | | | algorithm, supplied by wpaul himself. The lame one has an origin that's been called into question, so rather than argue about that (one could make an excellent fair use argument), replace it with better code since that's what FreeBSD is about. Submitted by: wpaul[1], Klaus Klein [1] Bill called this a silly bikeshed. Maybe his is not incorrect.
* Use BSD spelling, no SysV.obrien2004-04-191-1/+1
|
* Support the D-Link DGE-530T. Mine appears to have a blank eeprom, so assumemckay2004-03-312-1/+28
| | | | | | | | | | they all do and handle that without alarming the user. Also pull in a bit of defensive code from OpenBSD that triggers when a card is recognised but not properly classified as either Genesis or Yukon. Not that I could ever have needed this. :-) Obtained from: OpenBSD/NetBSD (partially) MFC after: 2 weeks
* 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-3/+0
|
* Stop setting ifp->if_output to ether_output() since ether_ifattach()mux2004-03-111-1/+0
| | | | does it for us already.
* Fix multicast and promiscuous mode handling for Yukon devices.wpaul2004-01-211-50/+101
| | | | Submitted by: Jung-uk Kim <jkim@niksun.com>
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-5/+5
| | | | Requested by: bde,imp
* correct typo in interrupt handling for the 2nd port of 2-port cardssam2003-11-291-1/+1
| | | | | | Submitted by: luigi Reviewed by: checking original openbsd code Approved by: re (scottl)
* Drop the driver lock around calls to if_input to avoid a LOR whensam2003-11-142-0/+7
| | | | | | | | 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-5/+3
|
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-6/+8
| | | | | | | 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).
* Add vendor ID to make Marvell chipset work. E.g. to be foundwilko2003-11-122-0/+10
| | | | | | | | on SMC9452TX it seems Submitted by: Jung-uk Kim <jkim@niksun.com> Tested by: <Radu Bogdan 'veedee' Rusu> veedee@c7.campus.utcluj.ro MFC after: 2 weeks
* Ahh, the joys of badge engineering. Tell the sk driver that thepeter2003-11-072-0/+16
| | | | | Linksys EG1032 is yet another variation. It looks just like the 3c940 except it only has a Marvell logo and no 3com logo.
* 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)
* Add missing file, it is sorely needed to make if_sk.c compile again.wilko2003-09-201-0/+171
|
* Add support for SK-9521 V2.0 and 3COM 3C940.wilko2003-09-202-178/+812
| | | | | | | | | | Tested at 100Mbit only, using Asus P4P800 onboard 3C940. The -stable version of this patch I have in use for ~2 weeks now, and works just fine for me. Based on: Nathan L. Binkert's patch for OpenBSD Patch submitted by and thanks to: Jung-uk Kim <jkim@niksun.com> MFC after: 2 weeks
* 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.
* Due to extreme bogusness in the pci bus layer, these drivers wereimp2003-07-031-2/+2
| | | | | | | | | forced to do slightly bogus power state manipulation. However, this is one of those features that is preventing further progress, so mark them as BURN_BIRDGES like I did for the drivers in sys/dev/... This, like the other change, are a no-op unless you have BURN_BRIDGES in your kernel.
* Remove unused variables.phk2003-05-311-7/+0
| | | | Found by: FlexeLint
* Use newly minted device_is_attached rather than device_is_alive to seeimp2003-04-211-1/+1
| | | | | | | | | if attach succeeded. device_is_alive just tells us that probe succeeded. Since we were using it to do things like detach net interfaces, this caused problems when there were errors in the attach routine. Symptoms of problem reported by: martin blapp
* Revise attach/detach resource cleanupnjl2003-04-171-4/+14
| | | | | | | | | | | | | | | - Unconditionally call *_stop() if device is in the tree. This is to prevent callouts from happening after the device is gone. Checks for bus_child_present() should be added in the future to keep from touching potentially non-existent hardware in *_detach(). Found by iedowse@. - Always check for and free miibus children, even if the device is not in the tree since some failure cases could have gotten here. - Call ether_ifdetach() in the irq setup failure case - ti(4), xl(4): move ifmedia_init() calls to the beginning of attach so that ifmedia_removeall() can be unconditionally called on detach. There is no way to detect whether ifmedia has been initialized without using a separate variable (as tl(4) does). - Add comments to indicate assumptions of code path
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-18/+0
| | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
OpenPOWER on IntegriCloud