Messages in this thread | | | Date | Thu, 9 Sep 1999 16:10:41 -0700 | From | "Leonard N. Zubkoff" <> | Subject | Re: BusLogic + SMP == broke |
| |
Date: Thu, 09 Sep 1999 15:46:14 -0700 From: Brian Macy <bmacy@sunshinecomputing.com>
Sure... that's probably true... my knowledge of Linux SCSI device drivers is limited to hacking the ability to recognize a PCI card. One question though... why does the Mylex DAC960 driver acquire the io_request spinlock? They seem to be similar functions to those in the BusLogic driver that don't have locks. Oh well... just my ignorance.
There are three separate sets of locking functions defined in the DAC960 driver, which is not a SCSI driver so the rules are somewhat different. Generalized access to the DAC960 controller requires a lock since the caller will not already hold the lock. Request functions already hold the lock and so cannot reacquire it. The interrupt holder must again acquire the lock.
These abstractions may not be quite right, but they will make it a lot easier to divorce the DAC960 driver from the general io_request_lock when that becomes desirable.
Leonard
/* DAC960_AcquireControllerLock acquires exclusive access to Controller. */
static inline void DAC960_AcquireControllerLock(DAC960_Controller_T *Controller, ProcessorFlags_T *ProcessorFlags) { spin_lock_irqsave(&io_request_lock, *ProcessorFlags); }
/* DAC960_AcquireControllerLockRF acquires exclusive access to Controller, but is only called from the request function with the io_request_lock held. */
static inline void DAC960_AcquireControllerLockRF(DAC960_Controller_T *Controller, ProcessorFlags_T *ProcessorFlags) { }
/* DAC960_AcquireControllerLockIH acquires exclusive access to Controller, but is only called from the interrupt handler. */
static inline void DAC960_AcquireControllerLockIH(DAC960_Controller_T *Controller, ProcessorFlags_T *ProcessorFlags) { spin_lock_irqsave(&io_request_lock, *ProcessorFlags); }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |