aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-04 16:31:39 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-04 16:31:39 -0400
commita862b5c8cd5d847779a049a5fc8cf5b1e6f5fa07 (patch)
treef64592cf9b60b3687eaabb44ffd986c54148e8f9 /drivers
parent0b662c64840fb281e5948ab6f9d60f84817277d0 (diff)
parent3a2430708fb8f31c084503cb47240483ec2c2662 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] JAZZ ESP and SUN ESP need SPI_ATTRS [SCSI] atari_NCR5380: update_timeout removal [SCSI] aacraid: fix shutdown handler to also disable interrupts. [SCSI] qla2xxx: fix timeout in qla2x00_down_timeout [SCSI] fix CONFIG_SCSI_WAIT_SCAN=m
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/Kconfig2
-rw-r--r--drivers/scsi/aacraid/linit.c22
-rw-r--r--drivers/scsi/atari_NCR5380.c44
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
-rw-r--r--drivers/scsi/scsi_scan.c9
5 files changed, 26 insertions, 53 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 572034ceb143..2b2f5c12019b 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1532,6 +1532,7 @@ source "drivers/scsi/arm/Kconfig"
1532config JAZZ_ESP 1532config JAZZ_ESP
1533 bool "MIPS JAZZ FAS216 SCSI support" 1533 bool "MIPS JAZZ FAS216 SCSI support"
1534 depends on MACH_JAZZ && SCSI 1534 depends on MACH_JAZZ && SCSI
1535 select SCSI_SPI_ATTRS
1535 help 1536 help
1536 This is the driver for the onboard SCSI host adapter of MIPS Magnum 1537 This is the driver for the onboard SCSI host adapter of MIPS Magnum
1537 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM 1538 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM
@@ -1756,6 +1757,7 @@ config SUN3X_ESP
1756config SCSI_SUNESP 1757config SCSI_SUNESP
1757 tristate "Sparc ESP Scsi Driver" 1758 tristate "Sparc ESP Scsi Driver"
1758 depends on SBUS && SCSI 1759 depends on SBUS && SCSI
1760 select SCSI_SPI_ATTRS
1759 help 1761 help
1760 This is the driver for the Sun ESP SCSI host adapter. The ESP 1762 This is the driver for the Sun ESP SCSI host adapter. The ESP
1761 chipset is present in most SPARC SBUS-based computers. 1763 chipset is present in most SPARC SBUS-based computers.
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 350ea7feb61d..5c487ff096c7 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -863,6 +863,14 @@ static struct scsi_host_template aac_driver_template = {
863 .emulated = 1, 863 .emulated = 1,
864}; 864};
865 865
866static void __aac_shutdown(struct aac_dev * aac)
867{
868 kthread_stop(aac->thread);
869 aac_send_shutdown(aac);
870 aac_adapter_disable_int(aac);
871 free_irq(aac->pdev->irq, aac);
872}
873
866static int __devinit aac_probe_one(struct pci_dev *pdev, 874static int __devinit aac_probe_one(struct pci_dev *pdev,
867 const struct pci_device_id *id) 875 const struct pci_device_id *id)
868{ 876{
@@ -1015,10 +1023,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1015 return 0; 1023 return 0;
1016 1024
1017 out_deinit: 1025 out_deinit:
1018 kthread_stop(aac->thread); 1026 __aac_shutdown(aac);
1019 aac_send_shutdown(aac);
1020 aac_adapter_disable_int(aac);
1021 free_irq(pdev->irq, aac);
1022 out_unmap: 1027 out_unmap:
1023 aac_fib_map_free(aac); 1028 aac_fib_map_free(aac);
1024 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); 1029 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);
@@ -1038,7 +1043,8 @@ static void aac_shutdown(struct pci_dev *dev)
1038{ 1043{
1039 struct Scsi_Host *shost = pci_get_drvdata(dev); 1044 struct Scsi_Host *shost = pci_get_drvdata(dev);
1040 struct aac_dev *aac = (struct aac_dev *)shost->hostdata; 1045 struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
1041 aac_send_shutdown(aac); 1046 scsi_block_requests(shost);
1047 __aac_shutdown(aac);
1042} 1048}
1043 1049
1044static void __devexit aac_remove_one(struct pci_dev *pdev) 1050static void __devexit aac_remove_one(struct pci_dev *pdev)
@@ -1048,16 +1054,12 @@ static void __devexit aac_remove_one(struct pci_dev *pdev)
1048 1054
1049 scsi_remove_host(shost); 1055 scsi_remove_host(shost);
1050 1056
1051 kthread_stop(aac->thread); 1057 __aac_shutdown(aac);
1052
1053 aac_send_shutdown(aac);
1054 aac_adapter_disable_int(aac);
1055 aac_fib_map_free(aac); 1058 aac_fib_map_free(aac);
1056 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, 1059 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
1057 aac->comm_phys); 1060 aac->comm_phys);
1058 kfree(aac->queues); 1061 kfree(aac->queues);
1059 1062
1060 free_irq(pdev->irq, aac);
1061 aac_adapter_ioremap(aac, 0); 1063 aac_adapter_ioremap(aac, 0);
1062 1064
1063 kfree(aac->fibs); 1065 kfree(aac->fibs);
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index eff846ae0aff..03dbe60c264a 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -894,45 +894,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
894} 894}
895 895
896/* 896/*
897 * our own old-style timeout update
898 */
899/*
900 * The strategy is to cause the timer code to call scsi_times_out()
901 * when the soonest timeout is pending.
902 * The arguments are used when we are queueing a new command, because
903 * we do not want to subtract the time used from this time, but when we
904 * set the timer, we want to take this value into account.
905 */
906
907int atari_scsi_update_timeout(Scsi_Cmnd * SCset, int timeout)
908{
909 int rtn;
910
911 /*
912 * We are using the new error handling code to actually register/deregister
913 * timers for timeout.
914 */
915
916 if (!timer_pending(&SCset->eh_timeout))
917 rtn = 0;
918 else
919 rtn = SCset->eh_timeout.expires - jiffies;
920
921 if (timeout == 0) {
922 del_timer(&SCset->eh_timeout);
923 SCset->eh_timeout.data = (unsigned long)NULL;
924 SCset->eh_timeout.expires = 0;
925 } else {
926 if (SCset->eh_timeout.data != (unsigned long)NULL)
927 del_timer(&SCset->eh_timeout);
928 SCset->eh_timeout.data = (unsigned long)SCset;
929 SCset->eh_timeout.expires = jiffies + timeout;
930 add_timer(&SCset->eh_timeout);
931 }
932 return rtn;
933}
934
935/*
936 * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd, 897 * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,
937 * void (*done)(Scsi_Cmnd *)) 898 * void (*done)(Scsi_Cmnd *))
938 * 899 *
@@ -956,7 +917,6 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
956 Scsi_Cmnd *tmp; 917 Scsi_Cmnd *tmp;
957 int oldto; 918 int oldto;
958 unsigned long flags; 919 unsigned long flags;
959 // extern int update_timeout(Scsi_Cmnd * SCset, int timeout);
960 920
961#if (NDEBUG & NDEBUG_NO_WRITE) 921#if (NDEBUG & NDEBUG_NO_WRITE)
962 switch (cmd->cmnd[0]) { 922 switch (cmd->cmnd[0]) {
@@ -1029,9 +989,9 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
1029 * alter queues and touch the lock. 989 * alter queues and touch the lock.
1030 */ 990 */
1031 if (!IS_A_TT()) { 991 if (!IS_A_TT()) {
1032 oldto = atari_scsi_update_timeout(cmd, 0); 992 /* perhaps stop command timer here */
1033 falcon_get_lock(); 993 falcon_get_lock();
1034 atari_scsi_update_timeout(cmd, oldto); 994 /* perhaps restart command timer here */
1035 } 995 }
1036 if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) { 996 if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) {
1037 LIST(cmd, hostdata->issue_queue); 997 LIST(cmd, hostdata->issue_queue);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index dd076da86a46..b98136adaaae 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2590,7 +2590,7 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout)
2590 return 0; 2590 return 0;
2591 if (msleep_interruptible(step)) 2591 if (msleep_interruptible(step))
2592 break; 2592 break;
2593 } while (--iterations >= 0); 2593 } while (--iterations > 0);
2594 2594
2595 return -ETIMEDOUT; 2595 return -ETIMEDOUT;
2596} 2596}
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index a67f315244d7..662577fbe7a8 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -184,6 +184,15 @@ int scsi_complete_async_scans(void)
184/* Only exported for the benefit of scsi_wait_scan */ 184/* Only exported for the benefit of scsi_wait_scan */
185EXPORT_SYMBOL_GPL(scsi_complete_async_scans); 185EXPORT_SYMBOL_GPL(scsi_complete_async_scans);
186 186
187#ifndef MODULE
188/*
189 * For async scanning we need to wait for all the scans to complete before
190 * trying to mount the root fs. Otherwise non-modular drivers may not be ready
191 * yet.
192 */
193late_initcall(scsi_complete_async_scans);
194#endif
195
187/** 196/**
188 * scsi_unlock_floptical - unlock device via a special MODE SENSE command 197 * scsi_unlock_floptical - unlock device via a special MODE SENSE command
189 * @sdev: scsi device to send command to 198 * @sdev: scsi device to send command to