Commit Graph

46731 Commits

Author SHA1 Message Date
Robert Watson
de5d99354f The advent of if_detach, allowing interface removal at runtime, makes it
possible for a panic to occur if BPF is in use on the interface at the
time of the call to if_detach.  This happens because BPF maintains pointers
to the struct ifnet describing the interface, which is freed by if_detach.

To correct this problem, a new call, bpfdetach, is introduced.  bpfdetach
locates BPF descriptor references to the interface, and NULLs them.  Other
BPF code is modified so that discovery of a NULL interface results in
ENXIO (already implemented for some calls).  Processes blocked on a BPF
call will also be woken up so that they can receive ENXIO.

Interface drivers that invoke bpfattach and if_detach must be modified to
also call bpfattach(ifp) before calling if_detach(ifp).  This is relevant
for buses that support hot removal, such as pccard and usb.  Patches to
all effected devices will not be committed, only to if_wi.c, due to
testing limitations.  To reproduce the crash, load up tcpdump on you
favorite pccard ethernet card, and then eject the card.  As some pccard
drivers do not invoke if_detach(ifp), this bug will not manifest itself
for those drivers.

Reviewed by:	wes
2000-03-19 05:42:34 +00:00
Kazutaka YOKOTA
ea20901db7 Missing pieces of the last commit ;-( 2000-03-19 04:37:18 +00:00
Kazutaka YOKOTA
db3e34cb71 - Properly keep track of I/O port resources.
- Use bus_space_read/write() to access the ports.
2000-03-19 03:25:13 +00:00
Larry Lile
49ec367311 o Replace the old "oltr" driver with the completely re-written
new-bus Olicom driver, previously known as "ol".  The new
  driver unfortunately does not support ISA cards yet.

o Update the microcode files, interface library and include files
  to the latest PowerMACH works version.  Force even byte alignment
  of adapter microcode.

o Roll in some of the patches from Nikolai Saoukh <nms@ethereal.ru>.
2000-03-18 23:51:54 +00:00
Søren Schmidt
2a14fd50d9 Remove the old DSC code, it doesn't work anymore. 2000-03-18 22:42:45 +00:00
Jason Evans
7e5e179982 Explicitly include sys/cdefs.h to get the definition of __strong_reference(),
rather than getting lucky due to header dependencies.
2000-03-18 22:36:46 +00:00
Justin T. Gibbs
ff58fb8420 o Correct the offsets into the syncrate table for paritcular
negotiation features (DT, ULTRA2, ULTRA, FAST).  The offsets
  where not properly updated when the DT entry was added and so
  the driver could attempt to negotiate a speed faster than that
  supported by the target device or even requested by the user
  via SCSI-Select settings. *

o Update the target mode incoming command queue kernel index value
  ever 128 commands instead of 32.  This means that the kernel will
  always try to keep its index (as seen on the card - the kernel may
  actually have cleared more space) 128 commands ahead of where the
  sequencer is adding entries.

o Use the HS_MAILBOX register instead of the KERNEL_TQINPOS location
  in SRAM to indicate the kernel's target queue possition on Ultra2
  cards.  This avoids the "pause bug" on these cards and also turns
  out to be much more efficient.

o When enabling or disabling a particular target id for target mode,
  make sure that the taret id in the SCSIID register does not
  reference an ID that is not to receive target selections.  This
  is only an issue on chips that support the multiple target id
  feature where the value in SCSIID will still affect selection
  behavior regardless of the values in the target id bit field
  registers.

o Remove some target mode debugging printfs.

o Make sure that the sense length reported in ATIO commands is
  always zero.  This driver does not, yet, report HBA generated
  sense information for accepted commands.

o Honor the CAM_TIME_INFINITY and CAM_TIME_DEFAULT values for
  the CCB timeout field.

o Make the driver compile with AHC_DEBUG again.

* Noticed by: Andrew Gallatin<gallatin@cs.duke.edu>
2000-03-18 22:28:20 +00:00
Jason Evans
603ed0f30d Use __alias__ instead of alias in the definition of __strong_reference().
Submitted by:	jdp
2000-03-18 22:26:54 +00:00
Justin T. Gibbs
c4b5781296 KNR -> ANSI function definition in two places. This matches the rest of
the code in this driver.
2000-03-18 22:15:00 +00:00
Justin T. Gibbs
a9e181db4a o clear the ccb_flags field before sending an accept target I/O ccb to
an HBA.  Garbage in this field confuses the driver in targdone().

o When completing a CCB on behalf of a user process, we need to
  *de-queue* the ccb from our pending ccb list, not queue it again.

o All continue target I/O operations need to have a timeout set.
  We use 5 seconds throughout this driver.

o Remove some logging printfs.

o During abort processing, remove ccbs that are on the pending queue
  from the pending queue, not the work queue.
2000-03-18 22:13:27 +00:00
Matt Jacob
39d3da3df7 Per Justin's request- remove his name from Copyright. 2000-03-18 22:03:41 +00:00
Jeroen Ruigrok van der Werven
5eca43faa9 After about two months I am the first to notice that SPLASERT.9 never
got installed.

Also, correct the copyright to a more realistic date (1996->2000).
Fix some wordings and omissions.
2000-03-18 21:51:16 +00:00
Jordan K. Hubbard
1d34c9e917 Sigh, it would have been nice but I just can't make the rsaref
hack work until we figure out some better way of handling package
interaction.
2000-03-18 20:14:58 +00:00
Jeroen Ruigrok van der Werven
1eeb917c9c Put ASUSCOM_IPAC in the section where it belongs, namely i4b. 2000-03-18 19:30:58 +00:00
Nick Hibma
e5399702e8 Print the PCI resources even if they are disabled. This shows more clearly
when the BIOS is forgetful about initialising the USB controllers.
2000-03-18 19:18:36 +00:00
Nick Hibma
05433731b6 Add the entries for urio. 2000-03-18 18:45:48 +00:00
Jeroen Ruigrok van der Werven
bc0e3a03b5 Put the undocumented options back at the bottom as per old
practice.

Place the debug options above the undocumented options.
2000-03-18 18:39:02 +00:00
Joerg Wunsch
5f830ea2cd Make the Y-E Data PCMCIA floppy of the Toshiba Libretto work under
-current.  It doesn't work yet as stable as the 3.x/PAO version of the
driver does, however, i get occasional `FDC direction bit not set' and
other weird messages, but it basically works at least.

The old (defunct) #ifdef FDC_YE stuff has been eliminated completely
now, PCMCIA-FDC specific functions have been implemented differently
where needed.

Unfortunately, due to the fact that the traditional PeeCee FDC with
its funny non-contiguous register space (one register for WD1003
harddisk controllers is interleaved into the FDC register set), and
Peter's subsequent changes involving two different bus space handles
for normal FDCs, the changes required for the Y-E stuff are more
complex than i'd love them to be.  I've done my best to keep the logic
for normal FDCs intact.

Since the Y-E FDC seems to lose interrupts after a FDC reset
sometimes, i've also replaced the timeout logic in fd_turnoff() to
generate an artificial pseudo interrupt in case of a timeout while the
drive has still outstanding transfers waiting.  This avoids the total
starvation of the driver that could be observed with highly damaged
media under 3.x/PAO.  This part of the patch has been revied by bde
previously.

I've fixed a number of occasions where previous commits have been
missing the encapuslation of ISA DMA related functions inside
FDC_NODMA checks.

I've added one call to SET_BCDR() during preparation of the format
floppy operation.  Floppy formatting has been totally broken before in
3.x/PAO (garbage ID fields have been written to the medium, causing
`wrong cylinder' errors upon media reading).  This is just black
magic, i don't have the slightes idea _why_ this needs to be but just
copied over the hack that has been used by the PAO folks in the normal
read/write case anyway.

The entired device_busy() stuff seems to be pointless to me.  In any
case, i had to add device_unbusy() calls symmetrical to the
device_busy() calls, otherwise the PCMCIA floppy driver could never be
deactivated.  (As it used to be, it caused a `mark the device busier
and busier' situation.)  IMHO, all block device drivers should be
marked busy based on active buffers still waiting for the driver, so
the device_unbusy() calls should probably go to biodone().  Only one
other driver (whose name escapes me at the moment) uses device_busy()
calls at all, so i question the value of all this...

I think this entire `device busy' logic simply doesn't fit for PCMCIA
&al.  It cannot be the decision of some piece of kernel software to
declare a device `busy by now, you can't remove it', when the actual
physical power of removing it is the user pulling the card.  The
kernel simply has to cope with the removal, however busy the device
might have been by the time of the removal, period.  Perhaps a force
flag needs to be added?

Upon inserting the card a second time, i get:

WARNING: "fd" is usurping "fd"'s cdevsw[]
WARNING: "fd" is usurping "fd"'s bmaj

I suspect this is related to the XXX comment at the call to
cdevsw_add().  Does anybody know what the correct way is to cleanup
this?
2000-03-18 18:27:01 +00:00
Nick Hibma
f21cd30bc4 Reflect the fact that we supported the Y-E Data floppy as well. 2000-03-18 17:59:27 +00:00
Nick Hibma
bc51947397 The completely rewritten USB Mass Storage driver. It supports the following
devices:

Tested:
   Zip 100 USB drive
   Y-E Data USB floppy drive

Untested: (let me know whether or not it works!)
   TEAC USB floppy drive
   Zip 250 USB drive
2000-03-18 17:33:41 +00:00
Jeroen Ruigrok van der Werven
5d6f1468bb Document three debug options: npx, bus and vfs locks debugging. 2000-03-18 17:30:12 +00:00
KATO Takenori
1c206c591f Activate the pc98 directory. 2000-03-18 16:49:22 +00:00
KATO Takenori
8220dd2744 Added PC98 version of fdisk. 2000-03-18 16:48:41 +00:00
Kazutaka YOKOTA
02572fd86e - `Newbus'ified the mse driver. 2000-03-18 15:43:13 +00:00
Kazutaka YOKOTA
8c219e162a - Fix bugs when painting border and the mouse cursor in the raster
text mode.
2000-03-18 15:28:48 +00:00
Kazutaka YOKOTA
fb96634340 - Add support for IntelliMouse Explorer, NetScroll Optical, SmartScroll,
Scroll Point, and 4D/4D+ mice.
- Add a couple of serial mouse PnP IDs.
- Extend the `-z' option so that the second wheel (or the horizontal
  movement of the `scroll' device) can be mapped to buttons.
2000-03-18 15:23:21 +00:00
Kazutaka YOKOTA
3346e881c1 - Add Support for the following PS/2 mice:
- Microsoft IntelliMouse Explorer: 2 buttons on top, 2 side buttons
    and a wheel which also acts as the middle button.  The mouse is
    recognized as "IntelliMouse Explorer".
  - Genius NetScroll Optical: 2 buttons on top, 2 side buttons and a
    wheel which also acts as the middle button.  The mouse is recognized
    as "NetMouse/NetScroll Optical".
  - MouseSystems SmartScroll Mouse (OEM from Genius?): 3 buttons on top,
    1 side button and a wheel.  The mouse is recognized as Genius
    "NetScroll".
  - IBM ScrollPoint: 2 buttons on top and a stick between the buttons.
    The stick can perform "horizontal scroll" in W*ndows environment.
    The horizontal movement of the stick is detected.  It is currently
    mapped to the Z axis movement in the same way as the first wheel.
    The mouse is recognized as "MouseMan+", as it is considered to be
    a variation of MouseMan.
  - A4 Tech 4D and 4D+ mice. These mice have two wheels! The movement
    of the second wheel is reported as the Z axis movement in the
    same way as the first wheel. These mice are recognized as "4D
    Mouse" and "4D+ Mouse".
  - Tweak IntelliMouse support code a bit so that less-than-compatible
    wheel mice can work properly with the psm driver.
- Add driver configuration flags which correspond to the kernel
  options PSM_HOOKRESUME and PSM_RESETAFTERSUSPEND, so that we don't
  need to recompile the kernel when we need these functions.
- Properly keep track of the irq resource.
- Add a watchdog timer in case interrupts are lost (experimental).
- Add `detach' function (experimental).
2000-03-18 15:21:40 +00:00
Kazutaka YOKOTA
6f6fe825bd - `Newbus'ified the driver.
- Properly keep track of resources (I/O ports and irq).
- Use bus_space_read/write() to access the ports.
- Add PnP IDs.
- Add a watchdog timer in case interrupts are lost (experimental).
- Add `detach' function (experimental).
2000-03-18 15:13:30 +00:00
Nick Hibma
31bfa89e41 Get rid of the last remnants of powerhook abuse. 2000-03-18 14:54:54 +00:00
Bill Fenner
95b2b777b5 Make sure to free the socket in soabort() if the protocol couldn't
free it (this could happen if the protocol already freed its part
 and we just kept the socket around to make sure accept(2) didn't block)
2000-03-18 08:56:56 +00:00
Sean Eric Fagan
6cb533fe1c Change the output of truss to more closely resemble SysV's. (Yes, it
really is much nicer looking.)

Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
2000-03-18 08:49:41 +00:00
Jordan K. Hubbard
54dd58b383 We still need a hack for rsaref package; add it. This doesn't
affect CDs since they don't contain the rsaref package anyway.
2000-03-18 08:46:23 +00:00
Jordan K. Hubbard
82b13696f8 Sigh, when the DIST_LOCAL thing was added, it unfortunately wasn't added
completely.  Take out another gratuitous warning which is omitted when
All is selected and local dist does not exist.
2000-03-18 08:40:39 +00:00
Jordan K. Hubbard
553cdb6fbd Update to match current reality (not that anyone reads these anyway :) 2000-03-18 08:06:16 +00:00
Matt Jacob
a4135b96f1 Alpha 8200: redo files arrangement for 8200 support. There sort of
still *is* a problem about how to get an mcclock attached w/o an
ISA declaration though.
2000-03-18 08:05:27 +00:00
Matt Jacob
d06b99eb3f Alpha 8200: remove the SIMOS usage of zs_cnattach- we have a real
zs_cnattach now.
2000-03-18 08:04:23 +00:00
Matt Jacob
c7790ceee2 Alpha 8200: Redo console attachment to be more 'normal'. Make sure the
halt function *stays* halted.
2000-03-18 08:03:48 +00:00
Matt Jacob
d0366c9108 Alpha 8200: redo prom console code to be more up to date, etc. This
is now a functional PROM console (previously broken). Do the correct
promcnatach && CONS_DRIVER dance.
2000-03-18 08:02:35 +00:00
Matt Jacob
583759a807 Alpha 8200: add DEC_KN8AE (TurboLaser) platform option. 2000-03-18 08:01:34 +00:00
Matt Jacob
e562365e1e Alpha 8200: Add prototype from promcnattach. 2000-03-18 08:00:51 +00:00
Matt Jacob
6499b39e60 Alpha 8200: Add in a dummy child of dwlpx so that we can make the leap
from DWLPX to PCI space. Just a methods holder such that we have a parent
which is a "pcib" and we create a child which is a "pci". Add the appropriate
ivar code (which is for a hose #).
2000-03-18 08:00:13 +00:00
Matt Jacob
9ca20275e0 Alpha 8200: Do some compilation cleanup. Conditionalize some IDE stuff
based upon presence/absence of ISA (there is no ISA bus on an 8200- okay,
well, there *could* be one in a DWLPX tray, but we don't support it)).

Most importantly change the interrupt resource map to cover a whole 16
bits. The 8200 uses 16 bit interrupt vectors which we construct that
contain the I/O-board, hose, an pci slot in them, and then we write these
vectors into the appropriate DWLPX registers. At any rate, a flat array
of 64 'IRQs' isn't enough.
2000-03-18 07:57:58 +00:00
Matt Jacob
8ad895a6a9 Alpha 8200: Reinsert licence from NetBSD that should have been there
to begin with. Redo newbus attachment code so that all the DMA mapping
and further pci attachment is done right. Insert config space functions
(jeez- how do you do type 1 cycles?). Do the interrupt setups, etc.
Basically, this is the core I/O module for 8200s, even though logically
it's the 3rd level down from the nominal principle backplane bus
(turbolaser). Still to be done here: S/G code isn't done yet, so we
better live with 2GB or less primary memory.
2000-03-18 07:54:11 +00:00
Matt Jacob
c6c4384666 Alpha 8200: Remove clause 3 of licence. Clean up code slightly. 2000-03-18 07:50:58 +00:00
Matt Jacob
6beeb2a4cd Alpha 8200: Remove clause 3 of licence. Redo KFTXX bus attachment
code (merge in progress made in NetBSD since the initial import to
FreeBSD). Create dwlpx as the child device. Of course, if we had
more h/w and time, we could find out whether the child device was
a FutureBus module, etc...Anyone ever actually seen one?
2000-03-18 07:49:53 +00:00
Matt Jacob
3c87339922 Alpha 8200: Remove clause 3 of licence and and some KFTXX defines. 2000-03-18 07:48:15 +00:00
Matt Jacob
9132772537 Alpha 8200: minor formatting tweaks; removal of clause 3 of licence. 2000-03-18 07:46:34 +00:00
Matt Jacob
eaef8d3ef1 Alpha 8200: Rework to get working properly with real h/w. This isn't a
clean MI/MD driver, but it *does* actually work at this time. Updated
to use new make_dev stuff. A CONS_DRIVER declaration is also put in
so that this can be the real console for the 8200s.
2000-03-18 07:46:05 +00:00
Matt Jacob
cf80414e14 Alpha 8200: Ooops on last delta- real changes include redoing bus attachment
code and interrupt mapping code.
2000-03-18 07:44:18 +00:00
Matt Jacob
db50341ca1 Alpha 8200: Some minor formatting tweaks and removal of clause 3 of licence. 2000-03-18 07:42:13 +00:00