summaryrefslogtreecommitdiffstats
path: root/sys/dev/sk
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+3
| | | | | | | | 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.)
* Use __FBSDID rather than rcsid[].obrien2003-04-031-2/+3
|
* Fix KASSERT syntax errors.phk2003-04-011-2/+2
| | | | Please compile LINT before commiting.
* Clean up locking and resource management for pci/if_*njl2003-03-311-59/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove locking of the softc in the attach method, instead depending on bus_setup_intr being at the end of attach (delaying interrupt enable until after ether_ifattach is called) - Call *_detach directly in the error case of attach, depending on checking in detach to only free resources that were allocated. This puts all resource freeing in one place, avoiding thinkos that lead to memory leaks. - Add bus_child_present check to calls to *_stop in the detach method to be sure hw is present before touching its registers. - Remove bzero softc calls since device_t should do this for us. - dc: move interrupt allocation back where it was before. It was unnecessary to move it. This reverts part of 1.88 - rl: move irq allocation before ether_ifattach. Problems might have been caused by allocating the irq after enabling interrupts on the card. - rl: call rl_stop before ether_ifdetach - sf: call sf_stop before ether_ifdetach - sis: add missed free of sis_tag - sis: check errors from tag creation - sis: move dmamem_alloc and dmamap_load to happen at same time as tag creation - sk: remove duplicate initialization of sk_dev - ste: add missed bus_generic_detach - ti: call ti_stop before ether_ifdetach - ti: add missed error setting in ti_rdata alloc failure - vr: add missed error setting in I/O, memory mapping cases - xl: add missed error setting in I/O, memory mapping cases - xl: remove multi-level goto on attach failure - xl: move dmamem_alloc and dmamap_load to happen at same time as tag creation - Calls to free(9) are unconditional because it is valid to call free with a null pointer. Reviewed by: imp, mdodd
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* o track either_ifattach/ether_ifdetach API changessam2002-11-141-16/+6
| | | | | | | | | | | o use if_input for input packet processing o don't strip the Ethernet header for input packets o use BPF_* macros bpf tapping o call ether_ioctl to handle default ioctl case o track vlan changes Reviewed by: many Approved by: re
* style:alfred2002-08-231-47/+91
| | | | | put return values on a line by themselves. fix some paste issues where whitespace was used instead of tabs.
* catch up with mextadd callback taking a void argument instead of a caddr_t.alfred2002-06-291-2/+2
|
OpenPOWER on IntegriCloud