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
This commit is contained in:
commit
a862b5c8cd
5 changed files with 26 additions and 53 deletions
|
@ -1532,6 +1532,7 @@ source "drivers/scsi/arm/Kconfig"
|
|||
config JAZZ_ESP
|
||||
bool "MIPS JAZZ FAS216 SCSI support"
|
||||
depends on MACH_JAZZ && SCSI
|
||||
select SCSI_SPI_ATTRS
|
||||
help
|
||||
This is the driver for the onboard SCSI host adapter of MIPS Magnum
|
||||
4000, Acer PICA, Olivetti M700-10 and a few other identical OEM
|
||||
|
@ -1756,6 +1757,7 @@ config SUN3X_ESP
|
|||
config SCSI_SUNESP
|
||||
tristate "Sparc ESP Scsi Driver"
|
||||
depends on SBUS && SCSI
|
||||
select SCSI_SPI_ATTRS
|
||||
help
|
||||
This is the driver for the Sun ESP SCSI host adapter. The ESP
|
||||
chipset is present in most SPARC SBUS-based computers.
|
||||
|
|
|
@ -863,6 +863,14 @@ static struct scsi_host_template aac_driver_template = {
|
|||
.emulated = 1,
|
||||
};
|
||||
|
||||
static void __aac_shutdown(struct aac_dev * aac)
|
||||
{
|
||||
kthread_stop(aac->thread);
|
||||
aac_send_shutdown(aac);
|
||||
aac_adapter_disable_int(aac);
|
||||
free_irq(aac->pdev->irq, aac);
|
||||
}
|
||||
|
||||
static int __devinit aac_probe_one(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
{
|
||||
|
@ -1015,10 +1023,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
|
|||
return 0;
|
||||
|
||||
out_deinit:
|
||||
kthread_stop(aac->thread);
|
||||
aac_send_shutdown(aac);
|
||||
aac_adapter_disable_int(aac);
|
||||
free_irq(pdev->irq, aac);
|
||||
__aac_shutdown(aac);
|
||||
out_unmap:
|
||||
aac_fib_map_free(aac);
|
||||
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)
|
|||
{
|
||||
struct Scsi_Host *shost = pci_get_drvdata(dev);
|
||||
struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
|
||||
aac_send_shutdown(aac);
|
||||
scsi_block_requests(shost);
|
||||
__aac_shutdown(aac);
|
||||
}
|
||||
|
||||
static void __devexit aac_remove_one(struct pci_dev *pdev)
|
||||
|
@ -1048,16 +1054,12 @@ static void __devexit aac_remove_one(struct pci_dev *pdev)
|
|||
|
||||
scsi_remove_host(shost);
|
||||
|
||||
kthread_stop(aac->thread);
|
||||
|
||||
aac_send_shutdown(aac);
|
||||
aac_adapter_disable_int(aac);
|
||||
__aac_shutdown(aac);
|
||||
aac_fib_map_free(aac);
|
||||
pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
|
||||
aac->comm_phys);
|
||||
kfree(aac->queues);
|
||||
|
||||
free_irq(pdev->irq, aac);
|
||||
aac_adapter_ioremap(aac, 0);
|
||||
|
||||
kfree(aac->fibs);
|
||||
|
|
|
@ -893,45 +893,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* our own old-style timeout update
|
||||
*/
|
||||
/*
|
||||
* The strategy is to cause the timer code to call scsi_times_out()
|
||||
* when the soonest timeout is pending.
|
||||
* The arguments are used when we are queueing a new command, because
|
||||
* we do not want to subtract the time used from this time, but when we
|
||||
* set the timer, we want to take this value into account.
|
||||
*/
|
||||
|
||||
int atari_scsi_update_timeout(Scsi_Cmnd * SCset, int timeout)
|
||||
{
|
||||
int rtn;
|
||||
|
||||
/*
|
||||
* We are using the new error handling code to actually register/deregister
|
||||
* timers for timeout.
|
||||
*/
|
||||
|
||||
if (!timer_pending(&SCset->eh_timeout))
|
||||
rtn = 0;
|
||||
else
|
||||
rtn = SCset->eh_timeout.expires - jiffies;
|
||||
|
||||
if (timeout == 0) {
|
||||
del_timer(&SCset->eh_timeout);
|
||||
SCset->eh_timeout.data = (unsigned long)NULL;
|
||||
SCset->eh_timeout.expires = 0;
|
||||
} else {
|
||||
if (SCset->eh_timeout.data != (unsigned long)NULL)
|
||||
del_timer(&SCset->eh_timeout);
|
||||
SCset->eh_timeout.data = (unsigned long)SCset;
|
||||
SCset->eh_timeout.expires = jiffies + timeout;
|
||||
add_timer(&SCset->eh_timeout);
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
/*
|
||||
* Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,
|
||||
* void (*done)(Scsi_Cmnd *))
|
||||
|
@ -956,7 +917,6 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
|
|||
Scsi_Cmnd *tmp;
|
||||
int oldto;
|
||||
unsigned long flags;
|
||||
// extern int update_timeout(Scsi_Cmnd * SCset, int timeout);
|
||||
|
||||
#if (NDEBUG & NDEBUG_NO_WRITE)
|
||||
switch (cmd->cmnd[0]) {
|
||||
|
@ -1029,9 +989,9 @@ static int NCR5380_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
|
|||
* alter queues and touch the lock.
|
||||
*/
|
||||
if (!IS_A_TT()) {
|
||||
oldto = atari_scsi_update_timeout(cmd, 0);
|
||||
/* perhaps stop command timer here */
|
||||
falcon_get_lock();
|
||||
atari_scsi_update_timeout(cmd, oldto);
|
||||
/* perhaps restart command timer here */
|
||||
}
|
||||
if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) {
|
||||
LIST(cmd, hostdata->issue_queue);
|
||||
|
|
|
@ -2590,7 +2590,7 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout)
|
|||
return 0;
|
||||
if (msleep_interruptible(step))
|
||||
break;
|
||||
} while (--iterations >= 0);
|
||||
} while (--iterations > 0);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
|
|
@ -184,6 +184,15 @@ int scsi_complete_async_scans(void)
|
|||
/* Only exported for the benefit of scsi_wait_scan */
|
||||
EXPORT_SYMBOL_GPL(scsi_complete_async_scans);
|
||||
|
||||
#ifndef MODULE
|
||||
/*
|
||||
* For async scanning we need to wait for all the scans to complete before
|
||||
* trying to mount the root fs. Otherwise non-modular drivers may not be ready
|
||||
* yet.
|
||||
*/
|
||||
late_initcall(scsi_complete_async_scans);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* scsi_unlock_floptical - unlock device via a special MODE SENSE command
|
||||
* @sdev: scsi device to send command to
|
||||
|
|
Loading…
Reference in a new issue