Commit Graph

25367 Commits

Author SHA1 Message Date
tsutsui
8d2f130b12 Tweak comments and conditionals about EXT_RFA and IPCB. 2009-03-15 14:48:11 +00:00
tsutsui
3acfa89d3b Adjust comments about sc_flags. 2009-03-15 14:18:38 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
apb
2a86bfea6b Add FSYNC_CACHE flag to the VOP_FSYNC() call for the DIOCCACHESYNC ioctl.
PR 41015.
2009-03-14 18:00:37 +00:00
apb
caccc8126b Pass DIOCCACHESYNC ioctl down to the underlying disk.
Addresses PR 41016.
2009-03-14 17:56:47 +00:00
christos
19b058b35e PR/41015: Alan Barrett: vnd driver does not implement DIOCCACHESYNC 2009-03-14 16:33:25 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl
02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
jmcneill
8cf7d77c2c Don't assume ACPI == x86, from kiyohara@kk.iij4u.or.jp 2009-03-14 13:56:41 +00:00
ad
0fa70e9b6f 'boot -z' bogons 2009-03-14 11:08:28 +00:00
jmcneill
b33d444d81 PR# kern/41008: possible simple mistake of field check in video(9)
video_set_format() requires hw->set_format to be set, not get_format,
from fukumoto@imasy.or.jp
2009-03-14 00:33:25 +00:00
jym
96f9080096 Fixes in the iwi(4) driver to better handle errors:
- bus_dmamap fixes, with checks against NULL
- move the rings' allocation code later in iwi_attach() to avoid NULL pointer
dereference if allocation fails
- avoid double free() in case of failure during attach. If an allocation fails,
do not free the ring directly, as it is handled by iwi_detach()
- only set ring->count for RX/TX rings when ring allocation is successful, or
else the for loop during detach will fail with a NULL dereference.
- call pci_intr_disestablish() if iwi_reset() fails during attach; driver is
in an incoherent state, interrupt handler should not be used.

Proposed by me on tech-net@, approved by christos@. Compiled and tested
with GENERIC and XEN3_DOM0 kernels.
2009-03-13 21:57:07 +00:00
yamt
34ccaa3db1 tprof_stop1: add an assertion. 2009-03-13 11:06:26 +00:00
bsh
01bbe49d65 Turn off interrupt disable bit in command status reg.
This is necessary to make S-ATA drives work on some motherboards with
SiS964 including my ASUS P4S800D.
2009-03-12 15:02:42 +00:00
jmcneill
143d119885 Add 'alternative memory' disk device driver. 2009-03-12 00:15:07 +00:00
yamt
0bbefb72ab fix breakage where db_regs_t != trapframe.
the problem pointed out by Martin Husemann on tech-kern@.
2009-03-11 13:48:47 +00:00
tsutsui
b057550bcf u_intNN_t -> uintNN_t 2009-03-11 13:12:41 +00:00
yamt
e1b625b4bc - adapt to MODULAR.
- some preparations to have more backends.
- add some comments.
2009-03-10 14:45:02 +00:00
msaitoh
9d35632b3f add an entry for 82567LF-3.
fix the register access for ICH10DO.
2009-03-10 03:41:50 +00:00
msaitoh
76b6d5d63e regen 2009-03-10 03:31:36 +00:00
msaitoh
9036c274a6 add i82567LF-3 LAN Controller 2009-03-10 03:30:55 +00:00
uebayasi
143d2214bf These don't need <sys/tty.h>. 2009-03-09 15:59:33 +00:00
christos
049ae3d056 Match Inter 82965PM, from Anon Ymous 2009-03-09 13:13:25 +00:00
tsutsui
567ce9e6ef Computed checksum value by the FXPF_82559_RXCSUM feature includes data
in IP headers, so we have to deduct not only IP option headers but all
IP headers.  But in TCP/UDP layer we can assume the IP header is valid
and a sum of the IP header part should be 0xffff, so we don't have to
bother to deduct it from the computed checksum.
2009-03-09 10:33:33 +00:00
ad
0458d57a95 use aprint_error 2009-03-08 15:06:56 +00:00
agc
15de39d387 Fix tyop in previous. 2009-03-08 02:07:38 +00:00
reinoud
664af01cd8 Actually lmplement striping as LVM target. OK'd by Adam. 2009-03-07 22:17:18 +00:00
tsutsui
a8ba219be8 Replace incorrect local ether_cmp() function with memcmp(9)
on checking multicast addresses, which is not so critical.
Noticed by FUKAUMI Naoki.
2009-03-07 16:46:25 +00:00
tsutsui
cf97a4b35d Add TCPv4/UDPv4 RX hardware checksum support for i82559 and later chips
which don't have EXT_RFA and IPCB support. From hme(4) driver and
FreeBSD's fxp(4). Tested on i82559.

XXX: Probably we should have a common function to parse RX packet headers
XXX: to handle a raw checksum value and share it among hme(4) and gem(4) etc.
2009-03-07 15:03:25 +00:00
mrg
9526e87d38 move a DRM_SPINUNLOCK() to where it will actually be executed. 2009-03-07 05:46:09 +00:00
dyoung
0226a0496e Don't try to write the registers of the NIC to stop it if it is
already powered down.  This change prevents PCI bus exceptions
(indicated by NMI) when, for example, I detach the whole device
tree on a Soekris net4521:

com1: detached
NMI ... going to debugger
Stopped in pid 0.1 (system) at  netbsd:sipcom_stop+0x4d:        pushl   $0
db{0}> continue
NMI ... going to debugger
Stopped in pid 0.1 (system) at  netbsd:sipcom_stop+0x149:       addl    $0x10,%e
sp
db{0}> continue
sip0: detached

(On the AMD Elan SC520, the NMI occurs at the instruction after
the write or, if the write was posted, at either that instruction
or some later one.)
2009-03-07 00:56:04 +00:00
tsutsui
ee11921a7a Add an `else' missed in rev 1.49 otherwise RX hardware checksum on hme(4)
is not activated at all. Ok'ed by christos@, tested on macppc.
2009-03-07 00:12:36 +00:00
bouyer
dbac012ecf Make it safe to call uhci_init() from a kernel thread with interrupts
enabled:
- don't enable interrupts before calling uhci_run()
- check if the controller's interrupt is enabled in uhci_intr()
The issue is that uhci_run() may tsleep(), uhci_intr1() may be called before
uhci_run() is complete and disable it because it found it halted.

Now a uhci controller can be successfully exported to a NetBSD Xen domU :)
2009-03-06 23:40:50 +00:00
hauke
f971ff9cd3 Workaround from jmcneill for a panic at shutdown.
Fixes PR kern/40947 and should be pulled up to netbsd-5.
2009-03-06 17:10:41 +00:00
haad
50b5b59cc7 Fix lvm lvrename command. There was bug in dm_dev_lookup where
dm_dev_lookup_name was called with device uuid. Remove dm_dev_t:dk_label is
it not used anymore.
2009-03-06 16:17:29 +00:00
tsutsui
19b9bc7f5d The Intel manual says that ICH and 82562 chips are compatible with 82559,
not 82550, so don't set FXPF_EXT_RFA (available only on 82550/82551)
for those variants.

Tested on Intel PRO/100 VM with 82562EM/EX PHY by ISHII Kimio
on current-users, and should also fix PR kern/40431.
2009-03-06 09:54:02 +00:00
msaitoh
f9ccf64b65 Fix typo(s/interupt/interrupt/) 2009-03-05 01:38:12 +00:00
tsutsui
26c579d9c4 Use FXPF_EXT_RFA flag instead of FXPF_EXT_TXCB to see IPCB capability
because EXT_RFA for RX cksum is always available with IPCB for TX cksum
but i82558 and i82559 have only EXT_TXCB without IPCB.

Tested on the following fxp cards:
fxp0 at pci0 dev 14 function 0: Intel i82557 Ethernet, rev 2
fxp0 at pci0 dev 14 function 0: i82559 Ethernet, rev 8
fxp0 at pci0 dev 14 function 0: i82550 Ethernet, rev 12
2009-03-04 10:15:08 +00:00
cegger
05d55db82b mimic fix from nfe(4):
when bus_dmamap_create fails, then the map pointer is undefined.
age_dma_free() assumes, the map pointer is NULL. Make the assumption
always true by setting the map pointer to NULL in bus_dmamap_create()
error path in order to prevent age_dma_free() to call bus_dmamap_destroy()
on an invalid map.
2009-03-03 23:28:44 +00:00
cegger
4822727b65 make multicast working.
Diff from OpenBSD's if_age.c rev. 1.2.
2009-03-03 22:26:41 +00:00
mrg
dcd94c7684 enable FXPF_EXT_RFA the same way the cardbus frontend does. 2009-03-03 06:06:40 +00:00
haad
5b244085d8 Linear target has only 2 arguments in a params string not 9. 2009-03-01 23:17:39 +00:00
haad
f8faf523ec Change comment and add description of line used to configure mirror device. 2009-03-01 23:16:51 +00:00
haad
f048f56f71 Add initial support for striping target, hardcode maximal number of stripes
to 2 for now. strategy routine must be written, for now only parsing and
support routines are available. This is work in progress code and should be
taken very carefully.
2009-03-01 23:15:56 +00:00
cegger
2352b93556 bzero -> memset per request from martin@
bcopy -> memcpy

XXX Would changing bcmp to memcpy be a functional change regarding its return value?
2009-03-01 13:44:54 +00:00
cegger
945fa6c58f when nfe_attach() fails, free all resources including
interrupt map, interrupt handler and dma maps.
Also prevent call to bus_dmamap_destroy() when bus_dmamap_create() failed.
The nfe_free_* routines assume, the map pointers are NULL but they
are actually undefined. Make the assumption true by making them NULL
in the error path of bus_dmamap_create().

All together, this fixes crashes when nfe_attach() fails.
ok martin@
2009-03-01 13:34:10 +00:00
cegger
927cfb73c8 MCP79 supports JUMBO frames.
Information from Linux driver.
Patch presented on current-users@ http://mail-index.netbsd.org/current-users/2009/02/11/msg008037.html
2009-03-01 08:29:25 +00:00
oster
b39a5d4daa Nuke a DIAGNOSTIC check that is no longer useful, even for DIAGNOSTIC. 2009-02-28 23:11:11 +00:00
oster
d7dbe2c6b8 It seems that some SCSI drivers can block while the spinlock on a given
disk queue is being held.  Work around this by dropping the lock before
bdev_strategy(), and re-grabbing the lock afterwards.  This is a
temporary measure until I get to gutting this queue locking code.

There has been some success with this in addressing PR#39993.
This patch is from Antti Kantee.  Thanks!
2009-02-28 22:02:17 +00:00
jmcneill
74dd0aeee0 Change a confusing attach message; if the embedded controller was attached
via ECDT, we would print:
  acpiec0 at acpi0 (EC, PHP0C09-0): ACPI Embedded Controller (disabled)
The embedded controller isn't actually disabled, but instead this driver
instance, so change the message to read:
  acpiec0 at acpi0 (EC, PHP0C09-0): using acpiecdt0
2009-02-28 19:40:23 +00:00
schwarz
8167178188 correct entry for Lucent 0x5802 into 2-port USB Host Controller 2009-02-28 17:55:46 +00:00
jmcneill
4ca035a32b Add proper Realtek ALC268 support. While we're here, fix a comment in
the ALC262 quirk section. Tested by Sean Davis on an Acer Aspire One.
2009-02-28 17:12:13 +00:00
msaitoh
95deb7702d Fix the multicast hash bug on ICH9's wm.
Now we can catch ff02::9 on ICH9's wm.
2009-02-28 15:06:43 +00:00
tsutsui
13a1c5a155 Return EIO rather than getting an infinite loop in the nullcons read function
so that getty(8) against nullcons console fails properly.

Problem on Cobalt Qube2700 reported by Wolfgang Solfrank on port-cobalt.
2009-02-28 00:40:47 +00:00
dyoung
6e3de811e0 Use the right format specifiers to print the new struct timeval. 2009-02-27 23:13:32 +00:00
sborrill
7d02030263 Add support for 82574L (as found on Desktop CT adaptor) based on 82573 support. 2009-02-27 13:17:01 +00:00
mjf
c49f4c3690 Regen. 2009-02-26 19:17:01 +00:00
mjf
c1c5918fbb Add Initio INIC-1622 SATA Controller. 2009-02-26 19:13:38 +00:00
jmcneill
079289a3e6 PR# port-i386/40143: Viewing an mpeg transport stream with mplayer causes crash
Not directly related to the PR but this bug was discovered while testing.

In azalia_stream_halt, invalidate the intr ptr to prevent a race condition
where azalia_stream_intr can jump off into lala land during stream shutdown.
2009-02-25 15:46:34 +00:00
jmcneill
72141a1696 Turn "bogus parameters" aprint_error into aprint_debug, and change the
message to say that the framebuffer was not configured by the firmware.
2009-02-23 23:45:56 +00:00
jdc
7262e977ee Mimic cgsix memory corruption fix (bwtwo and cgthree wscons code is
based on cgsix).  Original commit message:

  Include wsdisplay.h directly in the header to avoid different sizes
  of cgsix_softc depending on proper previous includes by the includer
  due to #ifdef NWSDISPLAY. Thanks to kmem poison check and DEBUG kernels.
2009-02-23 22:44:27 +00:00
cegger
6ec3b632d5 when attach routine fails, also free DMA memory and interrupt mapping.
Diff from OpenBSD's if_age.c rev. 1.2.
ok cube@
2009-02-23 13:39:41 +00:00
cegger
b6d8a5c8fc remove unused age_if_flags softc member 2009-02-23 07:33:58 +00:00
jmcneill
34c593f760 * Realtek ALC885: Use generic_mixer_autoinit/init_widget
* generic_mixer_create_virtual: if the front l/r DAC doesn't have a volume
  capability, enumerate all peer widgets and search for a volume mixer
  there.
2009-02-23 02:34:57 +00:00
cube
102a4f0ad3 I smell rotting code. (Give a chance to the user to at least set the flags
of the interface, if not use it because it otherwise doesn't work.)
2009-02-23 00:05:44 +00:00
pgoyette
7bcb9558e0 1. Reorganize code into memory-type-specific routines instead of multiple
monstrous if-then-else-if constructs.
2. Display module capacity in GB if it is at least 1GB.
3. Indicate if a memory module is "registered".
4. For DDR3, indicate if a temp-sensor is present.

Inspired by similar changes in OpenBSD's spdmem(4).
2009-02-22 17:28:50 +00:00
nakayama
c99ea852e4 - fix copyout size in CLOCKCTL_O?ADJTIME.
- add missing break in CLOCKCTL_NTP_ADJTIME.
2009-02-22 13:06:58 +00:00
christos
d43c4580f1 s/long/intptr_t/ 2009-02-21 17:24:47 +00:00
martin
ff1d9de353 Include wsdisplay.h directly in the header to avoid different sizes
of cgsix_softc depending on proper previous includes by the includer
due to #ifdef NWSDISPLAY. Thanks to kmem poison check and DEBUG kernels.
2009-02-20 22:55:26 +00:00
haad
e654dd3da2 Call dm_target_busy only on properly autoloaded module. 2009-02-20 11:14:11 +00:00
haad
9629be83bf Release tables before we drop reference on device, now creating device with
nonexistent target fails and not ends with deadlock.
2009-02-20 11:12:30 +00:00
dogcow
f2437436f6 sparc complains "cast to pointer from integer of different size"; cast the
int to (void *)(long).
2009-02-20 08:04:15 +00:00
mrg
ce8a6e2599 - remove FXPF_IPCB flag. it should always/only be used with the code
conditional on FXPF_EXT_TXCB, so, replace all uses with that
- for the pci frontend, reestablish some flags lost the the prior
  changes and simplify one of the cases

this fixes PR 40677 and may fix PR 40431.
2009-02-20 05:49:34 +00:00
jmcneill
90c7459808 If the bus glue provides an ioctl handler, don't return before we have a
chance to perform generic handling in the WSDISPLAYIO_SMODE case.

ok macallan
2009-02-20 00:08:00 +00:00
haad
d624725a46 In NetBSD our target modules are called with prefix dm_target_. Add this
prefix to target module name when loading module, lvm2tools uses linux
target names e.g. zero not dm_target_zero.
2009-02-19 23:20:27 +00:00
haad
17599f37f3 Add support for autoloading of device-mapper targets modules. Add
dm_target_autoload function which tries to load target module. Fix two
deadlocks in dm_table_load_ioctl error path(I forgot to call dm_dev_unbusy).
2009-02-19 23:07:32 +00:00
sborrill
d297edd948 Regen 2009-02-19 17:26:21 +00:00
sborrill
73ab5cd89f Add Intel i82574L 1000baseT Ethernet as used in Pro/1000 CT Desktop adapter 2009-02-19 17:25:46 +00:00
markd
e985093766 Add missing break. 2009-02-19 05:58:37 +00:00
jmcneill
a53ec2987d remove vesabios and vesafb 2009-02-19 00:55:48 +00:00
jmcneill
dc02b079e4 Remove vesafb-specific hacks. 2009-02-19 00:39:25 +00:00
mrg
f5e9e80946 simply the previous as suggested by enami:
- don't check args->tp, just let copyin() fail.
2009-02-18 17:57:11 +00:00
yamt
74ccc189c4 wsevent_copyout_events50: fix a bogus panic. 2009-02-18 13:20:02 +00:00
hira
b225d4fb77 - Rename filename of license.
- Correct filename in license (add missing prefix).
2009-02-18 10:51:17 +00:00
mrg
6e512790b1 clock_settime1() expects the struct timespec * to be in kernel space.
make it so.

fixes crashes seen on sparc64 systems with clockctl.
2009-02-18 05:17:56 +00:00
snj
3c510e6b43 s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202. 2009-02-18 04:17:44 +00:00
jmcneill
f11a7f3f4f Revision 1.25 was unintentionally reverted in the previous commit, bring
it back.
2009-02-18 00:27:21 +00:00
jmcneill
60c3292c48 Use aprint_* 2009-02-17 20:35:35 +00:00
jmcneill
3bc515352f Use kmem_alloc instead of malloc for shadowfb 2009-02-17 17:01:41 +00:00
jmcneill
c315121ad0 Cut the amount of spam from acpi devices in roughly half by printing
resources on the same line as autoconf messages. Things like:
  pcppi1 at acpi0 (SPKR, PNP0800)
  pcppi1: io 0x61
become:
  pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
2009-02-17 12:46:01 +00:00
jmcneill
3c220ee07d Use aprint_debug 2009-02-17 12:30:31 +00:00
jmcneill
28f60a7907 Print the physical address if available instead of a virtual address. 2009-02-17 02:41:11 +00:00
jmcneill
d994f000f0 Add clear-screen and cursor-row properties to allow genfb to persist
screen state from the MD console driver.
2009-02-17 02:19:33 +00:00
jmcneill
e04f5ff1b4 Provide callbacks so MD code can explicitly prevent genfb from matching;
works around vga/genfb deathmatches.
2009-02-16 22:24:40 +00:00
mlelstv
c94f3d9355 Don't release CCB twice. Found by code inspection. 2009-02-16 18:05:19 +00:00
cegger
0df426b492 make this compile w/o VLAN 2009-02-16 09:38:41 +00:00
cegger
add29455bf fix media priorities:
IEEE 802.3 Annex 28B.3 specifies the following relative
priorities of the technologies supported by
802.3 Selector Field value:

1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T

Our drivers give 100BASE-T4 a higher priority than
100BASE-TX full duplex.
Fix this. This patch is based on changes in FreeBSD and OpenBSD.

Patch presented on tech-kern and tech-net:
http://mail-index.netbsd.org/tech-kern/2009/02/15/msg004397.html
http://mail-index.netbsd.org/tech-net/2009/02/15/msg001064.html

got no comments, no objections.
2009-02-16 08:00:42 +00:00
jmcneill
b16648eaeb Only pull in genfb.h if _KERNEL_OPT is defined. Reported by Kurt Schreiner 2009-02-15 20:21:24 +00:00
jmcneill
2fa3d3184a Use genfb_borrow; drm works with genfb now. 2009-02-15 18:42:20 +00:00
jmcneill
ec798a6e6c Introduce genfb_ops genfb_borrow callback to allow the bus frontend to
lend mappings to drm.
2009-02-15 18:41:49 +00:00
jmcneill
a71612a2f8 Provide a stub genfb_cnattach for md code to call to give a hint to the
bus driver's match function to return a higher confidence (so it can
beat out vga(4), for example). genfb needs-flag so md code can determine
if the genfb driver is present.
2009-02-14 20:33:58 +00:00
perry
88e7f0dcf4 convert to ANSI function prototypes 2009-02-14 20:32:29 +00:00
jakllsch
78a7904557 Add USB_VENDOR_CYBERPOWER/USB_PRODUCT_CYBERPOWER_UPS to the HID blacklist.
This will allow Network UPS Tools to communicate with these UPSes via ugen(4).
2009-02-14 17:13:01 +00:00
jakllsch
5a819467a1 regen. 2009-02-14 17:03:33 +00:00
jakllsch
2c011568c9 Add CyberPower Systems, Inc. vendor ID, as well as one of their product IDs,
which is used in two (or more) models of UPS devices.
2009-02-14 17:01:23 +00:00
bjh21
a0263b80b8 I've just discovered config_found_ia(), which means that wskbd(4) and
wsmouse(4) can attach directly at arckbd(4) and I can dispose of the
ugly arcwsmouse(4) and arcwskbd(4) interpositions.  Do that, and purge
them from the documentation as well.
2009-02-14 10:20:55 +00:00
bouyer
73920b4161 More printf format fixes. 2009-02-13 23:31:23 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
bouyer
e83cf7c074 Fix bus_addr_t/bus_size_t confusion 2009-02-13 22:39:37 +00:00
bouyer
1b21577543 Fix printf format after bus_size_t change 2009-02-13 22:39:10 +00:00
bouyer
651c78e5dd Make sure PCI_COMMAND_MASTER_ENABLE is set in PCI_COMMAND_STATUS_REG. 2009-02-13 21:12:14 +00:00
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