isp_freebsd.h (205698) | isp_freebsd.h (218691) |
---|---|
1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 205698 2010-03-26 15:13:31Z mjacob $ */ | 1/* $FreeBSD: head/sys/dev/isp/isp_freebsd.h 218691 2011-02-14 21:50:51Z marius $ */ |
2/*- 3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions 4 * 5 * Copyright (c) 1997-2008 by Matthew Jacob 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 323 unchanged lines hidden (view full) --- 333 334#define NANOTIME_T struct timespec 335#define GET_NANOTIME nanotime 336#define GET_NANOSEC(x) ((x)->tv_sec * 1000000000 + (x)->tv_nsec) 337#define NANOTIME_SUB isp_nanotime_sub 338 339#define MAXISPREQUEST(isp) ((IS_FC(isp) || IS_ULTRA2(isp))? 1024 : 256) 340 | 2/*- 3 * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions 4 * 5 * Copyright (c) 1997-2008 by Matthew Jacob 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 323 unchanged lines hidden (view full) --- 333 334#define NANOTIME_T struct timespec 335#define GET_NANOTIME nanotime 336#define GET_NANOSEC(x) ((x)->tv_sec * 1000000000 + (x)->tv_nsec) 337#define NANOTIME_SUB isp_nanotime_sub 338 339#define MAXISPREQUEST(isp) ((IS_FC(isp) || IS_ULTRA2(isp))? 1024 : 256) 340 |
341#define MEMORYBARRIER(isp, type, offset, size) \ | 341#define MEMORYBARRIER(isp, type, offset, size, chan) \ |
342switch (type) { \ 343case SYNC_SFORDEV: \ | 342switch (type) { \ 343case SYNC_SFORDEV: \ |
344{ \ 345 struct isp_fc *fc = ISP_FC_PC(isp, chan); \ 346 bus_dmamap_sync(fc->tdmat, fc->tdmap, \ 347 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \ 348 break; \ 349} \ |
|
344case SYNC_REQUEST: \ 345 bus_dmamap_sync(isp->isp_osinfo.cdmat, \ 346 isp->isp_osinfo.cdmap, \ 347 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \ 348 break; \ 349case SYNC_SFORCPU: \ | 350case SYNC_REQUEST: \ 351 bus_dmamap_sync(isp->isp_osinfo.cdmat, \ 352 isp->isp_osinfo.cdmap, \ 353 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \ 354 break; \ 355case SYNC_SFORCPU: \ |
356{ \ 357 struct isp_fc *fc = ISP_FC_PC(isp, chan); \ 358 bus_dmamap_sync(fc->tdmat, fc->tdmap, \ 359 BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \ 360 break; \ 361} \ |
|
350case SYNC_RESULT: \ 351 bus_dmamap_sync(isp->isp_osinfo.cdmat, \ 352 isp->isp_osinfo.cdmap, \ 353 BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \ 354 break; \ 355case SYNC_REG: \ 356 bus_space_barrier(isp->isp_osinfo.bus_tag, \ 357 isp->isp_osinfo.bus_handle, offset, size, \ --- 283 unchanged lines hidden --- | 362case SYNC_RESULT: \ 363 bus_dmamap_sync(isp->isp_osinfo.cdmat, \ 364 isp->isp_osinfo.cdmap, \ 365 BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \ 366 break; \ 367case SYNC_REG: \ 368 bus_space_barrier(isp->isp_osinfo.bus_tag, \ 369 isp->isp_osinfo.bus_handle, offset, size, \ --- 283 unchanged lines hidden --- |