aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2007-09-14 20:48:19 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:48:42 -0400
commita69de507aae293e32d22e873f34f25f49b2db3b2 (patch)
treec500e4b79da7a6462868b2d073f86dc07f4de953 /drivers
parent8d6d83e90b874b0d6027d2bbf1d8c76dbf26e931 (diff)
[SCSI] mpt fusion: rename vdev to vdevice
common naming of vdevice through out driver Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/message/fusion/mptctl.c18
-rw-r--r--drivers/message/fusion/mptfc.c20
-rw-r--r--drivers/message/fusion/mptsas.c30
-rw-r--r--drivers/message/fusion/mptscsih.c36
-rw-r--r--drivers/message/fusion/mptspi.c16
5 files changed, 60 insertions, 60 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 5d137a8b3096..b7d1159916c2 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1175,7 +1175,7 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
1175 int cim_rev; 1175 int cim_rev;
1176 u8 revision; 1176 u8 revision;
1177 struct scsi_device *sdev; 1177 struct scsi_device *sdev;
1178 VirtDevice *vdev; 1178 VirtDevice *vdevice;
1179 1179
1180 /* Add of PCI INFO results in unaligned access for 1180 /* Add of PCI INFO results in unaligned access for
1181 * IA64 and Sparc. Reset long to int. Return no PCI 1181 * IA64 and Sparc. Reset long to int. Return no PCI
@@ -1270,8 +1270,8 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
1270 karg->numDevices = 0; 1270 karg->numDevices = 0;
1271 if (ioc->sh) { 1271 if (ioc->sh) {
1272 shost_for_each_device(sdev, ioc->sh) { 1272 shost_for_each_device(sdev, ioc->sh) {
1273 vdev = sdev->hostdata; 1273 vdevice = sdev->hostdata;
1274 if (vdev->vtarget->tflags & 1274 if (vdevice->vtarget->tflags &
1275 MPT_TARGET_FLAGS_RAID_COMPONENT) 1275 MPT_TARGET_FLAGS_RAID_COMPONENT)
1276 continue; 1276 continue;
1277 karg->numDevices++; 1277 karg->numDevices++;
@@ -1322,7 +1322,7 @@ mptctl_gettargetinfo (unsigned long arg)
1322 struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg; 1322 struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg;
1323 struct mpt_ioctl_targetinfo karg; 1323 struct mpt_ioctl_targetinfo karg;
1324 MPT_ADAPTER *ioc; 1324 MPT_ADAPTER *ioc;
1325 VirtDevice *vdev; 1325 VirtDevice *vdevice;
1326 char *pmem; 1326 char *pmem;
1327 int *pdata; 1327 int *pdata;
1328 int iocnum; 1328 int iocnum;
@@ -1391,13 +1391,13 @@ mptctl_gettargetinfo (unsigned long arg)
1391 shost_for_each_device(sdev, ioc->sh) { 1391 shost_for_each_device(sdev, ioc->sh) {
1392 if (!maxWordsLeft) 1392 if (!maxWordsLeft)
1393 continue; 1393 continue;
1394 vdev = sdev->hostdata; 1394 vdevice = sdev->hostdata;
1395 if (vdev->vtarget->tflags & 1395 if (vdevice->vtarget->tflags &
1396 MPT_TARGET_FLAGS_RAID_COMPONENT) 1396 MPT_TARGET_FLAGS_RAID_COMPONENT)
1397 continue; 1397 continue;
1398 lun = (vdev->vtarget->raidVolume) ? 0x80 : vdev->lun; 1398 lun = (vdevice->vtarget->raidVolume) ? 0x80 : vdevice->lun;
1399 *pdata = (((u8)lun << 16) + (vdev->vtarget->channel << 8) + 1399 *pdata = (((u8)lun << 16) + (vdevice->vtarget->channel << 8) +
1400 (vdev->vtarget->id )); 1400 (vdevice->vtarget->id ));
1401 pdata++; 1401 pdata++;
1402 numDevices++; 1402 numDevices++;
1403 --maxWordsLeft; 1403 --maxWordsLeft;
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 6c6299485f4e..061702d32888 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -213,7 +213,7 @@ mptfc_block_error_handler(struct scsi_cmnd *SCpnt,
213 if (ready == DID_NO_CONNECT || !SCpnt->device->hostdata) { 213 if (ready == DID_NO_CONNECT || !SCpnt->device->hostdata) {
214 dfcprintk (hd->ioc, printk(MYIOC_s_DEBUG_FMT 214 dfcprintk (hd->ioc, printk(MYIOC_s_DEBUG_FMT
215 "%s.%d: %d:%d, failing recovery, " 215 "%s.%d: %d:%d, failing recovery, "
216 "port state %d, vdev %p.\n", caller, 216 "port state %d, vdevice %p.\n", caller,
217 ((MPT_SCSI_HOST *) shost->hostdata)->ioc->name, 217 ((MPT_SCSI_HOST *) shost->hostdata)->ioc->name,
218 ((MPT_SCSI_HOST *) shost->hostdata)->ioc->sh->host_no, 218 ((MPT_SCSI_HOST *) shost->hostdata)->ioc->sh->host_no,
219 SCpnt->device->id, SCpnt->device->lun, ready, 219 SCpnt->device->id, SCpnt->device->lun, ready,
@@ -470,7 +470,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0)
470 /* 470 /*
471 * if already mapped, remap here. If not mapped, 471 * if already mapped, remap here. If not mapped,
472 * target_alloc will allocate vtarget and map, 472 * target_alloc will allocate vtarget and map,
473 * slave_alloc will fill in vdev from vtarget. 473 * slave_alloc will fill in vdevice from vtarget.
474 */ 474 */
475 if (ri->starget) { 475 if (ri->starget) {
476 vtarget = ri->starget->hostdata; 476 vtarget = ri->starget->hostdata;
@@ -602,7 +602,7 @@ mptfc_slave_alloc(struct scsi_device *sdev)
602{ 602{
603 MPT_SCSI_HOST *hd; 603 MPT_SCSI_HOST *hd;
604 VirtTarget *vtarget; 604 VirtTarget *vtarget;
605 VirtDevice *vdev; 605 VirtDevice *vdevice;
606 struct scsi_target *starget; 606 struct scsi_target *starget;
607 struct fc_rport *rport; 607 struct fc_rport *rport;
608 608
@@ -615,15 +615,15 @@ mptfc_slave_alloc(struct scsi_device *sdev)
615 615
616 hd = (MPT_SCSI_HOST *)sdev->host->hostdata; 616 hd = (MPT_SCSI_HOST *)sdev->host->hostdata;
617 617
618 vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 618 vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
619 if (!vdev) { 619 if (!vdevice) {
620 printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", 620 printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
621 hd->ioc->name, sizeof(VirtDevice)); 621 hd->ioc->name, sizeof(VirtDevice));
622 return -ENOMEM; 622 return -ENOMEM;
623 } 623 }
624 624
625 625
626 sdev->hostdata = vdev; 626 sdev->hostdata = vdevice;
627 vtarget = starget->hostdata; 627 vtarget = starget->hostdata;
628 628
629 if (vtarget->num_luns == 0) { 629 if (vtarget->num_luns == 0) {
@@ -631,8 +631,8 @@ mptfc_slave_alloc(struct scsi_device *sdev)
631 vtarget->tflags = MPT_TARGET_FLAGS_Q_YES; 631 vtarget->tflags = MPT_TARGET_FLAGS_Q_YES;
632 } 632 }
633 633
634 vdev->vtarget = vtarget; 634 vdevice->vtarget = vtarget;
635 vdev->lun = sdev->lun; 635 vdevice->lun = sdev->lun;
636 636
637 vtarget->num_luns++; 637 vtarget->num_luns++;
638 638
@@ -648,9 +648,9 @@ mptfc_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
648 struct mptfc_rport_info *ri; 648 struct mptfc_rport_info *ri;
649 struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device)); 649 struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device));
650 int err; 650 int err;
651 VirtDevice *vdev = SCpnt->device->hostdata; 651 VirtDevice *vdevice = SCpnt->device->hostdata;
652 652
653 if (!vdev || !vdev->vtarget) { 653 if (!vdevice || !vdevice->vtarget) {
654 SCpnt->result = DID_NO_CONNECT << 16; 654 SCpnt->result = DID_NO_CONNECT << 16;
655 done(SCpnt); 655 done(SCpnt);
656 return 0; 656 return 0;
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index ecaa1d6b0759..1dfe7d713aea 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -506,15 +506,15 @@ static VirtTarget *
506mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id) 506mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id)
507{ 507{
508 struct scsi_device *sdev; 508 struct scsi_device *sdev;
509 VirtDevice *vdev; 509 VirtDevice *vdevice;
510 VirtTarget *vtarget = NULL; 510 VirtTarget *vtarget = NULL;
511 511
512 shost_for_each_device(sdev, ioc->sh) { 512 shost_for_each_device(sdev, ioc->sh) {
513 if ((vdev = sdev->hostdata) == NULL) 513 if ((vdevice = sdev->hostdata) == NULL)
514 continue; 514 continue;
515 if (vdev->vtarget->id == id && 515 if (vdevice->vtarget->id == id &&
516 vdev->vtarget->channel == channel) 516 vdevice->vtarget->channel == channel)
517 vtarget = vdev->vtarget; 517 vtarget = vdevice->vtarget;
518 } 518 }
519 return vtarget; 519 return vtarget;
520} 520}
@@ -943,18 +943,18 @@ mptsas_slave_alloc(struct scsi_device *sdev)
943 MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; 943 MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata;
944 struct sas_rphy *rphy; 944 struct sas_rphy *rphy;
945 struct mptsas_portinfo *p; 945 struct mptsas_portinfo *p;
946 VirtDevice *vdev; 946 VirtDevice *vdevice;
947 struct scsi_target *starget; 947 struct scsi_target *starget;
948 int i; 948 int i;
949 949
950 vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 950 vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
951 if (!vdev) { 951 if (!vdevice) {
952 printk(MYIOC_s_ERR_FMT "slave_alloc kzalloc(%zd) FAILED!\n", 952 printk(MYIOC_s_ERR_FMT "slave_alloc kzalloc(%zd) FAILED!\n",
953 hd->ioc->name, sizeof(VirtDevice)); 953 hd->ioc->name, sizeof(VirtDevice));
954 return -ENOMEM; 954 return -ENOMEM;
955 } 955 }
956 starget = scsi_target(sdev); 956 starget = scsi_target(sdev);
957 vdev->vtarget = starget->hostdata; 957 vdevice->vtarget = starget->hostdata;
958 958
959 if (sdev->channel == MPTSAS_RAID_CHANNEL) 959 if (sdev->channel == MPTSAS_RAID_CHANNEL)
960 goto out; 960 goto out;
@@ -966,7 +966,7 @@ mptsas_slave_alloc(struct scsi_device *sdev)
966 if (p->phy_info[i].attached.sas_address != 966 if (p->phy_info[i].attached.sas_address !=
967 rphy->identify.sas_address) 967 rphy->identify.sas_address)
968 continue; 968 continue;
969 vdev->lun = sdev->lun; 969 vdevice->lun = sdev->lun;
970 /* 970 /*
971 * Exposing hidden raid components 971 * Exposing hidden raid components
972 */ 972 */
@@ -980,21 +980,21 @@ mptsas_slave_alloc(struct scsi_device *sdev)
980 } 980 }
981 mutex_unlock(&hd->ioc->sas_topology_mutex); 981 mutex_unlock(&hd->ioc->sas_topology_mutex);
982 982
983 kfree(vdev); 983 kfree(vdevice);
984 return -ENXIO; 984 return -ENXIO;
985 985
986 out: 986 out:
987 vdev->vtarget->num_luns++; 987 vdevice->vtarget->num_luns++;
988 sdev->hostdata = vdev; 988 sdev->hostdata = vdevice;
989 return 0; 989 return 0;
990} 990}
991 991
992static int 992static int
993mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) 993mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
994{ 994{
995 VirtDevice *vdev = SCpnt->device->hostdata; 995 VirtDevice *vdevice = SCpnt->device->hostdata;
996 996
997 if (!vdev || !vdev->vtarget || vdev->vtarget->deleted) { 997 if (!vdevice || !vdevice->vtarget || vdevice->vtarget->deleted) {
998 SCpnt->result = DID_NO_CONNECT << 16; 998 SCpnt->result = DID_NO_CONNECT << 16;
999 done(SCpnt); 999 done(SCpnt);
1000 return 0; 1000 return 0;
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 8081fe70b190..02f95900e095 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -644,7 +644,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
644 SCSIIORequest_t *pScsiReq; 644 SCSIIORequest_t *pScsiReq;
645 SCSIIOReply_t *pScsiReply; 645 SCSIIOReply_t *pScsiReply;
646 u16 req_idx, req_idx_MR; 646 u16 req_idx, req_idx_MR;
647 VirtDevice *vdev; 647 VirtDevice *vdevice;
648 VirtTarget *vtarget; 648 VirtTarget *vtarget;
649 649
650 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; 650 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
@@ -770,10 +770,10 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
770 if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF) 770 if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF)
771 hd->sel_timeout[pScsiReq->TargetID]++; 771 hd->sel_timeout[pScsiReq->TargetID]++;
772 772
773 vdev = sc->device->hostdata; 773 vdevice = sc->device->hostdata;
774 if (!vdev) 774 if (!vdevice)
775 break; 775 break;
776 vtarget = vdev->vtarget; 776 vtarget = vdevice->vtarget;
777 if (vtarget->tflags & MPT_TARGET_FLAGS_LED_ON) { 777 if (vtarget->tflags & MPT_TARGET_FLAGS_LED_ON) {
778 mptscsih_issue_sep_command(ioc, vtarget, 778 mptscsih_issue_sep_command(ioc, vtarget,
779 MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED); 779 MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED);
@@ -1359,7 +1359,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
1359 MPT_SCSI_HOST *hd; 1359 MPT_SCSI_HOST *hd;
1360 MPT_FRAME_HDR *mf; 1360 MPT_FRAME_HDR *mf;
1361 SCSIIORequest_t *pScsiReq; 1361 SCSIIORequest_t *pScsiReq;
1362 VirtDevice *vdev = SCpnt->device->hostdata; 1362 VirtDevice *vdevice = SCpnt->device->hostdata;
1363 int lun; 1363 int lun;
1364 u32 datalen; 1364 u32 datalen;
1365 u32 scsictl; 1365 u32 scsictl;
@@ -1416,8 +1416,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
1416 /* Default to untagged. Once a target structure has been allocated, 1416 /* Default to untagged. Once a target structure has been allocated,
1417 * use the Inquiry data to determine if device supports tagged. 1417 * use the Inquiry data to determine if device supports tagged.
1418 */ 1418 */
1419 if (vdev 1419 if (vdevice
1420 && (vdev->vtarget->tflags & MPT_TARGET_FLAGS_Q_YES) 1420 && (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)
1421 && (SCpnt->device->tagged_supported)) { 1421 && (SCpnt->device->tagged_supported)) {
1422 scsictl = scsidir | MPI_SCSIIO_CONTROL_SIMPLEQ; 1422 scsictl = scsidir | MPI_SCSIIO_CONTROL_SIMPLEQ;
1423 } else { 1423 } else {
@@ -1426,10 +1426,10 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
1426 1426
1427 /* Use the above information to set up the message frame 1427 /* Use the above information to set up the message frame
1428 */ 1428 */
1429 pScsiReq->TargetID = (u8) vdev->vtarget->id; 1429 pScsiReq->TargetID = (u8) vdevice->vtarget->id;
1430 pScsiReq->Bus = vdev->vtarget->channel; 1430 pScsiReq->Bus = vdevice->vtarget->channel;
1431 pScsiReq->ChainOffset = 0; 1431 pScsiReq->ChainOffset = 0;
1432 if (vdev->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) 1432 if (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT)
1433 pScsiReq->Function = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH; 1433 pScsiReq->Function = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH;
1434 else 1434 else
1435 pScsiReq->Function = MPI_FUNCTION_SCSI_IO_REQUEST; 1435 pScsiReq->Function = MPI_FUNCTION_SCSI_IO_REQUEST;
@@ -1968,7 +1968,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
1968{ 1968{
1969 MPT_SCSI_HOST *hd; 1969 MPT_SCSI_HOST *hd;
1970 int retval; 1970 int retval;
1971 VirtDevice *vdev; 1971 VirtDevice *vdevice;
1972 MPT_ADAPTER *ioc; 1972 MPT_ADAPTER *ioc;
1973 1973
1974 /* If we can't locate our host adapter structure, return FAILED status. 1974 /* If we can't locate our host adapter structure, return FAILED status.
@@ -1987,9 +1987,9 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
1987 if (hd->timeouts < -1) 1987 if (hd->timeouts < -1)
1988 hd->timeouts++; 1988 hd->timeouts++;
1989 1989
1990 vdev = SCpnt->device->hostdata; 1990 vdevice = SCpnt->device->hostdata;
1991 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, 1991 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
1992 vdev->vtarget->channel, 0, 0, 0, mptscsih_get_tm_timeout(ioc)); 1992 vdevice->vtarget->channel, 0, 0, 0, mptscsih_get_tm_timeout(ioc));
1993 1993
1994 printk(MYIOC_s_INFO_FMT "bus reset: %s (sc=%p)\n", 1994 printk(MYIOC_s_INFO_FMT "bus reset: %s (sc=%p)\n",
1995 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); 1995 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
@@ -2503,14 +2503,14 @@ slave_configure_exit:
2503static void 2503static void
2504mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply) 2504mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply)
2505{ 2505{
2506 VirtDevice *vdev; 2506 VirtDevice *vdevice;
2507 SCSIIORequest_t *pReq; 2507 SCSIIORequest_t *pReq;
2508 u32 sense_count = le32_to_cpu(pScsiReply->SenseCount); 2508 u32 sense_count = le32_to_cpu(pScsiReply->SenseCount);
2509 2509
2510 /* Get target structure 2510 /* Get target structure
2511 */ 2511 */
2512 pReq = (SCSIIORequest_t *) mf; 2512 pReq = (SCSIIORequest_t *) mf;
2513 vdev = sc->device->hostdata; 2513 vdevice = sc->device->hostdata;
2514 2514
2515 if (sense_count) { 2515 if (sense_count) {
2516 u8 *sense_data; 2516 u8 *sense_data;
@@ -2524,7 +2524,7 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
2524 /* Log SMART data (asc = 0x5D, non-IM case only) if required. 2524 /* Log SMART data (asc = 0x5D, non-IM case only) if required.
2525 */ 2525 */
2526 if ((hd->ioc->events) && (hd->ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) { 2526 if ((hd->ioc->events) && (hd->ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) {
2527 if ((sense_data[12] == 0x5D) && (vdev->vtarget->raidVolume == 0)) { 2527 if ((sense_data[12] == 0x5D) && (vdevice->vtarget->raidVolume == 0)) {
2528 int idx; 2528 int idx;
2529 MPT_ADAPTER *ioc = hd->ioc; 2529 MPT_ADAPTER *ioc = hd->ioc;
2530 2530
@@ -2542,8 +2542,8 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
2542 if (hd->ioc->pcidev->vendor == 2542 if (hd->ioc->pcidev->vendor ==
2543 PCI_VENDOR_ID_IBM) { 2543 PCI_VENDOR_ID_IBM) {
2544 mptscsih_issue_sep_command(hd->ioc, 2544 mptscsih_issue_sep_command(hd->ioc,
2545 vdev->vtarget, MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT); 2545 vdevice->vtarget, MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT);
2546 vdev->vtarget->tflags |= 2546 vdevice->vtarget->tflags |=
2547 MPT_TARGET_FLAGS_LED_ON; 2547 MPT_TARGET_FLAGS_LED_ON;
2548 } 2548 }
2549 } 2549 }
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 0e1cf5d60bd9..4248bf331e13 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -698,26 +698,26 @@ static int mptspi_slave_alloc(struct scsi_device *sdev)
698{ 698{
699 MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sdev->host->hostdata; 699 MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sdev->host->hostdata;
700 VirtTarget *vtarget; 700 VirtTarget *vtarget;
701 VirtDevice *vdev; 701 VirtDevice *vdevice;
702 struct scsi_target *starget; 702 struct scsi_target *starget;
703 703
704 if (sdev->channel == 1 && 704 if (sdev->channel == 1 &&
705 mptscsih_is_phys_disk(hd->ioc, 0, sdev->id) == 0) 705 mptscsih_is_phys_disk(hd->ioc, 0, sdev->id) == 0)
706 return -ENXIO; 706 return -ENXIO;
707 707
708 vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 708 vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL);
709 if (!vdev) { 709 if (!vdevice) {
710 printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", 710 printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
711 hd->ioc->name, sizeof(VirtDevice)); 711 hd->ioc->name, sizeof(VirtDevice));
712 return -ENOMEM; 712 return -ENOMEM;
713 } 713 }
714 714
715 vdev->lun = sdev->lun; 715 vdevice->lun = sdev->lun;
716 sdev->hostdata = vdev; 716 sdev->hostdata = vdevice;
717 717
718 starget = scsi_target(sdev); 718 starget = scsi_target(sdev);
719 vtarget = starget->hostdata; 719 vtarget = starget->hostdata;
720 vdev->vtarget = vtarget; 720 vdevice->vtarget = vtarget;
721 vtarget->num_luns++; 721 vtarget->num_luns++;
722 722
723 if (sdev->channel == 1) 723 if (sdev->channel == 1)
@@ -758,9 +758,9 @@ static int
758mptspi_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) 758mptspi_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
759{ 759{
760 struct _MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata; 760 struct _MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata;
761 VirtDevice *vdev = SCpnt->device->hostdata; 761 VirtDevice *vdevice = SCpnt->device->hostdata;
762 762
763 if (!vdev || !vdev->vtarget) { 763 if (!vdevice || !vdevice->vtarget) {
764 SCpnt->result = DID_NO_CONNECT << 16; 764 SCpnt->result = DID_NO_CONNECT << 16;
765 done(SCpnt); 765 done(SCpnt);
766 return 0; 766 return 0;