/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ghd.h"
/*
* Local Function Prototypes
*/
/*
* Round up all allocations so that we can guarantee
* long-long alignment. This is the same alignment
* provided by kmem_alloc().
*/
/*
* Private wrapper for gcmd_t
*/
/*
* round up the size so the HBA private area is on a 8 byte boundary
*/
typedef struct gcmd_padded_wrapper {
union {
} gwrap;
} gwrap_t;
/*ARGSUSED*/
void
{
int status;
if (gcmdp->cmd_dma_handle) {
if (status != DDI_SUCCESS) {
}
}
}
static struct scsi_pkt *
struct scsi_address *ap,
int cmdlen,
int statuslen,
int tgtlen,
int (*callback)(),
int ccblen)
{
int gwrap_len;
/* allocate everything from kmem pool */
return (NULL);
}
/* get the ptr to the HBA specific buffer */
/* get the ptr to the GHD specific buffer */
/*
* save the ptr to HBA private area and initialize the rest
* of the gcmd_t members
*/
/*
* save the the scsi_pkt ptr in gcmd_t.
*/
/*
* callback to the HBA driver so it can initalize its
* buffer and return the ptr to my cmd_t structure which is
* probably embedded in its buffer.
*/
ccblen)) {
return (NULL);
}
return (pktp);
}
/*
* packet free
*/
/*ARGSUSED*/
void
struct scsi_address *ap,
{
GDBG_PKT(("ghd_pktfree: cccp 0x%p ap 0x%p pktp 0x%p\n",
/* free any extra resources allocated by the HBA */
/* free the scsi_pkt and the GHD and HBA private areas */
}
struct scsi_pkt *
struct scsi_address *ap,
int cmdlen,
int statuslen,
int tgtlen,
int flags,
int (*callback)(),
int ccblen,
{
int new_pkt;
/*
* Allocate a pkt
*/
return (NULL);
} else {
}
GDBG_PKT(("ghd_tran_init_pkt_attr: gcmdp 0x%p dma_handle 0x%p\n",
/*
* free stale DMA window if necessary.
*/
/* release the old DMA resources */
}
/*
* Set up dma info if there's any data and
* if the device supports DMA.
*/
GDBG_PKT(("ghd_tran_init_pkt: gcmdp 0x%p bp 0x%p limp 0x%p\n",
int dma_flags;
/* check direction for data transfer */
else
/* check dma option flags */
if (flags & PKT_CONSISTENT)
if (flags & PKT_DMA_PARTIAL)
if (new_pkt)
return (NULL);
}
}
if (new_pkt)
return (NULL);
}
} else {
}
return (pktp);
}