mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Add compatibility for FreeBSD-4.
This commit is contained in:
parent
98ab6e3295
commit
4f93346871
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117228
@ -77,7 +77,11 @@ fwdma_malloc(struct firewire_comm *fc, int alignment, bus_size_t size,
|
|||||||
/*nsegments*/ 1,
|
/*nsegments*/ 1,
|
||||||
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
|
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
|
||||||
/*flags*/ BUS_DMA_ALLOCNOW,
|
/*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) {
|
if (err) {
|
||||||
printf("fwdma_malloc: failed(1)\n");
|
printf("fwdma_malloc: failed(1)\n");
|
||||||
return(NULL);
|
return(NULL);
|
||||||
@ -171,8 +175,11 @@ fwdma_malloc_multiseg(struct firewire_comm *fc, int alignment,
|
|||||||
/*nsegments*/ 1,
|
/*nsegments*/ 1,
|
||||||
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
|
/*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT,
|
||||||
/*flags*/ BUS_DMA_ALLOCNOW,
|
/*flags*/ BUS_DMA_ALLOCNOW,
|
||||||
|
#if __FreeBSD_version >= 501102
|
||||||
/*lockfunc*/busdma_lock_mutex,
|
/*lockfunc*/busdma_lock_mutex,
|
||||||
/*lockarg*/&Giant, &am->dma_tag)) {
|
/*lockarg*/&Giant,
|
||||||
|
#endif
|
||||||
|
&am->dma_tag)) {
|
||||||
printf("fwdma_malloc_multiseg: tag_create failed\n");
|
printf("fwdma_malloc_multiseg: tag_create failed\n");
|
||||||
free(am, M_FW);
|
free(am, M_FW);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
@ -1188,8 +1188,11 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
|
|||||||
/*nsegments*/ dbch->ndesc > 3 ? dbch->ndesc - 2 : 1,
|
/*nsegments*/ dbch->ndesc > 3 ? dbch->ndesc - 2 : 1,
|
||||||
/*maxsegsz*/ MAX_REQCOUNT,
|
/*maxsegsz*/ MAX_REQCOUNT,
|
||||||
/*flags*/ 0,
|
/*flags*/ 0,
|
||||||
|
#if __FreeBSD_version >= 501102
|
||||||
/*lockfunc*/busdma_lock_mutex,
|
/*lockfunc*/busdma_lock_mutex,
|
||||||
/*lockarg*/&Giant, &dbch->dmat))
|
/*lockarg*/&Giant,
|
||||||
|
#endif
|
||||||
|
&dbch->dmat))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* allocate DB entries and attach one to each DMA channels */
|
/* allocate DB entries and attach one to each DMA channels */
|
||||||
|
@ -301,8 +301,11 @@ fwohci_pci_attach(device_t self)
|
|||||||
/*nsegments*/0x20,
|
/*nsegments*/0x20,
|
||||||
/*maxsegsz*/0x8000,
|
/*maxsegsz*/0x8000,
|
||||||
/*flags*/BUS_DMA_ALLOCNOW,
|
/*flags*/BUS_DMA_ALLOCNOW,
|
||||||
|
#if __FreeBSD_version >= 501102
|
||||||
/*lockfunc*/busdma_lock_mutex,
|
/*lockfunc*/busdma_lock_mutex,
|
||||||
/*lockarg*/&Giant, &sc->fc.dmat);
|
/*lockarg*/&Giant,
|
||||||
|
#endif
|
||||||
|
&sc->fc.dmat);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
printf("fwohci_pci_attach: Could not allocate DMA tag "
|
printf("fwohci_pci_attach: Could not allocate DMA tag "
|
||||||
"- error %d\n", err);
|
"- error %d\n", err);
|
||||||
|
@ -1830,8 +1830,11 @@ END_DEBUG
|
|||||||
/*maxsize*/0x100000, /*nsegments*/SBP_IND_MAX,
|
/*maxsize*/0x100000, /*nsegments*/SBP_IND_MAX,
|
||||||
/*maxsegsz*/SBP_SEG_MAX,
|
/*maxsegsz*/SBP_SEG_MAX,
|
||||||
/*flags*/BUS_DMA_ALLOCNOW,
|
/*flags*/BUS_DMA_ALLOCNOW,
|
||||||
|
#if __FreeBSD_version >= 501102
|
||||||
/*lockfunc*/busdma_lock_mutex,
|
/*lockfunc*/busdma_lock_mutex,
|
||||||
/*lockarg*/&Giant, &sbp->dmat);
|
/*lockarg*/&Giant,
|
||||||
|
#endif
|
||||||
|
&sbp->dmat);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
printf("sbp_attach: Could not allocate DMA tag "
|
printf("sbp_attach: Could not allocate DMA tag "
|
||||||
"- error %d\n", error);
|
"- error %d\n", error);
|
||||||
|
Loading…
Reference in New Issue
Block a user