made empty. Found by new ctfconv(1) feature and validated by clang.
ok mpi@
-/* $OpenBSD: aic79xx.c,v 1.62 2016/08/31 12:59:59 tom Exp $ */
+/* $OpenBSD: aic79xx.c,v 1.63 2017/12/12 12:33:36 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
ahd->int_coalescing_stop_threshold =
AHD_INT_COALESCING_STOP_THRESHOLD_DEFAULT;
- if (ahd_platform_alloc(ahd, platform_arg) != 0) {
- free(ahd->seep_config, M_DEVBUF, 0);
- return (NULL);
- }
-
#ifdef AHD_DEBUG
if ((ahd_debug & AHD_SHOW_MEMORY) != 0) {
printf("%s: scb size = 0x%x, hscb size = 0x%x\n",
break;
}
- ahd_platform_free(ahd);
ahd_fini_scbdata(ahd);
for (i = 0; i < AHD_NUM_TARGETS; i++) {
struct ahd_tmode_tstate *tstate;
scb_data->scbs_left -= newcount;
scb_data->sgs_left -= newcount;
for (i = 0; i < newcount; i++) {
- struct scb_platform_data *pdata = NULL;
int error;
next_scb = (struct scb *)malloc(sizeof(*next_scb),
if (next_scb == NULL)
break;
- if (sizeof(*pdata) > 0) {
- pdata = malloc(sizeof(*pdata), M_DEVBUF, M_NOWAIT);
- if (pdata == NULL) {
- free(next_scb, M_DEVBUF, 0);
- break;
- }
- }
- next_scb->platform_data = pdata;
next_scb->hscb_map = hscb_map;
next_scb->sg_map = sg_map;
next_scb->sense_map = sense_map;
if (error != 0) {
free(next_scb, M_DEVBUF, 0);
- free(pdata, M_DEVBUF, 0);
break;
}
next_scb->hscb->tag = aic_htole16(scb_data->numscbs);
if ((ahd->flags & AHD_INITIATORROLE) == 0)
ahd->flags &= ~AHD_RESET_BUS_A;
- /*
- * Before committing these settings to the chip, give
- * the OSM one last chance to modify our configuration.
- */
- ahd_platform_init(ahd);
-
/* Bring up the chip. */
ahd_chip_init(ahd);
ahd_flush_qoutfifo(ahd);
- ahd_platform_flushwork(ahd);
ahd->flags &= ~AHD_ALL_INTERRUPTS;
}
ahd_search_qinfifo(ahd, target, channel, lun,
/*tag*/SCB_LIST_NULL, ROLE_UNKNOWN,
CAM_REQUEUE_REQ, SEARCH_COMPLETE);
-
- ahd_platform_freeze_devq(ahd, scb);
}
void
}
}
ahd_restore_modes(ahd, saved_modes);
- ahd_platform_abort_scbs(ahd, target, channel, lun, tag, role, status);
ahd->flags |= AHD_UPDATE_PEND_CMDS;
return found;
}
-/* $OpenBSD: aic79xx.h,v 1.26 2016/08/17 01:16:11 krw Exp $ */
+/* $OpenBSD: aic79xx.h,v 1.27 2017/12/12 12:33:36 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
#include <dev/ic/aic7xxx_cam.h>
-/************************* Forward Declarations *******************************/
-struct ahd_platform_data;
-struct scb_platform_data;
-
/****************************** Useful Macros *********************************/
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
struct ahd_softc *ahd_softc;
scb_flag flags;
bus_dmamap_t dmamap;
- struct scb_platform_data *platform_data;
struct map_node *hscb_map;
struct map_node *sg_map;
struct map_node *sense_map;
ahd_mode saved_dst_mode;
ahd_mode saved_src_mode;
- /*
- * Platform specific data.
- */
- struct ahd_platform_data *platform_data;
-
/*
* Platform specific device information.
*/
-/* $OpenBSD: aic79xx_openbsd.c,v 1.45 2016/08/17 01:16:11 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.46 2017/12/12 12:33:36 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
tstate->tagenable &= ~devinfo->target_mask;
}
-int
-ahd_platform_alloc(struct ahd_softc *ahd, void *platform_arg)
-{
- if (sizeof(struct ahd_platform_data) > 0) {
- ahd->platform_data = malloc(sizeof(struct ahd_platform_data),
- M_DEVBUF, M_NOWAIT | M_ZERO);
- if (ahd->platform_data == NULL)
- return (ENOMEM);
- }
-
- return (0);
-}
-
-void
-ahd_platform_free(struct ahd_softc *ahd)
-{
- if (sizeof(struct ahd_platform_data) > 0)
- free(ahd->platform_data, M_DEVBUF, 0);
-}
-
int
ahd_softc_comp(struct ahd_softc *lahd, struct ahd_softc *rahd)
{
ahd->features, ahd->flags, ahd->chip, ahd->bugs);
}
-void
-ahd_platform_flushwork(struct ahd_softc *ahd)
-{
-}
-/* $OpenBSD: aic79xx_openbsd.h,v 1.19 2015/07/17 21:42:49 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.h,v 1.20 2017/12/12 12:33:36 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
/* This driver supports target mode */
// #define AHD_TARGET_MODE 1
-/************************** Softc/SCB Platform Data ***************************/
-struct ahd_platform_data {
-};
-
-struct scb_platform_data {
-};
-
/************************** Timer DataStructures ******************************/
typedef struct timeout aic_timer_t;
#define aic_freeze_simq(ahd)
#define aic_release_simq(ahd)
#define aic_freeze_scb(scb)
-#define ahd_platform_freeze_devq(ahd, scb)
-#define ahd_platform_abort_scbs(ahd, target, channel, lun, tag, role, status)
void aic_platform_scb_free(struct ahd_softc *, struct scb *);
ahd_queue_alg);
/************************* Initialization/Teardown ****************************/
-int ahd_platform_alloc(struct ahd_softc *, void *);
-void ahd_platform_free(struct ahd_softc *);
int ahd_attach(struct ahd_softc *);
int ahd_softc_comp(struct ahd_softc *lahd, struct ahd_softc *rahd);
int ahd_detach(struct device *, int);
-#define ahd_platform_init(ahd)
-
/****************************** Interrupts ************************************/
int ahd_platform_intr(void *);
-void ahd_platform_flushwork(struct ahd_softc *ahd);
+
/************************ Misc Function Declarations **************************/
void ahd_done(struct ahd_softc *, struct scb *);
void ahd_send_async(struct ahd_softc *, char /*channel*/,
-/* $OpenBSD: aic7xxx.c,v 1.92 2016/08/17 01:17:54 krw Exp $ */
+/* $OpenBSD: aic7xxx.c,v 1.93 2017/12/12 12:33:36 krw Exp $ */
/* $NetBSD: aic7xxx.c,v 1.108 2003/11/02 11:07:44 wiz Exp $ */
/*
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: aic7xxx.c,v 1.92 2016/08/17 01:17:54 krw Exp $
+ * $Id: aic7xxx.c,v 1.93 2017/12/12 12:33:36 krw Exp $
*/
/*
* Ported from FreeBSD by Pascal Renauld, Network Storage Solutions, Inc. - April 2003
break;
}
- ahc_platform_free(ahc);
ahc_fini_scbdata(ahc);
for (i = 0; i < AHC_NUM_TARGETS; i++) {
struct ahc_tmode_tstate *tstate;
newcount = (PAGE_SIZE / (AHC_NSEG * sizeof(struct ahc_dma_seg)));
newcount = MIN(newcount, (AHC_SCB_MAX_ALLOC - scb_data->numscbs));
for (i = 0; i < newcount; i++) {
- struct scb_platform_data *pdata = NULL;
int error;
- if (sizeof(*pdata) > 0) {
- pdata = malloc(sizeof(*pdata), M_DEVBUF,
- M_NOWAIT | M_ZERO);
- if (pdata == NULL)
- break;
- }
-
- next_scb->platform_data = pdata;
next_scb->sg_map = sg_map;
next_scb->sg_list = segs;
/*
ahc_search_qinfifo(ahc, target, channel, lun,
/*tag*/SCB_LIST_NULL, ROLE_UNKNOWN,
CAM_REQUEUE_REQ, SEARCH_COMPLETE);
-
- ahc_platform_freeze_devq(ahc, scb);
}
void
}
}
ahc_outb(ahc, SCBPTR, active_scb);
- ahc_platform_abort_scbs(ahc, target, channel, lun, tag, role, status);
ahc_release_untagged_queues(ahc);
return found;
}
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.55 2016/08/17 01:17:54 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.56 2017/12/12 12:33:36 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
}
}
-int
-ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg)
-{
- if (sizeof(struct ahc_platform_data) > 0) {
- ahc->platform_data = malloc(sizeof(struct ahc_platform_data),
- M_DEVBUF, M_NOWAIT | M_ZERO);
- if (ahc->platform_data == NULL)
- return (ENOMEM);
- }
-
- return (0);
-}
-
-void
-ahc_platform_free(struct ahc_softc *ahc)
-{
- if (sizeof(struct ahc_platform_data) > 0)
- free(ahc->platform_data, M_DEVBUF, 0);
-}
-
int
ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc)
{
-/* $OpenBSD: aic7xxx_openbsd.h,v 1.26 2016/08/17 01:17:54 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.h,v 1.27 2017/12/12 12:33:36 krw Exp $ */
/* $NetBSD: aic7xxx_osm.h,v 1.7 2003/11/02 11:07:44 wiz Exp $ */
/*
#include <dev/ic/aic7xxxvar.h>
-/************************** Softc/SCB Platform Data ***************************/
-struct ahc_platform_data {
-};
-
-struct scb_platform_data {
-};
-
/*
* Some ISA devices (e.g. on a VLB) can perform 32-bit DMA. This
* flag is passed to bus_dmamap_create() to indicate that fact.
static __inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *,
struct scb *);
static __inline void ahc_freeze_scb(struct scb *);
-static __inline void ahc_platform_freeze_devq(struct ahc_softc *, struct scb *);
-static __inline int ahc_platform_abort_scbs(struct ahc_softc *, int, char,
- int, u_int, role_t, uint32_t);
static __inline
void ahc_set_transaction_status(struct scb *scb, uint32_t status)
{
}
-static __inline void
-ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb)
-{
-}
-
-static __inline int
-ahc_platform_abort_scbs(struct ahc_softc *ahc, int target,
- char channel, int lun, u_int tag,
- role_t role, uint32_t status)
-{
- return (0);
-}
-
static __inline void
ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb)
{
void ahc_platform_set_tags(struct ahc_softc *, struct ahc_devinfo *, int);
/************************* Initialization/Teardown ****************************/
-int ahc_platform_alloc(struct ahc_softc *, void *);
-void ahc_platform_free(struct ahc_softc *);
int ahc_map_int(struct ahc_softc *);
int ahc_attach(struct ahc_softc *);
int ahc_softc_comp(struct ahc_softc *, struct ahc_softc *);
/****************************** Interrupts ************************************/
int ahc_platform_intr(void *);
-static __inline void ahc_platform_flushwork(struct ahc_softc *);
-static __inline void
-ahc_platform_flushwork(struct ahc_softc *ahc)
-{
-}
/************************ Misc Function Declarations **************************/
void ahc_done(struct ahc_softc *, struct scb *);
-/* $OpenBSD: aic7xxxvar.h,v 1.30 2016/08/17 01:17:54 krw Exp $ */
+/* $OpenBSD: aic7xxxvar.h,v 1.31 2017/12/12 12:33:36 krw Exp $ */
/*
* Core definitions and data structures shareable across OS platforms.
*
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: aic7xxxvar.h,v 1.30 2016/08/17 01:17:54 krw Exp $
+ * $Id: aic7xxxvar.h,v 1.31 2017/12/12 12:33:36 krw Exp $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.50 2003/12/17 00:02:09 gibbs Exp $
*/
#include <dev/ic/aic7xxx_cam.h>
/************************* Forward Declarations *******************************/
-struct ahc_platform_data;
-struct scb_platform_data;
struct seeprom_descriptor;
/****************************** Useful Macros *********************************/
struct ahc_softc *ahc_softc;
scb_flag flags;
bus_dmamap_t dmamap;
- struct scb_platform_data *platform_data;
struct sg_map_node *sg_map;
struct ahc_dma_seg *sg_list;
bus_addr_t sg_list_phys;
*/
union ahc_bus_softc bus_softc;
- /*
- * Platform specific data.
- */
- struct ahc_platform_data *platform_data;
-
/*
* Platform specific device information.
*/