Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f274a02e authored by Hannes Reinecke's avatar Hannes Reinecke Committed by James Bottomley
Browse files

[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: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 50d14a70
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -521,7 +521,7 @@ dc390_StartSCSI( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_sr
	pACB->SelConn++;
	pACB->SelConn++;
	return 1;
	return 1;
    }
    }
    if (time_before (jiffies, pACB->pScsiHost->last_reset))
    if (time_before (jiffies, pACB->last_reset))
    {
    {
	DEBUG0(printk ("DC390: We were just reset and don't accept commands yet!\n"));
	DEBUG0(printk ("DC390: We were just reset and don't accept commands yet!\n"));
	return 1;
	return 1;
@@ -1863,7 +1863,7 @@ dc390_ScsiRstDetect( struct dc390_acb* pACB )
    /* delay half a second */
    /* delay half a second */
    udelay (1000);
    udelay (1000);
    DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
    DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
    pACB->pScsiHost->last_reset = jiffies + 5*HZ/2
    pACB->last_reset = jiffies + 5*HZ/2
		    + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY];
		    + HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY];
    pACB->Connected = 0;
    pACB->Connected = 0;


@@ -2048,7 +2048,7 @@ static int DC390_bus_reset (struct scsi_cmnd *cmd)


	dc390_ResetDevParam(pACB);
	dc390_ResetDevParam(pACB);
	mdelay(1);
	mdelay(1);
	pACB->pScsiHost->last_reset = jiffies + 3*HZ/2 
	pACB->last_reset = jiffies + 3*HZ/2
		+ HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY];
		+ HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY];


	DC390_write8(ScsiCmd, CLEAR_FIFO_CMD);
	DC390_write8(ScsiCmd, CLEAR_FIFO_CMD);
@@ -2383,7 +2383,7 @@ static void dc390_init_hw(struct dc390_acb *pACB, u8 index)
	if (pACB->Gmode2 & RST_SCSI_BUS) {
	if (pACB->Gmode2 & RST_SCSI_BUS) {
		dc390_ResetSCSIBus(pACB);
		dc390_ResetSCSIBus(pACB);
		udelay(1000);
		udelay(1000);
		shost->last_reset = jiffies + HZ/2 +
		pACB->last_reset = jiffies + HZ/2 +
			HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY];
			HZ * dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY];
	}
	}


@@ -2455,8 +2455,8 @@ static int dc390_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
	shost->irq = pdev->irq;
	shost->irq = pdev->irq;
	shost->base = io_port;
	shost->base = io_port;
	shost->unique_id = io_port;
	shost->unique_id = io_port;
	shost->last_reset = jiffies;


	pACB->last_reset = jiffies;
	pACB->pScsiHost = shost;
	pACB->pScsiHost = shost;
	pACB->IOPortBase = (u16) io_port;
	pACB->IOPortBase = (u16) io_port;
	pACB->IRQLevel = pdev->irq;
	pACB->IRQLevel = pdev->irq;
+1 −0
Original line number Original line Diff line number Diff line
@@ -143,6 +143,7 @@ u8 Ignore_IRQ; /* Not used */


struct pci_dev	*pdev;
struct pci_dev	*pdev;


unsigned long   last_reset;
unsigned long	Cmds;
unsigned long	Cmds;
u32		SelLost;
u32		SelLost;
u32		SelConn;
u32		SelConn;