-#define xpt_insque_tail(new, head) __xpt_que_add(new, (head)->blink, head)
-
-static inline struct xpt_quehead *xpt_remque_tail(struct xpt_quehead *head)
-{
- struct xpt_quehead *elem = head->blink;
-
- if (elem != head)
- __xpt_que_del(elem->blink, head);
- else
- elem = 0;
- return elem;
-}
-
-
-/*==========================================================
-**
-** SMP threading.
-**
-** Assuming that SMP systems are generally high end
-** systems and may use several SCSI adapters, we are
-** using one lock per controller instead of some global
-** one. For the moment (linux-2.1.95), driver's entry
-** points are called with the 'io_request_lock' lock
-** held, so:
-** - We are uselessly loosing a couple of micro-seconds
-** to lock the controller data structure.
-** - But the driver is not broken by design for SMP and
-** so can be more resistant to bugs or bad changes in
-** the IO sub-system code.
-** - A small advantage could be that the interrupt code
-** is grained as wished (e.g.: by controller).
-**
-**==========================================================
-*/
-
-spinlock_t DRIVER_SMP_LOCK = SPIN_LOCK_UNLOCKED;
-#define NCR_LOCK_DRIVER(flags) spin_lock_irqsave(&DRIVER_SMP_LOCK, flags)
-#define NCR_UNLOCK_DRIVER(flags) \
- spin_unlock_irqrestore(&DRIVER_SMP_LOCK, flags)
-
-#define NCR_INIT_LOCK_NCB(np) spin_lock_init(&np->smp_lock)
-#define NCR_LOCK_NCB(np, flags) spin_lock_irqsave(&np->smp_lock, flags)
-#define NCR_UNLOCK_NCB(np, flags) spin_unlock_irqrestore(&np->smp_lock, flags)
-
-#define NCR_LOCK_SCSI_DONE(host, flags) \
- spin_lock_irqsave((host)->host_lock, flags)
-#define NCR_UNLOCK_SCSI_DONE(host, flags) \
- spin_unlock_irqrestore(((host)->host_lock), flags)
-
-/*==========================================================
-**
-** Memory mapped IO
-**
-** Since linux-2.1, we must use ioremap() to map the io
-** memory space and iounmap() to unmap it. This allows
-** portability. Linux 1.3.X and 2.0.X allow to remap
-** physical pages addresses greater than the highest
-** physical memory address to kernel virtual pages with
-** vremap() / vfree(). That was not portable but worked
-** with i386 architecture.
-**
-**==========================================================
-*/
-