patch-2.4.21 linux-2.4.21/drivers/ieee1394/ohci1394.h
Next file: linux-2.4.21/drivers/ieee1394/pcilynx.c
Previous file: linux-2.4.21/drivers/ieee1394/ohci1394.c
Back to the patch index
Back to the overall index
- Lines: 174
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/ieee1394/ohci1394.h
- Orig date:
2002-11-28 15:53:13.000000000 -0800
diff -urN linux-2.4.20/drivers/ieee1394/ohci1394.h linux-2.4.21/drivers/ieee1394/ohci1394.h
@@ -95,6 +95,7 @@
/* dma block descriptors */
struct dma_cmd **prg_cpu;
dma_addr_t *prg_bus;
+ struct pci_pool *prg_pool;
/* dma buffers */
quadlet_t **buf_cpu;
@@ -108,6 +109,7 @@
int ctrlClear;
int ctrlSet;
int cmdPtr;
+ int ctxtMatch;
};
/* DMA transmit context */
@@ -120,6 +122,7 @@
/* dma block descriptors */
struct at_dma_prg **prg_cpu;
dma_addr_t *prg_bus;
+ struct pci_pool *prg_pool;
unsigned int prg_ind;
unsigned int sent_ind;
@@ -143,7 +146,8 @@
struct tasklet_struct tasklet;
struct list_head link;
int context;
- enum { OHCI_ISO_TRANSMIT, OHCI_ISO_RECEIVE } type;
+ enum { OHCI_ISO_TRANSMIT, OHCI_ISO_RECEIVE,
+ OHCI_ISO_MULTICHANNEL_RECEIVE } type;
};
struct ti_ohci {
@@ -168,7 +172,7 @@
/* dma buffer for self-id packets */
quadlet_t *selfid_buf_cpu;
dma_addr_t selfid_buf_bus;
-
+
/* buffer for csr config rom */
quadlet_t *csr_config_rom_cpu;
dma_addr_t csr_config_rom_bus;
@@ -185,18 +189,28 @@
struct dma_trm_ctx at_req_context;
/* iso receive */
- struct dma_rcv_ctx ir_context;
- struct ohci1394_iso_tasklet ir_tasklet;
- spinlock_t IR_channel_lock;
int nb_iso_rcv_ctx;
unsigned long ir_ctx_usage; /* use test_and_set_bit() for atomicity */
+ unsigned long ir_multichannel_used; /* ditto */
+ spinlock_t IR_channel_lock;
+
+ /* iso receive (legacy API) */
+ u64 ir_legacy_channels; /* note: this differs from ISO_channel_usage;
+ it only accounts for channels listened to
+ by the legacy API, so that we can know when
+ it is safe to free the legacy API context */
+
+ struct dma_rcv_ctx ir_legacy_context;
+ struct ohci1394_iso_tasklet ir_legacy_tasklet;
/* iso transmit */
- struct dma_trm_ctx it_context;
- struct ohci1394_iso_tasklet it_tasklet;
int nb_iso_xmit_ctx;
unsigned long it_ctx_usage; /* use test_and_set_bit() for atomicity */
-
+
+ /* iso transmit (legacy API) */
+ struct dma_trm_ctx it_legacy_context;
+ struct ohci1394_iso_tasklet it_legacy_tasklet;
+
u64 ISO_channel_usage;
/* IEEE-1394 part follows */
@@ -211,14 +225,17 @@
/* Tasklets for iso receive and transmit, used by video1394,
* amdtp and dv1394 */
-
+
struct list_head iso_tasklet_list;
spinlock_t iso_tasklet_list_lock;
-
+
/* Swap the selfid buffer? */
unsigned int selfid_swap:1;
/* Some Apple chipset seem to swap incoming headers for us */
unsigned int no_swap_incoming:1;
+
+ /* Force extra paranoia checking on bus-reset handling */
+ unsigned int check_busreset:1;
};
static inline int cross_bound(unsigned long addr, unsigned int size)
@@ -274,6 +291,13 @@
#define OHCI1394_VendorID 0x040
#define OHCI1394_HCControlSet 0x050
#define OHCI1394_HCControlClear 0x054
+#define OHCI1394_HCControl_noByteSwap 0x40000000
+#define OHCI1394_HCControl_programPhyEnable 0x00800000
+#define OHCI1394_HCControl_aPhyEnhanceEnable 0x00400000
+#define OHCI1394_HCControl_LPS 0x00080000
+#define OHCI1394_HCControl_postedWriteEnable 0x00040000
+#define OHCI1394_HCControl_linkEnable 0x00020000
+#define OHCI1394_HCControl_softReset 0x00010000
#define OHCI1394_SelfIDBuffer 0x064
#define OHCI1394_SelfIDCount 0x068
#define OHCI1394_IRMultiChanMaskHiSet 0x070
@@ -292,6 +316,9 @@
#define OHCI1394_IsoRecvIntEventClear 0x0A4
#define OHCI1394_IsoRecvIntMaskSet 0x0A8
#define OHCI1394_IsoRecvIntMaskClear 0x0AC
+#define OHCI1394_InitialBandwidthAvailable 0x0B0
+#define OHCI1394_InitialChannelsAvailableHi 0x0B4
+#define OHCI1394_InitialChannelsAvailableLo 0x0B8
#define OHCI1394_FairnessControl 0x0DC
#define OHCI1394_LinkControlSet 0x0E0
#define OHCI1394_LinkControlClear 0x0E4
@@ -380,7 +407,7 @@
/* OHCI evt_* error types, table 3-2 of the OHCI 1.1 spec. */
#define EVT_NO_STATUS 0x0 /* No event status */
-#define EVT_RESERVED 0x1 /* Reserved, not used !!! */
+#define EVT_RESERVED_A 0x1 /* Reserved, not used !!! */
#define EVT_LONG_PACKET 0x2 /* The revc data was longer than the buf */
#define EVT_MISSING_ACK 0x3 /* A subaction gap was detected before an ack
arrived, or recv'd ack had a parity error */
@@ -388,17 +415,28 @@
truncated */
#define EVT_OVERRUN 0x5 /* A recv FIFO overflowed on reception of ISO
packet */
-#define EVT_DESCRIPTOR_READ 0x6 /* An unrecoverable error occured while host was
+#define EVT_DESCRIPTOR_READ 0x6 /* An unrecoverable error occurred while host was
reading a descriptor block */
-#define EVT_DATA_READ 0x7 /* An error occured while host controller was
+#define EVT_DATA_READ 0x7 /* An error occurred while host controller was
attempting to read from host memory in the data
stage of descriptor processing */
-#define EVT_DATA_WRITE 0x8 /* An error occured while host controller was
+#define EVT_DATA_WRITE 0x8 /* An error occurred while host controller was
attempting to write either during the data stage
of descriptor processing, or when processing a single
16-bit host memory write */
#define EVT_BUS_RESET 0x9 /* Identifies a PHY packet in the recv buffer as
being a synthesized bus reset packet */
+#define EVT_TIMEOUT 0xa /* Indicates that the asynchronous transmit response
+ packet expired and was not transmitted, or that an
+ IT DMA context experienced a skip processing overflow */
+#define EVT_TCODE_ERR 0xb /* A bad tCode is associated with this packet.
+ The packet was flushed */
+#define EVT_RESERVED_B 0xc /* Reserved, not used !!! */
+#define EVT_RESERVED_C 0xd /* Reserved, not used !!! */
+#define EVT_UNKNOWN 0xe /* An error condition has occurred that cannot be
+ represented by any other event codes defined herein. */
+#define EVT_FLUSHED 0xf /* Send by the link side of output FIFO when asynchronous
+ packets are being flushed due to a bus reset. */
#define OHCI1394_TCODE_PHY 0xE
@@ -411,8 +449,8 @@
void ohci1394_unregister_iso_tasklet(struct ti_ohci *ohci,
struct ohci1394_iso_tasklet *tasklet);
-void ohci1394_stop_context (struct ti_ohci *ohci, int reg, char *msg);
+/* returns zero if successful, one if DMA context is locked up */
+int ohci1394_stop_context (struct ti_ohci *ohci, int reg, char *msg);
struct ti_ohci *ohci1394_get_struct(int card_num);
#endif
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)