Commit Graph

16823 Commits

Author SHA1 Message Date
jonathan
73e79089ee Possibloe fix for some bge chip revisions taking a long time to reset
(e.g., polling for a half-second or more at splnet(), blocking most
interrupts, durin an ifconfig down/ifconfig up).

Appears to help for a 5704C rev A3, which is the only chip I've
ever seen that had even a mild version of the reported problem.
2004-03-20 01:58:51 +00:00
matt
bcc199a19c Add gt_dma_bus_mem_to_phys and gt_dma_phys_to_bus_mem. 2004-03-20 01:55:00 +00:00
jonathan
426b3e3a08 Check for BGE_PCI_PCISTATE register failing to revert on reset.
if it occurs, print a message indicating why the reset took so long.
2004-03-20 01:42:21 +00:00
oster
29c6e63ebb dag_node_pool never did get used here. Turf. 2004-03-19 17:04:35 +00:00
oster
1a3e20d5d9 Introduce a dual-purpose pool for providing pointer and param "caches"
for RF_DagNode_t's.  Scale the structure size based on RF_MAXCOL.
Use the new allocation method in InitNode().  Note that we can't get
rid of the mallocs in there until we can prove that this new
allocation method is a strict upper bound.  Unless someone tries
running a RAID set with 40 components, the mallocs here shouldn't
shouldn't be an issue.  (and if someone does make a set with 40 components
they will run into other issues with other constants long before
then)
2004-03-19 17:01:26 +00:00
pk
fb4c6462e1 fb_is_console/SUN4U: fbnode => prom_stdout_node. 2004-03-19 16:05:25 +00:00
oster
b2c52e1175 Take care of six more mallocs:
- Pull rf_FreePhysDiskAddr() out from under a #ifdef, since we're now
going to use it.

- Add a pda_cleanup_list into the DAG header.  Use it in rf_FreeDAG() to
cleanup any PDA's that get allocated but have no "easy" way of being
located and freed when the DAG completes.

- numStripeUnitsAccessed is a per-stripe value, and has a maximum
value equal to the number of colums (thus limited by RF_MAXCOL).
Use this knowledge to set a high-bound on overlappingPDAs, and stuff
it on the stack instead of malloc'ing it all the time!  This costs us
a whopping 40 bytes on the stack, but saves a malloc() and a free().
2004-03-19 15:16:18 +00:00
petrov
42615e3301 Add sun display types. 2004-03-19 09:00:38 +00:00
oster
5ac8fbad7f Add a comment. Will hopefully save time next time someone tries
to figure out where the allocated memory is freed.
2004-03-19 02:57:34 +00:00
oster
d3810da59b Add a few comments to explain what some of these new structures are, and
where they are used.
2004-03-19 02:34:30 +00:00
oster
208b461a96 Introduce 3 more pools and 6 functions to handle allocating/freeing
elements from the pools.

Re-work rf_SelectAlgorithm() to get rid of all the 8 malloc's, and to
use the new functions to get/put these 'support structures'.  I'm not
overly happy with some of the variable names, but them's the breaks.

In the process of changing things, fix a bug:
 - in the case where we can't create a dag, free asmh_b and blockFuncs
too!!

[if you were able to look at the source code related to these changes,
and comprehend what was going on without having your eyes bleed or
getting dizzy, please contact me...  I'm sure I'll have more code
which would benefit by you having a look at it before I commit it :) ]
2004-03-19 02:27:44 +00:00
oster
997983060e Re-work rf_State_Quiesce() so that we don't have to hold a lock
while doing a pool_get().
2004-03-19 01:56:03 +00:00
he
2c34d70afa Adapt to the removal of NE2000_USE_WORD() macro, now replaced
by a field in ne2000_softc.
2004-03-18 23:38:17 +00:00
bouyer
4f04c7872f Use the bus_space_*_stream_* methods to access the chip's registers.
As we turn the chip to big-endian mode on big-endian systems, we should
never byte-swap the data read/written from/to registers. Tested on sparc64.
Finally fix kern/13341 by Jason R. Thorpe (really, the hard work of putting
bus_dmamap_sync() calls at the right places has been done my Jason mid-2001 :)
2004-03-18 23:20:32 +00:00
bouyer
6e20098871 cur_rx->ti_vlan_tag holds the 802.1q VLAN tag and the 802.1p priority.
Trimm the priority, as the upper layers won't do it and will drop the packet
if priority is not 0.
While there, print the revision in the "unsupported chip revision" printf.
2004-03-18 22:45:35 +00:00
bjh21
39d9753ed9 ANSIfy, un-__P(), and generally KNF. 2004-03-18 21:05:19 +00:00
oster
b69e81af97 Remove a debugging line that was accidentally left in. 2004-03-18 17:46:22 +00:00
oster
ba5bdf0048 Use rf_AllocDAGNode() to get new DAG nodes. 2004-03-18 17:26:36 +00:00
oster
1051cc745f Re-work the locking mechanisms for reconstruct and PSS structures
such that we don't actually hold a simplelock while we are doing
a pool_get(), but that we still effectively protecting critical code.

This should fix all of the outstanding LOCKDEBUG warnings related to
rebuilding RAID sets.
2004-03-18 16:54:54 +00:00
oster
d4fe1a2103 - Introduce a 'dagnode' pool. Initialize it and allow for cleanup.
Provide rf_AllocDAGNode() and rf_FreeDAGNode() to handle
allocation/freeing.

- Introduce a "nodes" linked list of RF_DagNode_t's into the DAG header.
Initialize nodes in InitHdrNode().  Arrange for nodes cleanup in rf_FreeDAG().

- Add a "list_next" to RF_DagNode_t to keep track of nodes on the
above "nodes" list.  (This is distinct from the "next" field of
RF_DagNode_t, which keeps track of the firing order of nodes.)
"list_next" gets used in the cleanup routines, and in traversing
through a set of nodes that belong to a particular set of nodes
(e.g. those belonging to xorNodes for a given DAG).

- use rf_AllocDAGNode() instead of mallocs of variable-sized arrays of
RF_DagNode_t's.  Mostly mechanical changes to convert the DAG construction
from "access nodes via an array index" to "access nodes via a 'nextnode'
pointer".

- rework a couple of tricky spots where assumptions about the node order
was being abused.

- performance remains consistent with performance before these changes.

[Thanks to Simon Burge (simonb at you.know.where) for looking over
the mechanical changes to make sure I didn't biff anything.]
2004-03-18 16:40:05 +00:00
dan
b912bfcc09 Fix a longstanding bug in key-handling for the blowfish cipher.
This is an incompatible change, and will break all existing cgd images
encrypted with blowfish. Users will need to dump their data before
booting a kernel with this change, and recreate cgd's and restore data
afterwards.

I believe this affects a very small number of users other than myself;
indeed after several alert mails in an attempt to find them, only 2
such users have come forward. They have both agreed the requirement
for backwards compatibility does not warrant the effort nor the mess
in the code.  This code does exist, if it should later prove to be
needed, but will not be in the tree.

Further, by the nature of the issue, I have strong reasons to believe
that, even if they missed these mails, there would be few other users
of blowfish who update their systems with any regularity; any such
users would have tripped over the problem in the same way I did when
it was first found over a year ago.

The problem stems from two issues with the underlying blowfish
encryption routines used by cgd:
 - they take key length arguments counted in bytes, rather than bits
   like all the opther ciphers.
 - they silently truncate any keys longer than an internal limit,
   rather than returning an error (which would have exposed the
   previous discrepancy immediately).

As a result, the kernel reads too much data as the key from cgdconfig,
and then truncates most of it. This can easily be demonstrated/tested.
Currently, Blowfish users will find that if they mis-enter the cgd
passphrase on the first attempt, when validation fails and cgdconfig
prompts for the passphrase again, the cgd will not correctly configure
even when given a correct passphrase.
2004-03-18 10:42:08 +00:00
sekiya
d1ae192917 Add console type for SGI GR2 family. 2004-03-18 08:30:58 +00:00
uwe
0e524a56a1 Scandinavian keyboard layout for Jornada 680/690. 2004-03-18 01:11:58 +00:00
mycroft
2d3bb76a10 A random patch that's been in my source tree...
Figure out whether the shared memory region is word-accessible in the same
place we figure out its size, and store this in the softc, rather than using a
series of comparisons later.
2004-03-17 23:47:16 +00:00
scw
6946234e5e Use PRIu64 and PRIx64 in place of %llu and %llx format strings for
printing variables of type u_int64_t.
2004-03-17 20:27:57 +00:00
dyoung
9ef4dd42f2 Prevent a buffer overflow that's been seen in the wild. The firmware
will sometimes return 0; subtracting 1 from that yields a too-big
buffer length.
2004-03-17 17:19:13 +00:00
pk
ea53363e84 Rename PROM_getprop*() => prom_getprop*(). 2004-03-17 17:04:58 +00:00
dyoung
73a618d5f3 In wi(4), wi_choose_rate used to contain device-independent code.
I have pulled that code into the function ieee80211_rssadapt_choose
so that I can re-use it in ath(4), atw(4), and in other drivers.

In rssadapt(9), I have also created a struct ieee80211_rssadapt_expavgctl
that contains parameters for rate adaptation. When IEEE80211_RSSADAPT_DEBUG
is enabled, I will using sysctl to expose an ieee80211_rssadapt_expavgctl
for each wireless device.

Also in rssadapt(9), I have introduced an interpolate() macro which
makes the exponential-averaging code more compact.
2004-03-17 17:00:34 +00:00
pk
c188a40b85 Update previous change: set defaults properly. 2004-03-17 14:00:46 +00:00
martin
fde39f7603 For sparc*: myetheraddr is no more 2004-03-17 13:54:09 +00:00
martin
ac3bee274a Fix hme for pci based sparcs (krups). 2004-03-17 08:58:23 +00:00
uwe
dd45c4817c Comment change only. Add a reminder that if you add new entry to
hpckbd_keymap_table, you must make sure that pckbd_keydesctab[] in
sys/dev/pckbport/wskbdmap_mfii.c has a placeholder KB_MACHDEP entry
for the base ht_layout that you refer.

I've stepped on this rakes two times already, with DE and FR keymaps,
so I gather, I'd better add this reminder, if only for myself. :)
2004-03-17 04:34:25 +00:00
uwe
5b0626de75 The platid for Jornada 680/690 with European English (ABB) keyboard is
now properly renamed to have the EU suffix.

Enable Jornada 680/690 French (ABF) keymap now that we have a platid
for it (requires updated hpcboot.exe to use).
2004-03-17 04:24:16 +00:00
uwe
050ecd0171 Add KB_FR | KB_MACHDEP placeholder. Need it for the Jornada 680/690
French (ABF) keyboard layout (to be enabled soon).
2004-03-17 04:09:57 +00:00
pk
9166dfe50b Use prom_getoption() and drop home-grown string-to-integer conversion code. 2004-03-16 22:47:10 +00:00
bouyer
751597cddb cbd -> cdb
Command Block Descriptor -> Command Descriptor Block
Pointed out by Allen Briggs.
2004-03-16 19:10:43 +00:00
simonb
98cd2fe77e Fix an assigned-to-but-not-used variable in the non AHC_ALLOW_MEMIO case. 2004-03-16 05:32:09 +00:00
pk
967492ee53 Replace myetheraddr() by prom_getether(). 2004-03-15 23:51:11 +00:00
uwe
e9612620ef Now that we can control contrast and brightness of the Jornada 680 LCD
add KS_Cmd_{Contrast,Brightness}{Up,Down} to default keymaps.
2004-03-15 23:25:09 +00:00
uwe
4b44d3c34a Change #if 0 protecting the lines with KS_euro to #ifdef KS_euro, so
that the keymap definitions are forward-compatible.
2004-03-15 22:49:07 +00:00
bouyer
542c876565 Extract the code printing the CBD from scsipi_print_sense(), so that it's
usable in other context.
Use the new scsipi_print_cbd() to dump the command in case of timeout
in siop/esiop.
2004-03-15 22:43:43 +00:00
bouyer
285ce8d78e Indent. 2004-03-15 22:28:30 +00:00
augustss
26b7762c08 Regen. 2004-03-15 11:16:43 +00:00
augustss
ae2960eaf0 Add some devices. From FreeBSD. 2004-03-15 11:16:23 +00:00
augustss
92bc86cdb6 Add Epson Perfection 1670 scanner 2004-03-15 11:09:23 +00:00
augustss
eaf85ed85e Regen. 2004-03-15 11:08:53 +00:00
augustss
fd28ddd148 Add Epson Perfection 1670 scanner 2004-03-15 11:08:34 +00:00
augustss
da2d21f6ee Set the device address before reading the device descriptor.
This makes certain non-conforming devices work.
Suggested by Peter Burnett in kern/24716.
2004-03-15 10:35:04 +00:00
dyoung
224491add0 Move the ath(4) sysctls to hw.ath from ath. 2004-03-15 03:26:04 +00:00
wiz
4fdf521f76 It's extension, not extention. From Miod Vallat (miod at online fr). 2004-03-14 20:11:24 +00:00