diff options
author | Hannes Reinecke <hare@suse.de> | 2013-10-23 04:51:18 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 06:51:37 -0400 |
commit | f274a02e52213bbeaf02adfea5f27aaed8a696c8 (patch) | |
tree | dbd9440ff91c703dda6ea2a53e86e9271a4cb31c | |
parent | 50d14a70fb284f5dcbc9e6f135b110c78786d07c (diff) |
[SCSI] tmscsim: Move 'last_reset' into host structure
The 'last_reset' value is only used internally, so move it into
the internal host structure.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/tmscsim.c | 14 | ||||
-rw-r--r-- | drivers/scsi/tmscsim.h | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 9327f5fcec4e..11423615c2ea 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -521,7 +521,7 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr | |||
521 | pACB->SelConn++; | 521 | pACB->SelConn++; |
522 | return 1; | 522 | return 1; |
523 | } | 523 | } |
524 | if (time_before (jiffies, pACB->pScsiHost->last_reset)) | 524 | if (time_before (jiffies, pACB->last_reset)) |
525 | { | 525 | { |
526 | DEBUG0(printk ("DC390: We were just reset and don't accept commands yet!\n")); | 526 | DEBUG0(printk ("DC390: We were just reset and don't accept commands yet!\n")); |
527 | return 1; | 527 | return 1; |
@@ -1863,7 +1863,7 @@ dc390_ScsiRstDetect( struct dc390_acb* pACB ) | |||
1863 | /* delay half a second */ | 1863 | /* delay half a second */ |
1864 | udelay (1000); | 1864 | udelay (1000); |
1865 | DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); | 1865 | DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); |
1866 | pACB->pScsiHost->last_reset = jiffies + 5*HZ/2 | 1866 | pACB->last_reset = jiffies + 5*HZ/2 |
1867 | + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; | 1867 | + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; |
1868 | pACB->Connected = 0; | 1868 | pACB->Connected = 0; |
1869 | 1869 | ||
@@ -2048,9 +2048,9 @@ static int DC390_bus_reset (struct scsi_cmnd *cmd) | |||
2048 | 2048 | ||
2049 | dc390_ResetDevParam(pACB); | 2049 | dc390_ResetDevParam(pACB); |
2050 | mdelay(1); | 2050 | mdelay(1); |
2051 | pACB->pScsiHost->last_reset = jiffies + 3*HZ/2 | 2051 | pACB->last_reset = jiffies + 3*HZ/2 |
2052 | + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; | 2052 | + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; |
2053 | 2053 | ||
2054 | DC390_write8(ScsiCmd, CLEAR_FIFO_CMD); | 2054 | DC390_write8(ScsiCmd, CLEAR_FIFO_CMD); |
2055 | DC390_read8(INT_Status); /* Reset Pending INT */ | 2055 | DC390_read8(INT_Status); /* Reset Pending INT */ |
2056 | 2056 | ||
@@ -2383,7 +2383,7 @@ static void dc390_init_hw(struct dc390_acb *pACB, u8 index) | |||
2383 | if (pACB->Gmode2 & RST_SCSI_BUS) { | 2383 | if (pACB->Gmode2 & RST_SCSI_BUS) { |
2384 | dc390_ResetSCSIBus(pACB); | 2384 | dc390_ResetSCSIBus(pACB); |
2385 | udelay(1000); | 2385 | udelay(1000); |
2386 | shost->last_reset = jiffies + HZ/2 + | 2386 | pACB->last_reset = jiffies + HZ/2 + |
2387 | HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; | 2387 | HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; |
2388 | } | 2388 | } |
2389 | 2389 | ||
@@ -2455,8 +2455,8 @@ static int dc390_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2455 | shost->irq = pdev->irq; | 2455 | shost->irq = pdev->irq; |
2456 | shost->base = io_port; | 2456 | shost->base = io_port; |
2457 | shost->unique_id = io_port; | 2457 | shost->unique_id = io_port; |
2458 | shost->last_reset = jiffies; | 2458 | |
2459 | 2459 | pACB->last_reset = jiffies; | |
2460 | pACB->pScsiHost = shost; | 2460 | pACB->pScsiHost = shost; |
2461 | pACB->IOPortBase = (u16) io_port; | 2461 | pACB->IOPortBase = (u16) io_port; |
2462 | pACB->IRQLevel = pdev->irq; | 2462 | pACB->IRQLevel = pdev->irq; |
diff --git a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h index 77adc54dbd16..3d1bb4ad1826 100644 --- a/drivers/scsi/tmscsim.h +++ b/drivers/scsi/tmscsim.h | |||
@@ -143,6 +143,7 @@ u8 Ignore_IRQ; /* Not used */ | |||
143 | 143 | ||
144 | struct pci_dev *pdev; | 144 | struct pci_dev *pdev; |
145 | 145 | ||
146 | unsigned long last_reset; | ||
146 | unsigned long Cmds; | 147 | unsigned long Cmds; |
147 | u32 SelLost; | 148 | u32 SelLost; |
148 | u32 SelConn; | 149 | u32 SelConn; |