ahci.h (199322) | ahci.h (199747) |
---|---|
1/*- 2 * Copyright (c) 1998 - 2008 S�ren Schmidt <sos@FreeBSD.org> 3 * Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 1998 - 2008 S�ren Schmidt <sos@FreeBSD.org> 3 * Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sys/dev/ahci/ahci.h 199322 2009-11-16 15:38:27Z mav $ | 27 * $FreeBSD: head/sys/dev/ahci/ahci.h 199747 2009-11-24 12:47:58Z mav $ |
28 */ 29 30/* ATA register defines */ 31#define ATA_DATA 0 /* (RW) data */ 32 33#define ATA_FEATURE 1 /* (W) feature */ 34#define ATA_F_DMA 0x01 /* enable DMA */ 35#define ATA_F_OVL 0x02 /* enable overlap */ --- 299 unchanged lines hidden (view full) --- 335 device_t dev; /* Device handle */ 336 u_int8_t slot; /* Number of this slot */ 337 enum ahci_slot_states state; /* Slot state */ 338 union ccb *ccb; /* CCB occupying slot */ 339 struct ata_dmaslot dma; /* DMA data of this slot */ 340 struct callout timeout; /* Execution timeout */ 341}; 342 | 28 */ 29 30/* ATA register defines */ 31#define ATA_DATA 0 /* (RW) data */ 32 33#define ATA_FEATURE 1 /* (W) feature */ 34#define ATA_F_DMA 0x01 /* enable DMA */ 35#define ATA_F_OVL 0x02 /* enable overlap */ --- 299 unchanged lines hidden (view full) --- 335 device_t dev; /* Device handle */ 336 u_int8_t slot; /* Number of this slot */ 337 enum ahci_slot_states state; /* Slot state */ 338 union ccb *ccb; /* CCB occupying slot */ 339 struct ata_dmaslot dma; /* DMA data of this slot */ 340 struct callout timeout; /* Execution timeout */ 341}; 342 |
343struct ahci_device { 344 u_int revision; 345 int mode; 346 u_int bytecount; 347 u_int tags; 348}; 349 |
|
343/* structure describing an ATA channel */ 344struct ahci_channel { 345 device_t dev; /* Device handle */ 346 int unit; /* Physical channel */ 347 struct resource *r_mem; /* Memory of this channel */ 348 struct resource *r_irq; /* Interrupt of this channel */ 349 void *ih; /* Interrupt handle */ 350 struct ata_dma dma; /* DMA data */ --- 6 unchanged lines hidden (view full) --- 357 int pm_level; /* power management level */ 358 int sata_rev; /* Maximum allowed SATA generation */ 359 360 struct ahci_slot slot[AHCI_MAX_SLOTS]; 361 union ccb *hold[AHCI_MAX_SLOTS]; 362 struct mtx mtx; /* state lock */ 363 int devices; /* What is present */ 364 int pm_present; /* PM presence reported */ | 350/* structure describing an ATA channel */ 351struct ahci_channel { 352 device_t dev; /* Device handle */ 353 int unit; /* Physical channel */ 354 struct resource *r_mem; /* Memory of this channel */ 355 struct resource *r_irq; /* Interrupt of this channel */ 356 void *ih; /* Interrupt handle */ 357 struct ata_dma dma; /* DMA data */ --- 6 unchanged lines hidden (view full) --- 364 int pm_level; /* power management level */ 365 int sata_rev; /* Maximum allowed SATA generation */ 366 367 struct ahci_slot slot[AHCI_MAX_SLOTS]; 368 union ccb *hold[AHCI_MAX_SLOTS]; 369 struct mtx mtx; /* state lock */ 370 int devices; /* What is present */ 371 int pm_present; /* PM presence reported */ |
372 uint32_t oslots; /* Occupied slots */ |
|
365 uint32_t rslots; /* Running slots */ 366 uint32_t aslots; /* Slots with atomic commands */ 367 int numrslots; /* Number of running slots */ 368 int numtslots; /* Number of tagged slots */ 369 int readlog; /* Our READ LOG active */ 370 int fatalerr; /* Fatal error happend */ 371 int lastslot; /* Last used slot */ 372 int taggedtarget; /* Last tagged target */ 373 union ccb *frozen; /* Frozen command */ 374 struct callout pm_timer; /* Power management events */ | 373 uint32_t rslots; /* Running slots */ 374 uint32_t aslots; /* Slots with atomic commands */ 375 int numrslots; /* Number of running slots */ 376 int numtslots; /* Number of tagged slots */ 377 int readlog; /* Our READ LOG active */ 378 int fatalerr; /* Fatal error happend */ 379 int lastslot; /* Last used slot */ 380 int taggedtarget; /* Last tagged target */ 381 union ccb *frozen; /* Frozen command */ 382 struct callout pm_timer; /* Power management events */ |
383 384 struct ahci_device user[16]; /* User-specified settings */ 385 struct ahci_device curr[16]; /* Current settings */ |
|
375}; 376 377/* structure describing a AHCI controller */ 378struct ahci_controller { 379 device_t dev; 380 int r_rid; 381 struct resource *r_mem; 382 struct rman sc_iomem; --- 64 unchanged lines hidden --- | 386}; 387 388/* structure describing a AHCI controller */ 389struct ahci_controller { 390 device_t dev; 391 int r_rid; 392 struct resource *r_mem; 393 struct rman sc_iomem; --- 64 unchanged lines hidden --- |