aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptfc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 10:19:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 10:19:18 -0400
commit33cf23b0a535475aead57707cb9f4fe135a93544 (patch)
tree67e14f77f0eeab847a26a6cbfcb44eecb5fa2fda /drivers/message/fusion/mptfc.c
parent7a9b149212f3716c598afe973b6261fd58453b7a (diff)
parent95bb335c0ebe96afe926387a1ef3a096bd884a82 (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: (182 commits) [SCSI] aacraid: add an ifdef'd device delete case instead of taking the device offline [SCSI] aacraid: prohibit access to array container space [SCSI] aacraid: add support for handling ATA pass-through commands. [SCSI] aacraid: expose physical devices for models with newer firmware [SCSI] aacraid: respond automatically to volumes added by config tool [SCSI] fcoe: fix fcoe module ref counting [SCSI] libfcoe: FIP Keep-Alive messages for VPorts are sent with incorrect port_id and wwn [SCSI] libfcoe: Fix incorrect MAC address clearing [SCSI] fcoe: fix a circular locking issue with rtnl and sysfs mutex [SCSI] libfc: Move the port_id into lport [SCSI] fcoe: move link speed checking into its own routine [SCSI] libfc: Remove extra pointer check [SCSI] libfc: Remove unused fc_get_host_port_type [SCSI] fcoe: fixes wrong error exit in fcoe_create [SCSI] libfc: set seq_id for incoming sequence [SCSI] qla2xxx: Updates to ISP82xx support. [SCSI] qla2xxx: Optionally disable target reset. [SCSI] qla2xxx: ensure flash operation and host reset via sg_reset are mutually exclusive [SCSI] qla2xxx: Silence bogus warning by gcc for wrap and did. [SCSI] qla2xxx: T10 DIF support added. ...
Diffstat (limited to 'drivers/message/fusion/mptfc.c')
-rw-r--r--drivers/message/fusion/mptfc.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 33f7256055b1..b5f03ad81568 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -482,6 +482,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0)
482 if (vtarget) { 482 if (vtarget) {
483 vtarget->id = pg0->CurrentTargetID; 483 vtarget->id = pg0->CurrentTargetID;
484 vtarget->channel = pg0->CurrentBus; 484 vtarget->channel = pg0->CurrentBus;
485 vtarget->deleted = 0;
485 } 486 }
486 } 487 }
487 *((struct mptfc_rport_info **)rport->dd_data) = ri; 488 *((struct mptfc_rport_info **)rport->dd_data) = ri;
@@ -1092,6 +1093,8 @@ mptfc_setup_reset(struct work_struct *work)
1092 container_of(work, MPT_ADAPTER, fc_setup_reset_work); 1093 container_of(work, MPT_ADAPTER, fc_setup_reset_work);
1093 u64 pn; 1094 u64 pn;
1094 struct mptfc_rport_info *ri; 1095 struct mptfc_rport_info *ri;
1096 struct scsi_target *starget;
1097 VirtTarget *vtarget;
1095 1098
1096 /* reset about to happen, delete (block) all rports */ 1099 /* reset about to happen, delete (block) all rports */
1097 list_for_each_entry(ri, &ioc->fc_rports, list) { 1100 list_for_each_entry(ri, &ioc->fc_rports, list) {
@@ -1099,6 +1102,12 @@ mptfc_setup_reset(struct work_struct *work)
1099 ri->flags &= ~MPT_RPORT_INFO_FLAGS_REGISTERED; 1102 ri->flags &= ~MPT_RPORT_INFO_FLAGS_REGISTERED;
1100 fc_remote_port_delete(ri->rport); /* won't sleep */ 1103 fc_remote_port_delete(ri->rport); /* won't sleep */
1101 ri->rport = NULL; 1104 ri->rport = NULL;
1105 starget = ri->starget;
1106 if (starget) {
1107 vtarget = starget->hostdata;
1108 if (vtarget)
1109 vtarget->deleted = 1;
1110 }
1102 1111
1103 pn = (u64)ri->pg0.WWPN.High << 32 | 1112 pn = (u64)ri->pg0.WWPN.High << 32 |
1104 (u64)ri->pg0.WWPN.Low; 1113 (u64)ri->pg0.WWPN.Low;
@@ -1119,6 +1128,8 @@ mptfc_rescan_devices(struct work_struct *work)
1119 int ii; 1128 int ii;
1120 u64 pn; 1129 u64 pn;
1121 struct mptfc_rport_info *ri; 1130 struct mptfc_rport_info *ri;
1131 struct scsi_target *starget;
1132 VirtTarget *vtarget;
1122 1133
1123 /* start by tagging all ports as missing */ 1134 /* start by tagging all ports as missing */
1124 list_for_each_entry(ri, &ioc->fc_rports, list) { 1135 list_for_each_entry(ri, &ioc->fc_rports, list) {
@@ -1146,6 +1157,12 @@ mptfc_rescan_devices(struct work_struct *work)
1146 MPT_RPORT_INFO_FLAGS_MISSING); 1157 MPT_RPORT_INFO_FLAGS_MISSING);
1147 fc_remote_port_delete(ri->rport); /* won't sleep */ 1158 fc_remote_port_delete(ri->rport); /* won't sleep */
1148 ri->rport = NULL; 1159 ri->rport = NULL;
1160 starget = ri->starget;
1161 if (starget) {
1162 vtarget = starget->hostdata;
1163 if (vtarget)
1164 vtarget->deleted = 1;
1165 }
1149 1166
1150 pn = (u64)ri->pg0.WWPN.High << 32 | 1167 pn = (u64)ri->pg0.WWPN.High << 32 |
1151 (u64)ri->pg0.WWPN.Low; 1168 (u64)ri->pg0.WWPN.Low;
@@ -1358,6 +1375,9 @@ mptfc_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
1358 unsigned long flags; 1375 unsigned long flags;
1359 int rc=1; 1376 int rc=1;
1360 1377
1378 if (ioc->bus_type != FC)
1379 return 0;
1380
1361 devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", 1381 devtverboseprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n",
1362 ioc->name, event)); 1382 ioc->name, event));
1363 1383
@@ -1396,7 +1416,7 @@ mptfc_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
1396 unsigned long flags; 1416 unsigned long flags;
1397 1417
1398 rc = mptscsih_ioc_reset(ioc,reset_phase); 1418 rc = mptscsih_ioc_reset(ioc,reset_phase);
1399 if (rc == 0) 1419 if ((ioc->bus_type != FC) || (!rc))
1400 return rc; 1420 return rc;
1401 1421
1402 1422