aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_ct.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 23:32:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 23:32:16 -0400
commit6ec129c3a2f8b38bc37e42348470ccfcb7460146 (patch)
tree3f11a99b9680728951b371fe12b5e01b6fc545a4 /drivers/scsi/lpfc/lpfc_ct.c
parent01e73be3c8f254ef19d787f9b6757468175267eb (diff)
parentb64ddf96456cde17be22bf74cafed381a29d58ba (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (58 commits) [SCSI] zfcp: clear boxed flag on unit reopen. [SCSI] zfcp: clear adapter failed flag if an fsf request times out. [SCSI] zfcp: rework request ID management. [SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI [SCSI] zfcp: Locking for req_no and req_seq_no [SCSI] zfcp: print S_ID and D_ID with 3 bytes [SCSI] ipr: Use PCI-E reset API for new ipr adapter [SCSI] qla2xxx: Update version number to 8.01.07-k7. [SCSI] qla2xxx: Add MSI support. [SCSI] qla2xxx: Correct pci_set_msi() usage semantics. [SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed. [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings. [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization. [SCSI] zfcp: Stop system after memory corruption [SCSI] mesh: cleanup variable usage in interrupt handler [SCSI] megaraid: replace yield() with cond_resched() [SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n [SCSI] aacraid: correct SUN products to README [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers [SCSI] aacraid: kexec fix (reset interrupt handler) ...
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index a51a41b7f15d..34a9e3bb2614 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -1,7 +1,7 @@
1/******************************************************************* 1/*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for * 2 * This file is part of the Emulex Linux Device Driver for *
3 * Fibre Channel Host Bus Adapters. * 3 * Fibre Channel Host Bus Adapters. *
4 * Copyright (C) 2004-2006 Emulex. All rights reserved. * 4 * Copyright (C) 2004-2007 Emulex. All rights reserved. *
5 * EMULEX and SLI are trademarks of Emulex. * 5 * EMULEX and SLI are trademarks of Emulex. *
6 * www.emulex.com * 6 * www.emulex.com *
7 * * 7 * *
@@ -334,21 +334,22 @@ lpfc_ns_rsp(struct lpfc_hba * phba, struct lpfc_dmabuf * mp, uint32_t Size)
334 334
335 lpfc_set_disctmo(phba); 335 lpfc_set_disctmo(phba);
336 336
337 Cnt = Size > FCELSSIZE ? FCELSSIZE : Size;
338 337
339 list_add_tail(&head, &mp->list); 338 list_add_tail(&head, &mp->list);
340 list_for_each_entry_safe(mp, next_mp, &head, list) { 339 list_for_each_entry_safe(mp, next_mp, &head, list) {
341 mlast = mp; 340 mlast = mp;
342 341
342 Cnt = Size > FCELSSIZE ? FCELSSIZE : Size;
343
343 Size -= Cnt; 344 Size -= Cnt;
344 345
345 if (!ctptr) 346 if (!ctptr) {
346 ctptr = (uint32_t *) mlast->virt; 347 ctptr = (uint32_t *) mlast->virt;
347 else 348 } else
348 Cnt -= 16; /* subtract length of CT header */ 349 Cnt -= 16; /* subtract length of CT header */
349 350
350 /* Loop through entire NameServer list of DIDs */ 351 /* Loop through entire NameServer list of DIDs */
351 while (Cnt) { 352 while (Cnt >= sizeof (uint32_t)) {
352 353
353 /* Get next DID from NameServer List */ 354 /* Get next DID from NameServer List */
354 CTentry = *ctptr++; 355 CTentry = *ctptr++;
@@ -442,10 +443,8 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
442 if (phba->fc_ns_retry < LPFC_MAX_NS_RETRY) { 443 if (phba->fc_ns_retry < LPFC_MAX_NS_RETRY) {
443 phba->fc_ns_retry++; 444 phba->fc_ns_retry++;
444 /* CT command is being retried */ 445 /* CT command is being retried */
445 ndlp = 446 ndlp = lpfc_findnode_did(phba, NameServer_DID);
446 lpfc_findnode_did(phba, NLP_SEARCH_UNMAPPED, 447 if (ndlp && ndlp->nlp_state == NLP_STE_UNMAPPED_NODE) {
447 NameServer_DID);
448 if (ndlp) {
449 if (lpfc_ns_cmd(phba, ndlp, SLI_CTNS_GID_FT) == 448 if (lpfc_ns_cmd(phba, ndlp, SLI_CTNS_GID_FT) ==
450 0) { 449 0) {
451 goto out; 450 goto out;
@@ -729,7 +728,7 @@ lpfc_cmpl_ct_cmd_fdmi(struct lpfc_hba * phba,
729 uint16_t fdmi_cmd = CTcmd->CommandResponse.bits.CmdRsp; 728 uint16_t fdmi_cmd = CTcmd->CommandResponse.bits.CmdRsp;
730 uint16_t fdmi_rsp = CTrsp->CommandResponse.bits.CmdRsp; 729 uint16_t fdmi_rsp = CTrsp->CommandResponse.bits.CmdRsp;
731 730
732 ndlp = lpfc_findnode_did(phba, NLP_SEARCH_ALL, FDMI_DID); 731 ndlp = lpfc_findnode_did(phba, FDMI_DID);
733 if (fdmi_rsp == be16_to_cpu(SLI_CT_RESPONSE_FS_RJT)) { 732 if (fdmi_rsp == be16_to_cpu(SLI_CT_RESPONSE_FS_RJT)) {
734 /* FDMI rsp failed */ 733 /* FDMI rsp failed */
735 lpfc_printf_log(phba, 734 lpfc_printf_log(phba,
@@ -1039,6 +1038,9 @@ lpfc_fdmi_cmd(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, int cmdcode)
1039 case LA_4GHZ_LINK: 1038 case LA_4GHZ_LINK:
1040 ae->un.PortSpeed = HBA_PORTSPEED_4GBIT; 1039 ae->un.PortSpeed = HBA_PORTSPEED_4GBIT;
1041 break; 1040 break;
1041 case LA_8GHZ_LINK:
1042 ae->un.PortSpeed = HBA_PORTSPEED_8GBIT;
1043 break;
1042 default: 1044 default:
1043 ae->un.PortSpeed = 1045 ae->un.PortSpeed =
1044 HBA_PORTSPEED_UNKNOWN; 1046 HBA_PORTSPEED_UNKNOWN;
@@ -1161,7 +1163,7 @@ lpfc_fdmi_tmo_handler(struct lpfc_hba *phba)
1161{ 1163{
1162 struct lpfc_nodelist *ndlp; 1164 struct lpfc_nodelist *ndlp;
1163 1165
1164 ndlp = lpfc_findnode_did(phba, NLP_SEARCH_ALL, FDMI_DID); 1166 ndlp = lpfc_findnode_did(phba, FDMI_DID);
1165 if (ndlp) { 1167 if (ndlp) {
1166 if (init_utsname()->nodename[0] != '\0') { 1168 if (init_utsname()->nodename[0] != '\0') {
1167 lpfc_fdmi_cmd(phba, ndlp, SLI_MGMT_DHBA); 1169 lpfc_fdmi_cmd(phba, ndlp, SLI_MGMT_DHBA);