Deleted Added
full compact
siis.h (199132) siis.h (199747)
1/*-
2 * Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/siis/siis.h 199132 2009-11-10 09:46:52Z mav $
26 * $FreeBSD: head/sys/dev/siis/siis.h 199747 2009-11-24 12:47:58Z mav $
27 */
28
29/* ATA register defines */
30#define ATA_DATA 0 /* (RW) data */
31
32#define ATA_FEATURE 1 /* (W) feature */
33#define ATA_F_DMA 0x01 /* enable DMA */
34#define ATA_F_OVL 0x02 /* enable overlap */

--- 306 unchanged lines hidden (view full) ---

341 device_t dev; /* Device handle */
342 u_int8_t slot; /* Number of this slot */
343 enum siis_slot_states state; /* Slot state */
344 union ccb *ccb; /* CCB occupying slot */
345 struct ata_dmaslot dma; /* DMA data of this slot */
346 struct callout timeout; /* Execution timeout */
347};
348
27 */
28
29/* ATA register defines */
30#define ATA_DATA 0 /* (RW) data */
31
32#define ATA_FEATURE 1 /* (W) feature */
33#define ATA_F_DMA 0x01 /* enable DMA */
34#define ATA_F_OVL 0x02 /* enable overlap */

--- 306 unchanged lines hidden (view full) ---

341 device_t dev; /* Device handle */
342 u_int8_t slot; /* Number of this slot */
343 enum siis_slot_states state; /* Slot state */
344 union ccb *ccb; /* CCB occupying slot */
345 struct ata_dmaslot dma; /* DMA data of this slot */
346 struct callout timeout; /* Execution timeout */
347};
348
349struct siis_device {
350 u_int revision;
351 int mode;
352 u_int bytecount;
353 u_int tags;
354};
355
349/* structure describing an ATA channel */
350struct siis_channel {
351 device_t dev; /* Device handle */
352 int unit; /* Physical channel */
353 struct resource *r_mem; /* Memory of this channel */
354 struct resource *r_irq; /* Interrupt of this channel */
355 void *ih; /* Interrupt handle */
356 struct ata_dma dma; /* DMA data */
357 struct cam_sim *sim;
358 struct cam_path *path;
359 int pm_level; /* power management level */
360 int sata_rev; /* Maximum allowed SATA generation */
361
362 struct siis_slot slot[SIIS_MAX_SLOTS];
363 union ccb *hold[SIIS_MAX_SLOTS];
364 struct mtx mtx; /* state lock */
365 int devices; /* What is present */
366 int pm_present; /* PM presence reported */
356/* structure describing an ATA channel */
357struct siis_channel {
358 device_t dev; /* Device handle */
359 int unit; /* Physical channel */
360 struct resource *r_mem; /* Memory of this channel */
361 struct resource *r_irq; /* Interrupt of this channel */
362 void *ih; /* Interrupt handle */
363 struct ata_dma dma; /* DMA data */
364 struct cam_sim *sim;
365 struct cam_path *path;
366 int pm_level; /* power management level */
367 int sata_rev; /* Maximum allowed SATA generation */
368
369 struct siis_slot slot[SIIS_MAX_SLOTS];
370 union ccb *hold[SIIS_MAX_SLOTS];
371 struct mtx mtx; /* state lock */
372 int devices; /* What is present */
373 int pm_present; /* PM presence reported */
374 uint32_t oslots; /* Occupied slots */
367 uint32_t rslots; /* Running slots */
368 uint32_t aslots; /* Slots with atomic commands */
369 uint32_t eslots; /* Slots in error */
370 uint32_t toslots; /* Slots in timeout */
371 int numrslots; /* Number of running slots */
372 int numtslots[SIIS_MAX_SLOTS]; /* Number of tagged slots */
373 int numhslots; /* Number of holden slots */
374 int readlog; /* Our READ LOG active */
375 int fatalerr; /* Fatal error happend */
376 int recovery; /* Some slots are in error */
375 uint32_t rslots; /* Running slots */
376 uint32_t aslots; /* Slots with atomic commands */
377 uint32_t eslots; /* Slots in error */
378 uint32_t toslots; /* Slots in timeout */
379 int numrslots; /* Number of running slots */
380 int numtslots[SIIS_MAX_SLOTS]; /* Number of tagged slots */
381 int numhslots; /* Number of holden slots */
382 int readlog; /* Our READ LOG active */
383 int fatalerr; /* Fatal error happend */
384 int recovery; /* Some slots are in error */
377 int lastslot; /* Last used slot */
378 union ccb *frozen; /* Frozen command */
385 union ccb *frozen; /* Frozen command */
386
387 struct siis_device user[16]; /* User-specified settings */
388 struct siis_device curr[16]; /* Current settings */
379};
380
381/* structure describing a SIIS controller */
382struct siis_controller {
383 device_t dev;
384 int r_grid;
385 struct resource *r_gmem;
386 int r_rid;

--- 54 unchanged lines hidden ---
389};
390
391/* structure describing a SIIS controller */
392struct siis_controller {
393 device_t dev;
394 int r_grid;
395 struct resource *r_gmem;
396 int r_rid;

--- 54 unchanged lines hidden ---