diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 19:54:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 19:54:31 -0400 |
commit | 961cde93dee2658000ead32abffb8ddf0727abe0 (patch) | |
tree | 2419e204132abe2ec2bb7f08bd20042573cc9bd6 /drivers/scsi/libiscsi.c | |
parent | f82c37e7bb4c4d9b6a476c642d5c2d2efbd6f240 (diff) | |
parent | 0d9dc7c8b9b7fa0f53647423b41056ee1beed735 (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: (69 commits)
[SCSI] scsi_transport_fc: Fix synchronization issue while deleting vport
[SCSI] bfa: Update the driver version to 2.1.2.1.
[SCSI] bfa: Remove unused header files and did some cleanup.
[SCSI] bfa: Handle SCSI IO underrun case.
[SCSI] bfa: FCS and include file changes.
[SCSI] bfa: Modified the portstats get/clear logic
[SCSI] bfa: Replace bfa_get_attr() with specific APIs
[SCSI] bfa: New portlog entries for events (FIP/FLOGI/FDISC/LOGO).
[SCSI] bfa: Rename pport to fcport in BFA FCS.
[SCSI] bfa: IOC fixes, check for IOC down condition.
[SCSI] bfa: In MSIX mode, ignore spurious RME interrupts when FCoE ports are in FW mismatch state.
[SCSI] bfa: Fix Command Queue (CPE) full condition check and ack CPE interrupt.
[SCSI] bfa: IOC recovery fix in fcmode.
[SCSI] bfa: AEN and byte alignment fixes.
[SCSI] bfa: Introduce a link notification state machine.
[SCSI] bfa: Added firmware save clear feature for BFA driver.
[SCSI] bfa: FCS authentication related changes.
[SCSI] bfa: PCI VPD, FIP and include file changes.
[SCSI] bfa: Fix to copy fpma MAC when requested by user space application.
[SCSI] bfa: RPORT state machine: direct attach mode fix.
...
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r-- | drivers/scsi/libiscsi.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 703eb6a88790..685eaec53218 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -2338,7 +2338,7 @@ EXPORT_SYMBOL_GPL(iscsi_session_recovery_timedout); | |||
2338 | * This function will wait for a relogin, session termination from | 2338 | * This function will wait for a relogin, session termination from |
2339 | * userspace, or a recovery/replacement timeout. | 2339 | * userspace, or a recovery/replacement timeout. |
2340 | */ | 2340 | */ |
2341 | static int iscsi_eh_session_reset(struct scsi_cmnd *sc) | 2341 | int iscsi_eh_session_reset(struct scsi_cmnd *sc) |
2342 | { | 2342 | { |
2343 | struct iscsi_cls_session *cls_session; | 2343 | struct iscsi_cls_session *cls_session; |
2344 | struct iscsi_session *session; | 2344 | struct iscsi_session *session; |
@@ -2389,6 +2389,7 @@ failed: | |||
2389 | mutex_unlock(&session->eh_mutex); | 2389 | mutex_unlock(&session->eh_mutex); |
2390 | return SUCCESS; | 2390 | return SUCCESS; |
2391 | } | 2391 | } |
2392 | EXPORT_SYMBOL_GPL(iscsi_eh_session_reset); | ||
2392 | 2393 | ||
2393 | static void iscsi_prep_tgt_reset_pdu(struct scsi_cmnd *sc, struct iscsi_tm *hdr) | 2394 | static void iscsi_prep_tgt_reset_pdu(struct scsi_cmnd *sc, struct iscsi_tm *hdr) |
2394 | { | 2395 | { |
@@ -2403,8 +2404,7 @@ static void iscsi_prep_tgt_reset_pdu(struct scsi_cmnd *sc, struct iscsi_tm *hdr) | |||
2403 | * iscsi_eh_target_reset - reset target | 2404 | * iscsi_eh_target_reset - reset target |
2404 | * @sc: scsi command | 2405 | * @sc: scsi command |
2405 | * | 2406 | * |
2406 | * This will attempt to send a warm target reset. If that fails | 2407 | * This will attempt to send a warm target reset. |
2407 | * then we will drop the session and attempt ERL0 recovery. | ||
2408 | */ | 2408 | */ |
2409 | int iscsi_eh_target_reset(struct scsi_cmnd *sc) | 2409 | int iscsi_eh_target_reset(struct scsi_cmnd *sc) |
2410 | { | 2410 | { |
@@ -2476,12 +2476,27 @@ done: | |||
2476 | ISCSI_DBG_EH(session, "tgt %s reset result = %s\n", session->targetname, | 2476 | ISCSI_DBG_EH(session, "tgt %s reset result = %s\n", session->targetname, |
2477 | rc == SUCCESS ? "SUCCESS" : "FAILED"); | 2477 | rc == SUCCESS ? "SUCCESS" : "FAILED"); |
2478 | mutex_unlock(&session->eh_mutex); | 2478 | mutex_unlock(&session->eh_mutex); |
2479 | return rc; | ||
2480 | } | ||
2481 | EXPORT_SYMBOL_GPL(iscsi_eh_target_reset); | ||
2479 | 2482 | ||
2483 | /** | ||
2484 | * iscsi_eh_recover_target - reset target and possibly the session | ||
2485 | * @sc: scsi command | ||
2486 | * | ||
2487 | * This will attempt to send a warm target reset. If that fails, | ||
2488 | * we will escalate to ERL0 session recovery. | ||
2489 | */ | ||
2490 | int iscsi_eh_recover_target(struct scsi_cmnd *sc) | ||
2491 | { | ||
2492 | int rc; | ||
2493 | |||
2494 | rc = iscsi_eh_target_reset(sc); | ||
2480 | if (rc == FAILED) | 2495 | if (rc == FAILED) |
2481 | rc = iscsi_eh_session_reset(sc); | 2496 | rc = iscsi_eh_session_reset(sc); |
2482 | return rc; | 2497 | return rc; |
2483 | } | 2498 | } |
2484 | EXPORT_SYMBOL_GPL(iscsi_eh_target_reset); | 2499 | EXPORT_SYMBOL_GPL(iscsi_eh_recover_target); |
2485 | 2500 | ||
2486 | /* | 2501 | /* |
2487 | * Pre-allocate a pool of @max items of @item_size. By default, the pool | 2502 | * Pre-allocate a pool of @max items of @item_size. By default, the pool |