Commit Graph

24666 Commits

Author SHA1 Message Date
jdc
7892af0d0c Read the chip revision from the Sbus register. 2008-11-20 20:56:56 +00:00
jnemeth
4e826d168f regen for Corega CG-USBRS232R 2008-11-20 10:51:51 +00:00
jnemeth
55a2353845 PR/39971 - SHIMAOKA Shunsuke -- Recognize Corega CG-USBRS232R as a
serial device.
2008-11-20 10:50:42 +00:00
bouyer
fec31ce43e Check that vnd is not NULL before using it, return ENXIO if it is.
Avoids a panic when vnconfig -uF is used on a busy vnd.
2008-11-19 18:38:36 +00:00
matt
2c14b3c725 Regen. 2008-11-18 16:12:21 +00:00
matt
b0c5679ab1 Make more consistent (change capitalization) etc. Shrinks by 33 tokens
and 300 bytes.
2008-11-18 16:12:03 +00:00
ad
54ef467580 _KERNEL_OPT 2008-11-18 14:29:55 +00:00
jnemeth
cc34b6178d PR/39947 - Juan RP -- dbcool_detach implicitly called
sysmon_envsys_destroy() twice
2008-11-18 10:49:45 +00:00
cegger
db189eeadc SATA GEN3 speed is 6.0Gb/s 2008-11-18 09:52:10 +00:00
chris
d1214474bc Fix Yukon EC Ultra cold power up issue.
For the EC Ultra it is necessary to update some extra registers during
reset.  Without doing so causes the system to hang at boot.  The only
workaround I found was to PXE boot before booting into NetBSD.

This change is based on the code from FreeBSD's if_msk.c.  Specifically the
msk_phy_power function.

Also add an splnet/splx across mii_tick.  This matches most other network
drivers.

Change posted for review on 3rd Oct 2008 to tech-net.  No feedback
received.
2008-11-18 09:30:43 +00:00
matt
bcb2caec0b Regen. 2008-11-17 23:35:24 +00:00
matt
eadd097264 Store pcidevs in a more compact manner. Instead of many string with duplicate
words, store each word individual in a long string and then store offsets
in the string to that word.  This reduces the space needed by half.
2008-11-17 23:33:41 +00:00
joerg
a5be52d405 On resum-from-RAM explicitly restore PCI link device state before
reenabling interrupts. At least one BIOS doesn't do this automatically
as reported by Christoph Egger.
2008-11-17 23:29:49 +00:00
bouyer
5a45b84ca9 If we return an error make sure we don't return a b_resid of 0; or this
will trigger a KASSERT in physio_done(). Fix issue reported by Todd Kover
on tech-kern@
2008-11-17 21:19:03 +00:00
dyoung
ddbd8176f9 Reduce code duplication: most PHY drivers call mii_phy_add_media()
when they attach to the device tree, so call pmf_device_register(9)
once there instead of once in more than twenty drivers.
2008-11-17 03:04:27 +00:00
bouyer
99f68f2ca2 cpu_intr_p() doesn't account for software interrupts (e.g. callouts) so
we can't use it here. Rssurect ATACH_TH_RUN, backing out
src/sys/dev/ata/ata.c 1.101
src/sys/dev/ata/ata_wdc.c 1.90
src/sys/dev/ata/atavar.h 1.77
src/sys/dev/ic/wdc.c 1.255
src/sys/dev/scsipi/atapi_wdc.c 1.108
Should fix kern/39927 and kern/39725.
2008-11-16 19:31:21 +00:00
bouyer
5c26c1f703 Do not depend on physmem for pci_dma64_available(). On some systems (e.g. Xen,
or any system with non-contigous physical memory), physmem may not represent
the hightest physical address available.
Discussed on tech-kern@ some weeks ago.
2008-11-16 17:31:03 +00:00
pgoyette
3dbe765413 For DDR3, the number of physical banks stored in the EEPROM needs to be
incremented by 1.
2008-11-16 14:03:48 +00:00
tsutsui
2a3ae26e88 Fix tyop in #ifdef TLDEBUG part. 2008-11-16 02:11:29 +00:00
blymn
a920095679 Actually declare the structures used in iwn_scan_hdr instead of using
pointer arithmetic to create the elements on the fly.

Other changes to scan routine taken from FreeBSD driver.
2008-11-13 12:04:09 +00:00
phx
3e7e644efc Added missing #include <net/if_ether.h> for ether_ioctl(). 2008-11-12 21:15:49 +00:00
joerg
4c4dba8748 Cache wpi firmware in memory, free it only on invalid content or when
the last user is detached. This stops wpi from accessing the disk on
resume.
2008-11-12 18:23:08 +00:00
jmcneill
d6b7340a23 Add support for Realtek ALC269 as found in Eee PC 1000HA. 2008-11-12 13:33:10 +00:00
ad
0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
pgoyette
438c6057be Fix typo in previous, and wrap a panic with #ifdef DIAGNOSTIC 2008-11-11 19:03:06 +00:00
pgoyette
0ba7ea9569 Initialize event's "previous sent state" based on the event monitor type,
regardless of sensor type.  Fixes spurious "device: normal state on
'sensor-name' messages (reported by ad@) which interfere with sysinst.
2008-11-11 16:55:01 +00:00
cegger
e60c84c6c6 PR kern/39608: bge(4) constant freeze on BCM5906M:
Correct DMA values. Patch from Karl Uwe Lockhoff via tech-kern.
2008-11-10 22:50:18 +00:00
joerg
5787d39971 Fix typo in fw name. 2008-11-10 18:05:12 +00:00
bjs
8b2e3ec035 Use agp_flush_cache() instead of wbinvd(). 2008-11-09 14:26:14 +00:00
pgoyette
7355d18b97 Leave the task of displaying sensor states to envsys_sysmon() unless we
are in debug mode.
2008-11-09 13:54:06 +00:00
pgoyette
18913ef363 Temp sensor should report a critical-overtemp condition (ENVSYS_SCRITOVER)
not a simple critical (ENVSYS_SCRITICAL) condition.
2008-11-09 03:36:04 +00:00
christos
4c2b1bf33a PR/39885: Sébastien Bocahu: add R500 chips support 2008-11-09 02:35:42 +00:00
christos
2688948f51 regen. 2008-11-08 17:27:15 +00:00
christos
71ede8ab96 Support for Intel G35 as found on Asus P5E-VM HDMI motherboard from
Milos Negovanovic
2008-11-08 17:26:28 +00:00
dyoung
8e791deb98 To finish the device_t/softc split, convert some casts to struct
auich_softc * to device_private() calls.
2008-11-08 00:26:35 +00:00
he
761f38db5c In wsdisplay_kbdholdscreen(), just return if sc->sc_focus is NULL.
There is apparently no guarantee sc->sc_focus will be non-NULL,
as proved by a crash I experienced earlier today (admittedly on 4.0.1).
2008-11-07 19:33:13 +00:00
joerg
866b295da8 Match image name with upstream distfiles. 2008-11-07 14:58:27 +00:00
dyoung
de87fe677d *** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link
02🇩🇪ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.
2008-11-07 00:20:01 +00:00
cegger
1f7782b4ba wrap lines. no functional change. 2008-11-06 17:50:59 +00:00
blymn
3286a94bad Move init of essid to the attach code. 2008-11-06 12:03:43 +00:00
hannken
a797621996 fss_bs_thread: initialize b_error and b_resid.
Before it was possible for fss reads to return bogus b_resid values
leading to "delta > 0" panics from physio().
2008-11-05 19:30:57 +00:00
blymn
57e1492b11 * Disable aborting the scan for the moment - it causes a firmware error if
a scan was never initiated which breaks WEP and open wireless connections
* Make sure the ESSID is cleared.
2008-11-05 09:42:20 +00:00
pgoyette
287fe7d56d Fix cut&paste error in prev 2008-11-04 22:16:15 +00:00
pgoyette
3880525312 Restore previous behavior concerning CRITICAL events. Send an event
whenever state enters or exits CRITICAL, or whenever value of sensor
changes while the state is CRITICAL.
2008-11-04 22:06:10 +00:00
reinoud
3a0f6cde46 Implement powersave for ixpide(4). Tested it on an Asus IXP250 with IGP.
It seems to sleep and awake fine now without errors or warnings.
2008-11-04 16:05:29 +00:00
cegger
bae2482c7f regen. 2008-11-04 13:23:41 +00:00
cegger
982f9b9410 fix typo in previous: prodcut -> product 2008-11-04 13:22:29 +00:00
cegger
b8c4e4c3fe regen. 2008-11-04 12:30:54 +00:00
cegger
2fdc34ba95 add ATI RD790 and RD890 chipset ids 2008-11-04 12:30:07 +00:00
bjs
bedd1969ee Allow writing to register R300_VAP_PVS_WAITIDLE; allows
r300 driver to work with Mesa-7.2!
2008-11-04 02:26:44 +00:00