PERFORCE change 118635 for review

Matt Jacob mjacob at FreeBSD.org
Mon Apr 23 05:26:16 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=118635

Change 118635 by mjacob at 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");


More information about the p4-projects mailing list