diff options
Diffstat (limited to 'drivers/message/fusion/mptsas.c')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index ecaa1d6b075..1dfe7d713ae 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -506,15 +506,15 @@ static VirtTarget * | |||
506 | mptsas_find_vtarget(MPT_ADAPTER *ioc, u8 channel, u8 id) | 506 | mptsas_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 | ||
992 | static int | 992 | static int |
993 | mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 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 | 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; |