1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

Add compatibility for FreeBSD-4.

This commit is contained in:
Hidetoshi Shimokawa 2003-07-04 14:04:41 +00:00
parent 98ab6e3295
commit 4f93346871
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117228
4 changed files with 21 additions and 5 deletions

View File

@ -77,7 +77,11 @@ fwdma_malloc(struct firewire_comm *fc, int alignment, bus_size_t size,
/*nsegments*/ 1,
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
/*flags*/ BUS_DMA_ALLOCNOW,
/*lockfunc*/busdma_lock_mutex,/*lockarg*/&Giant, &dma->dma_tag);
#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
/*lockarg*/&Giant,
#endif
&dma->dma_tag);
if (err) {
printf("fwdma_malloc: failed(1)\n");
return(NULL);
@ -171,8 +175,11 @@ fwdma_malloc_multiseg(struct firewire_comm *fc, int alignment,
/*nsegments*/ 1,
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
/*flags*/ BUS_DMA_ALLOCNOW,
#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
/*lockarg*/&Giant, &am->dma_tag)) {
/*lockarg*/&Giant,
#endif
&am->dma_tag)) {
printf("fwdma_malloc_multiseg: tag_create failed\n");
free(am, M_FW);
return(NULL);

View File

@ -1188,8 +1188,11 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
/*nsegments*/ dbch->ndesc > 3 ? dbch->ndesc - 2 : 1,
/*maxsegsz*/ MAX_REQCOUNT,
/*flags*/ 0,
#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
/*lockarg*/&Giant, &dbch->dmat))
/*lockarg*/&Giant,
#endif
&dbch->dmat))
return;
/* allocate DB entries and attach one to each DMA channels */

View File

@ -301,8 +301,11 @@ fwohci_pci_attach(device_t self)
/*nsegments*/0x20,
/*maxsegsz*/0x8000,
/*flags*/BUS_DMA_ALLOCNOW,
#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
/*lockarg*/&Giant, &sc->fc.dmat);
/*lockarg*/&Giant,
#endif
&sc->fc.dmat);
if (err != 0) {
printf("fwohci_pci_attach: Could not allocate DMA tag "
"- error %d\n", err);

View File

@ -1830,8 +1830,11 @@ END_DEBUG
/*maxsize*/0x100000, /*nsegments*/SBP_IND_MAX,
/*maxsegsz*/SBP_SEG_MAX,
/*flags*/BUS_DMA_ALLOCNOW,
#if __FreeBSD_version >= 501102
/*lockfunc*/busdma_lock_mutex,
/*lockarg*/&Giant, &sbp->dmat);
/*lockarg*/&Giant,
#endif
&sbp->dmat);
if (error != 0) {
printf("sbp_attach: Could not allocate DMA tag "
"- error %d\n", error);