aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/aic7xxx/aic7xxx.h
diff options
context:
space:
mode:
authorJustin T. Gibbs <gibbs@FreeBSD.org>2001-07-18 21:39:48 +0000
committerJustin T. Gibbs <gibbs@FreeBSD.org>2001-07-18 21:39:48 +0000
commitcd036e891a35c52880f7c8af76964b483860bf0a (patch)
treefdd4d55c36494a3c8562af45e6bdd921d7240cf8 /sys/dev/aic7xxx/aic7xxx.h
parent2d0fbde8e7737d87b96629aec00c3b5a54672cc8 (diff)
downloadsrc-cd036e891a35c52880f7c8af76964b483860bf0a.tar.gz
src-cd036e891a35c52880f7c8af76964b483860bf0a.zip
ahc_pci.c:
If bus_dma will give us addresses > 32 bits, setup our dma tag to accept up to 39bit addresses. aic7770.c: Update the softc directly rather than use an intermediate "probe_config" structure. aic7xxx.c: Complete core work to support 39bit addresses for bulk data dma operations. Controller data structures still must reside under the 4GB boundary to reduce code/data size in the sequencer and related data structures. This has been tested under Linux IA64 and will be tested on IA64 for FreeBSD as soon as our port can run there. Add bus dmamap synchronization calls around manipulation of all controller/kernel shared host data structures. Implement data pointer reinitialation for a second data phase in a single connection in the kernel rather than bloat the sequencer. This is an extremely rare operation (does it ever happen?) and the sequencer implementation was flawed for some of the newest chips. Don't ever allow our target role to initiate a PPR. This is forbidden by the SCSI spec. Add a few missing endian conversions in the ignore wide pointers code. The core has been tested on the PPC under Linux and should work for FreeBSD PPC. As soon as I can test the OSM layer for FreeBSD PPC, I will. Move some of ahc_softc_init() into ahc_alloc() now that the probe_config structure is gone. Add a 4GB boundary condition on all of our dma tags. 32bit DAC under PCI only works on a single 4GB "page". Although we can cross 4GB on a true 64bit bus, the card won't always be installed in one and we can save code space and cost in implementing high address support by assuming the high DWORD address will never change. Add diagnostics to ahc_search_qinfifo(). Correct a target mode issue with bus resets. To avoid an interrupt storm from a malicious third party holding the reset line, the sequencer would defer re-enabling the reset interrupt until either a select-out or select-in. Unfortunately, the select-in enable bit is cleared by a bus reset, so a second reset will render the card deaf to an initiator's attempts to contact it. We now re-enable bus reset interrupts immediately if the target role is enabled. aic7xxx.h: Remove struct ahc_probe_config. SCB's now contain a pointer to the sg_map_node so we can perfrom bus dma sync operations on the SG list prior to queuing a command. aic7xxx.reg: Register the Perforce ID for this file with the VERSION keyword so it is printed in generated files. Add the DSCOMMAND1 register which is used to access the high DWORD of address bits. Add the data pointer reinitialize sequencer interrupt code. aic7xxx.seq: Register the Perforce ID for this file with the VERSION keyword so it is printed in generated files. Remove code to re-enable the bus reset interrupt after a select-in. In target mode we cannot defer this operation as ENSELI is cleared by a bus reset. Complete 39bit support. Generate a sequencer inteerrupt rather than handle the data pointers re-initialitation in the sequencer. Inline the "seen identify" assertion to save a few cycles. Short circuit the update of our residual data if we have fully completed a transfer. The residual is correct from our last S/G load operation. Short circuit full SDPTR processing if the residual is 0. Just mark the transfer as complete. aic7xxx_93cx6.c: Synchronize perforce IDs. aic7xxx_freebsd.c: Complete untested 39bit support. Add missing endia conversions. Clear our residuals prior to starting a command. The update residual code in the core only sets the residual if there is one. aic7xxx_freebsd.h: Modeify ahc_dmamap_sync() macros to take an offset and a length. This is how sync operations are performed in NetBSD, and we should update our bus dma implementation to match. aic7xxx_inline.h: Add data structure synchronization helper functions. Fix a bug in ahc_intr() where we would not clear our unsolicited interrupt counter after running our PCI interrupt handler. This may have been the cause of the spurious PCI interrupt messages. aic7xxx_pci.c: Adjust for loss of probe_config structure. Guard against bogus 9005 subdevice information as seen on some IBM MB configurations. Add 39bit address support. MFC after: 10 days
Notes
Notes: svn path=/head/; revision=79874
Diffstat (limited to 'sys/dev/aic7xxx/aic7xxx.h')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.h44
1 files changed, 15 insertions, 29 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.h b/sys/dev/aic7xxx/aic7xxx.h
index 4eded92809ab..cc5bf764828b 100644
--- a/sys/dev/aic7xxx/aic7xxx.h
+++ b/sys/dev/aic7xxx/aic7xxx.h
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: //depot/src/aic7xxx/aic7xxx.h#27 $
+ * $Id: //depot/src/aic7xxx/aic7xxx.h#29 $
*
* $FreeBSD$
*/
@@ -335,22 +335,10 @@ typedef enum {
AHC_BIOS_ENABLED = 0x80000,
AHC_ALL_INTERRUPTS = 0x100000,
AHC_PAGESCBS = 0x400000, /* Enable SCB paging */
- AHC_EDGE_INTERRUPT = 0x800000 /* Device uses edge triggered ints */
+ AHC_EDGE_INTERRUPT = 0x800000, /* Device uses edge triggered ints */
+ AHC_39BIT_ADDRESSING = 0x1000000 /* Use 39 bit addressing scheme. */
} ahc_flag;
-/*
- * Controller Information composed at probe time.
- */
-struct ahc_probe_config {
- const char *description;
- char channel;
- char channel_b;
- ahc_chip chip;
- ahc_feature features;
- ahc_bug bugs;
- ahc_flag flags;
-};
-
/************************* Hardware SCB Definition ***************************/
/*
@@ -499,6 +487,13 @@ struct ahc_dma_seg {
#define AHC_SG_LEN_MASK 0x00FFFFFF
};
+struct sg_map_node {
+ bus_dmamap_t sg_dmamap;
+ bus_addr_t sg_physaddr;
+ struct ahc_dma_seg* sg_vaddr;
+ SLIST_ENTRY(sg_map_node) links;
+};
+
/*
* The current state of this SCB.
*/
@@ -538,18 +533,12 @@ struct scb {
bus_dmamap_t dmamap;
#endif
struct scb_platform_data *platform_data;
- struct ahc_dma_seg *sg_list;
+ struct sg_map_node *sg_map;
+ struct ahc_dma_seg *sg_list;
bus_addr_t sg_list_phys;
u_int sg_count;/* How full ahc_dma_seg is */
};
-struct sg_map_node {
- bus_dmamap_t sg_dmamap;
- bus_addr_t sg_physaddr;
- struct ahc_dma_seg* sg_vaddr;
- SLIST_ENTRY(sg_map_node) links;
-};
-
struct scb_data {
SLIST_HEAD(, scb) free_scbs; /*
* Pool of SCBs ready to be assigned
@@ -865,7 +854,7 @@ struct ahc_softc {
/*
* SCBs that have been sent to the controller
*/
- LIST_HEAD(, scb) pending_scbs;
+ LIST_HEAD(, scb) pending_scbs;
/*
* Counting lock for deferring the release of additional
@@ -1039,8 +1028,7 @@ struct ahc_devinfo {
};
/****************************** PCI Structures ********************************/
-typedef int (ahc_device_setup_t)(ahc_dev_softc_t,
- struct ahc_probe_config *);
+typedef int (ahc_device_setup_t)(struct ahc_softc *);
struct ahc_pci_identity {
uint64_t full_id;
@@ -1093,10 +1081,8 @@ int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb,
u_int tag, role_t role);
/****************************** Initialization ********************************/
-void ahc_init_probe_config(struct ahc_probe_config *);
struct ahc_softc *ahc_alloc(void *platform_arg, char *name);
-int ahc_softc_init(struct ahc_softc *,
- struct ahc_probe_config*);
+int ahc_softc_init(struct ahc_softc *);
void ahc_controller_info(struct ahc_softc *ahc, char *buf);
int ahc_init(struct ahc_softc *ahc);
void ahc_intr_enable(struct ahc_softc *ahc, int enable);