lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <NONAMEBXDvCeqTPcaWC00000d5d@nonameb.ptu.promise.com>
Date:	Mon, 28 Aug 2006 22:23:17 +0800
From:	"Ed Lin" <ed.lin@...mise.com>
To:	"linux-scsi" <linux-scsi@...r.kernel.org>
Cc:	"linux-kernel" <linux-kernel@...r.kernel.org>,
	"akpm" <akpm@...l.org>,
	"promise_linux" <promise_linux@...mise.com>,
	"james.Bottomley" <james.Bottomley@...elEye.com>,
	"jeff" <jeff@...zik.org>
Subject: [patch 1/3] stex: adjust command timeout in slave_config routine

From: "Ed Lin" <ed.lin@...mise.com>

- remove unsuitable waiting code and unnecessary handling code
  from reset routine

- adjust command timeout in slave_config routine to achieve intended
  effect of removed waiting code
---
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index fceae17..cb17415 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -519,6 +519,7 @@ stex_slave_config(struct scsi_device *sd
 {
 	sdev->use_10_for_rw = 1;
 	sdev->use_10_for_ms = 1;
+	sdev->timeout = 60 * HZ;
 	return 0;
 }
 
@@ -938,37 +939,11 @@ static void stex_hard_reset(struct st_hb
 static int stex_reset(struct scsi_cmnd *cmd)
 {
 	struct st_hba *hba;
-	int tag;
-	int i = 0;
 	unsigned long flags;
 	hba = (struct st_hba *) &cmd->device->host->hostdata[0];
 
-wait_cmds:
-	spin_lock_irqsave(hba->host->host_lock, flags);
-	for (tag = 0; tag < MU_MAX_REQUEST; tag++)
-		if ((hba->tag & (1 << tag)) && hba->ccb[tag].req != NULL)
-			break;
-	spin_unlock_irqrestore(hba->host->host_lock, flags);
-	if (tag < MU_MAX_REQUEST) {
-		ssleep(1);
-		if (++i < 10)
-			goto wait_cmds;
-	}
-
 	hba->mu_status = MU_STATE_RESETTING;
 
-	spin_lock_irqsave(hba->host->host_lock, flags);
-
-	for (tag = 0; tag < MU_MAX_REQUEST; tag++)
-		if ((hba->tag & (1 << tag)) && hba->ccb[tag].req != NULL) {
-			stex_free_tag((unsigned long *)&hba->tag, tag);
-			stex_unmap_sg(hba, hba->ccb[tag].cmd);
-			hba->ccb[tag].cmd->result = DID_RESET << 16;
-			hba->ccb[tag].cmd->scsi_done(hba->ccb[tag].cmd);
-		}
-
-	spin_unlock_irqrestore(hba->host->host_lock, flags);
-
 	if (hba->cardtype == st_shasta)
 		stex_hard_reset(hba);
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ