All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
To: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH] aacraid: cleanup and version stamp driver
Date: Wed, 21 Mar 2007 13:49:47 -0400	[thread overview]
Message-ID: <AE4F746F2AECFC4DA4AADD66A1DFEF0172BE93@otce2k301.adaptec.com> (raw)
In-Reply-To: <AE4F746F2AECFC4DA4AADD66A1DFEF01400B18@otce2k301.adaptec.com>

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

There is some residual cleanup of the last series of patches and the
need to bump the revision number to draw the line in the sand.

The cmd->SCp.phase is set in the aac_valid_context routine, then set
again to the same value following it's return. The cmd->scsi_done is set
twice in the aac_queuecommand routine. Free up the scsidev FILO in
aac_probe_container as it is not needed further down the function in any
case. Improve the efficiency of the abort handler kernel print
parameters. Bump revision number of driver to approximate the equivalent
in the Adaptec supplied version.

This attached patch is against current scsi-misc-2.6

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>

---

Sincerely -- Mark Salyzyn

[-- Attachment #2: aacraid_cleanup_and_version.patch --]
[-- Type: application/octet-stream, Size: 2795 bytes --]

diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c	2007-03-21 13:23:19.345260702 -0400
+++ b/drivers/scsi/aacraid/aachba.c	2007-03-21 13:37:32.995408010 -0400
@@ -365,7 +365,6 @@
 	struct scsi_cmnd * scsicmd;
 
 	scsicmd = (struct scsi_cmnd *) context;
-	scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL;
 
 	if (!aac_valid_context(scsicmd, fibptr))
 		return;
@@ -629,9 +628,9 @@
 	if (_aac_probe_container(scsicmd, aac_probe_container_callback1) == 0)
 		while (scsicmd->device == scsidev)
 			schedule();
+	kfree(scsidev);
 	status = scsicmd->SCp.Status;
 	kfree(scsicmd);
-	kfree(scsidev);
 	return status;
 }
 
@@ -1321,7 +1320,6 @@
 	u32 cid;
 
 	scsicmd = (struct scsi_cmnd *) context;
-	scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL;
 
 	if (!aac_valid_context(scsicmd, fibptr))
 		return;
@@ -1571,7 +1569,6 @@
 	struct scsi_cmnd *cmd;
 
 	cmd = context;
-	cmd->SCp.phase = AAC_OWNER_MIDLEVEL;
 
 	if (!aac_valid_context(cmd, fibptr))
 		return;
@@ -2127,7 +2124,6 @@
 	struct scsi_cmnd *scsicmd;
 
 	scsicmd = (struct scsi_cmnd *) context;
-	scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL;
 
 	if (!aac_valid_context(scsicmd, fibptr))
 		return;
diff -ru a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
--- a/drivers/scsi/aacraid/aacraid.h	2007-03-21 13:23:19.346260576 -0400
+++ b/drivers/scsi/aacraid/aacraid.h	2007-03-21 13:38:04.094421971 -0400
@@ -12,8 +12,8 @@
  *----------------------------------------------------------------------------*/
 
 #ifndef AAC_DRIVER_BUILD
-# define AAC_DRIVER_BUILD 2423
-# define AAC_DRIVER_BRANCH "-mh3"
+# define AAC_DRIVER_BUILD 2437
+# define AAC_DRIVER_BRANCH "-mh4"
 #endif
 #define MAXIMUM_NUM_CONTAINERS	32
 
diff -ru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c	2007-03-21 13:23:19.347260450 -0400
+++ b/drivers/scsi/aacraid/linit.c	2007-03-21 13:38:04.095421842 -0400
@@ -260,7 +260,6 @@
 		    (cmd->SCp.phase == AAC_OWNER_FIRMWARE))
 			return 0; /* Already owned by Adapter */
 	}
-	cmd->scsi_done = done;
 	cmd->SCp.phase = AAC_OWNER_LOWLEVEL;
 	return (aac_scsi_cmd(cmd) ? FAILED : 0);
 } 
@@ -461,15 +460,15 @@
 
 static int aac_eh_abort(struct scsi_cmnd* cmd)
 {
-	struct Scsi_Host * host = cmd->device->host;
+	struct scsi_device * dev = cmd->device;
+	struct Scsi_Host * host = dev->host;
 	struct aac_dev * aac = (struct aac_dev *)host->hostdata;
 	int count;
 	int ret = FAILED;
 
 	printk(KERN_ERR "%s: Host adapter abort request (%d,%d,%d,%d)\n",
 		AAC_DRIVERNAME,
-		cmd->device->host->host_no, sdev_channel(cmd->device),
-		sdev_id(cmd->device), cmd->device->lun);
+		host->host_no, sdev_channel(dev), sdev_id(dev), dev->lun);
 	switch (cmd->cmnd[0]) {
 	case SERVICE_ACTION_IN:
 		if (!(aac->raw_io_interface) ||

       reply	other threads:[~2007-03-21 17:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AE4F746F2AECFC4DA4AADD66A1DFEF01400B18@otce2k301.adaptec.com>
2007-03-21 17:49 ` Salyzyn, Mark [this message]
2007-03-21 18:49   ` [PATCH] aacraid: cleanup and version stamp driver Boaz Harrosh
2007-03-21 19:10     ` Salyzyn, Mark
2007-03-21 19:43   ` [PATCH] aacraid: Add likely() and unlikely() Salyzyn, Mark
2007-03-22  9:24     ` Arjan van de Ven
2007-03-26 13:21       ` [PATCH] aacraid: Add likely() and unlikely() Take 2 Salyzyn, Mark
2007-03-27 15:51         ` [PATCH] aacraid: Add SMC and SUN products to README Salyzyn, Mark
2007-03-27 19:07           ` [PATCH] aacraid: resolve compiler warnings using ptrdiff_t Salyzyn, Mark
2007-03-28 13:22             ` [PATCH] aacraid: remove unused or deprecated firmware constants Salyzyn, Mark
2007-03-28 17:44               ` [PATCH] aacraid: fix print of Firmware Build Date and add TSID Salyzyn, Mark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AE4F746F2AECFC4DA4AADD66A1DFEF0172BE93@otce2k301.adaptec.com \
    --to=mark_salyzyn@adaptec.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.