mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
[SCSI] dpt_i2o: Remove DPTI_STATE_IOCTL
scsi_block_host/scsi_unlock_host provides the required functionality. [jejb: checkpatch fixes] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
999ece0af9
commit
1f8c88c3b5
@ -448,15 +448,7 @@ static int adpt_queue_lck(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd
|
|||||||
}
|
}
|
||||||
|
|
||||||
rmb();
|
rmb();
|
||||||
/*
|
if ((pHba->state) & DPTI_STATE_RESET) {
|
||||||
* TODO: I need to block here if I am processing ioctl cmds
|
|
||||||
* but if the outstanding cmds all finish before the ioctl,
|
|
||||||
* the scsi-core will not know to start sending cmds to me again.
|
|
||||||
* I need to a way to restart the scsi-cores queues or should I block
|
|
||||||
* calling scsi_done on the outstanding cmds instead
|
|
||||||
* for now we don't set the IOCTL state
|
|
||||||
*/
|
|
||||||
if(((pHba->state) & DPTI_STATE_IOCTL) || ((pHba->state) & DPTI_STATE_RESET)) {
|
|
||||||
pHba->host->last_reset = jiffies;
|
pHba->host->last_reset = jiffies;
|
||||||
pHba->host->resetting = 1;
|
pHba->host->resetting = 1;
|
||||||
return 1;
|
return 1;
|
||||||
@ -1811,21 +1803,23 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if(pHba->host)
|
/*
|
||||||
|
* Stop any new commands from enterring the
|
||||||
|
* controller while processing the ioctl
|
||||||
|
*/
|
||||||
|
if (pHba->host) {
|
||||||
|
scsi_block_requests(pHba->host);
|
||||||
spin_lock_irqsave(pHba->host->host_lock, flags);
|
spin_lock_irqsave(pHba->host->host_lock, flags);
|
||||||
// This state stops any new commands from enterring the
|
}
|
||||||
// controller while processing the ioctl
|
|
||||||
// pHba->state |= DPTI_STATE_IOCTL;
|
|
||||||
// We can't set this now - The scsi subsystem sets host_blocked and
|
|
||||||
// the queue empties and stops. We need a way to restart the queue
|
|
||||||
rcode = adpt_i2o_post_wait(pHba, msg, size, FOREVER);
|
rcode = adpt_i2o_post_wait(pHba, msg, size, FOREVER);
|
||||||
if (rcode != 0)
|
if (rcode != 0)
|
||||||
printk("adpt_i2o_passthru: post wait failed %d %p\n",
|
printk("adpt_i2o_passthru: post wait failed %d %p\n",
|
||||||
rcode, reply);
|
rcode, reply);
|
||||||
// pHba->state &= ~DPTI_STATE_IOCTL;
|
if (pHba->host) {
|
||||||
if(pHba->host)
|
|
||||||
spin_unlock_irqrestore(pHba->host->host_lock, flags);
|
spin_unlock_irqrestore(pHba->host->host_lock, flags);
|
||||||
} while(rcode == -ETIMEDOUT);
|
scsi_unblock_requests(pHba->host);
|
||||||
|
}
|
||||||
|
} while (rcode == -ETIMEDOUT);
|
||||||
|
|
||||||
if(rcode){
|
if(rcode){
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -202,7 +202,6 @@ struct adpt_channel {
|
|||||||
|
|
||||||
// HBA state flags
|
// HBA state flags
|
||||||
#define DPTI_STATE_RESET (0x01)
|
#define DPTI_STATE_RESET (0x01)
|
||||||
#define DPTI_STATE_IOCTL (0x02)
|
|
||||||
|
|
||||||
typedef struct _adpt_hba {
|
typedef struct _adpt_hba {
|
||||||
struct _adpt_hba *next;
|
struct _adpt_hba *next;
|
||||||
|
Loading…
Reference in New Issue
Block a user