aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/sbp2.h')
-rw-r--r--drivers/ieee1394/sbp2.h33
1 files changed, 11 insertions, 22 deletions
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h
index 875428bc8d29..c5036f1cc5b0 100644
--- a/drivers/ieee1394/sbp2.h
+++ b/drivers/ieee1394/sbp2.h
@@ -139,13 +139,10 @@ struct sbp2_logout_orb {
139 u32 status_fifo_lo; 139 u32 status_fifo_lo;
140} __attribute__((packed)); 140} __attribute__((packed));
141 141
142#define PAGE_TABLE_SET_SEGMENT_BASE_HI(v) ((v) & 0xffff)
143#define PAGE_TABLE_SET_SEGMENT_LENGTH(v) (((v) & 0xffff) << 16)
144
145struct sbp2_unrestricted_page_table { 142struct sbp2_unrestricted_page_table {
146 u32 length_segment_base_hi; 143 __be32 high;
147 u32 segment_base_lo; 144 __be32 low;
148} __attribute__((packed)); 145};
149 146
150#define RESP_STATUS_REQUEST_COMPLETE 0x0 147#define RESP_STATUS_REQUEST_COMPLETE 0x0
151#define RESP_STATUS_TRANSPORT_FAILURE 0x1 148#define RESP_STATUS_TRANSPORT_FAILURE 0x1
@@ -216,15 +213,18 @@ struct sbp2_status_block {
216#define SBP2_UNIT_SPEC_ID_ENTRY 0x0000609e 213#define SBP2_UNIT_SPEC_ID_ENTRY 0x0000609e
217#define SBP2_SW_VERSION_ENTRY 0x00010483 214#define SBP2_SW_VERSION_ENTRY 0x00010483
218 215
219
220/* 216/*
221 * SCSI specific definitions 217 * The default maximum s/g segment size of a FireWire controller is
218 * usually 0x10000, but SBP-2 only allows 0xffff. Since buffers have to
219 * be quadlet-aligned, we set the length limit to 0xffff & ~3.
222 */ 220 */
221#define SBP2_MAX_SEG_SIZE 0xfffc
223 222
224#define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000 223/*
225/* There is no real limitation of the queue depth (i.e. length of the linked 224 * There is no real limitation of the queue depth (i.e. length of the linked
226 * list of command ORBs) at the target. The chosen depth is merely an 225 * list of command ORBs) at the target. The chosen depth is merely an
227 * implementation detail of the sbp2 driver. */ 226 * implementation detail of the sbp2 driver.
227 */
228#define SBP2_MAX_CMDS 8 228#define SBP2_MAX_CMDS 8
229 229
230#define SBP2_SCSI_STATUS_GOOD 0x0 230#define SBP2_SCSI_STATUS_GOOD 0x0
@@ -240,12 +240,6 @@ struct sbp2_status_block {
240 * Representations of commands and devices 240 * Representations of commands and devices
241 */ 241 */
242 242
243enum sbp2_dma_types {
244 CMD_DMA_NONE,
245 CMD_DMA_PAGE,
246 CMD_DMA_SINGLE
247};
248
249/* Per SCSI command */ 243/* Per SCSI command */
250struct sbp2_command_info { 244struct sbp2_command_info {
251 struct list_head list; 245 struct list_head list;
@@ -258,11 +252,6 @@ struct sbp2_command_info {
258 struct sbp2_unrestricted_page_table 252 struct sbp2_unrestricted_page_table
259 scatter_gather_element[SG_ALL] __attribute__((aligned(8))); 253 scatter_gather_element[SG_ALL] __attribute__((aligned(8)));
260 dma_addr_t sge_dma; 254 dma_addr_t sge_dma;
261 void *sge_buffer;
262 dma_addr_t cmd_dma;
263 enum sbp2_dma_types dma_type;
264 unsigned long dma_size;
265 enum dma_data_direction dma_dir;
266}; 255};
267 256
268/* Per FireWire host */ 257/* Per FireWire host */