Commit Graph

25156 Commits

Author SHA1 Message Date
bouyer
b48bdec72e make iwi_alloc_tx_ring() prototype match function declaration (shows up when
bus_addr_t != bus_size_t). Fix cast for 64bit paddr_t on i386.
2009-02-13 21:11:47 +00:00
pgoyette
c46760325c Fix dmesg output:
Old:
piixpm0 at pci0 dev 20 function 0
piixpm0: ATI Technologies SB600/SB700/SB800 SMBus Controller (rev. 0x13)
piixpm0: interrupting at SMIpiixpm0: polling

New:
piixpm0 at pci0 dev 20 function 0
piixpm0: ATI Technologies SB600/SB700/SB800 SMBus Controller (rev. 0x13)
piixpm0: interrupting at SMI, polling

Cosmetic change only, no functional changes intended.
2009-02-13 19:19:52 +00:00
abs
82eae5f5e8 avoid long/unsigned long printf warning on some platforms 2009-02-13 01:38:32 +00:00
cegger
1ff2d41bea pretty print atphy's supported medias in dmesg. 2009-02-12 13:38:49 +00:00
bouyer
c54134b00b When an error is reported on a write, data may have been transfered
to the device's cache anyway and so cmdh_prdbc reports a completed
transfer. If we use it to update ata_bio->bcount this has 2 conseqences:
- the automatic LBA48 workaround doesn't qick in because bcount is used
  to compute the last sector of the transfer (wd(4) part of kern/40569)
- wd(4) will report a B_ERROR buffer with a b_resid of 0, which panics
  a DIAGNOSTIC kernel
Fix by ignoring cmdh_prdbc if we had a write with errors, and in this case
leave ata_bio->bcount at its initial value.

While there use NOERROR instead of 0 for ata_bio->error (cosmetic).

thanks to Matthias Scheler for tests.
2009-02-12 11:44:11 +00:00
cegger
92e9ddc630 flow-control support for MCP65 chip.
XXX other chips may also have flow-control, but only on MCP65 tested.
ok cube@
2009-02-12 10:33:23 +00:00
cegger
150dcfcbbb Yukon chips support flow-control. Tested on Yukon Lite chip.
ok cube@
2009-02-12 10:22:30 +00:00
rumble
0e95582ed1 WD33C93 has only two registers, which often times aren't mapped to adjacent
bus space locations. Map them individually, instead.
2009-02-12 06:24:45 +00:00
rumble
4ef2271e2d If sc_dmamode is set to SBIC_CTL_NO_DMA, then actually don't do DMA. Now
PIO mode actually works.
2009-02-12 06:20:58 +00:00
oster
f17e8d67c4 If we see a RF_RECON_WRITE_ERROR event we know a write has finished and
we need to account for that.  Failure to do so means we can end up
waiting forever for writes we think are outstanding, but which have
already completed.

Addresses the RAIDframe part of PR#40569.  Thanks to Matthias Scheler
for reporting the issue and verifying the fix.
2009-02-11 23:54:10 +00:00
cegger
e6e201ff78 revert changes in rgephy_reset() done in rev. 1.25.
Should fix PR 40586
2009-02-11 23:01:07 +00:00
cegger
a4f75ff6c2 age_dma_free: set smb pointers to NULL for consistency
age_stop: call mii_down()
ok cube@
2009-02-11 16:15:59 +00:00
cegger
cdc8049f5c Attach atphy(4) on ATTANSIC oui.
ok cube@
2009-02-11 14:44:25 +00:00
cegger
276d5496f2 regen. 2009-02-11 14:42:52 +00:00
cegger
807b74b329 add ATTANSIC and their L1/L2 PHYs
ok cube@
2009-02-11 14:41:56 +00:00
markd
90459b5b45 Add some more ICH9 SATA controller variants. 2009-02-11 06:39:43 +00:00
markd
7bb4356373 regen 2009-02-11 06:36:21 +00:00
markd
10f2846ed4 Add more ICH9 SATA controller variants 2009-02-11 06:35:16 +00:00
tron
c15efe169f Backout LBA 48 quick entries which were added to fix one aspect of
PR kern/40569 because of objections by Manual Bouyer.
2009-02-10 19:45:22 +00:00
drochner
c4dd0bbb21 In usb_reserve_allocm(), return an error immediately if the requested
size is impossible to allocate, otherwise we might get a diagnostic
panic in subr_extent.c.
Being here, fix an off-by-one in setup.
2009-02-10 17:00:06 +00:00
jmorse
6e5c689d54 Fix uvideo_stream_init uninitialized variable / bad argument, leading to panic when opening video stream. 2009-02-09 23:28:50 +00:00
tron
56c9d6aa78 Add two more entries to the quirk table for hard disks which need the
LBA 48 work around. The first entry will watch the Seagate ST3160815AS
(and similar models), the second one HP's OEM version of the same drive.

This avoids the RAID rebuild problems described in PR kern/40569.
2009-02-09 22:34:23 +00:00
pgoyette
704a9b346c Previous check for ADM1027 caused a kernel panic, since the read routine
can be called _before_ we've identified the chip.  Ensure that sc_chip
is initialized to NULL before chip is identified, and if it is NULL or
ADM1027, use the less-efficient send_byte/receive_byte.

While here, don't attempt to release the i2c bus if we failed to acquire
it.  This would cause a panic on a LOCKDEBUG kernel.

Thanks to Nicholas Joly for pointing out both of these bugs.
2009-02-09 20:27:21 +00:00
nonaka
9d853f68dd fix comment. 2009-02-09 12:11:16 +00:00
uwe
c795b4c2a9 G/c duplicate definition of WSCONS_EVENT_ASCII. 2009-02-08 22:58:56 +00:00
pgoyette
66a822fbe7 The ADM1027 chip doesn't support i2c read_byte protocol, so in this
case we use send_byte followed by receive_byte.
2009-02-08 17:48:02 +00:00
pgoyette
d94df08c58 Use pre-scripted i2c protocols rather than re-inventing our own. No
functional change intended.

While here, change some indentation to use tabs vs spaces.
2009-02-08 14:34:40 +00:00
oster
2240ff3c50 Nuke #define MAXNSTRIPES which is no longer useful. 2009-02-07 20:41:30 +00:00
oster
ce32c4d01e Be consistent with wd.c and don't complain loudly if the underlying
device doesn't support flushing the cache.  Fixes an issue (reported
privately) where ST39120A drives are not capable of flushing the
cache, and RAIDFrame was incessantly complaining.
2009-02-07 20:36:49 +00:00
jakllsch
1db353a59c regen. 2009-02-06 19:40:31 +00:00
jakllsch
3b951f1af8 Add TI PCIxx12-series product IDs. 2009-02-06 19:36:35 +00:00
jym
92ae85d18e Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
2009-02-06 18:50:26 +00:00
drochner
37d6396041 -in the wdc@pcmcia driver, don't try to powerup/down while cold or
shutting down -- this is only supposed to happen from the pcmcia
 kernel thread while the system is running
-in wd_shutdown, call ata_addref first, so that the adapter is either
 active or we know that it isn't
This fixes a hang on shutdown-p reported by Dennis den Brok per
PR kern/40531. Verified by by Dennis and me.
(reported against 5.0-Beta, so this is a pullup candidate)
2009-02-06 13:43:11 +00:00
dyoung
613d59f38b Define some bitfields that come from a reference driver. 2009-02-06 02:02:26 +00:00
dyoung
aab95b778e Disable and acknowledge Function Events, and stop installing a
handler for them.

Don't override the latency timer set for us by the CardBus code.

Add a bit of debug code for the Function Event Registers, #if 0'd
out for now.

Cosmetic: remove gratuitous parenthesization of return statements.
Change the indentation of the struct atw_pci_softc definition.
Use a more meaningful variable name, et cetera.
2009-02-06 02:00:50 +00:00
dyoung
c11e37cd3d Disable and acknowledge Function Events, and stop installing a
handler for them.
2009-02-06 01:55:19 +00:00
dyoung
e7aed4b441 When the power status changes, always note the change and wake the
socket events thread.  Sometimes we would not note the power-status
change if the socket also indicated a change in card status.
2009-02-06 01:15:53 +00:00
dyoung
1121b32c97 If the bus_dmamap_load_mbuf() status was non-zero, then the DMA
map is undefined, so do not try to unload it.
2009-02-05 23:56:57 +00:00
dyoung
4bb08aca8c Initialize ec_mii, and re-use more ethernet common code for media
handling.

Replace an anonymous constant by PCI_COMMAND_INTERRUPT_DISABLE.

These changes have been compile-tested, only.
2009-02-05 21:40:46 +00:00
haad
7aa7bdd03c Add support for the MODULAR framework to the vnd driver. Enable building of
vnd.kmod by default.
2009-02-05 17:32:10 +00:00
ghen
a349a96a6f Enable Colemak altgr keys. 2009-02-03 17:50:28 +00:00
pgoyette
cf99d387f4 Change the i2c bus scan routine to use the write_quick protocol for most
addresses, rather than trying to read a byte of data from the device.

Some devices don't like to be read from (certain clock devices are, I'm
told, write-only!), while others expect to be asked only for words (or
pairs of bytes).

While here, skip a bunch of i2c addresses that can't (or at the very
least, shouldn't) have any slave devices.

This is the only use in NetBSD of the quick_read/quick_write protocol,
and it remains disabled by default.  I've updated all the generic i2c
drivers to handle the quick_* protocols, but several port-specific
drivers have not been updated since I'm in no position to verify that
the changes work.  Assistance from sandpoint, arm/xscale, evbarm/gumstix,
mips/alchemy, and macppc would be greatly appreciated.
2009-02-03 16:41:31 +00:00
pgoyette
7eb6f514e7 Update the i2c_exec() functions to handle quick_read/quick_write protocol.
Although interface routines i2c_smbus_*() exist, nothing in NetBSD actually
uses them yet.
2009-02-03 16:27:13 +00:00
pgoyette
b4d7d7bb1d Handle i2c quick_read/quick_write bus protocol in the generic i2c_exec()
routine, since we have already have the iic_smbus_* interfaces.

NOTE: i2c controllers that provide their own i2c_exec() routine also need
to be modified.  I'll be committing most of these shortly.
2009-02-03 16:17:54 +00:00
cegger
9e46f319a5 Adapt age_stop() as our ethernet stack expects it.
This makes 'ifconfig age0 down' working.
Ok cube@
2009-02-03 16:13:34 +00:00
jmcneill
5a635bb25b Add kmod glue. 2009-02-03 13:31:24 +00:00
joerg
90e9431320 Include the right header to get usb_hid_descriptor_t. 2009-02-02 18:15:36 +00:00
tsutsui
191f7dda19 - u_int8_t -> uint8_t
- use ANSI function decls
2009-02-02 15:59:20 +00:00
tsutsui
849e430f36 Remove obsolete #if defined(LKM) block. PR kern/40513 2009-02-02 15:57:51 +00:00
joerg
e2e8a79757 Include guards and match usbd_get_hid_descriptor prototype and
implementation.
2009-02-02 14:12:01 +00:00
bouyer
af9cd4822a Under some circunstance, the JMC250A2 (and maybe others) can enter a state
where INTA is asserted while no enabled interrupts are pending, which
cause a continous strean if interrupts with no way to clear it.
Clearing/resetting the enabled interrupt mask in the interrupt handler seems
to workaround this issue (this is what the FreeBSD driver does).
While there properly return 0 if the interrupt was not for us, and explicitely
disable JME_TMCSR in addition to TIMER1 and TIMER2.
2009-01-31 13:57:03 +00:00
martin
c7cc01c1be Add id for 5090 variant - reported in PR kern/40524 by Andrew Daugherity. 2009-01-31 13:54:10 +00:00
bouyer
12ae2b8914 Pass a bus_space_tag_t as first argument of bus_space_unmap, not an int. 2009-01-31 13:49:29 +00:00
martin
81ebd85110 Make it attach on JavaStation KRUPS again 2009-01-31 10:35:38 +00:00
hira
104ce1db3a Fix typo in comment (OUT -> OUI). 2009-01-31 05:44:05 +00:00
cegger
fac6f4dc2d age_dma_alloc(): Don't allocate more than really required.
It is less likely to fail with ENOMEM when we are short on dma-safe memory.
This happens more likely when running NetBSD as Xen Dom0.
2009-01-30 16:16:36 +00:00
he
2c8025012d Make fibre cards, at least 5701 models, work, by initializing the
bge_ifmedia.ifm_media field, which is not done by ifmedia_set().
Patch lifted from FreeBSD's revision 1.71.
2009-01-30 15:01:19 +00:00
jmcneill
a38fd8e41a When setting up isochronous transfers, fix a typo in an out-of-memory test. 2009-01-30 12:55:46 +00:00
jmcneill
0cc9fff237 PR# kern/38817: regression in acpi sleep on lifebook S6510
Switch to polling mode after the acpi(4) device has been suspended as
interrupts will be disabled later on and we may still need to execute
AML that tries to sleep or wait on a semaphore.
2009-01-30 12:51:03 +00:00
cegger
2caf306c7c age_dma_alloc(): print error code to figure out why it failed. 2009-01-30 08:57:35 +00:00
cegger
2042e8e4e8 remove brackets from return statements.
No functional change.
2009-01-30 08:46:25 +00:00
cegger
54411cb3fc fix error path: don't crash when age_dma_alloc() fails. 2009-01-29 17:03:37 +00:00
bouyer
c768d4a900 One more device_t/softc split fallout (a missing device_private()). 2009-01-29 12:14:40 +00:00
bouyer
9b761cfd2a As ic_ident is from 2 to ICP_NCCBS + 2, we need more than just ICP_NCCBS
sense structures in icp_scr map; otherwise we'll compute an offset past the
allocated memory (and past the end of the dmap map) from the ic_ident.
To be safe use ICP_NCCB_RESERVE instead of 2; as I'm not sure why
ICP_NCCB_RESERVE is 4.
2009-01-29 12:13:30 +00:00
sborrill
25201bad1e Correct PHY types (5 is LP, _not_ N). 2009-01-28 14:49:10 +00:00
dyoung
6ebb93d58e Protect against spurious "bnx0: Double mbuf allocation failure!"
panics.

Extract a new function, bnx_add_buf(), from bnx_get_buf().
bnx_add_buf() just tries to add an mbuf to the Rx chain.  bnx_get_buf()
tries to allocate an mbuf, first, and then to add the mbuf to the
chain.  Use bnx_add_buf() to try to put an mbuf that we took off
of the chain back onto the chain, and use bnx_get_buf() everywhere
else.

This change seems to be in keeping with the author's intent, but
it looks like the code broke at some point.

Thanks to Jarle Greipsland, David Dudley, and others for reporting
this bug and for testing patches.
2009-01-27 21:15:38 +00:00
tsutsui
398fb3fdca - use device_t and cfdata_t
- rename variables for readability after device_t/softc split
- use proper pointer types

No binary changes.
2009-01-27 11:26:15 +00:00
markd
70250ff52e Add some more Intel G4X class chipsets. Also fix gtt_size for G4X chipsets.
Partially from FreeBSD.   There is still an issue here as G4X chipsets
report an aperture size of 0.
2009-01-27 08:39:33 +00:00
markd
be346f80ff Add Analog Devices AD1984A and treat like AD1984. 2009-01-27 08:23:00 +00:00
markd
7c98b7ee1a Add i82567LM-3 2009-01-27 08:18:04 +00:00
markd
152cb9db85 regen 2009-01-27 08:07:43 +00:00
markd
a62cbc5202 Add Intel 82567LM_3 ethernet 2009-01-27 08:04:54 +00:00
bjh21
11aab16b02 Split device_t from wd33c93_softc. Reviewed by cube; tested on sgimips
by tsutsui.
2009-01-25 15:23:42 +00:00
bjh21
1cd868fdf2 The introduction of config_stdsubmatch() lost an important feature of
upc_submatch() whereby it made sure that the correct driver attached.
Since this didn't really belong in the submatch function anyway,
reintroduce it in the match functions for upc's children.

This allows my A5000 to find at least one of its hard disks.
2009-01-25 14:34:14 +00:00
christos
d2ebfa6451 PR/40471: Pierre Pronchery: ASUS CUR-DLS board found on HP NetServer E800 box
has broken ACPI BIOS. Disable it.
2009-01-25 02:26:30 +00:00
cegger
e3f5192d4c - fix test for IPv4 csum.
- No need to double negate TCP/UDP csum test
2009-01-24 08:31:03 +00:00
cegger
bbb2be253d Improve handling of transmitting large packets.
Sending large packets works better, but still needs investigations.
2009-01-23 22:59:30 +00:00
christos
bf9ab82c0e Make this compile &foo[0] does not work for void * :-) Wojciech Galazka 2009-01-23 19:49:16 +00:00
drochner
cf45120117 Avoid deadlock in tty code if a terminal emulation responds to
type/status/etc inquiries. (PR kern/37915)
This is clearly a design problem in tty, but we need a cheap fix now.
The problem is that ttyinput() tries to pull a spinlock which
is already held on calls to t_oproc.
The workaround is based on the fact that within wscons code, the
wsdisplay_emulinput() function is only called directly from
wsdisplaystart(). So we can be sure that the tty lock is held,
and use an inofficial entry point in ttc.c which avoids the locking.
These ate certainly more assumptions than needed by the fix
proposed in the PR, but it doesn't affect (and slow down) other
tty drivers.
2009-01-22 20:40:20 +00:00
cegger
23efc364a4 buildfix: re-adapt to major()/minor() return a 32bit value again. 2009-01-22 17:34:22 +00:00
cegger
f907d9477d buildfix: re-adapt to major() return a 32bit value again. 2009-01-22 17:32:20 +00:00
cegger
f365ed0108 buildfix: re-adapt to major()/minor() returning a 32bit value again. 2009-01-22 16:12:43 +00:00
cegger
f21b8480ba struct device -> device_t 2009-01-22 09:39:28 +00:00
cegger
ea6211cb91 fix crash when bringing up the device and no cable is plugged in 2009-01-22 09:37:44 +00:00
agc
dc733729ad Move back to printing the minor device as a 32-bit entity 2009-01-22 04:56:06 +00:00
cegger
ecc4ad527f buildfix: re-adapt to major()/minor() returning a 32bit value. 2009-01-21 17:16:12 +00:00
jnemeth
c0f7445ba3 add a comment explaining how to regenerate videomode.c 2009-01-21 14:40:25 +00:00
jnemeth
ae69439f5d add a comment explaining how to regenerate ediddevs.h and ediddevs_data.h 2009-01-21 14:40:02 +00:00
jnemeth
ebc311ebd3 add a comment explaining how to regenerate usbdevs.h and usbdevs_data.h 2009-01-21 14:36:10 +00:00
jnemeth
5d551dd0c7 add a comment explaining how to regenerate tcdevs.h and tcdevs_data.h 2009-01-21 14:34:18 +00:00
jnemeth
02b4a4a2af add a comment explaining how to regenerate podules.h and podule_data.h 2009-01-21 14:31:04 +00:00
jnemeth
5384a2c3b7 add a comment explaining how to regenerate onewiredevs.h and onewiredevs_data.h 2009-01-21 14:27:58 +00:00
jnemeth
7a16c23c62 add a comment explaining how to regenerate mcadevs.h and mcadevs_data.h 2009-01-21 14:24:52 +00:00
jnemeth
3650fe6bb4 add a comment explaining how to regenerate isapnpdevs.h and isapnpdevs.c 2009-01-21 14:22:46 +00:00
jnemeth
8fef557086 add a comment explaining how to regenerate eisadevs.h and eisadevs_data.h 2009-01-21 14:18:44 +00:00
jnemeth
45ff970e0f add a comment explaining how to regenerate acpidevs_data.h 2009-01-21 14:15:43 +00:00
jnemeth
dd35772633 add a comment explaining how to regenerate pcmicadevs.h and pcmciadevs_data.h 2009-01-21 14:13:09 +00:00
jnemeth
5a2d34426b add a comment explaining how to regenerate pcidevs.h and pcidevs_data.h 2009-01-21 14:10:10 +00:00
jnemeth
059ed7c24a add a comment explaining how to regenerate miidevs.h and miidevs_data.h 2009-01-21 14:08:03 +00:00
cegger
2f997eedf3 Roll our own ETHER_ALIGN #define like many other driver do.
Use ETHER_ALIGN to calculate number of segments correctly (actually the same way as FreeBSD and OpenBSD do).
Also use ETHER_ALIGN to correctly adjust new mbufs.
This makes the driver finally work. Tested by Jochen Kunz:
ping -nf 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes

----192.168.2.1 PING Statistics----
28949 packets transmitted, 28949 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.157/0.364/2.272/0.023 ms
  2710.6 packets/sec sent,  2710.6 packets/sec received


XXX Shouldn't if_ether.h provide ETHER_ALIGN instead of defining it in all drivers?
2009-01-21 07:48:54 +00:00
bjh21
ce80665a62 Convert more printfs to aprint_* and use the latter more consistently. 2009-01-20 20:57:26 +00:00
christos
ea2d6ba697 Fix obvious errors in conversion to device_t from Wojciech Galazka
Please compile-test at least!
2009-01-20 20:49:51 +00:00
bjh21
ca028b246f sec(4): use device_t and cfdata_t rather than explicit structure pointers. 2009-01-20 20:45:11 +00:00
drochner
26a88cd4d5 -avoid eternal block if device is not streaming
-apply locking to avoid race in poll()
-fix an obviously wrong flag check
2009-01-20 20:18:28 +00:00
drochner
95dfcca096 kill unused variable 2009-01-20 20:15:15 +00:00
drochner
d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
yamt
70a4009abb comment 2009-01-20 15:13:54 +00:00
yamt
3852c7cb1c bump lockstat interface version for timespec. 2009-01-20 14:49:00 +00:00
jmcneill
b7ae31c476 Decode and display PCI Power Management registers when available. 2009-01-20 13:54:43 +00:00
mjf
a3ff3b0296 mscp(4) was being a bad monkey! It's not OK to call config_found() from
interrupt context, as my vax kernel with DIAGNOSTIC told me. Instead, we
defer the work and get it to run in thread context via a workqueue(9).

Thanks to matt@ for the review.
2009-01-19 19:15:07 +00:00
jmcneill
0c302519a0 regen for Attansic L1E Gigabit Ethernet Adapter 2009-01-19 15:04:24 +00:00
jmcneill
371a1b3043 Attansic L1E Gigabit Ethernet Adapter 2009-01-19 15:03:50 +00:00
cegger
946c49f6ac fix botched age_ioctl(): don't try to roll its own handling when ether_ioctl() is doing all of it right.
Tested by Jochen Kunz.
2009-01-18 21:24:44 +00:00
cegger
97f2088ea7 beautify dmesg output 2009-01-18 18:55:38 +00:00
christos
5dd7ffdfb6 add compat50 ioctls. 2009-01-18 16:37:19 +00:00
tnn
8daad4ac39 Fix swedish USB keymap. The apostrophe key was mapped to comma.
(How did this go unnoticed for so many years?)
2009-01-18 12:58:49 +00:00
cegger
d5fc4888bc Bracket IRQ masking around nfe_intr() in nfe_init() rather inside nfe_intr().
Proposed by dyoung@ in PR 40345. Should fix PR 40345.
2009-01-18 11:21:06 +00:00
cegger
94a79c95d5 Use aprint_error_dev. Eliminates XNAME macro. 2009-01-18 10:40:40 +00:00
mrg
71e27a6efb The PCI revision numbers are unique to a PCI vendor/product
ID pair.  Misuse of the revision numbers was causing some of the chip
features to be disabled on some integrated Intel chips.  So, move the
determination of the features into the bus frontend, where the
vendor/product ID is known.  (Note: sc_rev should be removed.  The
microcode patch stuff is also busted and needs to be fixed.)  Also,
poll the actual flow control status in inphy, rather than making
assumptions.

contributed anonymously.
2009-01-18 10:37:03 +00:00
mrg
94ed4b4374 Don't attempt to unload a DRM device that's in use. (Note:
Unloading doesn't work right in any case -- it doesn't clean up the
sysctl tree, among other things.  This code needs Work, but at least
this prevents it crashing randomly due to autounload while X is
running.)  Also, fix the dependency list for radeondrm.

contributed anonymously.
2009-01-18 10:04:35 +00:00
mrg
dff35a2418 Enable flow control and poll the status appropriately.
contributed anonymously.
2009-01-18 10:00:51 +00:00
cegger
7971844bd8 Until we do WOL, the PCI power management suspend code is a noop. 2009-01-17 00:02:40 +00:00
cegger
8023f7432d don't call age_stop and age_init in suspend/resume.
pmf network class is already doing that.
pointed out by jmcneill
2009-01-16 23:58:05 +00:00
cegger
09bd2fda5c rename PCI_PMCSR_PME to PCI_PMCSR_PME_STS.
Per request from jmcneill
2009-01-16 23:23:34 +00:00
cegger
fe069f5185 - fix age_read_vpd_word().
- add power management support. From FreeBSD.
2009-01-16 23:10:32 +00:00
cegger
53033e6af4 add Power Management flag. From FreeBSD. 2009-01-16 23:09:27 +00:00
cegger
31614b9ad8 add RCSID 2009-01-16 21:47:56 +00:00
cegger
0da9122630 age driver needs mii_phy 2009-01-16 21:11:27 +00:00
cegger
7546e67ddd Driver for Attansic Technology F1 10/100/1000 Ethernet PHY.
Written by Pyun YongHyeon for FreeBSD, ported to OpenBSD by Kevin Lo, ported to
NetBSD by me.
2009-01-16 21:06:24 +00:00
cegger
351ce8ab9a Use mii_anar(). No functional change. 2009-01-16 20:52:20 +00:00
cegger
100faa2cd7 add mii_anar(). From OpenBSD. 2009-01-16 20:51:18 +00:00
cegger
20e2f309c1 regen 2009-01-16 20:42:19 +00:00
cegger
dc7d4d47a4 add ATHEROS F1 and F2 PHYs 2009-01-16 20:41:39 +00:00
cegger
32b43f4cc8 Driver for Attansic L1 gigabit ethernet driver.
Written by Pyun YongHyeon for FreeBSD, ported to DragonFlyBSD
by Sepherosa Ziehau, ported to OpenBSD by Kevin Lo and then
ported to NetBSD by me.

XXX Driver needs testing.
2009-01-16 20:18:08 +00:00
bouyer
c99586fc4a According to the latest datasheet I have (1.09), the transmitter and ckecksum
offload clocks needs to be programmed according to the negociated speed;
make it so. This makes the sample JME260 I have work.
2009-01-16 19:56:06 +00:00
yamt
cf5a92c11e always use the new version of wscons_event for in-kernel. 2009-01-16 15:14:11 +00:00
yamt
350f838fcf wsevent_init: always initialize version. pointed out by christos. 2009-01-16 14:38:09 +00:00
jmcneill
e90eb84a4b regen for HP Generic RNDIS 2009-01-16 13:31:41 +00:00
jmcneill
3e9c6e548d Add HP Generic RNDIS ID 2009-01-16 13:31:01 +00:00
haad
d80238dac9 Add struct disk to dm_dev so our LV will beshowed in iostat output. 2009-01-16 11:19:02 +00:00
mhitch
23a9d45ee2 When checking drive status, bump the pointer to the previous status
rather than using just drive 0 status.  Another drive with a different
status would cause the previous status state to flip-flop and repeatedly
output state change messages.
2009-01-16 05:40:50 +00:00
mhitch
258f66824c Another missed part of the device_t/softc split. Fixes ld(4) devices
on mlx(4) controller.
2009-01-16 04:20:28 +00:00
haad
44e4eeea57 Disable unloading of dm driver when there are any devices defined. This means
that we have to run lvm vgchange -a n before modunload in NetBSD.

We really need to disable module unloading only for mounted devices, I have
to look at vfs_hooks for mount/umount calls and find way how to mark devices
as mounted in dm driver.
2009-01-16 00:46:12 +00:00
yamt
0915dface4 - reduce the number of #ifdefs.
- build compat glues if MODULAR.
2009-01-15 04:22:11 +00:00
cegger
99af9c90e3 pull in changes from FreeBSD:
- reset autonegotation timer if media option is not IFM_AUTO or we got a invalid link.
- Announce link loss right after it happens.
- Autonegotiation is retried every mii_anegticks seconds.
- Report link state changes right after setting autonegotiation.
- use rgephy_reset consistently
- change rgephy_reset to use mii_phy_reset and rgephy_load_dspcode.

These changes give me a speedup from 6.5MB/s to 9.1MB/s on a 100MBit link.
2009-01-14 19:24:32 +00:00
christos
4c7a98373d Allocate the max size needed so that we don't need to realloc in setversion.
Problem pointed out by yamt.
2009-01-14 15:34:36 +00:00
pgoyette
c6125af1bb Include ADT7460 in chip table (it's identical to the ADT7463, except for
physical packaging).
2009-01-14 13:54:29 +00:00
haad
2df042407e Add dm module as dependency and remove module_hold/module_rele calls. 2009-01-14 00:56:15 +00:00
christos
8945a0f495 provide wscons_event compatibility with 5.0. 2009-01-13 18:05:55 +00:00
yamt
70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
cegger
2846a218fe use PRIu64 format to printf DISKPART 2009-01-12 08:33:02 +00:00
cegger
942939bc67 use PRIu64 format to printf major() value 2009-01-12 08:30:38 +00:00
cegger
da1cef7418 cast to char to printf DISKPART 2009-01-12 08:16:27 +00:00
christos
47e43241e2 protect kernel inline with _KERNEL 2009-01-12 02:26:16 +00:00
christos
b34c1a567e s/set/get/ 2009-01-11 23:55:25 +00:00
christos
ced9088db5 retain compatibility with old firm_event. Perhaps we should bump the protocol
version with an ioctl?
2009-01-11 23:36:39 +00:00
oster
6d132f42c6 Implement DIOCCACHESYNC for RAIDframe too. 2009-01-11 21:58:41 +00:00
mlelstv
8de4cc7236 Avoid crash under LOCKDEBUG by destroying a mutex correctly.
Also: move mutex init/destroy into attach/detach functions and
handle case where line discipline is closed before the irframe
device. Fixes PR kern/40271.
2009-01-11 14:28:13 +00:00
mlelstv
1c2f2889cc Register with pmf. 2009-01-11 14:21:48 +00:00
haad
a74b9dc067 Use 64bit long minor nuber in dm_dev structure. 2009-01-11 11:54:52 +00:00
haad
ae10a6c772 Fix aprint_debug after christos-time_t merge. 2009-01-11 11:44:23 +00:00
cegger
8c2b3a39bc make this compile 2009-01-11 10:58:26 +00:00
cegger
378bd0b618 make this compile 2009-01-11 10:47:37 +00:00
cegger
f8e41c4991 make this compile 2009-01-11 10:40:27 +00:00
cegger
e6e72079ad make this compile 2009-01-11 10:25:29 +00:00
cegger
08ebead94e make this compile 2009-01-11 09:51:38 +00:00
matt
eb01a7c3df Initialize sc->sc_dev before we use it. 2009-01-11 07:40:02 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
cegger
c288f70f98 use new exported constants from net80211.
no functional change.
2009-01-10 13:03:19 +00:00
cegger
13175d24c8 BCM4328 has MAC rev 12.
XXX Driver now tells me, this chip has unsupported PHY type 4.
2009-01-10 12:57:50 +00:00
cegger
48a2c14752 Attach on BCM4328. This chip supports 11n. 2009-01-10 12:55:45 +00:00
cegger
096c5722ac add flow control support. From OpenBSD. 2009-01-09 22:03:13 +00:00
cegger
f7112a92d1 add support for RTL8211C(L) phy.
From FreeBSD.
2009-01-09 21:56:35 +00:00
jmcneill
df68862dbf Make the "EULA not accepted" message a bit more informative, now reads:
EULA not accepted; please see the <driver>(4) man page.
2009-01-09 21:14:36 +00:00
macallan
d6ded78b71 Fix previous screwup.
This is the real bwi driver.
Ported by Taylor R. Campbell
2009-01-09 20:49:42 +00:00
macallan
b7893fb67e PCI attachment for the bwi driver
From Urban Boquist
2009-01-09 19:53:24 +00:00
macallan
c83792f07e A driver for Broadcom BCM4302 wlan controllers, otherwise known as
Airport Extreme.
Ported from Dragonfly and OpenBSD by Urban Boquist
2009-01-09 19:50:24 +00:00
briggs
9ee13eae71 According to the datasheet, temperatures on the LM75 are kept in
0.5 degC-precision the most-significant 9 bits of a 16-bit register.
Interpret them as such and simplify the conversion.
2009-01-09 17:20:31 +00:00
briggs
c43973de4b Provide a utility routine to configure/write the watchdog.
XXX This watchdog should eventually be integrated into the generic
    watchdog framework.
2009-01-09 16:09:43 +00:00
ahoka
805568190e Implement the required ioctls for running Xorg through /dev/ttyE0.
Reviewed by macallan@
2009-01-07 01:31:01 +00:00
jnemeth
f050d39171 regen 2009-01-07 00:40:51 +00:00
jnemeth
8c8c552278 fix typo in LUCENT ET1301 2009-01-07 00:40:09 +00:00
mrg
aab4d008e5 use the prom addresses except on MSIIEP.
this probably works on SB2000 now.
2009-01-06 04:04:55 +00:00
jakllsch
02513c1f9c Correct license. I have not formally contributed this to TNF.
However, ugensa.c was, so restore that licencse and append mine.

Also, use UT_*_VENDOR_INTERFACE instead of local defines of the same thing.
No functional change.
2009-01-05 17:22:18 +00:00
yamt
b1fea83762 remove extra semicolons. 2009-01-03 03:43:21 +00:00
haad
0e718155a1 Return ENOSYS during from dm_target_init routine these tow targets aren't
implemented yet.
2009-01-02 22:33:51 +00:00
briggs
bbc63cf490 Allocate enough space for the aac_pci_softc, not just the aac_softc. 2009-01-02 22:03:07 +00:00
jdc
ca92cdbafd Remove duplicated key symbol in UK keymap. 2009-01-02 13:09:36 +00:00
haad
2a2e81e0f1 Properly register dm_target_* modules with module framework. 2009-01-02 11:06:17 +00:00
haad
894d2ad3b7 Add stubs for mirror target, too. This target does nothing for now, but lvm
tools support mirror target and trying to create LV with mirrorred backend
caused panic in dm_table_load_ioctl.
2009-01-02 11:03:24 +00:00
haad
2547289caf Add more tasks and add more details about them. 2009-01-02 01:13:49 +00:00
haad
32013fd9f2 Add stripe target functions stubs. Stripe target must be present in dm driver
because without it lvm2tools will not create LVsi and eventualy panic system.

Problem reported by agc@.
2009-01-02 00:42:31 +00:00
jdc
79efdbb4ff Back out previous and clear the screen directly.
Pointed out by macallan@.
2009-01-01 13:53:07 +00:00
reinoud
339f5c5772 Add ISO partition detection enabling auto-detection of iso9660 and UDF
partitions on optical media like CD/DVD/BD but also on all other media if
there is no NetBSD disklabel or MBR label.

Also fix cd's readdisklabel arguments so the ioctl's arrive at the right
device (!) and update its default label to make more sense.
2008-12-30 19:38:36 +00:00
jmcneill
9f9ac957a5 Silence printf in common "device not found" error path. 2008-12-30 10:44:30 +00:00
pooka
13de128f76 Actually, revert previous - I doubt it would work with a non-rump kernel.
The filthy #ifdef _MODULE lives to stink another day.
2008-12-29 17:52:43 +00:00
pooka
7b9ae626a8 die filthy #ifdef _MODULE, die! 2008-12-29 17:47:08 +00:00
jdc
eebd19f78d On old chip revisions, clear the screen using rasops when attaching. 2008-12-29 14:42:15 +00:00
jdc
e3fc2b7c4b Clear the screen (via rasops) when attaching.
Pointed out by Bill Green on port-sparc.
2008-12-29 14:27:59 +00:00
mlelstv
0f2eef0070 fdcintr1 requires the mutex to be held. 2008-12-29 12:16:52 +00:00
jmcneill
63b42fed50 PR# port-i386/40284: add AMD Geode CS5536 audio driver; written by
SHIMIZU Ryo <ryo@nerv.org>
2008-12-28 15:16:24 +00:00
tsutsui
d88429017d Regen from miidevs rev 1.80:
> Fix a botched comment.
2008-12-27 10:39:04 +00:00
tsutsui
aa50416355 Fix a botched comment. 2008-12-27 10:38:15 +00:00
tsutsui
ff822508cf Regen from pcidevs rev 1.971:
> Fix tyop in previous.
2008-12-27 10:36:09 +00:00
tsutsui
62631acb1a Fix tyop in previous. 2008-12-27 10:35:08 +00:00
he
556cce3113 Follow up on the removal of MALLOC(), use malloc() instead. 2008-12-27 10:23:54 +00:00
jnemeth
5805e53b1d regen for et (Agere) driver 2008-12-27 09:05:22 +00:00
jnemeth
8cb5cf0f62 PR/39094 - Kaspar Brand -- Add et (Agere ET1310/ET1301) netowrk driver 2008-12-27 09:03:32 +00:00
jnemeth
7436f169a9 regen for et (Agere) driver 2008-12-27 08:56:50 +00:00
jnemeth
5b59b2b26d PR/39094 - Kaspar Brand -- Add et (Agere ET1310/ET1301) netowrk driver 2008-12-27 08:55:35 +00:00
he
ecff12ce83 Sprinkle #if NTCTRL > 0 so that this builds again without
warning that some static function is defined but never used.
2008-12-26 22:37:29 +00:00
macallan
efb62a12dd move callout_init(sc->sc_tick_ch) before we're trying to callout_stop()
the ticker.
2008-12-26 18:51:19 +00:00
tsutsui
3cf9bfd3aa Set all default geometry parameters (not only secpercyl and secsize)
before readdisklabel(9) on DIOCGDINFO so that we can get correct
media size via the ioctl. (usually floppy doesn't have a real disklabel)

Tested on i386 with 1.44M floppy.
2008-12-24 16:56:28 +00:00
jmorse
b400d28c38 Fix UVC webcam output by:
- Storing updated video format after user changes format
- Round up number of xfers queued to multiple of 8, due to ehci inefficiencies
- Remove random debugging line I slipped in earlier
2008-12-23 03:22:29 +00:00
macallan
698f27a0ae make this compile again with NWSDISPLAY==0 2008-12-22 23:46:22 +00:00
blymn
215b203640 Pay more attention to the state of the RF kill switch, such as don't
bring the interface up when the RF is off.
2008-12-22 11:32:04 +00:00
haad
9401ff0b03 Remove DM_TABLE_DEPS it is not used in kernel driver and it breaks build
of libdevmapper because it clashes with DM_TABLE_DEPS from dm-ioctl.h.
2008-12-22 02:20:04 +00:00
haad
1016f02c61 Remove done task and add new one. 2008-12-22 02:18:53 +00:00
he
dfe654dcfc Follow up the removal of the MALLOC() macro, use malloc() instead. 2008-12-21 18:01:42 +00:00
nonaka
8025a0b1ce Add VT8237S Integrated SATA Controller support. 2008-12-21 16:27:57 +00:00
nonaka
0b52d4c69a Regen. 2008-12-21 16:25:28 +00:00
nonaka
77c888b6df Add VIA VT8237S Integrated SATA Controller ID. 2008-12-21 16:23:53 +00:00
haad
cca8fb31f9 Add support for loading dm targets as separate modules. All targets except
linear can be loaded as module. Module is not loaded when there is target
with similar name already. Zero and error targets aresimple examples how
can be all future targets written to support dynamic loading. Target can't
be unloaded until there is at least one user.
2008-12-21 00:59:39 +00:00
haad
38805eb14c Fix error path in target_init call. When initializing target fails i have
to release table before I try to destroy it and I haveto unbusy device, too.
2008-12-21 00:53:27 +00:00
oster
73225b15a5 When unconfiguring an array where a reconstruct is in progress, abort
the reconstruct and wait for IOs to drain before pulling the plug.

Should fix the panic reported by der Mouse on tech-kern.
2008-12-20 17:04:51 +00:00
cegger
dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00
haad
78284dcaf1 Add infrastructure needed to load device-mapper targets as modules.
Targets wasn't converted yet and at least snapshot target will be converted
in a near future.
2008-12-19 16:30:41 +00:00
haad
c9d0c62a0c Merge the haad-dm branch to -current. This branch adds LVM functionality to
the base NetBSD system. It uses Linux LVM2 tools and our BSD licensed
device-mapper driver.

The device-mapper driver can be used to create virtual block devices which
maps virtual blocks to real with target mapping called target. Currently
these targets are available a linear, zero, error and a snapshot (this is
work in progress and doesn't work yet).

The lvm2tools adds lvm and dmsetup binary to based system, where the lvm
tool is used to manage and administer whole LVM and the dmestup is used to
communicate iwith device-mapper kernel driver. With these tools also
a libdevmapper library is instaled to the base system.

Building of tools and driver is currently disable and can be enabled with
MKLVM=yes in mk.conf. I will add sets lists and rc.d script soon.

Oked by agc@ and cube@.
2008-12-19 15:24:03 +00:00
pgoyette
3ed3895de3 Add i2c bus address checking for these chips. All supported chips live
at predefined addresses 0x2c, 0x2d, or 0x2e.
2008-12-18 20:41:35 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
cegger
77c3411230 make this compile 2008-12-17 19:35:09 +00:00
cegger
f51c42b9f0 make this compile 2008-12-17 19:09:56 +00:00
cegger
c04f959ef5 make this compile with AUDIO_DEBUG 2008-12-17 15:47:35 +00:00
cegger
ad15153381 make this compile with IYDEBUG 2008-12-17 15:41:24 +00:00
cegger
8d3de7484b make this build with AZALIA_DEBUG 2008-12-17 15:35:17 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
christos
761540f260 regen 2008-12-16 19:55:22 +00:00
christos
85947fef5e add more intel iwn devices 2008-12-16 19:54:52 +00:00
jakllsch
26f9d336c3 In case the PCI command bits aren't already set, do so before performing
an access that requires them to be.  From KIYOHARA Takashi.
2008-12-16 02:46:47 +00:00
jakllsch
9ff34ac12b Add siisata(4) to the lists. From KIYOHARA Takashi. 2008-12-16 02:14:24 +00:00
mhitch
2c6d71a592 More device_t/softc split fallout, this time in iop(4). Fix from
Juan Romero Pardines.  Tested on alpha by me.
2008-12-15 18:35:48 +00:00
elad
f4f1989ae8 PR/39559: Juan RP: veriexec(4): too easy to cause a NULL dereference
through it in kernel

Patch from PR applied with tiny modifications, thanks!

Discussed with blymn@ a while ago.
2008-12-14 23:20:23 +00:00
jmcneill
0af0b213b5 Remove debug printfs 2008-12-14 00:53:52 +00:00
jmcneill
3e8db25945 Add Elantech multi-touch driver. 2008-12-14 00:42:33 +00:00
sketch
8be734c633 Fix PGTBL sizes. 2008-12-13 20:12:13 +00:00
christos
64193bedec more debugging in the dump path. 2008-12-13 19:38:20 +00:00
tsutsui
3eda3c7d85 Revert part of previous that reverted part of rev 1.14
which didn't affect the bug. (use __func__ to print function names)
2008-12-13 17:32:53 +00:00
mrg
f4cdd8a3bc remove unused variable. 2008-12-13 05:54:57 +00:00
macallan
fc934dfa9a fix stride value returned by /dev/fb 2008-12-12 18:48:25 +00:00
macallan
20dab5963b device_t-ify 2008-12-12 18:46:41 +00:00