summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Tweak the output of event log messages from the controller:jhb2008-06-261-283/+48
| | | | | | | | | | | - Each log entry contains a text description in the "description" field of the entry. The existing decode logic always ended up duplicating information that was already in the description string. This made the logs overly verbose. Now we just print out the description string. - Add some simple parsing of the timestamp and event classes. Reviewed by: ambrisko, scottl MFC after: 2 weeks
* Adjust the handling of pending log events during boot:jhb2008-06-261-50/+75
| | | | | | | | | | | | | | | | | - Fetch events from the controller in batches of 15 rather than a single event at a time. - When fetching events from the controller, honor the event class and locale settings (via hw.mfi tunables). This also allows the firmware to skip over unwanted log entries resulting in fewer requests to the controller if there many unwanted log entries since the last clean shutdown. - Don't drop the driver mutex while decoding an event. - If we get an error other than MFI_STAT_NOT_FOUND (basically EOF for hitting the end of the event log) then emit a warning and bail on processing further log entries. Reviewed by: ambrisko, scottl MFC after: 2 weeks
* Remove the unused major/minor numbers from iodev and memdev.ed2008-06-251-1/+1
| | | | | | | | | Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem. Approved by: philip (mentor)
* Fix test for waiting AIFs in aac_poll(). This seems to solve theemaste2008-06-241-2/+7
| | | | | | | | problem where Adaptec's arcconf monitoring tool hangs after producing its expected output. Submitted by: Adaptec, via driver ver 15317 MFC after: 1 week
* - Use bus_foo() rather than bus_space_foo() and retire the bus tag and handlejhb2008-06-235-44/+27
| | | | | | | | | | | | from the softc. - Rework the watchdog timer to match other NIC drivers: - Start a timer in fe_init() that runs once a second and checks a counter in the softc that is identical to the deprecated 'if_timer'. - Just adjust the softc tx timeout value when sending packets instead of scheduling the timer. - Use IFQ_SET_MAXLEN(). Tested by: WATANABE Kazuhiro
* - Fix compile if WPI_DEBUG is not definedthompsa2008-06-231-27/+39
| | | | | | - Allow debug.wpi to be set from a tunable - Put ring reset messages back under debug - Add more debug output around channel init
* o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quitemarius2008-06-221-90/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some time now so collapse calls accordingly. o Given that gem_load_txmbuf() is allowed to fail resulting in a packet drop also for quite some time now implement the functionality of gem_txcksum() by means of m_pullup(9), which de-obfuscates the code and allows to always retrieve the correct length of the IP header. o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in gem_rint() and gem_start_locked(). o Correct some bus_barrier(9) calls to do a read/write barrier as we do a read after a write. Add some missing ones in gem_mii_readreg() and gem_mii_writereg(). o According to the Apple GMAC driver, the GEM ASIC specification and the OpenSolaris eri(7D) the TX FIFO threshold has to be set to 0x4ff for the Gigabit variants and 0x100 for the ERI in order do avoid TX underruns. o In gem_init_locked(): - be conservative and enable the RX and TX MACs, - don't clear GEM_LINK otherwise we don't ever mark the link as up again if gem_init_locked() is called from gem_watchdog(), - remove superfluous setting of sc_ifflags. o Don't bother to check whether the interface is running or whether its queue is empty before calling gem_start_locked() in gem_tint(), the former will check these anyway. o Call gem_start_locked() in gem_watchdog() in order to try to get some more packets going. o In gem_mii_writereg() after reseting the PCS restore its configuration. GMAC testing: grehan, marcel MFC after: 2 weeks
* Fix PCI id for 945GME Express Integrated Graphics Controller:gonzo2008-06-201-1/+1
| | | | | | | set to 8086:27AE PR: kern/124782 Event: Bugathon#5
* Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabitdelphij2008-06-202-0/+419
| | | | | | | | Ethernet device driver, written by sephe@ Obtained from: DragonFly Sponsored by: iXsystems MFC after: 2 weeks
* Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabitdelphij2008-06-204-0/+3108
| | | | | | | | Ethernet device driver, written by sephe@ Obtained from: DragonFly Sponsored by: iXsystems MFC after: 2 weeks
* - Move ether_ifdetach earlier.benno2008-06-171-2/+7
| | | | | | - Drain callouts after ether_ifdetach. Suggested by: jhb
* Make ex(4) MPSAFE:jhb2008-06-134-90/+101
| | | | | | | | | | - Add a mutex to the softc to protect the softc and device hardware. - Use a private watchdog timer. - Setup interrupt handler after ether_ifattach(). - Use bus_foo() rather than bus_space_foo() and remove bus space tag and handle from softc. Tested by: imp
* Add the D-Link DWA-111kevlo2008-06-132-0/+2
|
* - Added support for BCM5709 and BCM5716.davidch2008-06-131-9/+59
| | | | MFC after: 2 weeks
* - Added support for BCM5709 and BCM5716 controllers.davidch2008-06-133-6019/+16022
| | | | MFC after: 2 weeks
* Use callout_init_mtx to simplify locking somewhat. While we're here, rearrangebenno2008-06-132-35/+18
| | | | | | some operations in smc_detach to remove the need for the smc_shutdown variable. Suggested by: jhb
* Make sure we drain our taskqueues and stop our callouts in detach.benno2008-06-122-7/+37
|
* Change include to reflect tcp_lro.h move.jfv2008-06-111-1/+1
|
* Remove the tcp_lro.[ch] files as they are now in netinet.jfv2008-06-112-465/+0
|
* Don't enforce unique device minor number policy anymore.ed2008-06-113-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Except for the case where we use the cloner library (clone_create() and friends), there is no reason to enforce a unique device minor number policy. There are various drivers in the source tree that allocate unr pools and such to provide minor numbers, without using them themselves. Because we still need to support unique device minor numbers for the cloner library, introduce a new flag called D_NEEDMINOR. All cdevsw's that are used in combination with the cloner library should be marked with this flag to make the cloning work. This means drivers can now freely use si_drv0 to store their own flags and state, making it effectively the same as si_drv1 and si_drv2. We still keep the minor() and dev2unit() routines around to make drivers happy. The NTFS code also used the minor number in its hash table. We should not do this anymore. If the si_drv0 field would be changed, it would no longer end up in the same list. Approved by: philip (mentor)
* Convert ndis_spinlock to ndis_mtx and start using the sleepablecokane2008-06-112-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx interface for NDIS_LOCK/UNLOCK. This should result in less CPU utilization on behalf of the ndis driver. Additionally, this commit also fixes a potential LOR in the ndis_tick code, by not locking inside the ndis_tick function, but instead delegating that work to the helpers called through IoQueueWorkItem. The way that this is currently set up for NDIS prevents us from simply implementing a callout_init_mtx mechanism. However, the helper functions that handle the various timeout cases implement fine-grained locking using the spinlocks provided by the NDIS-compat layer, and using the mtx that is added with this commit. This leaves the following ndis_softc members operated on in ndis_tick in an unlocked context: * ndis_hang_timer - Only modified outside of ndis_tick once, before the first callout_reset to schedule ndis_tick * ifp->if_oerrors - Only incremented in two places, which should be an atomic op * ndis_tx_timer - Assigned to 5 (when guaranteed to be 0) or 0 (in txeof), to indicate to ndis_tick what to do. This is the only member of which I was suspicious for needing the NDIS_LOCK here. My testing (and another's) have been fine so far. * ndis_stat_callout - Only uses a simple set of callout routines, callout_reset only called by ndis_tick after the initial reset, and then callout_drain is used exactly once in shutdown code. The benefit is that ndis_tick doesn't acquire NDIS_LOCK unless one of the timeout conditions is flagged, and it still obeys the locking order semantics that are dictated by the NDIS layer at the moment. I have been investigating a more thorough s/spinlock/mtx/ of the NDIS layer, but the simplest naive approach (replace KeAcquireSpinLock with an mtx implementation) has anti-succeeded for me so far. This is a good first step though. Tested by: onemda@gmail.com Reviewed by: current@, jhb, thompsa Proposed by: jhb
* Wait up to 1S for the TFD data to signal un-busy before fetching the signature.sos2008-06-111-3/+3
| | | | | | This at least helps a few slow devices out there. Submitted by: Andrey V. Elsukov
* Switch to using a normal mutex instead of a spin mutex.benno2008-06-112-22/+30
| | | | | | | | | | | We still use the interrupt filter due to performance problems that show up if we don't. The main problem seen is that, due to the interrupt being edge triggered, we occasionally miss interrupts which leads us to not notice that we can transmit more packets. Using the new approach, which just schedules a task on a taskqueue, we are guaranteed to have the task run even if the interrupt arrived while we were already executing. If we were to use an ithread the system would mask the interrupt while the handler is run and we'd miss interrupts.
* Convert bus_space_{read,write}_* calls to bus_{read,write}_* calls.benno2008-06-112-30/+18
| | | | Suggested by: jhb
* Rearrange how to call dma.alloc() so that we have resources alloc'd when ↵sos2008-06-112-6/+5
| | | | need but also late enough to know how many to create.
* Add Belkin F5U257 to the mix.imp2008-06-101-0/+2
| | | | Submitted by: wilko@
* Make tx(4) MPSAFEjhb2008-06-102-117/+134
| | | | | | | | | | | - Add a mutex to the softc to protect the softc and device hardware. - Use a private timer to implement a watchdog for tx timeouts and drive the timer for auto negotiation. - Use bus_foo() rather than bus_space_foo() and remove the bus space tag & handle from the softc. - Call bus_setup_intr() after ether_ifattach(). Tested by: Florian Smeets flo of kasimir.com
* Add support for the P212, P410, P410i, P411, and P812 HP Smart Arrayps2008-06-101-0/+5
| | | | | | controllers. Submitted by: Scott Benesh at HP
* >From NetBSD:kevlo2008-06-102-46/+0
| | | | | | | | Remove the code which disables port status change interrupts for 1s when one occured -- this makes that events get lost or delayed until the next change. Obtained from: NetBSD
* - Fixed kern/123696 by increasing firmware timeout value from 100 to 1000.davidch2008-06-102-54/+193
| | | | | | | | | | - Fixed a problem on i386 architecture when using split header/jumbo frame firmware caused by hardware alignment requirements. - Added #define BCE_USE_SPLIT_HEADER to allow the feature to be enabled/ disabled. Enabled by default. PR: kern/123696 MFC after: 2 weeks
* Remove sicontrol(8)'s "ttystat".ed2008-06-092-6/+0
| | | | | | | | | | | | | | | | | In the FreeBSD base system, there are only two utilities that use struct tty, namely pstat and sicontrol. The sicontrol utility calls the TCSI_TTY ioctl(), which copies struct tty back to userspace. sicontrol should not have this functionality. The same data is already provided by pstat. If we really want to be able to export these numbers through a file descriptor to userspace, we can export struct xtty, which should provide a better abstraction. The ttystat option was only used as a debugging aid. This makes sicontrol compile in the mpsafetty branch. Reviewed by: peter Approved by: philip (mentor)
* Fix typo in comment.rpaulo2008-06-081-1/+1
|
* Ethernet hardware address stored in DC_AL_PAR0/DC_AL_PAR1 registeryongari2008-06-081-6/+14
| | | | | | | | | | | | is in little endian form. Likewise setting DC_AL_PAR0/DC_AL_PAR1 register expect the address to be in little endian form. For big endian architectures the address should be swapped to get correct one. Change setting/getting ethernet hardware address to big endian architecture frendly. Reported by: Robert Murillo ( billypilgrim782001 at yahoo dot com ) Tested by: Robert Murillo ( billypilgrim782001 at yahoo dot com )
* Add support for the Apple Big Mac (BMAC) Ethernet controller,marcel2008-06-074-0/+1765
| | | | | | found on various Apple G3 models. Submitted by: Nathan Whitehorn
* Change the calling convention for ic_node_alloc to deal withsam2008-06-079-22/+35
| | | | | | | | | | | | some longstanding issues: o pass the vap since it's now the "coin of the realm" and required to do things like set initial tx parameters in private node state for use prior to association o pass the mac address as cards that maintain outboard station tables require this to create an entry (e.g. in ibss mode) o remove the node table reference, we only have one node table and it's unlikely this will change so this is not needed to find the com structure
* - Store the device_t of the smbX device in the softc.jhb2008-06-061-37/+22
| | | | | | | | | | | | | - Store the softc of the device in the 'si_drv1' of the cdev. - Lookup the softc via 'si_drv1' in cdev methods rather than using the minor number as a unit for devclass_get_softc(). - Lookup the device_t via the softc field in cdev methods rather than using the minor number as a unit for devclass_get_device(). - Add a mutex to the softc to protect 'sc_opened'. - Remove D_NEEDGIANT as all the smbus drivers are now MPSAFE and this driver is now MPSAFE. - Remove some checks for NULL softc pointers that can't happen and don't bzero the softc during attach.
* Explicitly lock Giant in smbus_if methods in the bktr_i2c and iicsmbjhb2008-06-062-9/+67
| | | | | drivers for now. This can be replaced with driver locks when these drivers are locked.
* - Use bus_foo() rather than bus_space_foo() and remove bus space tag/handlejhb2008-06-063-67/+63
| | | | | | from softc. - Mark interrupt handlers MPSAFE as these drivers have been locked for a while.
* Tweak a comment and a constant to restore old 30ms upper bound.imp2008-06-061-3/+3
| | | | cs_readreg takes ~2us not ~1us to run.
* o Remove unused cs_debug tunable. I think I added it and then nothing withimp2008-06-061-10/+22
| | | | | | | | | | | it. Bad imp. Removing us dips us under 10,000 in size too. o Replace an unconditional 30ms DELAY (yes, busy wait) with a check of the SIBUSY bit in the SelfST register before accessing the eeprom. This changes the time to read the EEPROM from 2 * 20 * 30ms (1.2s) to < 20*25us (.0005s) and make the attach of the card tolerable when ethernet media is present. Include data from the datasheet about why this works. While this is a 2500x speed increase, it doesn't really matter at all once the card is probed... o set dev earlier in softc.
* Forgot to commit these files too :-(imp2008-06-062-3/+3
|
* Minor clean up to shave about 1.5k off the size of the driver:imp2008-06-064-95/+12
| | | | | | | | | o remove unused fields from softc and args from cs_alloc_irq o remove some commented code that will never be implemented. o Don't try to send a packet and see if it worked. We don't need this anymore, and it doesn't add any value. o tweaks for BNC and AUI. o limit possible time hung in the kernel to 4s rather than 40s.
* Simplify error checking when reading the function....imp2008-06-061-3/+1
|
* cs has detach, remove bogus ifdef.imp2008-06-061-3/+1
| | | | Remove dedundant initialization of error to 0.
* This is a rewritten driver for the SMSC LAN91C111. It's based in part on thebenno2008-06-065-0/+1929
| | | | | | | | | | | | | | | sn(4) driver and also looking at newer drivers. The reason for the rewrite is to support MII and to try and resolve some performance issues found when trying to use the sn(4) driver on the Gumstix network boards. For reference, the SMSC LAN91C111 is a non-PCI ethernet part whose lineage dates back to Ye Olde Days of ISA. It seems to get some use in the embedded space these days on parts lacking on-board MACs or on-board PCI controllers, such as the XScale PXA line of ARM CPUs. This also includes a driver for the SMSC LAN83C183 10/100 PHY. Man page to follow.
* Remove unused fields in softc. If they are ever really needed again,imp2008-06-064-27/+3
| | | | | | they can re-added. Remove CS_NAME. Don't whine when there's an ignored checksum error: User has said STFU, so we should S the FU. (remove mandated properties).
* Checkpoint what I've been running for the last year. Tidy up apeter2008-06-062-73/+82
| | | | bunch of loose ends that "can't happen" any more, if they ever could.
* Add the support for the Globetrotter Max 3.6 HSDPA Modem.attilio2008-06-052-0/+3
| | | | | PR: usb/118374 Submitted by: Greg Rivers <gcr at tharned dot org>
* Make the cs(4) driver MPSAFE:jhb2008-06-054-67/+118
| | | | | | | | | - Add a mutex to the softc to protect the softc and the device hardware. - Add a private timer to manage transmit watchdogs rather than using if_timer/if_watchdog. - Setup the interrupt handler after ether_ifattach(). Tested by: imp
* Rename the ie_EE16 module to just 'ie' so that at least one of the modulesjhb2008-06-051-1/+7
| | | | | | | | for this driver is called 'ie'. Otherwise, ifconfig(8) doesn't recognize any of the modules as being the ie(4) driver and will always try to kldload the driver even when it is already present in the kernel. Reported by: Thierry Herbelot
OpenPOWER on IntegriCloud