Skip to content

Commit

Permalink
[PATCH] cciss: add struct pci_driver shutdown support (replaces reboo…
Browse files Browse the repository at this point in the history
…t notifier)

This patch adds support for the struct pci_driver shutdown method to cciss.
 We require notification of an impending reboot or shutdown so that we can
flush the battery backed write cache (BBWC) on the Smart Array controller.

Signed-off-by: Mike Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Mike Miller (OS Dev) authored and Linus Torvalds committed Mar 6, 2007
1 parent 97c0697 commit de69fee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -3404,7 +3404,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
return -1;
}

static void __devexit cciss_remove_one(struct pci_dev *pdev)
static void cciss_remove_one(struct pci_dev *pdev)
{
ctlr_info_t *tmp_ptr;
int i, j;
Expand All @@ -3428,9 +3428,10 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
memset(flush_buf, 0, 4);
return_code = sendcmd(CCISS_CACHE_FLUSH, i, flush_buf, 4, 0, 0, 0, NULL,
TYPE_CMD);
if (return_code != IO_OK) {
printk(KERN_WARNING "Error Flushing cache on controller %d\n",
i);
if (return_code == IO_OK) {
printk(KERN_INFO "Completed flushing cache on controller %d\n", i);
} else {
printk(KERN_WARNING "Error flushing cache on controller %d\n", i);
}
free_irq(hba[i]->intr[2], hba[i]);

Expand Down Expand Up @@ -3481,6 +3482,7 @@ static struct pci_driver cciss_pci_driver = {
.probe = cciss_init_one,
.remove = __devexit_p(cciss_remove_one),
.id_table = cciss_pci_device_id, /* id_table */
.shutdown = cciss_remove_one,
};

/*
Expand Down

0 comments on commit de69fee

Please sign in to comment.