resistors, which return the last value written to the bus on a read. This
makes detecting empty channels on my HCCS and D.T. Software IDE interfaces
rather faster.
- Set XS_TIMEOUT on a selection timeout condition.
- Do not bother to call AscStartChip() in AscResetChipAndScsiBus()--
just clear the chip status.
- Make sure address is word-aligned in AscWriteLramByte().
Tested on my adv (AdvanSys ABP-9xxUA) with CRW8424S and UMAX SuperVista S-12.
Earlier versions of the system would get stuck trying to recover from error
conditions when the CD-RW drive was in heavy use. I have not seen that
behavior with these small patches.
network interfaces. This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us. In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software. This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.
We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.
Note: hardware-assisted checksumming defaults to "off". It is
enabled with ifconfig(8). See the manual page for details.
Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.
when the system is "warm", i.e. interrupts are not blocked anymore.
This seems to be necessary on my PS/2 Model 70 keyboard - without this,
system ends up in endless loop calling the keyboard intr routine if a key
is pressed when polling. This _may_ be just specific to level-triggered
interrupts PS/2 MCA uses, though it's more likely it's just the way the
particular keyboard controller works.
Discussed on tech-kern@.
Handle special case for IFF_PROMISC. If only IFF_PROMISC
flag is changed, do not call an_init() to avoid initiating
reassociation to another access point. It is really
helpful for tcpdump(8).
way of doing business- modulo some startup spasms and peculiarities
of the way kthreads are started (*after* configuration, weird) and
some strangeness with the freeze/thaw code, what now happens is
that any of Loop Down, LIP, Loop Reset or Port Datbase or Name
Server Database Changed ASYNC events cause the queues to freeze
for this channel. The arrival of a Loop UP is not relevant.
What *is* relevant is that the Port Datbase or Name Server Changed
async event indicate that it's okay to go and (re)evaluate the
state of the FC link and (re)probe local loop and fabric membership.
We have a kthread do this because it's *sooooo* much nicer to be
able to sleep while doing the 130-250 mailbox commands it'll take
to re-evaluate things.
When the state is well known again, we can unfreeze the channel
queues. Then, as commands start arriving, we simply can start them
or bounce them with XS_SELTIMEOUT (if the device in question has
gone away). Previously, we did lazy evaluation, which meant that
if a change occurred, we would wait until the very *next* command
to go rebuild stuff.
The reason this is not sensible is:
a) Even with sleeping, you can hang up your system because you might be
making some poor stat(2) call pay the price of re-evaluating the whole
fabric.
b) If we ever really want to get to dynamic attachment/detachment, we
should find out sooner, rather than later, where things get to.
Split off ispminphys_1020 from ispminphys- a 1020 has a 24 bit limit-
not anything newer.
Re-enable LIPs and Loop Resets as async events- this allows the outer
layer to set policy about them.
Roll platform major && minor. Remove bogus waitq (no longer used).
Remove callout entry in softc (no longer used). Define some shorthands
for channels. Clean up a variety of cruft left over from the
thorpej_scsipi changeover.
- Add some additional config block bits for the i82558/i82559.
- Change the config block template to only fill in the must-be-one
reserved bits, leave fxp_init() to fill in all the important things.
- On the i82558/i82559, we can use "Receive Long Frames" rather than
"Save Bad Frames" to support the VLAN MTU.
- Use 802.3x flow control on the i82558/i82559. This is all handled
transparently by the hardware. When in promiscuous mode, allow
wire-watchers to see the flow control frames.
- Use the Extended TxCB format on the i82558/i82559. This places two
Transmit Buffer Descriptors directly in the TxCB, which should cover
the vast majority of packets transmitted. This saves PCI transactions
that would otherwise be required to fetch the TBD list.
With the tansmit queue length changes from yesterday, this gets us up to
11.5MB/s TCP transmit speed, out of an absolute maximum of 12MB/s possible
on a 100Mb/s link.
This fixes a `hang' on shutdown when the `Synchronise Cache' command
is sent to a disk. (It uses polled mode because it is called from inside
a shutdown hook).
interrupt priority, to avoid allocating additional mbufs on
splsched(). Move some other misc bits out of splched()-guarded
section. This should make the code a bit more friendly wrt e.g.
clock interrupts. Sligh performance improvement was observed with
this change (like 1-2% on slow machine), even.
This also fixes ancient kern/2478 by Bill Sommerfeld.
keeps us from stomping on ourselves.
Say we're in the middle of re-evaluating a loop (and sleeping) when a
command completes, or a timer refires, and this *other* thread decides
*it* wants to start re-evaluating the loop. Bad news.
We have to be a bit careful- if we can't acquire the MBOX semaphore at
interrupt level, we will simulate a host interface error. This is a bit
of a temp workaround. There's some work underway driven by a NetBSD
commercial user that will try and force most mailbox stuff into a
part A/part B interrupt driven model.
0xfe on my gateway 2000 circa 1993). That should not affect broken controllers
that choke on the kbc_auxtest, because for those the write/read test succeeds.
Although WEP is used in Windows also in an old firm,
because WEP is processed by the windows driver side.
If Prism2 Firm version is more than 0.8.3, WEP does work without 'Promiscuous ON'.
Roaming mode can change value into 'firm mode' and disable.
Authentication mode can change into 'Open System authentication'
and 'Shared Key Authentication' with Prism2 chip.
wi_get_id() was introduced in order that chip might judge automatically
whether it is Prism2 chip. Therefore, a pp_prism2 entry in
"struct wi_pcmcia_product" became unnecessary.
done when the command-in-progress bit has been cleared. The 1ms
time that is mentioned also seems wrong; 20,000us is not enough
on at least one machine. So, do a delay(100000) in ex_reset.
Fortunately, this function is only called when the card is
attached or when hardware failure is suspected.
While here, only mask one 1 bit in the 'reset hack' case.
This is based on amiga's siop driver, but converted to use
bus_space(9) functions and modified to fit bus_dma(9) framework.
Currently tested on NetBSD/arc with jazzio 53c710 SCSI,
which really requires bus_dma(9) functions :-)
Sync transfers and disconnect/reconnect are also working.
TODO:
- Test under more heavy load
- Clean up osiop_checkintr() hander
- Reorganize command queue and sync negotiation handling more suitable
for thorpej-scsipi mid-layer
- Re-think defered interrupt handling for amiga
reasonable transmit/receive buffer count.
This is needed for e.g. SKNET adapters, which use top 30 bytes of 16KB
memory to map registers and PROM and hence not all the memory is
available for buffers.
to 16 or 4 (depending on capabilities of adapter), as it was before
thorpej_scsipi integration
Waiting feedback to known whenever the problem with openings set to AHC_SCB_MAX
existed before.
- Add (missed)powerhook_disestablish() in ex_detach().
- Sync with below. Original commit log message:
Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.
Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
a happy code sweep (in the kernel!) and constified a random selection of
kernel objects. This changed the alignment of the previously-aligned-by-
accident seqprog array, and exposed a lurking bug. I can't decide if this
is good or bad.
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.
I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
mouse port seem to interpret the "test aux port" (0xa9) command differently,
leading to a non-working keyboard.
Now we try to echo a byte through the aux port by means of the "echo aux"
(0xd3) command, which is what Linux does.
Thanks to Christoph Badura for detailed reports and testing.
of system drives from an ENQUIRY.
- Complain if there's more than 1 segment when issuing some kind of enquiry
(this needs to be fixed properly).
- Fix the ID hack for 2.xx firmware.
- Fix an argument to bus_dmamap_sync().
xx,f0. This appears to heavily alleviate, but not to eliminate entirely,
the problems I've been seeing with garbage being read from the rx buffer.
I suspect the real solution lies elsewhere.
* Use the timer to timoe out transmit operations.
* Spot when the "next packet" pointer falls outside the recieve buffer and
reset the interface.
* Don't reset the interface when we get a bad packet (unless there's
something else wrong as well).
About the only bit of his code not here is the transmit routines, which I'll
merge in separately.
Also a few bug-fixes, so (for instance) multicast on an 8005 doesn't
immediately fall back to IFF_ALLMULTI.
This now provides slightly more functionality than the FreeBSD layer1-newbus
interface. It was meant to be a simple change to one header and a few
c files, but the change rippled all through various stuff.
To prevent a change to the kernel<->userland interface right now the kernel
is now lying about card types to userland (but who cares). This will be fixed
when the userland interface changes, after layer 3 <-> layer 4 has been
fixed.
Functional changes:
Provide a clean interface for hardware drivers to attach to the upper
layers. This will need another small change in the B-channel handling
when a similar change to the layer 3 <-> layer 4 interface happens.
Avoid passing indices into global arrays of pointers around, instead pass
the pointers itself. Don't code hardware driver types by predefined magic
numbers (think LKM). Prepare for detachable drivers (think pcmcia).
While there remove some sets of function pointers always pointing to the
same function (meant to be the configurable set of D channel protocol
handlers). It is unlikely another supported D-channel protocol will fit into
that (maximal layer interface) abstraction. When we get support for another
protocol, we will need to come up with a workable interface. Besides, the
old implementation was, uhm, strange.
provided to me by David Brownlee (thanks!).
Performance of this card is quite poor on my PS/2 with 386DX, like 100KB/s
at best, but as low as 5KB/s when transferring bigger files due to
packet overruns. It would be good to revisit this later, probably by
teaching the ic code to use RX Early.
up header guard. Clean up structure definition for at2_entry so
it's correct rather than derived from at_entry- this is important
for unswizzling purposes. Add a whole bunch of unswizzle macros-
they're not quite right yet but at least they're a start. Note that
we now have, for at_entry, a 16 bit firmware handle as part of what
had been at_reserved- this is to correlate ATIOs with CTIOs- and
this must be carried along as part of a tag value to use with all
CTIOs we send in relation to this ATIO. ANSIfy.
- Load the DMA address a byte at a time, and
- Use bus_space_read_stream_2() instead of bus_space_read_2() when reading
the byte-stream of configuration data from the card.
Sanity-checked on both i386 and sandpoint. Reviewed by ad.
for the ICB firmware options meant- *I* had taken it to
mean that if you set it, Node Name would be ignored and
derived from Port Name. Actually, it meant the opposite.
As a consequence- change ICBOPT_USE_PORTNAME to the
define ICBOPT_BOTH_WWNS- makes more sense.
isp_iid_set/isp_iid for fibre channel- this is because we now
fake a port database entry for ourselves. Add the additional loop
states between LOOP_PDB_RCVD and LOOP_READY.
Change and comment on a wad of Fibre Channel isp_control functions.
Change and comment on some of the ISPASYNC Fibre Channel events.
Add was_fabric_dev/fabric_dev tags to our local FC database structure
(so we can see rapidly whether something was a fabric device but is
now gone).
Add a tag which says what role this adapter should take. It can take
on the value of None, Target, Initiator or Both. None is useful for
warm failover purposes. Remove the ISP_CFG_NOINIT silliness since
a role of "None" does this.
Add a isp_lastmbxcmd tag to store the opcode for the last mailbox
command used.
to report the mailbox command that times out. Fix isp_unswizzle_sns_rsp
which for reasons *I* find obscurer just doesn't work correctly on sparc64
with words past 128. I have no idea why this *does* work on SparcLinux.
and depending on role, make sure link is up, scan the fabric (if we're
connected to a fabric), scan the local loop (if appropriate), merge
the results into the local port database then, check once again
to make sure we have f/w at FW_READY state and the the loopstate
is LOOP_READY.
Remove ISP2100_FABRIC defines- we always handle fabric now. Insert
isp_getmap helper function (for getting Loop Position map). Make
sure we (for our own benefit) mark req_state_flags with RQSF_GOT_SENSE
for Fibre Channel if we got sense data- the !*$)!*$)~*$)*$ Qlogic
f/w doesn't do so. Add ISPCTL_SCAN_FABRIC, ISPCTL_SCAN_LOOP, ISPCTL_SEND_LIP,
and ISPCTL_GET_POSMAP isp_control functions. Correctly send async notifications
upstream for changes in the name server, changes in the port database, and
f/w crashes. Correctly set topology when we get a ASYNC_PTPMODE event.
When resetting the Qlogic 2X00 units, reset the FPM (Fibre Protocol
Module) and FBM (Fibre Buffer Modules). Also remember to clear the
semaphore registers. Tell the RISC processor to not halt on FPM
parity errors.
Finally, use a new tag in the softc to store the opcode for the
last mailbox command used so we can report which opcode timed
out.
Major stuff:
Quite massively redo how we handle Loop events- we've now added several
intermediate states between LOOP_PDB_RCVD and LOOP_READY. This allows us
a lot finer control about how we scan fabric, whether we go further
than scanning fabric, how we look at the local loop, and whether we
merge entries at the level or not. This is the next to last step for
moving managing loop state out of the core module entirely (whereupon
loop && fabric events will simply freeze the command queue and a thread
will run to figure out what's changed and *it* will re-enable the queu).
This fine amount of control also gets us closer to having an external
policy engine decide which fabric devices we really want to log into.
Throw out the ISP_CFG_NOINIT silliness and instead go to the use of
adapter 'roles' to see whether one completes initialization or not
(mostly for Fibre Channel). The ultimate intent, btw, of all of this
is to have a warm standby adapter for failover reasons. Because
we do roles now, setting of Target Capable Class 3 service parameters
in the ICB for the 2x00 cards reflects from role. Also, in isp_start,
if we're not supporting an initiator role, we bounce outgoing commands
with a Selection Timeout error. Also clean out the TOGGLE_TMODE
goop for FC- there is no toggling of target mode like there is
for parallel SCSI cards.
Do more cleanup with respect to using target ids 0..125 in F-port
topologies. Also keep track of things which *were* fabric devices
so that when you rescan the fabric you can notify the outer layers
when fabric devices go away.
Only force a LOGOUT for fabric devices if they're still logged in
(i.e., you cat their Port Database entry. Clean up the Get All Next
scanning.
- run request sense command without disconnect
- don't restart the script before siop_scsicmd_end has been called if the
cmd didn't complete with good status.
- reserve slot 0 for request sense, to make sure it'll be sent first.
transmit jobs. The previous logic occasionally, under heavy
load, would attempt to sync and unload DMA maps that weren't
currently in use, and also occasionally leaked mbufs under
heavy load.
Yay, NFS now works pretty well on my Dreamcast.
it causes assertions to fail in the PCI bounce buffer code. On
other platforms, it causes the address of the next packet to
be mis-calculated, leading to packet loss.
if we are requested range of multicast address or too many multicast address,
program multicast filter to receive all multicast address. And set/clear
IFF_ALLMULTI flag properly.
This adds support for EtherExpress/16 cards with 16k of RAM, and in the
process adds general support for PIO mode on these cards. This entails
changing the way the i82586 driver handles bus barriers, since it doesn't
allow for strange cases like this.
This has been tested on the i386 port with the 'ix' driver in both
16KB (which was the source of the problem) and 32KB modes, as well
as with the 'ef' driver. I've tested it (briefly) with 'ei' on arm26
as well. In theory, drivers other than 'ix' should follow precisely the
same code paths as before.