Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Eric Moore and committed by
James Bottomley
a69de507 8d6d83e9

+60 -60
+9 -9
drivers/message/fusion/mptctl.c
··· 1175 1175 int cim_rev; 1176 1176 u8 revision; 1177 1177 struct scsi_device *sdev; 1178 - VirtDevice *vdev; 1178 + VirtDevice *vdevice; 1179 1179 1180 1180 /* Add of PCI INFO results in unaligned access for 1181 1181 * IA64 and Sparc. Reset long to int. Return no PCI ··· 1270 1270 karg->numDevices = 0; 1271 1271 if (ioc->sh) { 1272 1272 shost_for_each_device(sdev, ioc->sh) { 1273 - vdev = sdev->hostdata; 1274 - if (vdev->vtarget->tflags & 1273 + vdevice = sdev->hostdata; 1274 + if (vdevice->vtarget->tflags & 1275 1275 MPT_TARGET_FLAGS_RAID_COMPONENT) 1276 1276 continue; 1277 1277 karg->numDevices++; ··· 1322 1322 struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg; 1323 1323 struct mpt_ioctl_targetinfo karg; 1324 1324 MPT_ADAPTER *ioc; 1325 - VirtDevice *vdev; 1325 + VirtDevice *vdevice; 1326 1326 char *pmem; 1327 1327 int *pdata; 1328 1328 int iocnum; ··· 1391 1391 shost_for_each_device(sdev, ioc->sh) { 1392 1392 if (!maxWordsLeft) 1393 1393 continue; 1394 - vdev = sdev->hostdata; 1395 - if (vdev->vtarget->tflags & 1394 + vdevice = sdev->hostdata; 1395 + if (vdevice->vtarget->tflags & 1396 1396 MPT_TARGET_FLAGS_RAID_COMPONENT) 1397 1397 continue; 1398 - lun = (vdev->vtarget->raidVolume) ? 0x80 : vdev->lun; 1399 - *pdata = (((u8)lun << 16) + (vdev->vtarget->channel << 8) + 1400 - (vdev->vtarget->id )); 1398 + lun = (vdevice->vtarget->raidVolume) ? 0x80 : vdevice->lun; 1399 + *pdata = (((u8)lun << 16) + (vdevice->vtarget->channel << 8) + 1400 + (vdevice->vtarget->id )); 1401 1401 pdata++; 1402 1402 numDevices++; 1403 1403 --maxWordsLeft;
+10 -10
drivers/message/fusion/mptfc.c
··· 213 213 if (ready == DID_NO_CONNECT || !SCpnt->device->hostdata) { 214 214 dfcprintk (hd->ioc, printk(MYIOC_s_DEBUG_FMT 215 215 "%s.%d: %d:%d, failing recovery, " 216 - "port state %d, vdev %p.\n", caller, 216 + "port state %d, vdevice %p.\n", caller, 217 217 ((MPT_SCSI_HOST *) shost->hostdata)->ioc->name, 218 218 ((MPT_SCSI_HOST *) shost->hostdata)->ioc->sh->host_no, 219 219 SCpnt->device->id, SCpnt->device->lun, ready, ··· 470 470 /* 471 471 * if already mapped, remap here. If not mapped, 472 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 475 if (ri->starget) { 476 476 vtarget = ri->starget->hostdata; ··· 602 602 { 603 603 MPT_SCSI_HOST *hd; 604 604 VirtTarget *vtarget; 605 - VirtDevice *vdev; 605 + VirtDevice *vdevice; 606 606 struct scsi_target *starget; 607 607 struct fc_rport *rport; 608 608 ··· 615 615 616 616 hd = (MPT_SCSI_HOST *)sdev->host->hostdata; 617 617 618 - vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 619 - if (!vdev) { 618 + vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 619 + if (!vdevice) { 620 620 printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", 621 621 hd->ioc->name, sizeof(VirtDevice)); 622 622 return -ENOMEM; 623 623 } 624 624 625 625 626 - sdev->hostdata = vdev; 626 + sdev->hostdata = vdevice; 627 627 vtarget = starget->hostdata; 628 628 629 629 if (vtarget->num_luns == 0) { ··· 631 631 vtarget->tflags = MPT_TARGET_FLAGS_Q_YES; 632 632 } 633 633 634 - vdev->vtarget = vtarget; 635 - vdev->lun = sdev->lun; 634 + vdevice->vtarget = vtarget; 635 + vdevice->lun = sdev->lun; 636 636 637 637 vtarget->num_luns++; 638 638 ··· 648 648 struct mptfc_rport_info *ri; 649 649 struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device)); 650 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 654 SCpnt->result = DID_NO_CONNECT << 16; 655 655 done(SCpnt); 656 656 return 0;
+15 -15
drivers/message/fusion/mptsas.c
··· 506 506 mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id) 507 507 { 508 508 struct scsi_device *sdev; 509 - VirtDevice *vdev; 509 + VirtDevice *vdevice; 510 510 VirtTarget *vtarget = NULL; 511 511 512 512 shost_for_each_device(sdev, ioc->sh) { 513 - if ((vdev = sdev->hostdata) == NULL) 513 + if ((vdevice = sdev->hostdata) == NULL) 514 514 continue; 515 - if (vdev->vtarget->id == id && 516 - vdev->vtarget->channel == channel) 517 - vtarget = vdev->vtarget; 515 + if (vdevice->vtarget->id == id && 516 + vdevice->vtarget->channel == channel) 517 + vtarget = vdevice->vtarget; 518 518 } 519 519 return vtarget; 520 520 } ··· 943 943 MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; 944 944 struct sas_rphy *rphy; 945 945 struct mptsas_portinfo *p; 946 - VirtDevice *vdev; 946 + VirtDevice *vdevice; 947 947 struct scsi_target *starget; 948 948 int i; 949 949 950 - vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 951 - if (!vdev) { 950 + vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 951 + if (!vdevice) { 952 952 printk(MYIOC_s_ERR_FMT "slave_alloc kzalloc(%zd) FAILED!\n", 953 953 hd->ioc->name, sizeof(VirtDevice)); 954 954 return -ENOMEM; 955 955 } 956 956 starget = scsi_target(sdev); 957 - vdev->vtarget = starget->hostdata; 957 + vdevice->vtarget = starget->hostdata; 958 958 959 959 if (sdev->channel == MPTSAS_RAID_CHANNEL) 960 960 goto out; ··· 966 966 if (p->phy_info[i].attached.sas_address != 967 967 rphy->identify.sas_address) 968 968 continue; 969 - vdev->lun = sdev->lun; 969 + vdevice->lun = sdev->lun; 970 970 /* 971 971 * Exposing hidden raid components 972 972 */ ··· 980 980 } 981 981 mutex_unlock(&hd->ioc->sas_topology_mutex); 982 982 983 - kfree(vdev); 983 + kfree(vdevice); 984 984 return -ENXIO; 985 985 986 986 out: 987 - vdev->vtarget->num_luns++; 988 - sdev->hostdata = vdev; 987 + vdevice->vtarget->num_luns++; 988 + sdev->hostdata = vdevice; 989 989 return 0; 990 990 } 991 991 992 992 static int 993 993 mptsas_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 998 SCpnt->result = DID_NO_CONNECT << 16; 999 999 done(SCpnt); 1000 1000 return 0;
+18 -18
drivers/message/fusion/mptscsih.c
··· 644 644 SCSIIORequest_t *pScsiReq; 645 645 SCSIIOReply_t *pScsiReply; 646 646 u16 req_idx, req_idx_MR; 647 - VirtDevice *vdev; 647 + VirtDevice *vdevice; 648 648 VirtTarget *vtarget; 649 649 650 650 hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; ··· 770 770 if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF) 771 771 hd->sel_timeout[pScsiReq->TargetID]++; 772 772 773 - vdev = sc->device->hostdata; 774 - if (!vdev) 773 + vdevice = sc->device->hostdata; 774 + if (!vdevice) 775 775 break; 776 - vtarget = vdev->vtarget; 776 + vtarget = vdevice->vtarget; 777 777 if (vtarget->tflags & MPT_TARGET_FLAGS_LED_ON) { 778 778 mptscsih_issue_sep_command(ioc, vtarget, 779 779 MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED); ··· 1359 1359 MPT_SCSI_HOST *hd; 1360 1360 MPT_FRAME_HDR *mf; 1361 1361 SCSIIORequest_t *pScsiReq; 1362 - VirtDevice *vdev = SCpnt->device->hostdata; 1362 + VirtDevice *vdevice = SCpnt->device->hostdata; 1363 1363 int lun; 1364 1364 u32 datalen; 1365 1365 u32 scsictl; ··· 1416 1416 /* Default to untagged. Once a target structure has been allocated, 1417 1417 * use the Inquiry data to determine if device supports tagged. 1418 1418 */ 1419 - if (vdev 1420 - && (vdev->vtarget->tflags & MPT_TARGET_FLAGS_Q_YES) 1419 + if (vdevice 1420 + && (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_Q_YES) 1421 1421 && (SCpnt->device->tagged_supported)) { 1422 1422 scsictl = scsidir | MPI_SCSIIO_CONTROL_SIMPLEQ; 1423 1423 } else { ··· 1426 1426 1427 1427 /* Use the above information to set up the message frame 1428 1428 */ 1429 - pScsiReq->TargetID = (u8) vdev->vtarget->id; 1430 - pScsiReq->Bus = vdev->vtarget->channel; 1429 + pScsiReq->TargetID = (u8) vdevice->vtarget->id; 1430 + pScsiReq->Bus = vdevice->vtarget->channel; 1431 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 1433 pScsiReq->Function = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH; 1434 1434 else 1435 1435 pScsiReq->Function = MPI_FUNCTION_SCSI_IO_REQUEST; ··· 1968 1968 { 1969 1969 MPT_SCSI_HOST *hd; 1970 1970 int retval; 1971 - VirtDevice *vdev; 1971 + VirtDevice *vdevice; 1972 1972 MPT_ADAPTER *ioc; 1973 1973 1974 1974 /* If we can't locate our host adapter structure, return FAILED status. ··· 1987 1987 if (hd->timeouts < -1) 1988 1988 hd->timeouts++; 1989 1989 1990 - vdev = SCpnt->device->hostdata; 1990 + vdevice = SCpnt->device->hostdata; 1991 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 1994 printk(MYIOC_s_INFO_FMT "bus reset: %s (sc=%p)\n", 1995 1995 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); ··· 2503 2503 static void 2504 2504 mptscsih_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 2507 SCSIIORequest_t *pReq; 2508 2508 u32 sense_count = le32_to_cpu(pScsiReply->SenseCount); 2509 2509 2510 2510 /* Get target structure 2511 2511 */ 2512 2512 pReq = (SCSIIORequest_t *) mf; 2513 - vdev = sc->device->hostdata; 2513 + vdevice = sc->device->hostdata; 2514 2514 2515 2515 if (sense_count) { 2516 2516 u8 *sense_data; ··· 2524 2524 /* Log SMART data (asc = 0x5D, non-IM case only) if required. 2525 2525 */ 2526 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 2528 int idx; 2529 2529 MPT_ADAPTER *ioc = hd->ioc; 2530 2530 ··· 2542 2542 if (hd->ioc->pcidev->vendor == 2543 2543 PCI_VENDOR_ID_IBM) { 2544 2544 mptscsih_issue_sep_command(hd->ioc, 2545 - vdev->vtarget, MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT); 2546 - vdev->vtarget->tflags |= 2545 + vdevice->vtarget, MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT); 2546 + vdevice->vtarget->tflags |= 2547 2547 MPT_TARGET_FLAGS_LED_ON; 2548 2548 } 2549 2549 }
+8 -8
drivers/message/fusion/mptspi.c
··· 698 698 { 699 699 MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)sdev->host->hostdata; 700 700 VirtTarget *vtarget; 701 - VirtDevice *vdev; 701 + VirtDevice *vdevice; 702 702 struct scsi_target *starget; 703 703 704 704 if (sdev->channel == 1 && 705 705 mptscsih_is_phys_disk(hd->ioc, 0, sdev->id) == 0) 706 706 return -ENXIO; 707 707 708 - vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 709 - if (!vdev) { 708 + vdevice = kzalloc(sizeof(VirtDevice), GFP_KERNEL); 709 + if (!vdevice) { 710 710 printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", 711 711 hd->ioc->name, sizeof(VirtDevice)); 712 712 return -ENOMEM; 713 713 } 714 714 715 - vdev->lun = sdev->lun; 716 - sdev->hostdata = vdev; 715 + vdevice->lun = sdev->lun; 716 + sdev->hostdata = vdevice; 717 717 718 718 starget = scsi_target(sdev); 719 719 vtarget = starget->hostdata; 720 - vdev->vtarget = vtarget; 720 + vdevice->vtarget = vtarget; 721 721 vtarget->num_luns++; 722 722 723 723 if (sdev->channel == 1) ··· 758 758 mptspi_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) 759 759 { 760 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 764 SCpnt->result = DID_NO_CONNECT << 16; 765 765 done(SCpnt); 766 766 return 0;