diff options
author | Moore, Eric <Eric.Moore@lsil.com> | 2006-04-21 18:14:35 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-25 19:07:32 -0400 |
commit | 65207fedcf57dcb854a3ebb9da43c745106fe8d5 (patch) | |
tree | fce7ca7526448abd0be4ae59423d11fb842611e5 /drivers/message/fusion/mptbase.h | |
parent | bd23e94cd70f18700fc366451a8f1427e56ed137 (diff) |
[SCSI] - fusion - mptfc bug fix's to prevent deadlock situations
mptbase.h
bump version number to 3.03.09
remove unneeded flags
define workq and remove old fc specific locks
mptbase.c
initialize new lock and don't initialize two removed locks
mptscsih.c
when firmware reports target is no longer there, return
DID_REQUEUE for fc hosts so that i/o doesn't get killed until
the transport has an opportunity to manage the loss via its
dev loss timer
when the "eh_abort" routine is called, check to see if the
driver has the command or not before looking to see if a reset
is pending. James Smart and I talked about this and believe
that the API for this routine is: if driver doesn't have
command, return SUCCESS. This change helps prevent a target
from being taken offline. SUCCESS is returned because it's
likely that the command completed after error recovery timed
it out but before it could be aborted.
provide a routine to queue work to newly created workq, and
use it.
remove "ioc" from mptscsih_abort() it was only used one time.
the other references were via hd->ioc, so I just moved it....
net change in references to ioc via hd->ioc is zero
move hd->resetPending test and hd->timeouts increment to after
the test for whether the command to be aborted remains known
to the driver
Make certain that the workq exists before queuing work to it.
mptfc.c
no longer need to lock rport data structures as I was able to
single thread the code! I fixed up the debug code to
eliminate compilation messages due to type mismatch in the
printk. Got rid of some no longer needed rport flags.
Initialize and destroy the workq used for the rescan work.
simplify the logic regarding the increment of
fc_rescan_work_count. use post increment and test for zero
vs. pre increment and test for one; eliminate work_count
variable: queue_work can be called with the work_lock held as
it doesn't sleep
Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r-- | drivers/message/fusion/mptbase.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index be7e8501b53c..f673cca507e1 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -76,8 +76,8 @@ | |||
76 | #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR | 76 | #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #define MPT_LINUX_VERSION_COMMON "3.03.08" | 79 | #define MPT_LINUX_VERSION_COMMON "3.03.09" |
80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.08" | 80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.09" |
81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" | 81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" |
82 | 82 | ||
83 | #define show_mptmod_ver(s,ver) \ | 83 | #define show_mptmod_ver(s,ver) \ |
@@ -489,7 +489,6 @@ typedef struct _RaidCfgData { | |||
489 | 489 | ||
490 | #define MPT_RPORT_INFO_FLAGS_REGISTERED 0x01 /* rport registered */ | 490 | #define MPT_RPORT_INFO_FLAGS_REGISTERED 0x01 /* rport registered */ |
491 | #define MPT_RPORT_INFO_FLAGS_MISSING 0x02 /* missing from DevPage0 scan */ | 491 | #define MPT_RPORT_INFO_FLAGS_MISSING 0x02 /* missing from DevPage0 scan */ |
492 | #define MPT_RPORT_INFO_FLAGS_MAPPED_VDEV 0x04 /* target mapped in vdev */ | ||
493 | 492 | ||
494 | /* | 493 | /* |
495 | * data allocated for each fc rport device | 494 | * data allocated for each fc rport device |
@@ -501,7 +500,6 @@ struct mptfc_rport_info | |||
501 | struct scsi_target *starget; | 500 | struct scsi_target *starget; |
502 | FCDevicePage0_t pg0; | 501 | FCDevicePage0_t pg0; |
503 | u8 flags; | 502 | u8 flags; |
504 | u8 remap_needed; | ||
505 | }; | 503 | }; |
506 | 504 | ||
507 | /* | 505 | /* |
@@ -628,11 +626,11 @@ typedef struct _MPT_ADAPTER | |||
628 | struct work_struct mptscsih_persistTask; | 626 | struct work_struct mptscsih_persistTask; |
629 | 627 | ||
630 | struct list_head fc_rports; | 628 | struct list_head fc_rports; |
631 | spinlock_t fc_rport_lock; /* list and ri flags */ | ||
632 | spinlock_t fc_rescan_work_lock; | 629 | spinlock_t fc_rescan_work_lock; |
633 | int fc_rescan_work_count; | 630 | int fc_rescan_work_count; |
634 | struct work_struct fc_rescan_work; | 631 | struct work_struct fc_rescan_work; |
635 | 632 | char fc_rescan_work_q_name[KOBJ_NAME_LEN]; | |
633 | struct workqueue_struct *fc_rescan_work_q; | ||
636 | } MPT_ADAPTER; | 634 | } MPT_ADAPTER; |
637 | 635 | ||
638 | /* | 636 | /* |