diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 00:57:05 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 00:57:05 -0400 |
commit | 5bc65793cbf8da0d35f19ef025dda22887e79e80 (patch) | |
tree | 8291998abd73055de6f487fafa174ee2a5d3afee /drivers/block | |
parent | 6edae708bf77e012d855a7e2c7766f211d234f4f (diff) | |
parent | 3f0a6766e0cc5a577805732e5adb50a585c58175 (diff) |
[SCSI] Merge up to linux-2.6 head
Conflicts:
drivers/scsi/jazz_esp.c
Same changes made by both SCSI and SPARC trees: problem with UTF-8
conversion in the copyright.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/cciss.c | 45 | ||||
-rw-r--r-- | drivers/block/floppy.c | 2 |
2 files changed, 31 insertions, 16 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 370dfe1c422e..5acc6c44aead 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -3469,13 +3469,39 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
3469 | return -1; | 3469 | return -1; |
3470 | } | 3470 | } |
3471 | 3471 | ||
3472 | static void cciss_remove_one(struct pci_dev *pdev) | 3472 | static void cciss_shutdown(struct pci_dev *pdev) |
3473 | { | 3473 | { |
3474 | ctlr_info_t *tmp_ptr; | 3474 | ctlr_info_t *tmp_ptr; |
3475 | int i, j; | 3475 | int i; |
3476 | char flush_buf[4]; | 3476 | char flush_buf[4]; |
3477 | int return_code; | 3477 | int return_code; |
3478 | 3478 | ||
3479 | tmp_ptr = pci_get_drvdata(pdev); | ||
3480 | if (tmp_ptr == NULL) | ||
3481 | return; | ||
3482 | i = tmp_ptr->ctlr; | ||
3483 | if (hba[i] == NULL) | ||
3484 | return; | ||
3485 | |||
3486 | /* Turn board interrupts off and send the flush cache command */ | ||
3487 | /* sendcmd will turn off interrupt, and send the flush... | ||
3488 | * To write all data in the battery backed cache to disks */ | ||
3489 | memset(flush_buf, 0, 4); | ||
3490 | return_code = sendcmd(CCISS_CACHE_FLUSH, i, flush_buf, 4, 0, 0, 0, NULL, | ||
3491 | TYPE_CMD); | ||
3492 | if (return_code == IO_OK) { | ||
3493 | printk(KERN_INFO "Completed flushing cache on controller %d\n", i); | ||
3494 | } else { | ||
3495 | printk(KERN_WARNING "Error flushing cache on controller %d\n", i); | ||
3496 | } | ||
3497 | free_irq(hba[i]->intr[2], hba[i]); | ||
3498 | } | ||
3499 | |||
3500 | static void __devexit cciss_remove_one(struct pci_dev *pdev) | ||
3501 | { | ||
3502 | ctlr_info_t *tmp_ptr; | ||
3503 | int i, j; | ||
3504 | |||
3479 | if (pci_get_drvdata(pdev) == NULL) { | 3505 | if (pci_get_drvdata(pdev) == NULL) { |
3480 | printk(KERN_ERR "cciss: Unable to remove device \n"); | 3506 | printk(KERN_ERR "cciss: Unable to remove device \n"); |
3481 | return; | 3507 | return; |
@@ -3506,18 +3532,7 @@ static void cciss_remove_one(struct pci_dev *pdev) | |||
3506 | 3532 | ||
3507 | cciss_unregister_scsi(i); /* unhook from SCSI subsystem */ | 3533 | cciss_unregister_scsi(i); /* unhook from SCSI subsystem */ |
3508 | 3534 | ||
3509 | /* Turn board interrupts off and send the flush cache command */ | 3535 | cciss_shutdown(pdev); |
3510 | /* sendcmd will turn off interrupt, and send the flush... | ||
3511 | * To write all data in the battery backed cache to disks */ | ||
3512 | memset(flush_buf, 0, 4); | ||
3513 | return_code = sendcmd(CCISS_CACHE_FLUSH, i, flush_buf, 4, 0, 0, 0, NULL, | ||
3514 | TYPE_CMD); | ||
3515 | if (return_code == IO_OK) { | ||
3516 | printk(KERN_INFO "Completed flushing cache on controller %d\n", i); | ||
3517 | } else { | ||
3518 | printk(KERN_WARNING "Error flushing cache on controller %d\n", i); | ||
3519 | } | ||
3520 | free_irq(hba[i]->intr[2], hba[i]); | ||
3521 | 3536 | ||
3522 | #ifdef CONFIG_PCI_MSI | 3537 | #ifdef CONFIG_PCI_MSI |
3523 | if (hba[i]->msix_vector) | 3538 | if (hba[i]->msix_vector) |
@@ -3550,7 +3565,7 @@ static struct pci_driver cciss_pci_driver = { | |||
3550 | .probe = cciss_init_one, | 3565 | .probe = cciss_init_one, |
3551 | .remove = __devexit_p(cciss_remove_one), | 3566 | .remove = __devexit_p(cciss_remove_one), |
3552 | .id_table = cciss_pci_device_id, /* id_table */ | 3567 | .id_table = cciss_pci_device_id, /* id_table */ |
3553 | .shutdown = cciss_remove_one, | 3568 | .shutdown = cciss_shutdown, |
3554 | }; | 3569 | }; |
3555 | 3570 | ||
3556 | /* | 3571 | /* |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 3587cb434371..fe088045dd08 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -670,7 +670,7 @@ static void __reschedule_timeout(int drive, const char *message, int marg) | |||
670 | if (drive == current_reqD) | 670 | if (drive == current_reqD) |
671 | drive = current_drive; | 671 | drive = current_drive; |
672 | del_timer(&fd_timeout); | 672 | del_timer(&fd_timeout); |
673 | if (drive < 0 || drive > N_DRIVE) { | 673 | if (drive < 0 || drive >= N_DRIVE) { |
674 | fd_timeout.expires = jiffies + 20UL * HZ; | 674 | fd_timeout.expires = jiffies + 20UL * HZ; |
675 | drive = 0; | 675 | drive = 0; |
676 | } else | 676 | } else |