Commit 39509e47 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 6484567f aada1970
Release Date : Thu Dec 9 19:02:14 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
Current Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
Older Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
i. Fix a bug in kioc's dma buffer deallocation
Release Date : Thu Nov 4 18:24:56 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
Current Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
......
......@@ -663,10 +663,9 @@ static void __devexit aac_remove_one(struct pci_dev *pdev)
kfree(aac->fibs);
list_del(&aac->entry);
scsi_host_put(shost);
pci_disable_device(pdev);
list_del(&aac->entry);
}
static struct pci_driver aac_pci_driver = {
......
......@@ -1140,6 +1140,10 @@ static struct scsi_host_template imm_template = {
.use_clustering = ENABLE_CLUSTERING,
.can_queue = 1,
.slave_alloc = imm_adjust_queue,
.unchecked_isa_dma = 1, /* imm cannot deal with highmem, so
* this is an easy trick to ensure
* all io pages for this host reside
* in low memory */
};
/***************************************************************************
......
......@@ -142,7 +142,7 @@ typedef struct uioc {
caddr_t buf_vaddr;
dma_addr_t buf_paddr;
uint8_t pool_index;
int8_t pool_index;
uint8_t free_buf;
uint8_t timedout;
......
......@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*
* FILE : megaraid_mm.c
* Version : v2.20.2.2 (Nov 04 2004)
* Version : v2.20.2.3 (Dec 09 2004)
*
* Common management module
*/
......@@ -614,23 +614,27 @@ mraid_mm_dealloc_kioc(mraid_mmadp_t *adp, uioc_t *kioc)
mm_dmapool_t *pool;
unsigned long flags;
pool = &adp->dma_pool_list[kioc->pool_index];
if (kioc->pool_index != -1) {
pool = &adp->dma_pool_list[kioc->pool_index];
/* This routine may be called in non-isr context also */
spin_lock_irqsave(&pool->lock, flags);
/*
* While attaching the dma buffer, if we didn't get the required
* buffer from the pool, we would have allocated it at the run time
* and set the free_buf flag. We must free that buffer. Otherwise,
* just mark that the buffer is not in use
*/
if (kioc->free_buf == 1)
pci_pool_free(pool->handle, kioc->buf_vaddr, kioc->buf_paddr);
else
pool->in_use = 0;
/* This routine may be called in non-isr context also */
spin_lock_irqsave(&pool->lock, flags);
spin_unlock_irqrestore(&pool->lock, flags);
/*
* While attaching the dma buffer, if we didn't get the
* required buffer from the pool, we would have allocated
* it at the run time and set the free_buf flag. We must
* free that buffer. Otherwise, just mark that the buffer is
* not in use
*/
if (kioc->free_buf == 1)
pci_pool_free(pool->handle, kioc->buf_vaddr,
kioc->buf_paddr);
else
pool->in_use = 0;
spin_unlock_irqrestore(&pool->lock, flags);
}
/* Return the kioc to the free pool */
spin_lock_irqsave(&adp->kioc_pool_lock, flags);
......
......@@ -29,10 +29,9 @@
#include "megaraid_ioctl.h"
#define LSI_COMMON_MOD_VERSION "2.20.2.2"
#define LSI_COMMON_MOD_VERSION "2.20.2.3"
#define LSI_COMMON_MOD_EXT_VERSION \
"(Release Date: Thu Nov 4 17:46:29 EST 2004)"
"(Release Date: Thu Dec 9 19:02:14 EST 2004)"
#define LSI_DBGLVL dbglevel
......
......@@ -47,8 +47,6 @@
/* Local Prototypes. */
static inline uint32_t qla2x00_to_handle(uint16_t, uint16_t, uint16_t);
static inline uint16_t qla2x00_handle_to_idx(uint32_t);
static inline uint16_t qla2x00_handle_to_iter(uint32_t);
static inline uint16_t qla2x00_handle_to_type(uint32_t);
static inline uint32_t qla2x00_iodesc_to_handle(struct io_descriptor *);
static inline struct io_descriptor *qla2x00_handle_to_iodesc(scsi_qla_host_t *,
uint32_t);
......@@ -129,30 +127,6 @@ qla2x00_handle_to_idx(uint32_t handle)
return ((uint16_t)(((handle) >> HDL_INDEX_SHIFT) & HDL_INDEX_MASK));
}
/**
* qla2x00_handle_to_type() - Retrive the descriptor type for a given handle.
* @handle: descriptor handle
*
* Returns the descriptor type specified by the @handle.
*/
static inline uint16_t
qla2x00_handle_to_type(uint32_t handle)
{
return ((uint16_t)(((handle) >> HDL_TYPE_SHIFT) & HDL_TYPE_MASK));
}
/**
* qla2x00_handle_to_iter() - Retrive the rolling signature for a given handle.
* @handle: descriptor handle
*
* Returns the signature specified by the @handle.
*/
static inline uint16_t
qla2x00_handle_to_iter(uint32_t handle)
{
return ((uint16_t)(((handle) >> HDL_ITER_SHIFT) & HDL_ITER_MASK));
}
/**
* qla2x00_iodesc_to_handle() - Convert an IO descriptor to a unique handle.
* @iodesc: io descriptor
......
......@@ -198,8 +198,8 @@ static struct scsi_disk *scsi_disk_get(struct gendisk *disk)
static void scsi_disk_put(struct scsi_disk *sdkp)
{
down(&sd_ref_sem);
scsi_device_put(sdkp->device);
kref_put(&sdkp->kref, scsi_disk_release);
scsi_device_put(sdkp->device);
up(&sd_ref_sem);
}
......
......@@ -156,8 +156,8 @@ static inline struct scsi_cd *scsi_cd_get(struct gendisk *disk)
static inline void scsi_cd_put(struct scsi_cd *cd)
{
down(&sr_ref_sem);
scsi_device_put(cd->device);
kref_put(&cd->kref, sr_kref_release);
scsi_device_put(cd->device);
up(&sr_ref_sem);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment