Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91734
b: refs/heads/master
c: e14ac67
h: refs/heads/master
v: v3
  • Loading branch information
scameron@beardog.cca.cpqcorp.net authored and Jens Axboe committed Apr 21, 2008
1 parent c8d4eff commit 3036633
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f18573abcc57844a7c3c12699d40eead8728cd8a
refs/heads/master: e14ac67026b46e94478134df9521682fc6501ac0
17 changes: 16 additions & 1 deletion trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,10 @@ static void cciss_update_drive_info(int ctlr, int drv_index)
spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags);
h->drv[drv_index].busy_configuring = 1;
spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);

/* deregister_disk sets h->drv[drv_index].queue = NULL */
/* which keeps the interrupt handler from starting */
/* the queue. */
ret = deregister_disk(h->gendisk[drv_index],
&h->drv[drv_index], 0);
h->drv[drv_index].busy_configuring = 0;
Expand Down Expand Up @@ -1419,6 +1423,10 @@ static void cciss_update_drive_info(int ctlr, int drv_index)
blk_queue_hardsect_size(disk->queue,
hba[ctlr]->drv[drv_index].block_size);

/* Make sure all queue data is written out before */
/* setting h->drv[drv_index].queue, as setting this */
/* allows the interrupt handler to start the queue */
wmb();
h->drv[drv_index].queue = disk->queue;
add_disk(disk);
}
Expand Down Expand Up @@ -3520,10 +3528,17 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
continue;
blk_queue_hardsect_size(q, drv->block_size);
set_capacity(disk, drv->nr_blocks);
add_disk(disk);
j++;
} while (j <= hba[i]->highest_lun);

/* Make sure all queue data is written out before */
/* interrupt handler, triggered by add_disk, */
/* is allowed to start them. */
wmb();

for (j = 0; j <= hba[i]->highest_lun; j++)
add_disk(hba[i]->gendisk[j]);

return 1;

clean4:
Expand Down

0 comments on commit 3036633

Please sign in to comment.