diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 18:15:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 18:15:15 -0400 |
commit | 03da30986793385af57eeca3296253c887b742e6 (patch) | |
tree | 9c46dbe51c9d0856990649dd917ab45474b7be87 /drivers/message/fusion/mptctl.c | |
parent | 6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7 (diff) | |
parent | 339f4f4eab80caa6cf0d39fb057ad6ddb84ba91e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (276 commits)
[SCSI] zfcp: Trigger logging in the FCP channel on qdio error conditions
[SCSI] zfcp: Introduce experimental support for DIF/DIX
[SCSI] zfcp: Enable data division support for FCP devices
[SCSI] zfcp: Prevent access on uninitialized memory.
[SCSI] zfcp: Post events through FC transport class
[SCSI] zfcp: Cleanup QDIO attachment and improve processing.
[SCSI] zfcp: Cleanup function parameters for sbal value.
[SCSI] zfcp: Use correct width for timer_interval field
[SCSI] zfcp: Remove SCSI device when removing unit
[SCSI] zfcp: Use memdup_user and kstrdup
[SCSI] zfcp: Fix retry after failed "open port" erp action
[SCSI] zfcp: Fail erp after timeout
[SCSI] zfcp: Use forced_reopen in terminate_rport_io callback
[SCSI] zfcp: Register SCSI devices after successful fc_remote_port_add
[SCSI] zfcp: Do not try "forced close" when port is already closed
[SCSI] zfcp: Do not unblock rport from REOPEN_PORT_FORCED
[SCSI] sd: add support for runtime PM
[SCSI] implement runtime Power Management
[SCSI] convert to the new PM framework
[SCSI] Unify SAM_ and SAM_STAT_ macros
...
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r-- | drivers/message/fusion/mptctl.c | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index f06b29193b4e..d8ddfdf8be14 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -261,10 +261,16 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply) | |||
261 | /* We are done, issue wake up | 261 | /* We are done, issue wake up |
262 | */ | 262 | */ |
263 | if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_PENDING) { | 263 | if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_PENDING) { |
264 | if (req->u.hdr.Function == MPI_FUNCTION_SCSI_TASK_MGMT) | 264 | if (req->u.hdr.Function == MPI_FUNCTION_SCSI_TASK_MGMT) { |
265 | mpt_clear_taskmgmt_in_progress_flag(ioc); | 265 | mpt_clear_taskmgmt_in_progress_flag(ioc); |
266 | ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING; | 266 | ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING; |
267 | complete(&ioc->ioctl_cmds.done); | 267 | complete(&ioc->ioctl_cmds.done); |
268 | if (ioc->bus_type == SAS) | ||
269 | ioc->schedule_target_reset(ioc); | ||
270 | } else { | ||
271 | ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING; | ||
272 | complete(&ioc->ioctl_cmds.done); | ||
273 | } | ||
268 | } | 274 | } |
269 | 275 | ||
270 | out_continuation: | 276 | out_continuation: |
@@ -298,6 +304,8 @@ mptctl_taskmgmt_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
298 | mpt_clear_taskmgmt_in_progress_flag(ioc); | 304 | mpt_clear_taskmgmt_in_progress_flag(ioc); |
299 | ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING; | 305 | ioc->taskmgmt_cmds.status &= ~MPT_MGMT_STATUS_PENDING; |
300 | complete(&ioc->taskmgmt_cmds.done); | 306 | complete(&ioc->taskmgmt_cmds.done); |
307 | if (ioc->bus_type == SAS) | ||
308 | ioc->schedule_target_reset(ioc); | ||
301 | return 1; | 309 | return 1; |
302 | } | 310 | } |
303 | return 0; | 311 | return 0; |
@@ -946,9 +954,12 @@ retry_wait: | |||
946 | mpt_free_msg_frame(iocp, mf); | 954 | mpt_free_msg_frame(iocp, mf); |
947 | goto fwdl_out; | 955 | goto fwdl_out; |
948 | } | 956 | } |
949 | if (!timeleft) | 957 | if (!timeleft) { |
958 | printk(MYIOC_s_WARN_FMT | ||
959 | "FW download timeout, doorbell=0x%08x\n", | ||
960 | iocp->name, mpt_GetIocState(iocp, 0)); | ||
950 | mptctl_timeout_expired(iocp, mf); | 961 | mptctl_timeout_expired(iocp, mf); |
951 | else | 962 | } else |
952 | goto retry_wait; | 963 | goto retry_wait; |
953 | goto fwdl_out; | 964 | goto fwdl_out; |
954 | } | 965 | } |
@@ -2293,6 +2304,10 @@ retry_wait: | |||
2293 | goto done_free_mem; | 2304 | goto done_free_mem; |
2294 | } | 2305 | } |
2295 | if (!timeleft) { | 2306 | if (!timeleft) { |
2307 | printk(MYIOC_s_WARN_FMT | ||
2308 | "mpt cmd timeout, doorbell=0x%08x" | ||
2309 | " function=0x%x\n", | ||
2310 | ioc->name, mpt_GetIocState(ioc, 0), function); | ||
2296 | if (function == MPI_FUNCTION_SCSI_TASK_MGMT) | 2311 | if (function == MPI_FUNCTION_SCSI_TASK_MGMT) |
2297 | mutex_unlock(&ioc->taskmgmt_cmds.mutex); | 2312 | mutex_unlock(&ioc->taskmgmt_cmds.mutex); |
2298 | mptctl_timeout_expired(ioc, mf); | 2313 | mptctl_timeout_expired(ioc, mf); |
@@ -2600,9 +2615,12 @@ retry_wait: | |||
2600 | mpt_free_msg_frame(ioc, mf); | 2615 | mpt_free_msg_frame(ioc, mf); |
2601 | goto out; | 2616 | goto out; |
2602 | } | 2617 | } |
2603 | if (!timeleft) | 2618 | if (!timeleft) { |
2619 | printk(MYIOC_s_WARN_FMT | ||
2620 | "HOST INFO command timeout, doorbell=0x%08x\n", | ||
2621 | ioc->name, mpt_GetIocState(ioc, 0)); | ||
2604 | mptctl_timeout_expired(ioc, mf); | 2622 | mptctl_timeout_expired(ioc, mf); |
2605 | else | 2623 | } else |
2606 | goto retry_wait; | 2624 | goto retry_wait; |
2607 | goto out; | 2625 | goto out; |
2608 | } | 2626 | } |
@@ -3000,7 +3018,8 @@ static int __init mptctl_init(void) | |||
3000 | * Install our handler | 3018 | * Install our handler |
3001 | */ | 3019 | */ |
3002 | ++where; | 3020 | ++where; |
3003 | mptctl_id = mpt_register(mptctl_reply, MPTCTL_DRIVER); | 3021 | mptctl_id = mpt_register(mptctl_reply, MPTCTL_DRIVER, |
3022 | "mptctl_reply"); | ||
3004 | if (!mptctl_id || mptctl_id >= MPT_MAX_PROTOCOL_DRIVERS) { | 3023 | if (!mptctl_id || mptctl_id >= MPT_MAX_PROTOCOL_DRIVERS) { |
3005 | printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n"); | 3024 | printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n"); |
3006 | misc_deregister(&mptctl_miscdev); | 3025 | misc_deregister(&mptctl_miscdev); |
@@ -3008,7 +3027,8 @@ static int __init mptctl_init(void) | |||
3008 | goto out_fail; | 3027 | goto out_fail; |
3009 | } | 3028 | } |
3010 | 3029 | ||
3011 | mptctl_taskmgmt_id = mpt_register(mptctl_taskmgmt_reply, MPTCTL_DRIVER); | 3030 | mptctl_taskmgmt_id = mpt_register(mptctl_taskmgmt_reply, MPTCTL_DRIVER, |
3031 | "mptctl_taskmgmt_reply"); | ||
3012 | if (!mptctl_taskmgmt_id || mptctl_taskmgmt_id >= MPT_MAX_PROTOCOL_DRIVERS) { | 3032 | if (!mptctl_taskmgmt_id || mptctl_taskmgmt_id >= MPT_MAX_PROTOCOL_DRIVERS) { |
3013 | printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n"); | 3033 | printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n"); |
3014 | mpt_deregister(mptctl_id); | 3034 | mpt_deregister(mptctl_id); |