Commit graph

18857 commits

Author SHA1 Message Date
Bill Paul a6d9a40e81 More USB ethernet tweaks:
- Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the
  following improvements:
        o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP
          quirk. This allows drivers to specify busy waiting only for
          certain transfers (namely control transfers for reading/writing
          registers and stuff).
        o New USBD_FORCE_SHORT_XFER flag can be used to deal with
          devices like the ADMtek Pegasus that sense the end of bulk OUT
          transfers in a special way (if a transfer is exactly a multiple
          of 64 bytes in size, you need to send an extra empty packet
          to terminate the transfer).
        o usbd_open_pipe_intr() now accepts an interval argument which
          can be used to change the rate at which the interrupt callback
          routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the
          value specified in the device's config data, but drivers can
          override it if needed.
- Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions.
- Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all
  control transfers. We no longer force the non-tsleep hack for
  bulk transfers since these are done asynchronously anyway.
- Removed quirk entry fiddling from if_aue and if_kue since we don't
  need it anymore now that we have the USBD_NO_TSLEEP flag.
- Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to
  usbd_open_pipe_intr().
- Add a flag to the softc struct in the ethernet drivers to indicate
  when a device has been detached, and use this flag to perform
  tests to prevent the drivers from trying to do control transfers
  if this is the case. This is necessary because calling if_detach()
  with INET6 enabled will eventually result in a call to the driver's
  ioctl() routine to delete the multicast groups on the interface,
  which will result in attempts to perform control transfers. (It's
  possible this also happens even without INET6 support enabled.) This
  is pointless since we know that if the detach method has been called,
  the hardware has been unplugged.
- Changed watchdog timeout routines to just call the driver init routines
  to initialize the device states without trying to close and re-open the
  pipes. This is partly because we don't want to frob things at interrupt
  context, but also because this doesn't seem to work right and I don't
  want to panic the system just because a USB device may have stopped
  responding.
- Fix aue_rxeof() to be a little smarter about detecting when a double
  transfer is needed. Unfortunately, the design of the chip makes it hard
  to get this exactly right. Hopefully, this will go away once either
  Nick or Lennart finds the bug in the uhci driver that makes this ugly
  hack necessary.
- Also sync usbdevs with NetBSD.
2000-01-20 07:38:33 +00:00
Warner Losh 5e2664428c When we are execing a setugid program, and we have a procfs filesystem
file open in one of the special file descriptors (0, 1, or 2), close
it before completing the exec.

Submitted by: nergal@idea.avet.com.pl
Constructive comments: deraadt@openbsd.org, sef, peter, jkh
2000-01-20 07:12:52 +00:00
Robert Watson 1a601bedea A few more style cleanups
Submitted by:	bde
2000-01-20 06:39:07 +00:00
Jason Evans ed25321907 Move ENTRY and ALTENTRY definitions to asm.h where they belong.
Unbreak profiling.  Again.

Submitted by:	bde
2000-01-20 03:15:01 +00:00
Mike Smith c2b9ed0fc3 Add the pcdmx theatre lighting controller major number 2000-01-20 02:54:03 +00:00
Jason Evans 60ffb01993 Don't tsleep() while at splbio().
Correctly return EINPROGRESS from aio_error() even when an aio request
is still in the socket queue.

Submitted by:	Adrian Chadd <adrian@bofh.co.uk>
2000-01-20 01:59:58 +00:00
Archie Cobbs 1b67001469 Fix an #ifdef that should have been and #ifndef.
Noticed by:	Hellmuth Michaelis <hm@hcs.de>
2000-01-20 01:49:45 +00:00
KATO Takenori 290fb50e67 Port of the PC-98 ppc to the newbus system. 2000-01-20 00:58:49 +00:00
Bill Paul 88d739dc5f Add support for the Davicom DM9102A 10/100 ethernet controller chip.
This is just to make sure we initialize the chip correctly: we need to
make the sure the port select bit in CSR6 is set properly so that we
use the internal PHY for 10/100 support. (The eval boards I have also
include an external HomePNA PHY, but I need to play with that more
before I can support it.)
2000-01-19 19:03:08 +00:00
Jordan K. Hubbard 6417807e8b Add parallel port clock driver.
Submitted by:	Sascha Schumann <sascha@schumann.cx>
2000-01-19 18:19:16 +00:00
Jordan K. Hubbard 3b2d592ca2 Import simple driver for a parallel port radio clock which receives
the German legal time (commonly available in Europe).

Submitted by:	Sascha Schumann <sascha@schumann.cx>
2000-01-19 18:17:25 +00:00
Søren Schmidt 6e5d660a63 Quantify the calls to ad_attach and atapi_attach so that diskless
or atapiless kernels can be built.
2000-01-19 07:25:46 +00:00
Robert Watson 8f0738756c Fix bde'isms in acl/extattr syscall interface, renaming syscalls to
prettier (?) names, adding some const's around here, et al.

Reviewed by:	bde
2000-01-19 06:07:34 +00:00
Robert Watson 9b0be035b8 Fix bde'isms in acl/extattr syscall interface, renaming syscalls to
prettier (?) names, adding some const's around here, et al.

Commit 2 out of 3.

Reviewed by:	bde
2000-01-19 06:02:31 +00:00
Robert Watson 5134b3e92a Fix bde'isms in acl/extattr syscall interface, renaming syscalls to
prettier (?) names, adding some const's around here, et al.

Commit 1 out of 3.

Reviewed by:	bde
2000-01-19 06:01:07 +00:00
Mike Smith bffc499a69 Reference machine/param.h rather than the nonexistent
machine/machparam.h in a comment

PR:		kern/11178, kern/16128
2000-01-19 01:26:06 +00:00
Bill Paul 76fd432173 Fix a couple of bugs:
- The busy wait hack in usbdi.c was doing its timeout in microseconds
  instead of milliseconds.
- if_aue.c:aue_intr() is creating a bitmask by and'ing two bits when it
  should be or'ing them.

Submitted by:	Lennart Augustsson
2000-01-19 01:01:56 +00:00
Søren Schmidt 974f34013a Rearrange the probecode, so that 80pin cables can be identified
correctly on both master and slave.
Smash together the ata_params & atapi_params structures as they
are more or less equal anyways.
Get rid of the last SYSINIT's in here.
2000-01-18 21:02:59 +00:00
Cameron Grant f2410ff244 kludge to fix the end-of-sample repeating bug. i don't know why it happens;
none of my hw does it, but this should fix it for now.

Tested by:	wpaul
2000-01-18 18:59:03 +00:00
Cameron Grant 03a00905d3 update ac97 layer to use device_printf when printing messages 2000-01-18 17:13:43 +00:00
Bill Fumerola 0b04a9eef3 Cast rman_get_virtual() to a vm_offset_t.
Submitted by:	msmith
2000-01-18 15:44:24 +00:00
Alfred Perlstein 28255f07ec unbreak (rv -> r), afaik what Mike intended, boots fine on my machine 2000-01-18 12:24:44 +00:00
Peter Wemm 5995e84e19 Add another four device ID's for isa pnp modems. The USR's seem to use
the same vendor and logical ID.  The rest I am not sure whether they
are vendor or logical, but it won't hurt if I've put a vendor ID here
as merely will not match.  These came from the old sio-pnp code, hence
the uncertainty about which ID it is.
2000-01-18 09:30:58 +00:00
Yoshinobu Inoue 714dabb963 Merge a bug fix from freebsd-current; check m != NULL before touching it,
at udp6_ctlinput().
  There should be kernel panic at PCCARD suspend etc, before this bug fix.

Submitted by:  Hajimu UMEMOTO <ume@mahoroba.org>
2000-01-18 09:02:19 +00:00
Peter Wemm 2d77b66efb Add ADS7182 as a known Joystick. 2000-01-18 08:38:35 +00:00
Peter Wemm 71d38539b4 Add a warning for the snd drivers and a pointer to pcm/sbc/etc. 2000-01-18 08:31:40 +00:00
Jordan K. Hubbard c5954134e4 Enable POSIX P1003_1B extentions by default; there's no reason I can see
not to class them with the SYSV extentions as "optional but damn useful".

Also desired by:	wollman
2000-01-18 07:52:12 +00:00
Robert Watson 5b0613d5cb IRIX interoperability -- define ACL_MAX_ENTRIES from MAX_ACL_ENTRIES 2000-01-18 06:21:29 +00:00
Kris Kennaway 1180a889cf Bump __FreeBSD_version due to openssl import. 2000-01-18 04:36:56 +00:00
Mike Smith 01fef73008 Don't mark unallocated resources as active; the goal is to reserve them,
and there may be a good reason for them being unallocated (eg. they're
nonsensical or not useful).  The goal here is simply to reserve them
against accidental use by other code.
2000-01-18 02:15:05 +00:00
Mike Smith f6bf1bb672 Don't try to map memory resources into the kernel until they're actually
activated.  Some of the things that get listed as "resources" aren't
necessarily suited for this.

(This shouldn't be a problem for any driver that correctly passes
RF_ACTIVE)
2000-01-18 02:13:27 +00:00
Kirk McKusick 71c87cfd7e Need to reset the buffer pointer to avoid reconsidering the same buffer
again (without this the rollback analysis was being lost). Should reduce
the write count for most workloads.

Submitted by:	Craig A Soules <soules+@andrew.cmu.edu>
2000-01-18 02:13:26 +00:00
Matt Jacob a5d8019e08 add a R_PREV_IDX macro 2000-01-18 01:42:11 +00:00
Kirk McKusick 57a91f6fb0 During fastpath processing for removal of a short-lived inode, the
set of restrictions for cancelling an inode dependency (inodedep)
is somewhat stronger than originally coded. Since this check appears
in two places, we codify it into the function check_inode_unwritten
which we then call from the two sites, one freeing blocks and the
other freeing directory entries.

Submitted by:	Steinar Haug via Matthew Dillon
2000-01-18 01:33:05 +00:00
Kirk McKusick 4c6adb0622 Need to reorganize the flushing of directory entry (pagedep) dependencies
so that they never try to lock an inode corresponding to ".." as this
can lead to deadlock. We observe that any inode with an updated link count
is always pushed into its buffer at the time of the link count change, so
we do not need to do a VOP_UPDATE, but merely find its buffer and write it.
The only time we need to get the inode itself is from the result of a
mkdir whose name will never be ".." and hence locking such an inode will
never request a lock above us in the filesystem tree. Thanks to Brian
Fundakowski Feldman for providing the test program that tickled soft updates
into hanging in "inode" sleep.

Submitted by:	Brian Fundakowski Feldman <green@FreeBSD.org>
2000-01-18 01:30:03 +00:00
Bill Paul b822a5eae9 Add the vendor/device ID for the Farallon PN9000SX gigabit ethernet
card, which is apparently also a Tigon 2 device.
2000-01-18 00:26:29 +00:00
Bill Paul 7b7b87d7ef Change the mechanism by which we detect that the firmware is already
running. It turns out that trying to read the MAC address when there's
no firmware creates a zero length transfer. This apparently doesn't
hurt anything on a UHCI controller, but OHCI controllers generate an
IOERROR, and the device doesn't initialize.

Instead, check the bcdDevice revision code. We know this will be
different when the firmware is running, so if we detect the firmware's
code instead of the bare hardware's code, we skip the firmware load.
2000-01-17 23:14:40 +00:00
Brian Feldman f582ac0630 Fix vn_isdisk() usage to make AIO work on non-disk-files again, rather
than just return ENOTBLK.

PR:	16163
Submitted by:	Adrian Chadd <adrian@FreeBSD.org>
2000-01-17 21:18:39 +00:00
Mike Spengler 96cdb64ea9 Remove un-needed #include's.
Pointed out by: phk
2000-01-17 20:49:59 +00:00
Archie Cobbs 010c5481fd Work around aparent bug in the .Dv macro by eliminating some spaces.
The closing curly-brace in this line was being omitted somehow.
2000-01-17 20:10:39 +00:00
Bill Paul 4c10dd65ca The correct part number for the CATC ASIC is USB-EL1210A, not
USB-EL1201A or even USB-EL1202A. Wonder what drugs I was on when
I made this mistake, and then propagated it to 6 different files.

*sigh*
2000-01-17 18:49:20 +00:00
Yoshihiro Takahashi 690951a252 Remove unnecessary includes. 2000-01-17 12:49:54 +00:00
Yoshihiro Takahashi 41d8671572 Use rman_get_bustag and rman_get_bushandle to initialize bus tag and
bus handle.
2000-01-17 12:38:51 +00:00
Yoshihiro Takahashi 521c75a254 Use rman_get_start instead of bus handle directly. 2000-01-17 12:38:00 +00:00
Peter Wemm 615407b5a0 Some SB128's (ES1371) have a different PCI vendor id. Vendor == 0x3274
instead of the normal 0x1274.

Tested by:	des
2000-01-17 07:54:00 +00:00
Kirk McKusick 105ef72c55 Better bounding on softdep_flushfiles; other minor tweeks to checks. 2000-01-17 06:35:11 +00:00
Kirk McKusick 107d5039ef Must track multiple uncommitted renames until one ultimately gets
committed to disk or is removed.
2000-01-17 06:28:18 +00:00
Matt Jacob 10b6172afb Do the minor changes needed because of change to ccb_getdev structure.
JKH Trading Stamps applied.

Reviewed by:	gibbs@freebsd.org, ken@freebsd.org
2000-01-17 06:27:37 +00:00
Matt Jacob ab6eec3ad9 Increase size of the scsi_inquiry_data structure to it's nearly
full size. Define a SHORT_INQUIRY_LENGTH for use during initial
probing (covers the size used previously). Define some SPC-2 related
fields (and define the revision code for SPC-2) which includes some
further SPI-3 defines. Don't go all the way (256 bytes) for the structure-
stop 4 bytes short- because we haven't auditted the source base to find
any u_int8_t potential overflow issues. Add RBC (single byte device)
and OCR (Optical Character Reader) device type codes.

Approved by JKH.

Reviewed by:	gibbs@freebsd.org, ken@freebsd.org
2000-01-17 06:24:35 +00:00
Matt Jacob 9ec5d7cd35 Remove garbage collected tags from their usage in the ccb_getdev
structure. Remove usage of the (now gone) pd_type tag of same.

Add an extra probing state such that if we successfully run an
initial inquiry (36 bytes), rerun another one with a longer data
size as informed by the 'additional length' field in the first
returned inquiry data (making sure not to get bigger than the
actual scsi_inquiry_data structure- which has also been modified-
see separate checkin of scsi_all.h). This allows devices such
as SAF-TE devices (which have identifying marks in offsets 48-53
in inquiry data) to be successfully found without special case
inquiry commands. There are also a lot of other things such as
version codes that are coming in in the SPC2 specification that it
would be useful to get our hands on.

Reviewed by:	gibbs@freebsd.org, ken@freebsd.org
2000-01-17 06:20:08 +00:00