#
dd1290f0 |
| 31-Oct-2000 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
aic7xxx.c: Filter incoming transfer negotiation requests to ensure they never exceed the settings specified by the user.
In restart sequencer attempt to deal with a bug in the aic7895. If a thir
aic7xxx.c: Filter incoming transfer negotiation requests to ensure they never exceed the settings specified by the user.
In restart sequencer attempt to deal with a bug in the aic7895. If a third party reset occurs at just the right time, the stack register can lock up. When restarting the sequencer after handling the SCSI reset, poke SEQADDR1 before resting the sequencers program counter.
When something strange happens, dump the card's transaction state via ahc_dump_card_state(). This should aid in debugging.
Handle request sense transactions via the QINFIFO instead of attaching them to the waiting queue directly. The waiting queue consumes card SCB resources and, in the pathological case of every target on the bus beating our selection attemps and issuing a check condition, could have caused us to run out of SCBs. I have never seen this happen, and only early cards with 3 or 4 SCBs had any real chance of ever getting into this state.
Add additional sequencer interrupt codes to support firmware diagnostics. The diagnostic code is enabled with the AHC_DEBUG_SEQUENCER kernel option.
Make it possible to switch into and out of target mode on the fly. The card comes up by default as an initiator but will switch into target mode as soon as an enable lun operation is performed. As always, target mode behavior is gated by the AHC_TMODE_ENABLE kernel option so most users will not be affected by this change.
In ahc_update_target_msg_request(), also issue a new request if the ppr_options have changed.
Never issue a PPR as a target. It is forbidden by the spec.
Correct a bug in ahc_parse_msg() that prevented us from responding to PPR messages as a target.
Mark SCBs that are on the untagged queue with a flag instead of checking several fields in the SCB to see if the SCB should be on the queue. This makes it easier for things like automatic request sense requests to be queued without touching the untagged queues even though they are untagged requests.
When dealing with ignore wide residue messages that occur in the middle of a transfer, reset HADDR, not SHADDR for non-ultra2 chips. Although SHADDR is where the firmware fetches the ending transfer address for a save data pointers request, it is readonly. Setting HADDR has the side effect of also updating SHADDR.
Cleanup the output of ahc_dump_card_state() by nulling out the free scb list in the non-paging case. The free list is only used if we must page SCBs.
Correct the transmission of cdbs > 12 bytes in length. When swapping HSCBs prior to notifing the sequencer of the new transaction, the bus address pointer for the cdb must also be recalculated to reflect its new location. We now defer the calculation of the cdb address until just before queing it to the card.
When pulling transfer negotiation settings out of scratch ram, convert 5MHz/clock doubled settings to 10MHz.
Add a new function ahc_qinfifo_requeue_tail() for use by error recovery actions and auto-request sense operations. These operations always occur when the sequencer is paused, so we can avoid the extra expense incurred in the normal SCB queue method.
Use the BMOV instruction for all single byte moves on controllers that support it. The bmov instruction is twice as fast as an AND with an immediate of 0xFF as is used on older controllers.
Correct a few bugs in ahc_dump_card_state(). If we have hardware assisted queue registers, use them to get the sequencer's idea of the head of the queue. When enumerating the untagged queue, it helps to use the correct index for the queue.
aic7xxx.h:
Indicate via a feature flag, which controllers can take on both the target and the initiator role at the same time.
Add the AHC_SEQUENCER_DEBUG flag.
Add the SCB_CDB32_PTR flag used for dealing with cdbs with lengths between 13 and 32 bytes.
Add new prototypes.
aic7xxx.reg: Allow the SCSIBUSL register to be written to. This is required to fix a selection timeout problem on the 7892/99.
Cleanup the sequencer interrupt codes so that all debugging codes are grouped at the end of the list.
Correct the definition of the ULTRA_ENB and DISC_DSB locations in scratch ram. This prevented the driver from properly honoring these settings when no serial eeprom was available.
Remove an unused sequencer flag.
aic7xxx.seq: Just before a potential select-out, clear the SCSIBUSL register. Occasionally, during a selection timeout, the contents of the register may be presented on the bus, causing much confusion.
Add sequencer diagnostic code to detect software and or hardware bugs. The code attempts to verify most list operations so any corruption is caught before it occurs. We also track information about why a particular reconnection request was rejected.
Don't clobber the digital REQ/ACK filter setting in SXFRCTL0 when clearing the channel.
Fix a target mode bug that would cause us to return busy status instead of queue full in respnse to a tagged transaction.
Cleanup the overrun case. It turns out that by simply butting the chip in bitbucket mode, it will ack any bytes until the phase changes. This drasticaly simplifies things.
Prior to leaving the data phase, make sure that the S/G preload queue is empty.
Remove code to place a request sense request on the waiting queue. This is all handled by the kernel now.
Change the semantics of "findSCB". In the past, findSCB ensured that a freshly paged in SCB appeared on the disconnected list. The problem with this is that there is no guarantee that the paged in SCB is for a disconnected transation. We now defer any list manipulation to the caller who usually discards the SCB via the free list.
Inline some busy target table operations.
Add a critical section to protect adding an SCB to the disconnected list.
aic7xxx_freebsd.c: Handle changes in the transfer negotiation setting API to filter incoming requests. No filtering is necessary for "goal" requests from the XPT.
Set the SCB_CDB32_PTR flag when queing a transaction with a large cdb.
In ahc_timeout, only take action if the active SCB is the timedout SCB. This deals with the case of two transactions to the same device with different timeout values.
Use ahc_qinfifo_requeu_tail() instead of home grown version.
aic7xxx_inline.h: Honor SCB_CDB32_PTR when queuing a new request.
aic7xxx_pci.c: Use the maximum data fifo threshold for all chips.
show more ...
|
#
60754d0b |
| 12-Oct-2000 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Bring back the ability to send cdbs of length 13->32 bytes. This was lost during the qinfifo optimization. When swapping HSCBs, we were only copying the first 32 bytes, the amount used in the commo
Bring back the ability to send cdbs of length 13->32 bytes. This was lost during the qinfifo optimization. When swapping HSCBs, we were only copying the first 32 bytes, the amount used in the common case of a cdb <= 12 bytes. Larger cdbs are stored in the second 32 bytes of the cdb.
Noticed by: Marc Frajola <marc@terasolutions.com>
show more ...
|
#
a49630ac |
| 05-Oct-2000 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Convert the driver to use a single DMA for fetching new commands instead of two (one to access the circular input fifo, the other to get the SCB). This costs us a command slot so the driver can now o
Convert the driver to use a single DMA for fetching new commands instead of two (one to access the circular input fifo, the other to get the SCB). This costs us a command slot so the driver can now only queue 254 simultaneous commands.
Have the kernel driver honor critical sections in sequencer code.
When prefetching S/G segments only pull a cacheline's worth but never less than two elements. This reduces the impact of the prefetch on the main data transfer when compared to the 128 byte fetches the driver used to do.
Add "bootverbose" logging for transfer negotiations.
Correct a bug in ahc_set_syncrate() that would prevent an update of the sync parameters if only the ppr_options had changed.
Correct locking for calls to ahc_free_scb(). ahc_free_scb() is no longer protected internally to simplify ports to other platforms.
Make sure we unfreeze our SIMQ if a resource shortage has occurred and an SCB is been freed.
ahc_pci.c: Turn on cacheline streaming for all controllers that support it.
Clarify diagnostic messages about PCI interrupts.
show more ...
|
#
c498406d |
| 23-Sep-2000 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Add Perforce RCSIDs for easy revision correlation to my local tree.
ahc_pci.c: Bring back the AHC_ALLOW_MEMIO option at least until the memory mapped I/O problem on the SuperMicro 370DR3 is bette
Add Perforce RCSIDs for easy revision correlation to my local tree.
ahc_pci.c: Bring back the AHC_ALLOW_MEMIO option at least until the memory mapped I/O problem on the SuperMicro 370DR3 is better understood.
aic7xxx.c: If we see a spurious SCSI interrupt, attempt to clear it and continue by unpausing the sequencer.
Change the interface to ahc_send_async(). Some async messages need to be broadcast to all the luns of a target or all the targets of a bus. This is easier to achieve by passing explicit channel, target, and lun parameters instead of attempting to construct a device info struct to match.
Filter the sync parameters for the PPR message in exactly the same way we do for an old fashioned SDTR message.
Correct some typos and correct a panic message.
Handle rejected PPR messages.
In ahc_handle_msg_reject(), let ahc_build_transfer_msg() build any additional transfer messages instead of doing this inline.
aic7xxx.h: Increase the size of both msgout_buf and msgin_buf to better accomodate PPR messages.
aic7xxx_freebsd.c: Update for change in ahc_send_async() parameters.
aic7xxx_freebsd.h Update for change in ahc_send_async() parameters.
Honor AHC_ALLOW_MEMIO.
aic7xxx_pci.c: Check the error register before going into full blown PCI interrupt handling. This avoids a few costly PCI configuration space reads when we run our PCI interrupt handler because another device sharing our interrupt line is more active than we are.
Also unpause the sequencer after processing a PCI interrupt.
show more ...
|
#
717d4247 |
| 16-Sep-2000 |
Justin T. Gibbs <gibbs@FreeBSD.org> |
Move aicasm to its own subdirectory.
Separate our platform independent hooks from core driver functionality shared between platforms (FreeBSD and Linux at this time).
Add sequencer workarounds for
Move aicasm to its own subdirectory.
Separate our platform independent hooks from core driver functionality shared between platforms (FreeBSD and Linux at this time).
Add sequencer workarounds for several chip->chipset interactions.
Correct external SCB corruption problem on aic7895 based cards (3940AUW).
Lots of cleanups resulting from the port to another OS.
show more ...
|