aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c36
1 files changed, 18 insertions, 18 deletions
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 }