diff options
| -rw-r--r-- | drivers/block/cpqarray.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index c01237f47363..7bfa29a5bc89 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -200,6 +200,7 @@ static int ida_proc_get_info(char *buffer, char **start, off_t offset, int lengt drv_info_t *drv; #ifdef CPQ_PROC_PRINT_QUEUES cmdlist_t *c; + unsigned long flags; #endif ctlr = h->ctlr; @@ -236,6 +237,7 @@ static int ida_proc_get_info(char *buffer, char **start, off_t offset, int lengt } #ifdef CPQ_PROC_PRINT_QUEUES + spin_lock_irqsave(IDA_LOCK(h->ctlr), flags); size = sprintf(buffer+len, "\nCurrent Queues:\n"); pos += size; len += size; @@ -258,6 +260,7 @@ static int ida_proc_get_info(char *buffer, char **start, off_t offset, int lengt } size = sprintf(buffer+len, "\n"); pos += size; len += size; + spin_unlock_irqrestore(IDA_LOCK(h->ctlr), flags); #endif size = sprintf(buffer+len, "nr_allocs = %d\nnr_frees = %d\n", h->nr_allocs, h->nr_frees); @@ -373,8 +376,6 @@ static int __init cpqarray_init(void) getgeometry(i); start_fwbk(i); - hba[i]->access.set_intr_mask(hba[i], FIFO_NOT_EMPTY); - ida_procinit(i); q = BLK_DEFAULT_QUEUE(MAJOR_NR + i); @@ -395,6 +396,9 @@ static int __init cpqarray_init(void) hba[i]->timer.function = ida_timer; add_timer(&hba[i]->timer); + /* Enable IRQ now that spinlock and rate limit timer are set up */ + hba[i]->access.set_intr_mask(hba[i], FIFO_NOT_EMPTY); + for(j=0; j<NWD; j++) { struct gendisk *disk = ida_gendisk[i][j]; drv_info_t *drv = &hba[i]->drv[j]; @@ -809,8 +813,6 @@ queue_next: blkdev_dequeue_request(creq); - spin_unlock_irq(q->queue_lock); - c->ctlr = h->ctlr; c->hdr.unit = minor(creq->rq_dev) >> NWD_SHIFT; c->hdr.size = sizeof(rblk_t) >> 2; @@ -842,8 +844,6 @@ DBGPX( printk("Submitting %d sectors in %d segments\n", creq->nr_sectors, seg); c->req.hdr.cmd = (rq_data_dir(creq) == READ) ? IDA_READ : IDA_WRITE; c->type = CMD_RWREQ; - spin_lock_irq(q->queue_lock); - /* Put the request on the tail of the request queue */ addQ(&h->reqQ, c); h->Qdepth++; @@ -853,7 +853,6 @@ DBGPX( printk("Submitting %d sectors in %d segments\n", creq->nr_sectors, seg); goto queue_next; startio: - __blk_stop_queue(q); start_io(h); } @@ -1006,8 +1005,8 @@ static void do_ida_intr(int irq, void *dev_id, struct pt_regs *regs) /* * See if we can queue up some more IO */ - spin_unlock_irqrestore(IDA_LOCK(h->ctlr), flags); - blk_start_queue(BLK_DEFAULT_QUEUE(MAJOR_NR + h->ctlr)); + do_ida_request(BLK_DEFAULT_QUEUE(MAJOR_NR+h->ctlr)); + spin_unlock_irqrestore(IDA_LOCK(h->ctlr), flags); } /* |
