summaryrefslogtreecommitdiffstats
path: root/sys/pci
Commit message (Collapse)AuthorAgeFilesLines
* Add support for Planex FNW-3602-T(CardBus 100M/10M).sanpei2003-04-182-0/+12
| | | | | Submitted by: kazz <kazz@v001.vaio.ne.jp> Obtained from: [bsd-nomads:16637]
* Revise attach/detach resource cleanupnjl2003-04-1712-58/+173
| | | | | | | | | | | | | | | - 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
* Revert part of revision 1.97 by calling dc_stop() unconditionallyiedowse2003-04-171-2/+1
| | | | | | | | | | | in dc_detach() instead of only calling it if the hardware is preset. This is a workaround for page faults in softclock() after a `dc' device was detached, caused by not disabling a timer before freeing its memory. The bus_child_present() checks should probably be re-added later, but only to avoid the hardware accesses and not the other resource cleanups in dc_stop(). Approved by: njl
* Remove another unused variable.jhb2003-04-161-1/+0
|
* Remove an unused variable so this compiles again.jhb2003-04-161-1/+0
|
* Remove some code that managed to escape from my local repository.mdodd2003-04-161-6/+0
|
* - Remove a block of code I missed in the previous commit.mdodd2003-04-161-6/+2
| | | | - Call tl_ifmedia_upd() in tl_init() for cards with bitrate devices.
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-1612-186/+5
| | | | | - 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-1526-18/+61
| | | | | | | | 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.)
* Rework the rl_encap failure case. Previously, we would stuff thesilby2003-04-151-3/+3
| | | | | | | | | | | | | unencapsulated packet back into the IFQ. Unfortunately, the only reason rl_encap would fail was due to m_defrag failing, which should only happen when we're low on mbufs. Hence, it was possible for us to end up with an IFQ full of packets which could never clear the queue because they could never be defragmented because they were themselves taking up all the mbufs. To solve this, take if_xl's approach to the problem of encapsulation failure: drop the packet. MFC after: 3 days
* Correct maxsize/maxsegsz parameters to bus_dma_tag_create().mux2003-04-091-6/+4
|
* Fix if_vr's handling of vr_encap failures. 3 parts:silby2003-04-091-10/+9
| | | | | | | | | | | | | | - Don't bother setting OACTIVE when the descriptors are all full or there's a vr_encap failure, it doesn't help anything. - Correctly roll back on the descriptor list after a failure so as not to corrupt the list. - Add a missing VR_UNLOCK(). Without these changes, vr_encap failure (which is assured during a low mbuf situation) would result in the card locking until the watchdog could fire. MFC after: 1 week
* Quick fix so that the watchdog timer is not set unless packets aresilby2003-04-081-4/+5
| | | | | | | actually queued for transmission. Without this, a low memory situation would trigger false watchdog timeouts. MFC after: 1 week
* Fix up callers of xl_encap so that they handle a failure responsesilby2003-04-081-3/+10
| | | | | | | | | | | properly (likely due to mbuf exhaustion.) Previously, the driver got somewhat wedged. Also, remove the annoying messages printed every time xl_encap couldn't allocate a mbuf; they served no useful purpose, and just made an mbuf exhaustion situation more annoying. MFC after: 1 week
* Fix typo.murray2003-04-071-1/+1
| | | | | | PR: kern/50504 Submitted by: Alex Semenyaka <alexs@snark.ratmir.ru> MFC after: 3 days
* Use bus_dmamap_load_mbuf() instead of bus_dmamap_load() for themux2003-04-051-2/+21
| | | | | | | | RX part of this driver too. It's better since the code wasn't dealing with bus_dmamap_load() returning EINPROGRESS, and this can't happen with bus_dmamap_load_mbuf(). Submitted by: jake
* Use __FBSDID rather than rcsid[].obrien2003-04-0310-67/+30
|
* Fix KASSERT syntax error.phk2003-04-011-1/+1
|
* Fix KASSERT syntax errors.phk2003-04-011-2/+2
| | | | Please compile LINT before commiting.
* Add missing ()'s so that these drivers all compile again.jhb2003-03-3110-10/+10
| | | | | Noticed by: jake Tested on: i386 (compile)
* If we fail to find our PCI ID in attach (this should never happen), thenjhb2003-03-311-2/+1
| | | | | just return ENXIO directly instead of calling tl_detach() since that would panic since the softc mutex isn't initialized until after this check.
* Clean up locking and resource management for pci/if_*njl2003-03-3112-583/+533
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Switch rl_encap over to using m_defrag.silby2003-03-301-11/+1
| | | | | | | No functional change, the previous rl_encap was correct wrt long mbuf chains; this just reduces code duplication. MFC after: 2 weeks
* Switch vr_encap over to using m_defrag instead of its own versionsilby2003-03-291-14/+2
| | | | | | | | | of the function. No functional change, this driver already handled long mbuf chains correctly. MFC after: 2 weeks
* Update if_dc to use m_defrag, removing the semi-duplicate dc_coalsilby2003-03-291-35/+30
| | | | | | | | | | | function. Also, use m_defrag where appropriate to defrag long mbuf chains in the same fashion as was done in if_sis.c. Before this change, if_dc would blow up and take down the interface if fed a really long mbuf chain. MFC after: 2 weeks
* Have sis_encap use m_defrag if:silby2003-03-291-1/+25
| | | | | | | | | | | | | | | 1. The chain passed in is > 31 fragments long or 2. The chain will not fit in the remaining descriptors without defragmentation. This is slightly less clear than other network drivers because the sis chips share one descriptor list for all packets, it seems. Before this change, a > 127 fragment chain would get stuck in the IFQUEUE permanently, bringing all network traffic to a halt. MFC after: 2 weeks
* Fix up the long mbuf chain recovery code to use m_defrag; the oldsilby2003-03-291-19/+8
| | | | | | | code messed up on B & C chipsets because it lost the packet header and therefore the flag indicating the need for hardware checksums. MFC after: 2 weeks
* - Add vm_paddr_t, a physical address type. This is required for systemsjake2003-03-253-3/+3
| | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
* - Use if_broadcastaddr from struct ifnet rather than relying onmdodd2003-03-212-3/+3
| | | | | | | extern 'etherbroadcastaddr'. - Make 'etherbroadcastaddr' static. Reviewed by: imp
* Make sure to free the correct resources when the card fails to attachsilby2003-03-191-0/+8
| | | | | | properly. (Broken in the previous commit.) Noticed by: "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
* Add support for Planex FNW-3800-TX(CardBus 100M/10M).sanpei2003-03-182-1/+14
| | | | | Submitted by: Kunihiro Arai <araik@attglobal.net> Obtained from: [bsd-nomads:16625]
* Instead of relying on a compile time define to determine whether the xlsilby2003-03-182-37/+34
| | | | | | | | | driver should use port or memory based IO, determine it dynamically at runtime, preferring MMIO where possible. This helps us support newer arches which dislike port based access better. Tested on i386 & sparc64, with 3c900, 905, 905b, and 905C cards. (in varying combinations by both jake and myself)
* Add pci id# for the sis648sos2003-03-131-0/+2
|
* Fix bug introduced in 1.130. For the < MHLEN case, we shouldbmilekic2003-03-041-1/+1
| | | | | | | be doing a m_gethdr(), not an m_get(). Pointed out by: Hiten Pandya <hiten@unixdaemons.com> Pointy hat to: Me
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-034-52/+26
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Spell noread() and nowrite() correctly (ie: not "NULL")phk2003-03-021-2/+2
|
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-6/+6
|
* Use rman_get_start() to get start address of the resource.nyan2003-02-261-2/+2
|
* Cleanup of the d_mmap_t interface.mux2003-02-253-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386
* Remove support for running in SimOS. The support has rotted overmarcel2003-02-252-431/+0
| | | | | | | | time and there's no indication that it will improve anytime soon. By removing support for SimOS it is possible to build LINT on Alpha, which is considered more important at the moment. Not objected to on: alpha@
* Add support for Peppercon ROL-F Card.dan2003-02-232-0/+10
| | | | | Submitted by: Sascha Holzeiter <sascha@root-login.org> PR: 48559
* Make xl use m_getcl() to allocate an mbuf and a cluster in one shot,bmilekic2003-02-221-19/+5
| | | | | | | | | | | | as opposed to one after the other. This is faster in both -CURRENT and -STABLE. Additionally, there is less code duplication for error-checking. One thing to note is that this code seems to return(1) when no buffers are available; perhaps ENOBUFS should be the correct return value? Partially submitted & tested by: Hiten Pandya <hiten@unixdaemons.com> MFC after: 1 week
* Fix panic on sparc64 introduced in my last commit. I reallymux2003-02-191-5/+6
| | | | | | | | | | | wish the busdma APIs were more consistent accross architectures. We should probably move all the other DMA map creations in xl_attach() where we can really handle them failing, since xl_init() is void and shouldn't fail. Pointy hat to: mux Tested by: Anders Andersson <anders@hack.org>
* Back out M_* changes, per decision of the TRB.imp2003-02-1919-65/+65
| | | | Approved by: trb
* - Fix mbuf leak when we successfully allocate a new mbuf but fail tomux2003-02-182-6/+18
| | | | | | | | | bus_dmamap_load() it. - Make it so reusing mbufs when we can't allocate (or map) new ones actually works. We were previously trying to reuse a mbuf which was already bus_dmamap_unload()'ed. Reviewed by: silby
* Split the arch-specific AGP files into the appropriate files.* and do the sameanholt2003-02-141-0/+6
| | | | | | for the agp module, and add agp to the list of modules to compile for alpha. Add an alpha_mb() to agp_flush_cache for alpha -- it's not correct but may improve the situation, and it's what linux and NetBSD do.
* Remove an extra agp_flush_cache(). The i810 case that needs it already has it.anholt2003-02-141-5/+0
|
* Add agpreg.h missed in commit to agp_i810 (adding i85x/i86x AGP support).anholt2003-02-131-0/+26
|
* Add Intel 85x/86x AGP support.anholt2003-02-131-16/+88
| | | | Submitted by: David Dawes <dawes@xfree86.org>
* Minor correction to comment: PNIC and XIRCOM have eeprom, its justimp2003-02-121-1/+1
| | | | non-standard.
OpenPOWER on IntegriCloud