diff options
author | Salyzyn, Mark <mark_salyzyn@adaptec.com> | 2007-03-21 13:49:47 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-03-21 14:03:52 -0400 |
commit | 802ae2f05b646c1e5f9e33cfe4c80cfa1452a0e3 (patch) | |
tree | 46bc8f6d789538abf7a5feed0a40e318a652e7d5 /drivers/scsi/aacraid | |
parent | 20235f35221472f1a127a5d5414f11091eb0a845 (diff) |
[SCSI] aacraid: cleanup and version stamp driver
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.
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 6 | ||||
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 4 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 7 |
3 files changed, 6 insertions, 11 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index f9deab686dc4..fc16fe0dfa84 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -365,7 +365,6 @@ static void get_container_name_callback(void *context, struct fib * fibptr) | |||
365 | struct scsi_cmnd * scsicmd; | 365 | struct scsi_cmnd * scsicmd; |
366 | 366 | ||
367 | scsicmd = (struct scsi_cmnd *) context; | 367 | scsicmd = (struct scsi_cmnd *) context; |
368 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; | ||
369 | 368 | ||
370 | if (!aac_valid_context(scsicmd, fibptr)) | 369 | if (!aac_valid_context(scsicmd, fibptr)) |
371 | return; | 370 | return; |
@@ -629,9 +628,9 @@ int aac_probe_container(struct aac_dev *dev, int cid) | |||
629 | if (_aac_probe_container(scsicmd, aac_probe_container_callback1) == 0) | 628 | if (_aac_probe_container(scsicmd, aac_probe_container_callback1) == 0) |
630 | while (scsicmd->device == scsidev) | 629 | while (scsicmd->device == scsidev) |
631 | schedule(); | 630 | schedule(); |
631 | kfree(scsidev); | ||
632 | status = scsicmd->SCp.Status; | 632 | status = scsicmd->SCp.Status; |
633 | kfree(scsicmd); | 633 | kfree(scsicmd); |
634 | kfree(scsidev); | ||
635 | return status; | 634 | return status; |
636 | } | 635 | } |
637 | 636 | ||
@@ -1321,7 +1320,6 @@ static void io_callback(void *context, struct fib * fibptr) | |||
1321 | u32 cid; | 1320 | u32 cid; |
1322 | 1321 | ||
1323 | scsicmd = (struct scsi_cmnd *) context; | 1322 | scsicmd = (struct scsi_cmnd *) context; |
1324 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; | ||
1325 | 1323 | ||
1326 | if (!aac_valid_context(scsicmd, fibptr)) | 1324 | if (!aac_valid_context(scsicmd, fibptr)) |
1327 | return; | 1325 | return; |
@@ -1571,7 +1569,6 @@ static void synchronize_callback(void *context, struct fib *fibptr) | |||
1571 | struct scsi_cmnd *cmd; | 1569 | struct scsi_cmnd *cmd; |
1572 | 1570 | ||
1573 | cmd = context; | 1571 | cmd = context; |
1574 | cmd->SCp.phase = AAC_OWNER_MIDLEVEL; | ||
1575 | 1572 | ||
1576 | if (!aac_valid_context(cmd, fibptr)) | 1573 | if (!aac_valid_context(cmd, fibptr)) |
1577 | return; | 1574 | return; |
@@ -2127,7 +2124,6 @@ static void aac_srb_callback(void *context, struct fib * fibptr) | |||
2127 | struct scsi_cmnd *scsicmd; | 2124 | struct scsi_cmnd *scsicmd; |
2128 | 2125 | ||
2129 | scsicmd = (struct scsi_cmnd *) context; | 2126 | scsicmd = (struct scsi_cmnd *) context; |
2130 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; | ||
2131 | 2127 | ||
2132 | if (!aac_valid_context(scsicmd, fibptr)) | 2128 | if (!aac_valid_context(scsicmd, fibptr)) |
2133 | return; | 2129 | return; |
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 2c0994b448d8..1771851db6ef 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -12,8 +12,8 @@ | |||
12 | *----------------------------------------------------------------------------*/ | 12 | *----------------------------------------------------------------------------*/ |
13 | 13 | ||
14 | #ifndef AAC_DRIVER_BUILD | 14 | #ifndef AAC_DRIVER_BUILD |
15 | # define AAC_DRIVER_BUILD 2423 | 15 | # define AAC_DRIVER_BUILD 2437 |
16 | # define AAC_DRIVER_BRANCH "-mh3" | 16 | # define AAC_DRIVER_BRANCH "-mh4" |
17 | #endif | 17 | #endif |
18 | #define MAXIMUM_NUM_CONTAINERS 32 | 18 | #define MAXIMUM_NUM_CONTAINERS 32 |
19 | 19 | ||
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 3cf3f6472e94..a5950c17d62b 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -260,7 +260,6 @@ static int aac_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd | |||
260 | (cmd->SCp.phase == AAC_OWNER_FIRMWARE)) | 260 | (cmd->SCp.phase == AAC_OWNER_FIRMWARE)) |
261 | return 0; /* Already owned by Adapter */ | 261 | return 0; /* Already owned by Adapter */ |
262 | } | 262 | } |
263 | cmd->scsi_done = done; | ||
264 | cmd->SCp.phase = AAC_OWNER_LOWLEVEL; | 263 | cmd->SCp.phase = AAC_OWNER_LOWLEVEL; |
265 | return (aac_scsi_cmd(cmd) ? FAILED : 0); | 264 | return (aac_scsi_cmd(cmd) ? FAILED : 0); |
266 | } | 265 | } |
@@ -461,15 +460,15 @@ static int aac_ioctl(struct scsi_device *sdev, int cmd, void __user * arg) | |||
461 | 460 | ||
462 | static int aac_eh_abort(struct scsi_cmnd* cmd) | 461 | static int aac_eh_abort(struct scsi_cmnd* cmd) |
463 | { | 462 | { |
464 | struct Scsi_Host * host = cmd->device->host; | 463 | struct scsi_device * dev = cmd->device; |
464 | struct Scsi_Host * host = dev->host; | ||
465 | struct aac_dev * aac = (struct aac_dev *)host->hostdata; | 465 | struct aac_dev * aac = (struct aac_dev *)host->hostdata; |
466 | int count; | 466 | int count; |
467 | int ret = FAILED; | 467 | int ret = FAILED; |
468 | 468 | ||
469 | printk(KERN_ERR "%s: Host adapter abort request (%d,%d,%d,%d)\n", | 469 | printk(KERN_ERR "%s: Host adapter abort request (%d,%d,%d,%d)\n", |
470 | AAC_DRIVERNAME, | 470 | AAC_DRIVERNAME, |
471 | cmd->device->host->host_no, sdev_channel(cmd->device), | 471 | host->host_no, sdev_channel(dev), sdev_id(dev), dev->lun); |
472 | sdev_id(cmd->device), cmd->device->lun); | ||
473 | switch (cmd->cmnd[0]) { | 472 | switch (cmd->cmnd[0]) { |
474 | case SERVICE_ACTION_IN: | 473 | case SERVICE_ACTION_IN: |
475 | if (!(aac->raw_io_interface) || | 474 | if (!(aac->raw_io_interface) || |