Commit Graph

152639 Commits

Author SHA1 Message Date
martin
d55cb18cdc A few -Wextra nits 2006-10-20 18:26:26 +00:00
reinoud
f64c33e88b Define DPRINTF(x) as an empty block to prevent gcc from complaining about
empty statements. This is still an empty statement but it will be filtered
out still.
2006-10-20 18:14:59 +00:00
christos
8c97c569de include ecalloc() from our anonymous user. 2006-10-20 17:40:39 +00:00
christos
284c960b4d typo from our anonymous user. 2006-10-20 17:40:18 +00:00
tsutsui
f236f53515 In re_newbuf():
- adjust m_data and m_len directly rather than calling m_adj(9)
- more cosmetics
2006-10-20 17:11:36 +00:00
tsutsui
2cc86b486f KNF, remove register decls, TAB/space cosmetics etc. 2006-10-20 16:46:47 +00:00
kiyohara
9bb8dc5407 alphabetical order. 2006-10-20 16:38:15 +00:00
tsutsui
572ce0789f u_intNN_t -> uintNN_t 2006-10-20 16:31:08 +00:00
christos
2933708c6a remove 3d magic. 2006-10-20 15:54:45 +00:00
tsutsui
7245fafc22 Add re at pci and rgephy at mii. 2006-10-20 15:48:37 +00:00
tsutsui
d27d349474 Use BUS_DMA_COHERENT on mapping DMA memory for TX/RX descriptors.
I can't think of a good way to avoid race condition between writeback and
DMA write against descriptors if cachelinesize > sizeof(struct rtk_desc)...

Anyway, now re(4) is functional on O2 (and probably other mips ports).
2006-10-20 15:44:00 +00:00
tsutsui
a7ca335bad Try to avoid race condition between cache writeback from CPU and DMA write
from re(4) chip as much as possible.
2006-10-20 15:19:01 +00:00
tsutsui
620e93c99c while (1) -> for (;;) 2006-10-20 14:51:06 +00:00
tsutsui
d2c63dd7b9 - bcopy -> memcpy
- bcmp -> memcmp
2006-10-20 14:28:55 +00:00
tsutsui
55b9847900 There is no particular reason to use BUS_DMA_ALLOCNOW on bus_dmamap_create(9). 2006-10-20 14:00:49 +00:00
tsutsui
920add0c28 Tweak a for() loop a bit in re_rxeof(). 2006-10-20 13:44:31 +00:00
tsutsui
38e9d649da Sync RX mbufs before setting up RX DMA descriptor. 2006-10-20 13:39:47 +00:00
reinoud
78f5b5f9d5 Fix alignment problems causing regular panics in tpc_sack_option on
NetBSD/alpha and NetBSD/sparc. This fixes PR#34751.

The problem most likely started to show in gcc4 and is caused by the use of
a casting to an uint32_t pointer that is later copied from using memcpy.
Gcc detects the copying of 4 bytes from an uint32_t pointer and decides to
just replace it with an aligned copy causing the trap.

Fix provided by Izumi Tsutsui and ok'd by Martin.
2006-10-20 13:11:09 +00:00
he
f0947b3081 The symbol to define to 1 if a pointer to an int fits in a long is
INTPTR_IS_LONG, not INTPTR_IS_ULONG -- the latter is unused in
other parts of lint's code.  This stops vax's lint from complaining
about conversion of integer constants to 'unsigned long' in function
argument lists, via a proper define of INT_RSIZE in common/inittyp.c.
sh3 defined this to 0, so was actually not affected, but better to
eradicate the typo there as well.
2006-10-20 12:51:12 +00:00
tsutsui
e9a7d245ed - call bus_dmamap_sync(9) against DMA descriptors more properly
- make DMA descripter members volatile
Now re(4) works on sgimips O2.

XXX: Still re(4) sometimes stalls on NFS load on sgimips,
XXX: but I'm not sure it's sgimips specific or not.
2006-10-20 11:30:54 +00:00
scw
d269f28650 Force a reload of the EEPROM if the MAC address is all zeroes.
Fixes PR kern/34812.
2006-10-20 10:31:06 +00:00
yamt
a2fafc1061 mention tcp abc. reminded by Rui Paulo. 2006-10-20 09:39:55 +00:00
scw
4526a898c6 Validate the sector size returned by READ CAPACITY. If it looks bogus
print a warning and fallback to a suitable default.

Fixes a problem on hp700 reported by skrll@
2006-10-20 07:11:50 +00:00
gdamore
e8ac1cad77 This commit provides substantial fixes and functionality for SPI flash.
Specifically, the SPI flash now operates as a nearly fully functional block
device (other than lacking disklabel support).  It does some basic translation
stuff, so that if you attempt to write a block, the underlying flash sectors
(usually 64k in size) will be read, erased and rewritten.

To minize thrashing, the spiflash strategy routine attempts to gather writes
to the same sector together, so that in the typical case you will not have to
repeatedly erase/rewrite the sector.  It also attempts to check and verify
whether an erase cycle is truly needed.  There are still access patterns that
will cause multiple erases to occur, and so I heartily discourage the use
of these flash devices for storing anything other than small configuration
data, or write-once images.  If you want to do more than that, then someone
should try to write a real flash translation layer.

The drivers attempt to provide some level of asynchronous operation, so that
while you are erasing or writing to the flash, other things can reasonably
take place.

Note that spiflash does not do bad block remapping.  It also doesn't detect
when a device is in read-only mode, or if some sectors are read-only.  It
only supports uniform sectored NOR flash.  It lacks any code to deal with
disklabels, and does not offer any disk related ioctls.

These limitations aside, it would not be terribly hard, I think, to break
out the code I've done to create a generic "norflash" driver, backed by
a "common" spiflash module.  Then other flash drivers (e.g. athflash, etc.)
could benefit from the ability to use this as a block device.  I've tried
to architect it to support that, if someone else wants to do the work.
(Hi Jared!)

The primary reason that I've not added code to deal with disklabels is that
I had a difficult time figuring out which framework (disklabels or wedges)
to use, and which bits of code were necessary to implement.  In the case of
the flash devices I'm working with, a parser to deal with redboot FIS images
(partitions) would need to be added.  I was prepared to do this, but gave
up owing to the complete and total lack of any API or design documentation
pertaining to the requirements for disk drivers and disklabel management or
wedges.   I would strongly encourage someone who knows something about
wedges or disklabels to write a simple document (or even a dummy driver)
showing which interfaces should be provided in new mass storage drivers.

This work was funded by the Champaign-Urbana Community Wireless Network
Project.
2006-10-20 06:41:46 +00:00
martin
06f6d1ebf7 Sync (commented out) kgdb options with reality.
(Not that it works at all - the locore.s support is not done yet)
2006-10-19 22:01:18 +00:00
martin
6caa94ff4b kgdb support for sabtty 2006-10-19 21:52:12 +00:00
martin
860142f506 Remove unsued file 2006-10-19 21:44:51 +00:00
martin
8c154addc5 Remove obsolete (and partially accidently commited) kgdb parts 2006-10-19 21:09:46 +00:00
wiz
d72654d9e5 Fix spacing issue, reported by anonymous. 2006-10-19 20:28:45 +00:00
he
e1fda29be8 Convert to using hexadecimal literals for the type limits.
Also, add a trailing 'U' to the unsigned limits.
2006-10-19 20:20:43 +00:00
skrll
7e68cfaa21 powerpc MD_DO_NOT_NEED_FALLTHRU.
OK'ed by Matt Thomas.
2006-10-19 18:59:30 +00:00
drochner
b7e3bcb0e5 gcc4/gdb6 work well with dwarf debug symbols (at least in the example
from PR toolchain/25094), so revert the local change which made .stabs
the default
2006-10-19 18:10:38 +00:00
drochner
06e33f371b remove relicts of COMPAT_AOUT, fixes compilation problems with old
kernel config files reported by Patrick Welche on current-users
2006-10-19 16:55:37 +00:00
skrll
e99b876999 Alpha MD_DO_NOT_NEED_FALLTHRU
Ok'd by Matt Thomas.
2006-10-19 16:47:38 +00:00
reinoud
98d17cde9d Make it compile again; it had an empty if body due the the DPRINTF and gcc
complained about it.
2006-10-19 15:11:59 +00:00
tnozaki
17e6581dbd add encoding alias CP949 -> UHC. 2006-10-19 14:47:58 +00:00
tnozaki
cf5d987754 add new iconvdata ATARIST, HP-ROMAN8, NEXTSTEP. 2006-10-19 14:45:02 +00:00
tsutsui
881db3b0de Defer enabling hardware interrupts until all timecounter(9)s are initialized
in cpu_initclocks(9), and then remove "if (cold)" check in decr_intr().

Fixes long delay during config_process_deferred() for interrupt_config_queue,
OK'ed by macallan.
2006-10-19 14:25:29 +00:00
rpaulo
8106a506d3 Use a better way to create sysctl subtrees for ECN and Congctl.
Inspired on ABC subtree.
2006-10-19 14:14:34 +00:00
tnozaki
503c123619 switch the conversion table from rfc1345 to unicode.org's one. 2006-10-19 14:06:14 +00:00
pooka
c870120337 VOP_RENAME synopsis:
* tdvp points to a vnode, not a componentname.
* name of the source vnode is fvp, not vp
2006-10-19 13:44:00 +00:00
simonb
e8ff7d18f3 Use "U" suffixes for largest unsigned type values.
Pointed out by Nick Hudson.
2006-10-19 12:05:26 +00:00
yamt
355bbc5cdf document tcp.abc. 2006-10-19 11:48:02 +00:00
yamt
c549acefec tcp_reno_newack: remove an __unused because it's now used. 2006-10-19 11:42:32 +00:00
yamt
df8e5bddfa tcp_reno_newack: regardless of sysctl setting, use L=1*SMSS when
we are doing retransmission.
2006-10-19 11:42:02 +00:00
yamt
81463c93c7 implement RFC3465 appropriate byte counting.
from Kentaro A. Kurahone, with minor adjustments by me.
the ack prediction part of the original patch was omitted because
it's a separate change.  reviewed by Rui Paulo.
2006-10-19 11:40:51 +00:00
he
4df50368d1 sysconf() returns long, which isn't neccessarily assignment-compatible
with size_t, as evidenced by sh5, so add an explicit cast.
2006-10-19 10:10:35 +00:00
vanhu
5328e8c78b Added ipsecdoi_chkcmpids() function 2006-10-19 09:36:22 +00:00
vanhu
3835b0b6a5 From Matthew Grooms: use ipsecdoi_chkcmpids() and changed src/dst to loc/rmt in getsainfo(). 2006-10-19 09:35:51 +00:00
vanhu
b0f2fc5ddb From Matthew Grooms: Added ipsecdoi_chkcmpids() function. 2006-10-19 09:35:44 +00:00