diff options
author | Mark Haverkamp <markh@osdl.org> | 2005-10-24 13:52:22 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-10-28 12:41:53 -0400 |
commit | 8e0c5ebde82b08f6d996e11983890fc4cc085fab (patch) | |
tree | 3ba38ff8e7b9203b47d038c215d9c7d623c250ba /drivers/scsi/aacraid/aachba.c | |
parent | 38a9a621aba953ddb8051547e98c10ec3c741312 (diff) |
[SCSI] aacraid: Newer adapter communication iterface support
Received from Mark Salyzyn.
This patch adds the 'new comm' interface, which modern AAC based
adapters that are less than a year old support in the name of much
improved performance. These modern adapters support both the legacy and
the 'new comm' interfaces.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/aachba.c')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index a913196459d5..acc3d9209879 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -359,15 +359,6 @@ int aac_get_containers(struct aac_dev *dev) | |||
359 | return status; | 359 | return status; |
360 | } | 360 | } |
361 | 361 | ||
362 | static void aac_io_done(struct scsi_cmnd * scsicmd) | ||
363 | { | ||
364 | unsigned long cpu_flags; | ||
365 | struct Scsi_Host *host = scsicmd->device->host; | ||
366 | spin_lock_irqsave(host->host_lock, cpu_flags); | ||
367 | scsicmd->scsi_done(scsicmd); | ||
368 | spin_unlock_irqrestore(host->host_lock, cpu_flags); | ||
369 | } | ||
370 | |||
371 | static void aac_internal_transfer(struct scsi_cmnd *scsicmd, void *data, unsigned int offset, unsigned int len) | 362 | static void aac_internal_transfer(struct scsi_cmnd *scsicmd, void *data, unsigned int offset, unsigned int len) |
372 | { | 363 | { |
373 | void *buf; | 364 | void *buf; |
@@ -424,7 +415,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr) | |||
424 | 415 | ||
425 | fib_complete(fibptr); | 416 | fib_complete(fibptr); |
426 | fib_free(fibptr); | 417 | fib_free(fibptr); |
427 | aac_io_done(scsicmd); | 418 | scsicmd->scsi_done(scsicmd); |
428 | } | 419 | } |
429 | 420 | ||
430 | /** | 421 | /** |
@@ -988,7 +979,7 @@ static void io_callback(void *context, struct fib * fibptr) | |||
988 | fib_complete(fibptr); | 979 | fib_complete(fibptr); |
989 | fib_free(fibptr); | 980 | fib_free(fibptr); |
990 | 981 | ||
991 | aac_io_done(scsicmd); | 982 | scsicmd->scsi_done(scsicmd); |
992 | } | 983 | } |
993 | 984 | ||
994 | static int aac_read(struct scsi_cmnd * scsicmd, int cid) | 985 | static int aac_read(struct scsi_cmnd * scsicmd, int cid) |
@@ -1167,7 +1158,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1167 | * For some reason, the Fib didn't queue, return QUEUE_FULL | 1158 | * For some reason, the Fib didn't queue, return QUEUE_FULL |
1168 | */ | 1159 | */ |
1169 | scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL; | 1160 | scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL; |
1170 | aac_io_done(scsicmd); | 1161 | scsicmd->scsi_done(scsicmd); |
1171 | fib_complete(cmd_fibcontext); | 1162 | fib_complete(cmd_fibcontext); |
1172 | fib_free(cmd_fibcontext); | 1163 | fib_free(cmd_fibcontext); |
1173 | return 0; | 1164 | return 0; |
@@ -1239,7 +1230,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) | |||
1239 | */ | 1230 | */ |
1240 | if (!(cmd_fibcontext = fib_alloc(dev))) { | 1231 | if (!(cmd_fibcontext = fib_alloc(dev))) { |
1241 | scsicmd->result = DID_ERROR << 16; | 1232 | scsicmd->result = DID_ERROR << 16; |
1242 | aac_io_done(scsicmd); | 1233 | scsicmd->scsi_done(scsicmd); |
1243 | return 0; | 1234 | return 0; |
1244 | } | 1235 | } |
1245 | fib_init(cmd_fibcontext); | 1236 | fib_init(cmd_fibcontext); |
@@ -1336,7 +1327,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) | |||
1336 | * For some reason, the Fib didn't queue, return QUEUE_FULL | 1327 | * For some reason, the Fib didn't queue, return QUEUE_FULL |
1337 | */ | 1328 | */ |
1338 | scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL; | 1329 | scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL; |
1339 | aac_io_done(scsicmd); | 1330 | scsicmd->scsi_done(scsicmd); |
1340 | 1331 | ||
1341 | fib_complete(cmd_fibcontext); | 1332 | fib_complete(cmd_fibcontext); |
1342 | fib_free(cmd_fibcontext); | 1333 | fib_free(cmd_fibcontext); |
@@ -1380,7 +1371,7 @@ static void synchronize_callback(void *context, struct fib *fibptr) | |||
1380 | 1371 | ||
1381 | fib_complete(fibptr); | 1372 | fib_complete(fibptr); |
1382 | fib_free(fibptr); | 1373 | fib_free(fibptr); |
1383 | aac_io_done(cmd); | 1374 | cmd->scsi_done(cmd); |
1384 | } | 1375 | } |
1385 | 1376 | ||
1386 | static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) | 1377 | static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) |
@@ -2097,7 +2088,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr) | |||
2097 | 2088 | ||
2098 | fib_complete(fibptr); | 2089 | fib_complete(fibptr); |
2099 | fib_free(fibptr); | 2090 | fib_free(fibptr); |
2100 | aac_io_done(scsicmd); | 2091 | scsicmd->scsi_done(scsicmd); |
2101 | } | 2092 | } |
2102 | 2093 | ||
2103 | /** | 2094 | /** |