*** ../../man-orig/sata_cmd.txt	Mon Nov  7 17:46:27 2005
--- sata_cmd.man.changed	Mon Nov  7 18:22:00 2005
***************
*** 5,11 ****
      sata_cmd - SATA cmd structure
  
  SYNOPSIS
!     #include <sys/sata/impl/sata_hba.h> 
  
  
  INTERFACE LEVEL
--- 5,11 ----
      sata_cmd - SATA cmd structure
  
  SYNOPSIS
!     #include <sys/sata/sata_hba.h> 
  
  
  INTERFACE LEVEL
***************
*** 21,31 ****
      register is not specified in sata_cmd - SATA HBA driver should set it up
      according to the operational mode, i.e. interrupt enabled/disabled.
      			
!     If the READ MULTIPLIER command is specified in cmd_reg field (a command
!     is directed to the Port Multiplier rather then to an attached SATA device),
!     SATA HBA driver has to update sec_count_lsb, lba_low_lsb, lba_mid_lsb and
!     lba_high_lsb fields to values returned via command block registers (task
!     file registers).
      
      Note:  SATA HBA Framework works only with devices supporting LBA
             mode.
--- 21,32 ----
      register is not specified in sata_cmd - SATA HBA driver should set it up
      according to the operational mode, i.e. interrupt enabled/disabled.
      			
!     If the READ/WRITE MULTIPLIER commands are specified in satacmd_cmd_reg
!     field (a command is directed to the Port Multiplier rather than to
!     an attached SATA device), SATA HBA driver has to update 
!     satacmd_sec_count_lsb, satacmd_lba_low_lsb, satacmd_lba_mid_lsb and
!     satacmd_lba_high_lsb fields to values returned via command block 
!     registers (task file registers).
      
      Note:  SATA HBA Framework works only with devices supporting LBA
             mode.
***************
*** 32,90 ****
  
  STRUCTURE MEMBERS
  
!     int		sata_cmd_rev;		/* Version */
      
!     struct_buf	*bp;		/*  Pointer to a buffer structure*/
      
!     uint32_t	flags		/* Data transfer direction flag */
      
!     uint8_t	addr_type;	/* addressing type: LBA, LBA28, LBA48 */
      
!     uint8_t 	sec_count_msb;	/* sector count MSB (LBA48) */
      
!     uint8_t 	lba_low_msb;	/* LBA Low MSB (LBA48) */
  
!     uint8_t 	lba_mid_msb;	/* LBA Mid MSB (LBA48) */ 
      
!     uint8_t 	lba_high_msb;	/* LBA High MSB (LBA48) */
      
!     uint8_t 	sec_count_lsb;	/* sector count LSB */
      
!     uint8_t 	lba_low_lsb;	/* LBA Low LSB */
      
!     uint8_t 	lba_mid_lsb;	/* LBA Mid LSB */
      
!     uint8_t 	lba_high_lsb;	/* LBA High LSB */
      
!     uint8_t 	device_reg;	/* ATA device register & LBA28 MSB */
      
!     uint8_t 	cmd_reg;	/* ata command code */
      
!     uint8_t 	features_reg;	/* ATA features register */
      
!     uint8_t 	status_reg;	/* ATA status reg at cmd completion */
      
!     uint8_t 	error_reg;	/* ATA error reg at cmd completion */
      
!     uint8_t 	pad;		/* Unused */
      
!     uint8_t 	acdb_len;	/* ATAPI cdb length */
      
!     uint8_t 	acdb[SATA_ATAPI_MAX_CDB_LEN];	/* ATAPI cdb */
      
!     uint8_t 	*arq_cdb;	/* Ptr to pre-set request sense cdb */
      
!     uint8_t 	rqsense[SATA_ATAPI_RQSENSE_LEN]; /* request sense buf */
      
!     int		num_dma_cookies;	/* number of dma cookies */
      
!     ddi_dma_cookie_t *dma_cookie_list;	/* ptr to dma cookie list */
  
      
      
-     sata_cmd_rev	Version of the sata_cmd structure.
  
!     bp			Pointer to the sata buffer structure. The buffer is
      			kernel addressable and has DMA resources already
      			allocated,  SATA HBA driver may use this buffer for
      			either programmatic access, or as the DMA buffer,
--- 33,94 ----
  
  STRUCTURE MEMBERS
  
!     int		satacmd_rev;		/* Version */
      
!     struct_buf	*satacmd_bp;		/*  Pointer to a buffer structure*/
      
!     uint32_t	satacmd_flags		/* Data transfer direction flag */
      
!     uint8_t	satacmd_addr_type;	/* addressing type: LBA, LBA28, LBA48 */
     
!     unit8_t     satacmd_features_reg_ext; /* ATA features extended register */
   
!     uint8_t 	satacmd_sec_count_msb;	/* sector count MSB (LBA48) */
      
!     uint8_t 	satacmd_lba_low_msb;	/* LBA Low MSB (LBA48) */
  
!     uint8_t 	satacmd_lba_mid_msb;	/* LBA Mid MSB (LBA48) */ 
      
!     uint8_t 	satacmd_lba_high_msb;	/* LBA High MSB (LBA48) */
      
!     uint8_t 	satacmd_sec_count_lsb;	/* sector count LSB */
      
!     uint8_t 	satacmd_lba_low_lsb;	/* LBA Low LSB */
      
!     uint8_t 	satacmd_lba_mid_lsb;	/* LBA Mid LSB */
      
!     uint8_t 	satacmd_lba_high_lsb;	/* LBA High LSB */
      
!     uint8_t 	satacmd_device_reg;	/* ATA device register & LBA28 MSB */
      
!     uint8_t 	satacmd_cmd_reg;	/* ATA command register */
      
!     uint8_t 	satacmd_features_reg;	/* ATA features register */
      
!     uint8_t 	satacmd_status_reg;	/* ATA status reg at cmd completion */
      
!     uint8_t 	satacmd_error_reg;	/* ATA error reg at cmd completion */
      
!     uint8_t 	satacmd_acdb_len;	/* ATAPI cdb length */
      
!     uint8_t 	satacmd_acdb[SATA_ATAPI_MAX_CDB_LEN];	/* ATAPI cdb */
      
!     uint8_t 	*satacmd_arq_cdb;	/* Ptr to pre-set request sense cdb */
      
!     uint8_t 	satacmd_rqsense[SATA_ATAPI_RQSENSE_LEN]; /* request sense buf */
      
!     struct sata_cmd *satacmd_rle_sata_cmd; /* Ptr to pre-set FPDMA error 
!                                               retrieval cmd */
  
!     int		satacmd_num_dma_cookies;	/* number of dma cookies */
      
+     ddi_dma_cookie_t *satacmd_dma_cookie_list;	/* ptr to dma cookie list */
  
      
      
!     satacmd_rev		Version of the sata_cmd structure.
! 
!     satacmd_bp		Pointer to the sata buffer structure. The buffer is
      			kernel addressable and has DMA resources already
      			allocated,  SATA HBA driver may use this buffer for
      			either programmatic access, or as the DMA buffer,
***************
*** 91,97 ****
      			utilizing DMA cookies list specified in sata_cmd
      			structure.
  
!     flags		This field specifies data transfer direction. SATA HBA
      			driver may use it to set direction of the transfer
      			without examining specified ATA command.
      			
--- 95,103 ----
      			utilizing DMA cookies list specified in sata_cmd
      			structure.
  
!     satacmd_flags	This field specifies data transfer direction (if
! 			data transfer is involved), command queuing type,
! 			and device reset state handling. SATA HBA
      			driver may use it to set direction of the transfer
      			without examining specified ATA command.
      			
***************
*** 111,118 ****
  						tagged operations are translated
  						into SATA_QUEUE_OTAG_CMD.
  			
!    			SATA_NCQ_CMD		Native Command Queueing
!    						read/write cpmmand is specified.
     						
     			SATA_IGNORE_DEV_RESET_STATE Ignore device reset state;
     						execute specified command.
--- 117,124 ----
  						tagged operations are translated
  						into SATA_QUEUE_OTAG_CMD.
  			
!    			SATA_QUEUED_CMD		Native Command Queuing
!    						read/write command is specified.
     						
     			SATA_IGNORE_DEV_RESET_STATE Ignore device reset state;
     						execute specified command.
***************
*** 121,127 ****
     						execute specified command.
     
                     
!     addr_type		Addressing method used by the attached device. This
      			field allows SATA HBA driver to correctly use other
      			addressing information in sata_cmd structure:
      			
--- 127,133 ----
     						execute specified command.
     
                     
!     satacmd_addr_type	Addressing method used by the attached device. This
      			field allows SATA HBA driver to correctly use other
      			addressing information in sata_cmd structure:
      			
***************
*** 134,184 ****
                    	
                    	ATA_ADDR_LBA48          48-bit LBA mode.
  
!     sec_count_msb	Bits 15:8 of the sector count. Valid only when
      			addressing mode indicates ATA_ADDR_LBA48 mode.
  
!     lba_low_msb		Bits 31:24 of the LBA. Valid only when addressing mode
      			indicates ATA_ADDR_LBA28 or ATA_ADDR_LBA48 mode.
  
!     ba_mid_msb		Bits 39:32 of the LBA. Valid only when addressing mode
      			indicates ATA_ADDR_LBA48 mode.
  
!     lba_high_msb	Bits 40:37 of the LBA. Valid only when addressing mode
      			indicates ATA_ADDR_LBA48 mode.
  
!     sec_count_lsb	Bits 7:0 of the sector count.
  
!     lba_low_lsb		Bits 7:0 of the LBA.
  
!     lba_mid_lsb		Bits 8:15 of the LBA.
  
!     lba_high_lsb	Bits 23:16 of the LBA.
  
!     device_reg		Device addressing mode (LBA) and a  bits 27:24 if
      			28-bit addressing mode (ATA_ADDR_LBA28) is used. See
      			ATA/ATAPI spec for more detailed description. SATA HBA
      			Framework supports only devices using LBA mode.
  
!     cmd_reg		The content of this field specifies ATA/ATAPI command.
  
!     features_reg	The content of this field specifies device's ATA
      			Feature Register.
  
!     status_reg		This field should be set by SATA HBA driver according
!     			the the content of the device's Status register when
      			specified ATA/ATAPI command is completed or terminated
      			by a device for any reason.
  
!     error_reg		This field should be set by SATA HBA driver according
!     			the content of the device's Error register when
      			specified ATA/ATAPI command is completed by a device
      			with error. The  sector count and lba fields of the
      			sata_cmd structure should be also set-up by the SATA
      			HBA driver to reflect the values in corresponding 
      			device registers. This information is used by SATA HBA
!     			framework to determine a cause of an error.
  
!     acdb_len		The content of this field specifies the lenght in bytes
      			of the ATAPI command in acdb field. If zero, there is
      			no command in the acdb field.  When ATAPI command is to
      			be sent, other fields of the sata_cmd structure specify
--- 140,193 ----
                    	
                    	ATA_ADDR_LBA48          48-bit LBA mode.
  
!     satacmd_features_reg_ext  The content of this field specifies device's
! 			ATA Feature Register Extended.
! 
!     satacmd_sec_count_msb  Bits 15:8 of the sector count. Valid only when
      			addressing mode indicates ATA_ADDR_LBA48 mode.
  
!     satacmd_lba_low_msb	  Bits 31:24 of the LBA. Valid only when addressing mode
      			indicates ATA_ADDR_LBA28 or ATA_ADDR_LBA48 mode.
  
!     satacmd_lba_mid_msb	  Bits 39:32 of the LBA. Valid only when addressing mode
      			indicates ATA_ADDR_LBA48 mode.
  
!     satacmd_lba_high_msb  Bits 47:40 of the LBA. Valid only when addressing mode
      			indicates ATA_ADDR_LBA48 mode.
  
!     satacmd_sec_count_lsb Bits 7:0 of the sector count.
  
!     satacmd_lba_low_lsb	  Bits 7:0 of the LBA.
  
!     satacmd_lba_mid_lsb   Bits 8:15 of the LBA.
  
!     satacmd_lba_high_lsb  Bits 23:16 of the LBA.
  
!     satacmd_device_reg	Device addressing mode (LBA) and a  bits 27:24 if
      			28-bit addressing mode (ATA_ADDR_LBA28) is used. See
      			ATA/ATAPI spec for more detailed description. SATA HBA
      			Framework supports only devices using LBA mode.
  
!     satacmd_cmd_reg	The content of this field specifies ATA/ATAPI command.
  
!     satacmd_features_reg   The content of this field specifies device's ATA
      			Feature Register.
  
!     satacmd_status_reg	This field should be set by SATA HBA driver according to
!     			the the contents of the device's Status register when
      			specified ATA/ATAPI command is completed or terminated
      			by a device for any reason.
  
!     satacmd_error_reg	This field should be set by SATA HBA driver according to
!     			the contents of the device's Error register when
      			specified ATA/ATAPI command is completed by a device
      			with error. The  sector count and lba fields of the
      			sata_cmd structure should be also set-up by the SATA
      			HBA driver to reflect the values in corresponding 
      			device registers. This information is used by SATA HBA
!     			framework to determine the cause of an error.
  
!     satacmd_acdb_len	The content of this field specifies the length in bytes
      			of the ATAPI command in acdb field. If zero, there is
      			no command in the acdb field.  When ATAPI command is to
      			be sent, other fields of the sata_cmd structure specify
***************
*** 186,215 ****
      			command is set in acdb field and acdb_len is set to
      			the  length of the ATAPI command (in bytes).
  
!     acdb		The byte array containig ATAPI command Command
      			Descriptor Block (CDB).  
  
!     arq_cdb		This is a pointer to the REQUEST SENSE CDB, i.e byte
      			array containing REQUEST SENSE command descriptor block.
      			SATA HBA driver has to use this command to retrieve
      			request sense data if the previously sent ATAPI command.
      			REQUEST SENSE command could be sent using the same ATA
      			PACKET command that was used to send failed ATAPI
!     			command. Request sense date should be returned in
      			rqsense array.
      			
!     rqsense		This is a byte array to be used for request sense data
      			returned by REQUEST SENSE command. See arq_cdb
      			description.   
  
!     num_dma_cookies	Number of DMA cookies necessary for the DMA transfer of
!     			a data to be read or written by the command specified
!     			in sata_cmd structure.
!              		SATA HBA driver is resposible for allocating and
!              		freeing any additional DMA resources (if needed) to
!              		transfer a command to the HBA and/or the device.
  
!     dma_cookie_list	This is an array of the dma_cookie_t structures 
      			necessary for setting-up a DMA transfer of a data 
      			to be read or written by the command specified in
      			sata_cmd structure.  These cookies are managed by SATA
--- 195,227 ----
      			command is set in acdb field and acdb_len is set to
      			the  length of the ATAPI command (in bytes).
  
!     satacmd_acdb	The byte array containing ATAPI command Command
      			Descriptor Block (CDB).  
  
!     satacmd_arq_cdb	This is a pointer to the REQUEST SENSE CDB, i.e byte
      			array containing REQUEST SENSE command descriptor block.
      			SATA HBA driver has to use this command to retrieve
      			request sense data if the previously sent ATAPI command.
      			REQUEST SENSE command could be sent using the same ATA
      			PACKET command that was used to send failed ATAPI
!     			command. Request sense data should be returned in
      			rqsense array.
      			
!     satacmd_rqsense	This is a byte array to be used for request sense data
      			returned by REQUEST SENSE command. See arq_cdb
      			description.
     
!     satacmd_ rle_sata_cmd   This is a pointer to the pre-set sata_cmd structure
! 			 containing READ_LOG EXT command.  SATA HBA driver may
! 			 use this command to retrieve error information for
! 			 a native queued command (READ FPDMA QUEUED command
! 			 or WRITE FPDMA QUEUED command). 
  
!     satacmd_num_dma_cookies  Number of DMA cookies necessary for the DMA
! 			transfer of a data to be read or written by the
!     			command specified in sata_cmd structure.
! 
!     satacmd_dma_cookie_list	This is an array of the dma_cookie_t structures 
      			necessary for setting-up a DMA transfer of a data 
      			to be read or written by the command specified in
      			sata_cmd structure.  These cookies are managed by SATA
