From owner-p4-projects@FreeBSD.ORG Mon Apr 23 05:26:16 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 76FC516A403; Mon, 23 Apr 2007 05:26:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E12B16A401 for ; Mon, 23 Apr 2007 05:26:16 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id F2AEE13C469 for ; Mon, 23 Apr 2007 05:26:15 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3N5QFc3037616 for ; Mon, 23 Apr 2007 05:26:15 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3N5QFd0037613 for perforce@freebsd.org; Mon, 23 Apr 2007 05:26:15 GMT (envelope-from mjacob@freebsd.org) Date: Mon, 23 Apr 2007 05:26:15 GMT Message-Id: <200704230526.l3N5QFd0037613@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 118635 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2007 05:26:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=118635 Change 118635 by mjacob@mjexp on 2007/04/23 05:26:14 Fix some RELENG_4 compilation issues. Affected files ... .. //depot/projects/mjexp/sys/dev/isp/isp_freebsd.h#14 edit .. //depot/projects/mjexp/sys/dev/isp/isp_pci.c#24 edit Differences ... ==== //depot/projects/mjexp/sys/dev/isp/isp_freebsd.h#14 (text+ko) ==== @@ -94,7 +94,7 @@ #endif #if __FreeBSD_version < 700000 -typedef void ispfwfunc(int, int, int, void **); +typedef void ispfwfunc(int, int, int, const void **); #endif #ifdef ISP_TARGET_MODE @@ -554,16 +554,22 @@ cam_sim_alloc(a, b, c, d, e, &(d)->isp_osinfo.lock, f, g, h) #endif +#if __FreeBSD_version < 500000 +#define INLINE __inline +#else +#define INLINE inline +#endif + /* Should be BUS_SPACE_MAXSIZE, but MAXPHYS is larger than BUS_SPACE_MAXSIZE */ #define ISP_NSEGS ((MAXPHYS / PAGE_SIZE) + 1) /* * Platform specific inline functions */ -static inline int isp_get_pcmd(ispsoftc_t *, union ccb *); -static inline void isp_free_pcmd(ispsoftc_t *, union ccb *); +static INLINE int isp_get_pcmd(ispsoftc_t *, union ccb *); +static INLINE void isp_free_pcmd(ispsoftc_t *, union ccb *); -static inline int +static INLINE int isp_get_pcmd(ispsoftc_t *isp, union ccb *ccb) { ISP_PCMD(ccb) = isp->isp_osinfo.pcmd_free; @@ -574,7 +580,7 @@ return (0); } -static inline void +static INLINE void isp_free_pcmd(ispsoftc_t *isp, union ccb *ccb) { ((struct isp_pcmd *)ISP_PCMD(ccb))->next = isp->isp_osinfo.pcmd_free; ==== //depot/projects/mjexp/sys/dev/isp/isp_pci.c#24 (text+ko) ==== @@ -510,8 +510,6 @@ int bitmap; int unit = device_get_unit(dev); - callout_handle_init(&isp->isp_osinfo.ldt); - callout_handle_init(&isp->isp_osinfo.gdt); if (IS_SCSI(isp)) { return; @@ -1691,7 +1689,6 @@ static int isp_pci_mbxdma(ispsoftc_t *isp) { - struct isp_pcisoftc *pcs = (struct isp_pcisoftc *)isp; caddr_t base; uint32_t len; int i, error, ns; @@ -1744,9 +1741,10 @@ } #endif - if (isp_dma_tag_create(BUS_DMA_ROOTARG(pcs->pci_dev), 1, slim, llim, - hlim, NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, - &isp->isp_osinfo.dmat)) { + if (isp_dma_tag_create( + BUS_DMA_ROOTARG(((struct isp_pcisoftc *)isp)->pci_dev), + 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, + slim, 0, &isp->isp_osinfo.dmat)) { free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); ISP_LOCK(isp); isp_prt(isp, ISP_LOGERR, "could not create master dma tag");