summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the opening of the resources for cardbus cards. Before we'dimp2005-12-291-102/+53
| | | | | | | | | | | | try very hard to be perfect. However, these attempts broke down when there were large numbers of resources. We'd not be able to map them all. Instead, accept that we might pass more range to thse subbus than might be optimal be able to compute. However, there's little harm in this and it allows us to pass greater resources through. # it has been suggested that we allocate a fixed amount of resources # on attach and give it out upon request. This might not be a bad idea...
* Sync the type (and size, compare mousestatus_t in /usr/include/sys/mouse.h)netchild2005-12-291-1/+1
| | | | | | | of a variable according to the usage (after increasing the number of max buttons this may matter). Noticed by: flz
* Add support for the HP 8200C/8250C/8290C scanners.netchild2005-12-292-0/+2
| | | | | PR: 90467 Submitted by: Adam McDougall <mcdouga9@egr.msu.edu>
* Add support for the Canon CanoSvan LIDE 25.netchild2005-12-292-0/+2
| | | | | PR: 89509 Submitted by: David Gilbert <dgilbert@daveg.ca>
* Fix some kind of "off by one"-error: the min or max sample rate thenetchild2005-12-291-2/+2
| | | | | | | | device is able to reproduce should be usable too instead of failing in such a case. PR: 89269 Submitted by: Don L. Belcher <don@siad.net>
* Merge NetBSD rev. 1.61:netchild2005-12-291-1/+1
| | | | | | | - Support more than 7 buttons for USB mice. Patch from NetBSD kern/30248. PR: 83353 Submitted by: Seán Farley <sean-freebsd@farley.org>
* Add support for Epson 2480 scanner.netchild2005-12-292-0/+2
| | | | | PR: 86094 Submitted by: Erik Norgaard <norgaard@locolomo.org>
* Emit USB_EVENT_DRIVER_DETACH on detach.netchild2005-12-291-0/+3
| | | | | | PR: 83247 Submitted by: Sangwoo Shim <ssw@neo.redjade.org> MFC after: 2 weeks
* Help Warner with merge from p4.glebius2005-12-291-1/+2
|
* Implement /dev/cardbus%d.cis, same thing as /dev/pccard%d.cis. Thereimp2005-12-294-71/+268
| | | | | are some rough edges with this still, but it seems to work well enough to commit.
* Initialize the event tailq.scottl2005-12-281-0/+1
| | | | | | Submitted by: Frank Mayhar PR: kern/90882 MFC After: 1 day
* Add missing parens.glebius2005-12-281-1/+1
| | | | Submitted by: njl
* Fix the order of the stereo channels (left <-> right).netchild2005-12-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the PR: ---snip--- I think I have found the change which reversed the channels. Revision 1.44 of emu10k1.c, which added Audigy support, has the line emu_wrptr(sc, v->vnum, FXRT, 0xd01c0000); replaced with the following lines: if (sc->audigy) { emu_wrptr(sc, v->vnum, A_FXRT1, v->fxrt1); emu_wrptr(sc, v->vnum, A_FXRT2, v->fxrt2); emu_wrptr(sc, v->vnum, A_SENDAMOUNTS, 0); } else emu_wrptr(sc, v->vnum, FXRT, v->fxrt1 << 16); where v->fxrt1 << 16 == 0xd10c0000 I don't have Audigy, so I'm not sure if the problem affects Audigy cards too. The order of the channels can't be tested by just altering mixer settings. Here's a small program to test if the channels are reversed on your sound card: #include <sys/soundcard.h> #include <fcntl.h> #include <unistd.h> int main(int argc, char **argv) { int fd = open("/dev/dsp", O_WRONLY), format = AFMT_S16_LE; int channels = 2, rate = 22050, i; /* 450 Hz sine wave on left channel, right channel silent */ unsigned char samples[] = {0, 0, 0, 0, 94, 16, 0, 0, 120, 32, 0, 0, 9, 48, 0, 0, 208, 62, 0, 0, 143, 76, 0, 0, 12, 89, 0, 0, 19, 100, 0, 0, 117, 109, 0, 0, 11, 117, 0, 0, 182, 122, 0, 0, 92, 126, 0, 0, 239, 127, 0, 0, 105, 127, 0, 0, 202, 124, 0, 0, 32, 120, 0, 0, 124, 113, 0, 0, 251, 104, 0, 0, 193, 94, 0, 0, 249, 82, 0, 0, 212, 69, 0, 0, 138, 55, 0, 0, 85, 40, 0, 0, 120, 24, 0, 0, 51, 8, 0, 0, 205, 247, 0, 0, 136, 231, 0, 0, 171, 215, 0, 0, 118, 200, 0, 0, 44, 186, 0, 0, 7, 173, 0, 0, 63, 161, 0, 0, 5, 151, 0, 0, 132, 142, 0, 0, 224, 135, 0, 0, 54, 131, 0, 0, 151, 128, 0, 0, 17, 128, 0, 0, 164, 129, 0, 0, 74, 133, 0, 0, 245, 138, 0, 0, 139, 146, 0, 0, 237, 155, 0, 0, 244, 166, 0, 0, 113, 179, 0, 0, 48, 193, 0, 0, 247, 207, 0, 0, 136, 223, 0, 0, 162, 239, 0, 0}; ioctl(fd, SNDCTL_DSP_SETFMT,&format); ioctl(fd, SNDCTL_DSP_CHANNELS,&channels); ioctl(fd, SNDCTL_DSP_SPEED,&rate); for(i=0;i<500;i++) write(fd, &samples, sizeof(samples)); write(fd, &samples, 2); /* swap channels */ for(i=0;i<500;i++) write(fd, &samples, sizeof(samples)); return 0; } You should hear a sound on the left channel followed by a sound on the right channel. If you hear a sound on the right channel first, the channels are reversed. ---snip--- Owners of an audigy card should verify if it DTRT and report back. Noticed by: Matthias Buelow <mkb@mukappabeta.de> Submitted by: Juha-Matti Tilli <juhis@nallukka.net> PR: 72221
* o Fix typos in the comments.maxim2005-12-281-2/+2
| | | | Submitted by: Wojciech A. Koszek
* Check for IFF_DRV_RUNNING in the interrupt loop.glebius2005-12-281-2/+3
| | | | Reported & tested by: Martin P. Hansen <mph lima.dyndns.dk>
* Further updates to the Marvell support code.sos2005-12-281-13/+24
| | | | Should be reliable enough for actual use by now.
* When in rev. 1.47 cardbus_alloc_resources() function was moved fromglebius2005-12-281-15/+40
| | | | | | | | | | | | | | | | | | | | cardbus_cis.c to this file, some code was not merged and thus resource list entries were invalid. They didn't have a resources attached to them. However, the problem was masked for some time later, because newer resources list entries were added to the head of the list, and resource_list_find() always returned the first matching resource list entry. Usually the underlying driver allocated a valid resource and added it to the head of the list, and invalid one wasn't used. In rev. 1.174 of subr_bus.c the sorting of resource list entries was reversed demasking the problem in cardbus_alloc_resources(). This commit fixes the problem returning back some code from cardbus_cis.c, pre-1.49 revisions. PR: kern/87114 PR: kern/90441 Hardware provided by: Vasily Olekhov <olekhov yandex.ru> Reviewed by: imp
* A style nit.glebius2005-12-281-1/+1
|
* Tidy up em_resume():glebius2005-12-281-8/+4
| | | | | - Don't call em_init_locked() twice. - Collapse two if() blocks into one.
* Cache the tx producer index instead of reading it every time ti_start isscottl2005-12-282-1/+4
| | | | called.
* Fix a serious regression from the busdma conversion. Check to make surescottl2005-12-281-10/+17
| | | | | that we don't overrun the tx descriptor ring before actually trying to overrun it.
* Add some sanity checking to the pccard insertion case. Whine if theimp2005-12-281-4/+6
| | | | | bridge tries to tell us about a new card when we have one already in the socket.
* Bring big-endian architecture support for ti(4).yongari2005-12-282-241/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . remove unnecessay header files after Scott's bus_dma(9) commit. . remove global variable tis which was introduced at the time of zero_copy(9) changes. The variable tis was not used at all. The same applyes to ti_links in softc so axe it. . deregister variables. . axe ti_vhandle and switch to use explicit register access for accessing NIC local memory. Creates three variants of ti_mem to read/write NIC local memory(ti_mem_read, ti_mem_write) and clearing NIC local memory(ti_mem_zero). This greatly enhances code readability and have ti(4) drop using shared memory scheme for Tigon 1. As Tigon 1 switched to use explicit register access for Tx, axe ti_tx_ring_nic/ti_cmd_ring in softc.(Tigon 2 used to host ring scheme which means there is no need to access NIC local memory via register access for Tx and NIC would DMA the modified Tx rings into its local memory.) [1] . introduce new macro TI_EVENT_*/TI_CMD_* to handle NIC envent/command. Instead of using bit fields assginment for accessing the event, use shift operations to set/get it. [1] . add additional check for valid DMA tags in ti_free_dmamaps(). . add missing bus_dmamap_sync/bus_dmamap_unload in ti_free_*_ring_*. . fix locking nits(MTX_RECURSE mutex) and make ti(4) MPSAFE. . change data type of ti_rdata_phys to bus_addr_t and don't blindly cast to uint32_t. . rearrange detach path and make ti(4) survive during device detach. . for Tigon 1, use explicit register access for checking Tx descriptors in ti_encap()/ti_txeof(). [1] . properly call bus_dmamap_sync(9) for updating statistics. . remove extra semicolon in ti_encap() . rewrite loading MAC address to work on strict-alignment architectures. . move TI_RD_OFF macro to if_tireg.h . axe ETHER_ALIGN as it's already defined in <net/ethernet.h>. . make macros immuine from expansion by adding parenthesis and do-while. . remove alpha specific hack as vtophys(9) is no longer used in ti(4) after Scott's bus_dma(9) fix. Reviewed by: scottl Obtained from: OpenBSD [1]
* Add a hid blacklist quirk.flz2005-12-274-1/+20
| | | | | | | | PR: usb/80383 Submitted by: Lonnie Mendez <lmendez19@austin.rr.com> Tested by: Adam Kropelin <akropel1@rochester.rr.com>, thierry, fenner Approved by: pjd MFC after: 1 week
* Ensure that we're aligned at leas tto the size of the resource being requested.imp2005-12-271-0/+21
| | | | When cbb_debug is on, print the windows that we're mapping.
* nitsimp2005-12-271-1/+1
|
* Change the probes in ATA to return a negative value on success.sos2005-12-272-26/+24
| | | | | This allows other driver to take over if needed during probe, and allows me to distribute new drivers as modules.
* Update the last commit to also take 48Bit access functions.sos2005-12-271-1/+3
|
* Add initial support for the Marvell 88SX[56]0[48][01] series of SATA chips.sos2005-12-273-0/+456
| | | | | Hardware donated by: Matthew Jacob Hardware donated by: Y!
* Fix rebuilds of arrays that got stuck.sos2005-12-273-9/+30
| | | | | | Misc minor fixes. Bughunting and initial fixes by Pav@ and Anton.
* - Plug a memory leak: free up per-cpu sample buffers at module unload time.jkoshy2005-12-261-3/+14
| | | | - Correct a few style nits.
* Add simple suspend and resume methods. We call em_stop() on suspend andglebius2005-12-261-0/+40
| | | | | | | em_init() on resume. With this change the network is ready right after resume, without half minute lag. Tested by: Jacques Garrigue
* Wrap comment lines to be under 80 characters wide.jkoshy2005-12-261-2/+3
| | | | MFC after: 3 days
* Add suspend and resume support.ariff2005-12-251-4/+88
|
* Make tv_sec a time_t on all platforms but alpha. Brings us more in line withtrhodes2005-12-242-4/+4
| | | | | | | | | POSIX. This also makes the struct correct we ever implement an i386-time64 architecture. Not that we need too. Reviewed by: imp, brooks Approved by: njl (acpica), des (no objects, touches procfs) Tested with: make universe
* Use device_printf() and if_printf() rather than printf() and axeyongari2005-12-232-53/+51
| | | | | | bge_unit from the softc. Requested by: marius
* Return BUS_PROBE_GENERIC rather than 0 in the probe routine.jhb2005-12-221-1/+1
| | | | Requested by: marius
* Use the copy of the card's MAC address saved in tulip_enaddr() in the softcjhb2005-12-221-3/+12
| | | | | | | if we need a valid MAC address (for probing the media for example) before ether_ifattach() has been called since IF_LLADDR() is NULL then. Tested by: tisco
* - All bge(4) supported hardware is known to support RX/TX checksum offloading,glebius2005-12-221-10/+69
| | | | | | | | | | | except for BGE_CHIPID_BCM5700_B0, which is buggy. - All bge(4) supported hardware, has a bug that produces incorrect checksums on Ethernet runts. However, in case of a transmitted packet, the latter can be padded with zeroes, and the checksum would be correct. (Probably chip includes the pad data into checksum). In case of receive, we just don't trust checksum data in received runts. Obtained from: NetBSD (jonathan) via Mihail Balikov
* Add a quirk to fix resume on some laptops.glebius2005-12-221-0/+9
| | | | | | | Reported by: joe Reported by: Huang wen hui <huang gddsn.org.cn> Reported by: Jacques Garrigue <garrigue math.nagoya-u.ac.jp> PR: kern/89825
* Fix bge_eeprom_getbyte() to return 1 when timeout happens.yongari2005-12-221-3/+8
| | | | | | | | | Previously it always returned 0 which means success regardless of EEPROM status. While here, add a check whether EEPROM read is successful. Submitted by: jkim
* Add bge(4) support for big-endian architectures(part 2/2).yongari2005-12-221-92/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | - removed unused funtion bge_handle_events(). - removed bus_dmamap_destroy(9) calls for DMA maps created by bus_dmamem_alloc(9). This should fix panics seen on sparc64 in device detach. - added check for parent DMA tag creation. - switched to use __NO_STRICT_ALIGNMENT as bge(4) supports all architectures. - added missing bus_dmamap_sync(9) in bge_txeof(). - added missing bus_dmamap_sync(9) in bge_encap(). - corrected memory synchronization operation on status block. As the driver just read status block that was DMAed by NIC it should use BUS_DMASYNC_POSTREAD. Likewise the driver does not need to write status block back, so remove unnecessary bus_dmamap_sync(9) calls in bge_intr(). - corrected memory synchronization operation on RX return ring. The driver only read the block so remove unnecessary bus_dmamap_sync(9) in bge_rxeof(). - force bus_dmamap_sync(9) for only modified descriptors. Blindly synching all desciptor rings would reduce performance. - call bus_dmamap_sync(9) for DMA maps that were modified in bge_rxeof(). Reviewed by: jkim(initial version) Tested by: glebius(i386), jkim(amd64 initial version)
* Drivers for AMD-8111 and NVIDIA nForce2/3/4 SMBus 2.0 controllers.ru2005-12-211-0/+2
|
* Use ETHER_ADDR_LEN rather than hardcoding 6.jhb2005-12-211-1/+1
|
* Add missing MODULE_DEPEND() so that ppbus.ko and these .ko's can beru2005-12-216-0/+6
| | | | loaded dynamically.
* bandaid assumption that char is signedsam2005-12-211-1/+1
| | | | MFC after: 1 week
* - Fix type in previous commit; unbreak buildpav2005-12-201-1/+1
| | | | | Approved by: ssouhlal Pointy hat to: pav
* - Use PCIR_BAR() macro for the BAR for the aperture.jhb2005-12-201-7/+1
| | | | | - Axe macros used for walking PCI capabilities list. We now ask the PCI bus to find caps for us rather than doing it in the drm and agp drivers.
* - Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well asjhb2005-12-2011-39/+63
| | | | | | | | | the addition of pci_find_extcap(). - Change the drm drivers to attach to vgapci. This is #ifdef'd so the code can be shared across branches. - Use pci_find_extcap() to look for AGP and PCIE capabilities in drm. - GC all the drmsub stuff for i810/i830/i915. The agp and drm devices are now both children of vgapci.
* Attach to the vgapci device rather than pci.jhb2005-12-201-1/+11
|
OpenPOWER on IntegriCloud