Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Hannes Reinecke and committed by
James Bottomley
f274a02e 50d14a70

+8 -7
+7 -7
drivers/scsi/tmscsim.c
··· 521 521 pACB->SelConn++; 522 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 526 DEBUG0(printk ("DC390: We were just reset and don't accept commands yet!\n")); 527 527 return 1; ··· 1863 1863 /* delay half a second */ 1864 1864 udelay (1000); 1865 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 1867 + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; 1868 1868 pACB->Connected = 0; 1869 1869 ··· 2048 2048 2049 2049 dc390_ResetDevParam(pACB); 2050 2050 mdelay(1); 2051 - pACB->pScsiHost->last_reset = jiffies + 3*HZ/2 2051 + pACB->last_reset = jiffies + 3*HZ/2 2052 2052 + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; 2053 - 2053 + 2054 2054 DC390_write8(ScsiCmd, CLEAR_FIFO_CMD); 2055 2055 DC390_read8(INT_Status); /* Reset Pending INT */ 2056 2056 ··· 2383 2383 if (pACB->Gmode2 & RST_SCSI_BUS) { 2384 2384 dc390_ResetSCSIBus(pACB); 2385 2385 udelay(1000); 2386 - shost->last_reset = jiffies + HZ/2 + 2386 + pACB->last_reset = jiffies + HZ/2 + 2387 2387 HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]; 2388 2388 } 2389 2389 ··· 2455 2455 shost->irq = pdev->irq; 2456 2456 shost->base = io_port; 2457 2457 shost->unique_id = io_port; 2458 - shost->last_reset = jiffies; 2459 - 2458 + 2459 + pACB->last_reset = jiffies; 2460 2460 pACB->pScsiHost = shost; 2461 2461 pACB->IOPortBase = (u16) io_port; 2462 2462 pACB->IRQLevel = pdev->irq;
+1
drivers/scsi/tmscsim.h
··· 143 143 144 144 struct pci_dev *pdev; 145 145 146 + unsigned long last_reset; 146 147 unsigned long Cmds; 147 148 u32 SelLost; 148 149 u32 SelConn;