This makes crash recovery work for stripe sizes that are not multiples of
DEFAULT_REVIVE_BLOCKSIZE (currently 64 kB).
While we're here, fix a few cosmetic nits.
Reviewed by: grog
Sponsored by: Enitel ASA (http://www.enitel.no/)
of the data structures to include new members that weren't defined in the
manual I have.
I opted to use Doug Ambrisko's WEP patches since David Cornejo's patches
did not include the necessary changes to ancontrol(8) to actually enable
and use WEP.
NOTE: I don't currently have access to an Aironet card, so I can't test
any of this. Everything compiles and close scrutiny doesn't reveal any
obvious problems, but Murphy's Law applies. This means I will probably
leave these changes in -current for a bit longer than usual until I'm
sure they work right.
This allows us to successfully attach early Storage Dimension cards.
Allocate mailboxes for the 742A bellow the 16MB limit. Although these
cards seem to be able to deal with all other types of data anywhere
in a 32bit address space, 24bit addresses are required for mailboxes.
bt_eisa.c:
Add device IDs for all Storage Dimension products I could
find from their web site.
Thanks to Ted Mittelstaed for loaning me the equipment to diagnose
and fix these problems.
The prior version in the tree was repo-copied from Duncan Barclay's
cvs tree.
Also add $FreeBSD$
Submitted by: Duncan Barclay
Committed-via: raylan link with two webgear cards.
boot problems..
However this demands that dangerously dedicated disks use an
offset of at least 10 from the start to not overwrite the
raid config sector on the HPT...
Shutdown the card when a catastrophic error occurs. This quenches
any interrupts stemming from the card.
aic7xxx_inline.h:
Return instead of processing additional interrupt state
after handling a catastrophic error. We now shutdown the
chip in this case in the hopes that the system can live
without this controller. The shutdown process invalidates any
other interrupt state.
aic7xxx.seq:
Only attempt to clear SCSIBUSL on Ultra2 controllers. The
clearing is workaround for a selection timeout bug on U2/U160
controllers and happens to be illegal on aic7770 (EISA/VL)
controllers.
numerous error recovery buglets.
Many thanks to Tor Egge for his assistance in diagnosing problems with
the error recovery code.
aic7xxx.c:
Report missed bus free events using their own sequencer interrupt
code to avoid confusion with other "bad phase" interrupts.
Remove a delay used in debugging. This delay could only be hit
in certain, very extreme, error recovery scenarios.
Handle transceiver state changes correctly. You can now
plug an SE device into a hot-plug LVD bus without hanging
the controller.
When stepping through a critical section, panic if we step
more than a reasonable number of times.
After a bus reset, disable bus reset interupts until we either
our first attempt to (re)select another device, or another device
attemps to select us. This removes the need to busy wait in
kernel for the scsi reset line to fall yet still ensures we
see any reset events that impact the state of either our initiator
or target roles. Before this change, we had the potential of
servicing a "storm" of reset interrupts if the reset line was
held for a significant amount of time.
Indicate the current sequencer address whenever we dump the
card's state.
aic7xxx.reg:
Transceiver state change register definitions.
Add the missed bussfree sequencer interrupt code.
Re-enable the scsi reset interrupt if it has been
disabled before every attempt to (re)select a device
and when we have been selected as a target.
When being (re)selected, check to see if the selection
dissappeared just after we enabled our bus free interrupt.
If the bus has gone free again, go back to the idle loop
and wait for another selection.
Note two locations where we should change our behavior
if ATN is still raised. If ATN is raised during the
presentation of a command complete or disconnect message,
we should ignore the message and expect the target to put
us in msgout phase. We don't currently do this as it
requires some code re-arrangement so that critical sections
can be properly placed around our handling of these two
events. Otherwise, we cannot guarantee that the check of
ATN is atomic relative to our acking of the message in
byte (the kernel could assert ATN).
Only set the IDENTIFY_SEEN flag after we have settled
on the SCB for this transaction. The kernel looks at
this flag before assuming that SCB_TAG is valid. This
avoids confusion during certain types of error recovery.
Add a critical section around findSCB. We cannot allow
the kernel to remove an entry from the disconnected
list while we are traversing it. Ditto for get_free_or_disc_scb.
aic7xxx_freebsd.c:
Only assume that SCB_TAG is accurate if IDENTIFY_SEEN is
set in SEQ_FLAGS.
Fix a typo that caused us to execute some code for the
non-SCB paging case when paging SCBs. This only occurred
during error recovery.
As of this patchset, the loader builds (under NetBSD/macppc), boots, interacts
and talks to BOOTP/NFS servers.
(main.c was moved from boot/ofw/libofw to boot/ofw/common but has no revision
history)
Reviewed by: obrien
This code has help us comprehence ACPI spec .
Contributors of this code is as follows(except for FreeBSD commiter):
Yasuo Yokoyama,
Munehiro Matsuda,
and ALL acpi-jp@jp.freebsd.org people.
Thanks.
R.I.P.
When the printer is turned off the pipe write will cause and error,
which causes lpd to close the device and reopen it to clear the error.
After a short while the device will disappear from the bus but lpd will
have opened the ulpt0 port by then. ulpt_status will check for status
without checking the sc->dying flag and panic the kernel when the device
finally disappears from the bus.
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
also
- sync with netbsd
- fix a bug that miscalculates tx cell counts when the pointer size isn't 4
tested both ENI and Adaptec cards on both i386 and alpha.
interface. In addition to using newbus, it also uses bus_space rather
than inb/outb to make it MI. The grody static softc allocation stuff
has been removed as well.
When restarting the sequencer, ensure that the SCBCNT register
is 0. A non-zero count will prevent the setting of the CCSCBDIR
bit in any future dma operations. The only time CCSCBCNT would
be non-zero is if we happened to halt the dma during a reset,
but even that should never happen. Better safe than sorry.
When a command completes before the target responds to an
ATN for a recovery command, we now notify the kernel so that
any recovery operation requeued in the qinfifo can be removed
safely. In the past, we did this in ahc_done(), but ahc_done()
may be called without the card paused. This also avoids a
recursive call to ahc_search_qinifo() which could have occurred if
ahc_search_qinififo() happened to be the routine to complete
a recovery action.
Fix 8bit math used for adjusting the qinfifo. The index must
be wrapped properly within the 256 entry array. We rely on the
fact that qinfifonext is a uint8_t in most cases to handle
this wrap, but we missed a few spots where the resultant
calculation was promoted to an int.
Change the way that we deal with aborting the first or second
entry from the qinfifo. We now swap the first entry in the
qinfifo with the "next queued scb" to force the sequencer
to see an abort collision if we ever touch the qinififo while
the sequencer is mid SCB dma.
aic7xxx.reg:
Add new MKMSG_FAILED sequencer interrupt. This displaced
the BOGUS_TAG interrupt used in some previous sequencer code
debugging.
aic7xxx.seq:
Increment our position in the qinfifo only once the dma
is complete and we have verified that the queue has not
been changed during our DMA. This simplifies code in the
kernel.
Protect against "instruction creep" when issuing a pausing
sequencer interrupt. On at least the 7890/91/96/97, the
sequencer will coast after issuing the interrupt for up
to two instructions. In the past we delt with this by
using carefully placed nops. Now we call a routine to
issue the interrupt followed by a nop and a ret.
Tell the kernel should an SCB complete with the MK_MESSAGE
flag still set. This means the target ignored our ATN request.
Clear the channel twice as we exit the data phase. On the
aic7890/91, the S/G preload logic may require the second
clearing to get the last S/G out of the FIFO.
aic7xxx_freebsd.c:
Don't bother searching the qinfifo for a doubly queued
recovery scb in ahc_done. This case is handled by the
core driver now.
Free the path used to issue async callbacks after the callback
is complete.
aic7xxx_inline.h:
Split the SCB queue routine into a routine that swaps
the SCB with the "next queued SCB" and a routine that
calls the swapping routine and notifies the card of
the new SCB. The swapping routine is now also used by
ahc_search_qinfifo.
circuit generates too much jitter to be used directly as xmit clock.
Don't miscount pending bytes in weird error conditions.
Drop the rest of a packet if we run out of tx-md's.
Trig the xmit-frame signal on rising edge, this fixed the one-bit-too-late
position of the HDLC frames in E1 mode.
pollution in <sys/mutex.h>. This was half fixed in rev.1.3 of
midwayreg.h. The pollution exposed the bug that this driver was using
toy versions of the bus space macros under FreeBSD. Disabling the
toy versions made this driver compile but dependent on the pollution.
There was still a toy version of bus_space_read_1() in unreachable code.
namespace pollution in <sys/mutex.h>. This was half fixed in rev.1.3
of midwayreg.h. The pollution exposed the bug that this driver was
using toy versions of the bus space macros under FreeBSD. Disabling
the toy versions made this driver compile and maybe support PIO space,
but dependent on the pollution.
them. If we leave garbage in them, the dc_apply_fixup() routine may
try to follow bogus pointers when applying the reset fixup.
Noticed by: Andrew Gallatin
Xtal reference instead of the CLADI input.
In unframed E1 mode, tie SIGFRZ low so that the mysycc doesn't
get confused.
Don't mask errors with OOF. Don't ignore OOF errors.
Stop the channel before freeing mbufs in disconnect.
I still have no T1 devices to test with, so the T1 code is non-existent.
multicast filter on the Pegasus chip. Since IPv6 depends a lot
on multicasting, this caused several failures for people trying to
use IPv6 with Pegasus USB ethernet devices.
Submitted by: Jun Kuriyama <kuriyama@FreeBSD.org>