Commit Graph

65825 Commits

Author SHA1 Message Date
itojun 32e3deae21 randomize IPv4/v6 fragment ID and IPv6 flowlabel. avoids predictability
of these fields.  ip_id.c is from openbsd.  ip6_id.c is adapted by kame.
2003-09-06 03:36:30 +00:00
itojun fc918f8713 add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more.  see tech-security
2003-09-06 03:25:23 +00:00
itojun 175c9afa3f clarify flowlabel handling 2003-09-06 03:12:51 +00:00
itojun dd45bfac41 backout previous, we don't know if arc4random() corrides on reboot. 2003-09-06 00:24:54 +00:00
itojun a245b3dc6d u_short -> u_int16_t. sync w/ kame.
don't set ip6_plen where unneeded (i.e. before calling ip6_output)
2003-09-05 23:20:48 +00:00
martin 6dd20a92b2 Fix copy & pasto. 2003-09-05 23:13:15 +00:00
itojun 9636351c96 u_short -> u_int16_t 2003-09-05 23:02:40 +00:00
itojun 0a34c7661e use arc4random. sync w/ kame 2003-09-05 22:43:01 +00:00
itojun 186bd1ad6a initialize fragment ID with arc4random, not by time.tv_sec 2003-09-05 22:09:38 +00:00
itojun 761c22ff58 use arc4random instead of random (mask with INT32_MAX to avoid getting
negative numbers unexpectedly).
2003-09-05 21:58:35 +00:00
mycroft 4d89e946a7 Some of the table entries are now noops. Remove them. 2003-09-05 11:24:56 +00:00
mycroft 61c35f890c Take vigilante action and remove all the NO_MAX_LUN, NOMODESENSE and
NOBIGMODESENSE "quirks".  These problems should be fixed without klugery
now.
2003-09-05 11:18:25 +00:00
mycroft 80605e4feb Use SMS_DBD in a several places to avoid even thinking about block descriptors. 2003-09-05 09:04:26 +00:00
mycroft 677da6684c Forgot to commit this. Add the "rpm" field to the flex geometry page. 2003-09-05 09:00:08 +00:00
tron 90ef1d5718 From FreeBSD as suggested by Nicolas Joly in PR kern/22682:
Do not initalize the LED's to 0x00.  The default configuration
the chip comes up in should yeild proper operation of the LED's.
2003-09-05 08:53:23 +00:00
mycroft 5c195383ca In addition to skipping a variable-length list of block descriptors, we also
have to adjust for whether he have a "small" or "large" mode sense response.

sd_scsibus_getcache(), sd_scsibus_setache(): Set SMS_DBD so that we don't
have to deal with block descriptors here.

sd_scsibus_mode_sense(): Add a new parameter, "int *big", which tells the
caller whether it's a small or large header.

sd_scsibus_get_parms(), sd_scsibus_getcache(), sd_scsibus_setcache(): Use
the "big" value to find the data following the mode sense header correctly.

sd_scsibus_mode_sense(): Disable PQUIRK_NOBIGMODESENSE for now, as the
reasons for it were dubious and most likely fixed now.

sd_scsibus_get_parms(): Now that we're actually locating the right data,
check the returned page code to see if it's correct before using the mode
page info.

sd_scsibus_get_parms(): Get the rotational rate from the flex geometry page
too, if present.

XXX sd_scsibus_get_{opt,simplifiedparms}() need some work.
2003-09-05 08:12:09 +00:00
itojun 891811de60 add DIAGNOSTIC check for AN_DEFAULT_xx 2003-09-05 05:38:44 +00:00
itojun 95b95dbc37 call tcp_drain() if IPv4-less kernel 2003-09-05 01:35:08 +00:00
mycroft a9e1f75ec7 Several changes to eliminate bogus controllers and sockets from being found:
PCIC_VENDOR_NONE: New.
PCIC_VENDOR_CIRRUS_*: Collapse the 2 chips into one vendor ID.

pcic_ident_ok(): Check the ID revision field -- if it's 0, punt.

pcic_vendor(): Check the ID revision field -- if it's 0, or the ID register
is all-1s, assume there is no chip present.  (Previously this would return
"Unknown controller" -- which, AFAICT, *never* resulted in a working device.)
Do the Cirrus check only after verifying that we got the Intel ID.

pcic_attach(): Use a priori knowledge of the Cirrus chips to determine the
number of sockets rather than trying (unsuccessfully) to probe.  Also, just
blast all of PCIC_INTR -- we do this in pcic_deactivate_card() anyway.
2003-09-05 01:02:51 +00:00
mycroft 8b228f0d42 sd_scsibus_get_parms():
* Use the "block descriptor length" to find the beginning of the mode page
  data.  This is critical, since some devices do not return a block descriptor
  at all.  (XXX There is disgusting structure hackery here.)
* Always use scsipi_size() (i.e. READ CAPACITY) to get the total disk size.
* Get the rotational rate from the rigid geometry page.
* Don't read the block size from the block descriptor if there was none.
* Get the block size from the flexible geometry page if possible.
* If we don't like the way page 4 smells, try page 5, rather than just punting.
2003-09-05 00:28:55 +00:00
thorpej 2f2b9c7cb0 GMII works on the i82543 now. 2003-09-04 19:32:19 +00:00
wrstuden d9f694842d Adjust struct sockbuf and sorflush() so that we don't zero out
every field; some need to stay around.

Fixes a bug where by calling shutdown() on a socket with knotes
will cause the kernel to panic when the kernel closes the socket.
Other access, such as calling kevent() may also trigger the panic.

Debugged with help from Jason and Allen. Patch reviewed by same plus
Itojun and Matt Thomas.

This problem seems to be the same one that FreeBSD saw in their PR
number 54331.

Kernel version _not_ bumped as we will piggyback the bump earlier today.
2003-09-04 16:44:05 +00:00
tsutsui 4189ddf652 Remove advertising clauses from code written by Shingo WATANABE.
He has kindly consented it.
2003-09-04 15:17:38 +00:00
yamt 01e41ddfe3 don't call LFS_DEBUG_COUNTLOCKED after bread().
lfs_countlocked doesn't count buffers that isn't on the freelist.
2003-09-04 12:28:53 +00:00
he 9ac0a9ed26 Um, undo last; libsa printf doesn't do %z. 2003-09-04 12:02:10 +00:00
he bd42895755 Use the %zu format for size_t printing instead of cast + %lu. 2003-09-04 11:42:52 +00:00
dsl fe89b1db32 Add memcmp, memcpy and memset
Fix strncmp(x, y, 0)
Use unsigned compares for strcmp and memcmp (and bcmp).
Compiles but untested
AFAICT http://h71000.www7.hp.com/doc/72final/4515/4515pro_025.html#4515ch9_146
cmpc3/5 set %r4 and %r5 to zero, It doesn't look as though the procedure
call is set to preserve these, and I doubt that gcc is treating them as
scratch registers - does our vax pcs actually have %r2 and %r3 as scratch regs?
2003-09-04 10:40:44 +00:00
itojun cdb260b823 welcome to 1.6Y (for inpcb/in6pcb change) 2003-09-04 09:17:40 +00:00
itojun 495906ca8e revamp inpcb/in6pcb so that they are more aligned with each other.
in6pcb lookup now uses hash(9).
2003-09-04 09:16:57 +00:00
lukem 7237dbc136 missing rcsid 2003-09-04 07:51:21 +00:00
christos a0e952bddb bump the buffer size from 15 to 63 bytes. 2003-09-04 07:46:47 +00:00
lukem f7fe23abb3 use LNFILES to simplify creation of symlinks in .OBJDIR for builds 2003-09-04 07:18:01 +00:00
matt 12588bd8b6 Adapt to the new calling conventions of unp_connect2 2003-09-04 04:33:49 +00:00
matt e3bf7b7e7d Adjust to the new calling convention of unp_connect2. 2003-09-04 04:30:25 +00:00
itojun 119a24cbdd clarify comment on m_cat(). 2003-09-04 04:10:32 +00:00
mycroft aea8e885f0 Cast a printf() arg so that USB_DEBUG compiles on multiple platforms. 2003-09-04 03:47:03 +00:00
itojun 19d8b9bfea don't use m_cat to mbuf of different types. KAME-PR-495 2003-09-04 03:07:33 +00:00
itojun 1e4d96a37f bzero() 2nd arg mistake. found by openbsd guys, via kame 2003-09-04 00:11:49 +00:00
mycroft 9bba9f60b6 Well, this is bloody obscure...
My Imation USB FlashGO! adapter responds to a Get Max Lun request with a
stall.  With uhci, this does the expected thing.  With ohci, it was returning
a "data underrun" error because we weren't setting "buffer rounding" (i.e.
USBD_SHORT_XFER_OK), and the underrun was taking priority.  This happened with
both the ohci in a Mac cube and the builtin ohci on the S3C2410.

So, set USBD_SHORT_XFER_OK on the Get Max Lun.  Now I get a stall reported and
umass attaches correctly.
2003-09-04 00:02:59 +00:00
matt d7506a7151 Fix typo. 2003-09-03 22:20:34 +00:00
martin 965fbb9f63 If the peer cares to send us error messages, actually display them. 2003-09-03 21:36:31 +00:00
matt cec9cb32df Move CLKF_BASEPRI to machine specific <intr.h> file since it depends on
the encoding of the spl for the port.
2003-09-03 21:33:31 +00:00
matt ecf95073f1 Change the behavor of AF_LOCAL connect() to sleep until the server has
accepted the connection.  This can prevent a client from overwhelming a
server.
2003-09-03 21:30:12 +00:00
martin 6f2d2eefc7 Rearange dead link detection slightly:
As long as we receive data from the peer, don't worry. When we have not
received anything within the "max_noreceive" period, we start sending LCP
echo requests and count them, until we receive an answer (or some data)
or the "maxalive" count of not answered echo requests is reached.
All this is checked at a global 10 seconds interval for all interfaces.
The "max_noreceive" period and the "maxalive" count are configurable per
interface.
2003-09-03 20:48:46 +00:00
ragge ffaea276d3 Add a few more prototypes. 2003-09-03 19:35:26 +00:00
ragge a90264a9b5 Add alloca() prototype. XXX should be somewhere else. 2003-09-03 19:35:02 +00:00
simonb 05c33c1c05 Need to set BUS_DMA_COHERENT to BUS_DMA_NOCACHE on IBM ppc4xx CPUs.
The "emac" interface now works properly again on my Walnut.  Much
thanks to Steve Woodford for tracking this down.
2003-09-03 13:30:05 +00:00
simonb 553d2b901f Add missing semicolon. 2003-09-03 13:05:50 +00:00
he 022f01cef7 Cast size_t to u_long before printing, and use %lu instead of %d as format.
Fixes compilation on alpha.
2003-09-03 12:43:41 +00:00
ragge 412d4e7d1b Use correct basic types when addresses are given in function calls. 2003-09-03 11:36:52 +00:00
ragge 76d3da2d68 Do correct pointer casts. 2003-09-03 11:13:14 +00:00
ragge d13eca2ef5 long -> unsigned long. 2003-09-03 10:55:22 +00:00
ragge 65e8bb870b long -> unsigned long, so that correct pointer is sent in function call. 2003-09-03 10:45:10 +00:00
manu 72fb398585 regen 2003-09-03 07:29:29 +00:00
manu fcd3e861d0 Implement Darwin's FIODTYPE ioctl (get a file d_type) 2003-09-03 07:28:38 +00:00
mycroft 9b3ff19873 Whoops, reenable some stuff. 2003-09-03 03:19:04 +00:00
mycroft 7929022703 Add gzboot support for SMDK2410. 2003-09-03 03:18:30 +00:00
mycroft 56cdfe0eab GC a bogus variable that was causing link failures with PCMCIA. 2003-09-03 03:17:22 +00:00
mycroft e5168f409e Use generic versions of rr_1, wr_1, sr_1 -- some PCMCIA cards use these. 2003-09-03 03:15:02 +00:00
mycroft f13bd83ab3 Minor tweak for some macros elsewhere. 2003-09-03 03:12:28 +00:00
mycroft 1e2b27307d Add some register definitions. 2003-09-03 03:11:50 +00:00
mycroft b715eaff3c Recognize some TI processors -- not that you'd want to use them. 2003-09-03 02:07:07 +00:00
mycroft 3713dfb05b Fix another place where we blasted PCIC_INTR_ENABLE. 2003-09-03 01:33:23 +00:00
mycroft a93d49837e Don't clear PCIC_INTR_ENABLE here, either -- not appropriate. 2003-09-02 22:48:30 +00:00
mycroft 55ff1b2294 If the frontend passes in sc->irq=0, set PCIC_INTR_ENABLE. Also, don't clear
that bit all over the bloody place
2003-09-02 22:44:08 +00:00
manu 244c38a2ae regen 2003-09-02 21:48:49 +00:00
manu c4c193473f correct translation for struct statfs in getfsstat, ststfs and fstatfs 2003-09-02 21:31:01 +00:00
fvdl 4458cfede6 * Make the ahc and ahd probes more alike.
* Remove some redundant code.
* ahd: Don't initiate negotiation for a discovery xs when the negotiation goal
  is set. Just looking at the auto_negotiate mask is enough, and it can
  cause an endless loop if the request gets requeued (happens with a
  of a PPR negotiation, which ends with a busfree).
2003-09-02 21:02:56 +00:00
fvdl b9fcb05e95 Make this less chatty on probe/attach, to match the output of other controllers. 2003-09-02 20:59:51 +00:00
fvdl ce2fedd6fb Compile in the !MPACPI && NIOAPIC case. 2003-09-02 20:10:30 +00:00
drochner ffad96d540 add coda5, sort 2003-09-02 17:15:46 +00:00
ichiro 867de3d367 add support IO-DATA PCET/TX-R EthernetCard 2003-09-02 12:43:02 +00:00
drochner 98cfd7bc8b also feed getdents/readdir data to KTRACE 2003-09-02 12:31:35 +00:00
drochner 35755efb8c as requested by Jaromir Dolecek:
Add a "coda5" LKM which is "coda" with the "CODA_COMPAT_5" option.
This deliberately conflicts with "coda" as they can't coexist within
one kernel.
2003-09-02 12:08:45 +00:00
jdolecek fbf6a5667f make compile
adresses PR kern/22622 by Thomas Devreese
2003-09-01 17:11:03 +00:00
christos ab661a6a58 Add a new ioctl PPPIOCGRAWIN to get the last characters we got from the
remote site.
2003-09-01 16:51:25 +00:00
christos b7510d87e5 fix debugging printfs 2003-09-01 16:44:03 +00:00
pk 1d113dcde7 Can't rely on side-effects in KASSERT expressions which was pointed out to
me by YAMAMOTO Takashi.
2003-09-01 14:20:57 +00:00
dsl fafabf93cc Another attempt to get libsa to contain the right things.
- put a 'standards conforming' memcmp into memcmp.c
- make bcmp be a second label on the same code
- make bcmp.c be just #include "memcmp.c"
This means that libsa.o might contain both a memcmp.o and a bcmp.o, but
both contain the same code (defining both symbols) so it doesn't matter
which ld uses.
Saves worrying about which of bcmp.c and memcmp.c the architecture specific
Makefile requests.
2003-09-01 12:28:03 +00:00
yamt 7f7c9a3509 remove an obsolete comment.
(we now have only one inactive list.)
2003-09-01 12:16:17 +00:00
yamt b3d9c9a976 remove an obsolete comment. pointed by enami@ 2003-09-01 12:13:55 +00:00
tls 48e67d1d60 Revert previous change, which was wrong. As Enami points out, we really do
want the NO_ESTIMATE flag here, because if the source doesn't have it,
rnd_add_data will *use the time the data was added directly as entropy*,
which is not a good idea either for a hardware RNG that works like this
one (periodically polled by the driver) or, really, like any other that I've
seen, because even for "interrupt when ready" RNGs the data rate (and thus
interrupt time) will vary only slightly for a given RNG configuration over
time, if at all.

The data we add _is_ counted into the pool estimage because we directly
pass in an entropy estimate.

The overloading of the NO_ESTIMATE flag with this meaning seems, to me, like
a design bug (albeit easily fixed) in the rng interface; but until that's
changed, we need to use it here.
2003-09-01 06:30:24 +00:00
fvdl cd1ddca4f8 Use MPBIOS_SCANPCI by default. 2003-09-01 00:35:44 +00:00
fvdl e8769fc0a0 Update a few types and formats. 2003-08-31 23:24:04 +00:00
fvdl 60ae17c7ae Fix signed/unsigned warnings. 2003-08-31 22:40:13 +00:00
manu 80ae13b4df Handle colormap change requests 2003-08-31 21:10:22 +00:00
uwe f7c1e9b8e5 Comment change only, the ioctl is WSDISPLAYIO_PUTCMAP, not ..._SETCMAP.
The function is called igsfb_set_cmap() to follow the get/set/update
naming convention.
2003-08-31 14:41:15 +00:00
manu 2a523b0455 Correctly map the framebuffer. XDarwin display its background shade, hurrah! 2003-08-31 14:17:25 +00:00
fvdl 6c4d7c0fee Fix error in previous commit: the first vaddr_t argument to uvm_km_suballoc
is in/out, so it must be zeroed out before passing it, otherwise the
uvm_km_suballoc call would get stack garbage, and fail randomly.
2003-08-31 12:59:05 +00:00
ragge a808d6e157 Add stop routine. Add support for turning the device into promiscous mode.
Force interrupt in probe so that the interrupt vector can be detected.
2003-08-31 11:13:43 +00:00
chs ea3277f683 add a defflag for USELEDS. 2003-08-31 01:55:27 +00:00
chs 6e0aaa640d update for LWPs, and some lite cleanup. 2003-08-31 01:52:43 +00:00
gson 144519b826 The unit displayed when printing battery capacities and
charge/discharge rates was incorrect - the value printed is actually
in A, W, Ah, or Wh, not in mA, mW, mAh, or mWh (assuming as we must
that the period is interpreted as a decimal point, not a thousands
separator).
2003-08-31 01:36:12 +00:00
chs e46cb5bfce add some placeholders so we can at least build. 2003-08-31 01:28:58 +00:00
chs b5ed452510 just include the hppa version. 2003-08-31 01:28:22 +00:00
chs e9303b36fc disable some things that don't build yet. 2003-08-31 01:27:18 +00:00
chs a2ffedf11f add a hack for the link set stuff. 2003-08-31 01:27:00 +00:00
chs cc0b88792e update for LWPs, and some lite cleanup. 2003-08-31 01:26:31 +00:00
chs c023b4180f add "makeoptions MACHINE_ARCH=..." in std.* for mips ports
where it is constant (to ease cross-building).
2003-08-30 22:44:38 +00:00
jdolecek 62614dd63a Add sk as the PCI SysKonnect driver 2003-08-30 21:41:19 +00:00