struct scsipi_adapter; they were not used.
Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.
Inspired by PR #6090, from Matt Jacob.
the hp300 port.
- Interrupts 3-6 use this immediately. Interrupt 7 is a special case,
and the VIA interrupts (1 and 2) will be addressed when that code is
rototilled.
- Modify the zs front end to register with the appropriate interrupt
controller: through the PSC on the AV Quadras, and direct to
interrupt 4 on the rest. Arrange to have the appropriate zsc_softc
supplied to us at interrupt time.
- Modify the direct ADB driver (and its PowerManager cousin) to call
intr_dispatch(), rather than zshard(). XXX This is a kludge, but at
least limits the brokenness to the ADB drivers, now.
As a side effect, this should fix PR 5590. Thanks to Bill Studenmund for
correctly determining the cause of the problem reported there.
resolves a great many issues, including Performa 58x interrupt handling
and offset displays on some models.
Programs that depend on the old (pre-NetBSD 1.1) grf interface may break.
That's actually a separate issue uncovered by this code, not caused by it.
serial echo work, but not sure. Tested by Paul Goyette.
A few of these changes can probably be backed out, but I'm not sure which.
This part should work for now, and get things going again. These fixes
should also get rid of the problem of things crashing just as zstty0 gets
configured.
handlers. (Only slot_ignore() and slot_noint() need this, and we already
have a place to put this information.) Adjust add_nubus_intr() so that if
the client_data arg is specified as NULL, pass the slot number as
client_data to the interrupt handler.
MACHINE_NEW_NONCONTIG interface implementation, which is now enabled
on all systems. Thanks to Jason Thorpe for his work on the hp300 port,
from which most of the code used here was derived.
XXX In spite of the fact that it works on the hp300, UVM does not (yet)
work well under load on mac68k.
certain 17" monitors. Change from Michael R. Zucca, PR 4988.
XXX - This can cause problems on system with the DAFB chip which currently
use only a NuBus-based video adapter. In particular, grf devices may not be
attached properly in this case. This unfortunate situation is less annoying
than not having a reasonable console, however. A reasonable, reliable
monitor sense algorithm for the DAFB would resolve the problem.
Rather than waiting indefinitely for a mouse or extended keyboard to
respond -- which may not even exist -- time out after 2 seconds and
continue. This corrects a very common problem with the MRG-based ADB
driver that has bitten many people running 1.3.
it in initializing during autoconfig. Similar to sys/arch/sun3/dev/zs.c
revision 1.47. Ought to fix hangs at first tty access reported by
Johnny Lam, <jlbg+@andrew.cmu.edu>.
causes the MI interrupt handler to barf when we get a 5380 RST interrupt
while probing. Worse, the VIA latches the interrupt, so simply having
all interrupts disabled during autoconfig doesn't resolve the problem.
[I demonstrated the latter on a IIci, which erroneously reports a
reselection attempt(!) after autoconfig is complete. The latched
interrupt results from the SCSI bus reset we do when initializing the
bus.]
Since interrupts must be enabled during autoconfig anyway (sigh), test
to see if autoconfig has completed in sbc_irq_intr(). If not, we don't
pass the interrupt up to the MI interrupt handler. Also, make sure to
clear the VIA interrupt if we're servicing an unclaimed 5380 RST
interrupt.
Thanks to Bill Studenmund for providing the key insight needed to unlock
this problem.
interrupt properly on a SuperMac Spectrum/8 Series III, and thanks
to Dan McMahill for loaning the card to Paul.
I modified Paul's patch somewhat to change grfmv_intr_generic_{1,4}
to grfmv_intr_generic_write{1,4} and added grfmv_intr_generic_or4 to
handle this card.
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.
Unfortunately, there does not seem to be a good way to determine what
variety of comm-slot card is present in a machine. There is still an
interrupt issue preventing these cards from working--hopefully that will
be ironed out shortly.
internal ethernet on the Quadra/Centris 660av/840av.
Add initial support for the PSC (DMA controller) to support the above
(DMA SCSI remains unsupported). This involved also changing the way
that several interrupts are handled.
Above from David Huang <khym@bga.com>
Since the interrupts changed somewhat, we must also make the ipls
dynamic, defaulting to their prior levels and adjusted for the AVs.
I modelled this on the hp300.
(mrz5149@cs.rit.edu) for the addresses and hints as to how the interrupts
might be disabled, and thanks to Henry Hotz (h.b.hotz@jpl.nasa.gov) for
testing on the 840AV.
Unmap the DAFB regs on the other Quadras after attachment. They're not
used.
Define a constant for the SuperMac Spectrum/24 series III display card.
Thanks go to Luca Falzoni <falzoni@jetai.unipv.it> for trying out the
code for the Dayna ethernet support.
$Fssxxxxx 1MB slot space documented in the old Inside Macintosh, or the
$Fs0xxxxx 1MB slot space documented in the new IM and Guide to Macintosh
Family Hardware.
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
(address error faults), as well as other reported problems:
- Simplify grfmv_phys() to work like grfiv_phys(), and eliminate the
second argument to both, as we don't use it anyway.
- Handle fbbase and fboff consistently throughout. Closes PR 3862.
- Eliminate grfaddr() by pulling it into grfmmap(), which is the
only place it was used, previously.
- grfmap() now gets the physical address of the framebuffer from
the appropriate driver, rather than try to compute it by itself.
Be careful with aligning the base to a page address and increase
the length of the mapped region appropriately. Closes PR 2867.
the pc532/dev/ncr.c-inspired changes; in particular, wait for previous
transfer to complete before starting another, as we used to do. Retain
splbio() protection and simplified sbc_pdma_in().
Simplify the way transmit buffers are managed, remove assumptions about
NBPG, simplify sonic_get handling, update snioctl to be more like other
current drivers, and probably a few other changes I've now forgotten about.
our MD bus_space_probe() extension). This has several side effects:
- NuBus drivers must map and unmap slot space, rather than relying
on this happening before they are attached.
- Functions exported to NuBus drivers from nubus.c now need to be
supplied with a bus space tag/handle pair.
- Old bus map/peek functions can be garbage collected, as can pmap
support for the same.
Because of some current limitations of the bus space specification, we
are violating the abstraction in grf_mv (NuBus grf driver). All such
violations are clearly marked /* XXX */, and must be addressed when
the specification is updated.
- Remove unused `register' modifier on declarations
- Reverse the sense of some tests to make the code more clear
- Type casts per KNF
- Move a static variable into the only function that uses it (perhaps
we can eliminate it entirely, someday?)
Change in the way receive buffer areas are handled. Before we gave
the chip 16 buffers, each 1536 bytes (big enough for one packet).
Now we're handing the chip 8 buffers, each 4 Kbytes, and letting
the chip fit as many packets as it can in each one. This should
help keep it from running out of buffer space. Also make some of
the performance-crucial routines inline. It made no measurable
difference except to make me feel better
Changes from Bob Nestor <rnestor@metronet.com> to get closer to support
for his Apple SONIC-based nubus card.
Changes from me to try to get SONIC's MAC address from MacOS settings if
we can't read the PROM space.
driver. Major highlights:
- Protect with splbio(), now that interrupts from the chip might be
enabled by default;
- Wait for current transfer to complete before returning, rather than
wait for previous transfer to complete before starting another;
- Instead of logging a "timeout" message when a target disconnects,
just return, letting the sbc_ready() and sbc_wait_not_req() print
timeout messages if such really did occur.
With interrupt changes to sbc_obio.c, disconnect/reselect now works if
configured into the kernel.
present and initialize a few things. No color support, yet.
- Properly disable interrupts for DAFB.
- Rearrange for better nubus display card interrupt support. Only register
an interrupt if we know how to clear it.
- Complain if we don't know about a given display card and can not install
an interrupt handler.
- Change MYSTERY stuff to cb264--still need to get the DrSW so we can
actually call the routine to clear an interrupt from this card.
tweaks and bug fixes by yours truly.
Here's what Denny had to say:
nubus.h:
- add a drsw entry for my card
[ I also added a couple of constants for more display cards ]
if_sn.c:
- allocate sc->space using malloc (Scott wanted this).
- make csr accesses use NIC_PUT/GET, remove sc->sc_csr.
- add multicast and IFF_PROMISC support. multicast isn't
well tested, but I made sure the unicast case still
works.
- finish the new arp interface, remove sc->sc_enaddr
if_snreg.h:
- remove struct sonic_reg
if_snvar.h:
- add NIC_PUT and NIC_GET macros a la if_ae
- remove sc_txhead, it isn't used.
if_sn_nubus.c:
- clean up support for my SE/30 card.
- Move add_nubus_intr from if_sn.c (to keep if_sn.c MI)
if_sn_obio.c:
- make Q610, C610, Q650, C650, Q800 use EXBUS.
- PB500 had a "return" where "break" was intended. PB500
probably wasn't working.
- move add_nubus_intr from if_sn.c.
- add an "explanation" why Apple's ethernet addr is encoded
in token ring format in the PROM.
- Indent some comments appropriately per KNF.
- Output all diagnostics using the device name rather than a static string.
- Fix a (mostly marmless) bug in snintr(), where loss of heartbeat wasn't
properly ignored and could mask the `receive descriptors exhausted'
diagnostic.
- Use more consistent and portable types in the softc.
- Map registers using an array of bus_size_t offsets, and set up the
mapping in the attach code (thanks to Jason Thorpe for suggesting
this!).
- Disable the ae-specific watchdog, which is no longer necessary in
the general case.
Still remaining: split out functions used to copy data to/from the
card, and retain a way to have a local driver name with the MI code.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.