diff options
Diffstat (limited to 'drivers/message/fusion/mptspi.c')
-rw-r--r-- | drivers/message/fusion/mptspi.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 3c24928e3cec..ed6a778b6707 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -516,8 +516,8 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget, | |||
516 | struct Scsi_Host *shost = dev_to_shost(&starget->dev); | 516 | struct Scsi_Host *shost = dev_to_shost(&starget->dev); |
517 | struct _MPT_SCSI_HOST *hd = shost_priv(shost); | 517 | struct _MPT_SCSI_HOST *hd = shost_priv(shost); |
518 | struct _MPT_ADAPTER *ioc = hd->ioc; | 518 | struct _MPT_ADAPTER *ioc = hd->ioc; |
519 | struct _CONFIG_PAGE_SCSI_DEVICE_0 *pg0; | 519 | struct _CONFIG_PAGE_SCSI_DEVICE_0 *spi_dev_pg0; |
520 | dma_addr_t pg0_dma; | 520 | dma_addr_t spi_dev_pg0_dma; |
521 | int size; | 521 | int size; |
522 | struct _x_config_parms cfg; | 522 | struct _x_config_parms cfg; |
523 | struct _CONFIG_PAGE_HEADER hdr; | 523 | struct _CONFIG_PAGE_HEADER hdr; |
@@ -535,8 +535,8 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget, | |||
535 | size += 2048; | 535 | size += 2048; |
536 | */ | 536 | */ |
537 | 537 | ||
538 | pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &pg0_dma, GFP_KERNEL); | 538 | spi_dev_pg0 = dma_alloc_coherent(&ioc->pcidev->dev, size, &spi_dev_pg0_dma, GFP_KERNEL); |
539 | if (pg0 == NULL) { | 539 | if (spi_dev_pg0 == NULL) { |
540 | starget_printk(MYIOC_s_ERR_FMT, starget, | 540 | starget_printk(MYIOC_s_ERR_FMT, starget, |
541 | "dma_alloc_coherent for parameters failed\n", ioc->name); | 541 | "dma_alloc_coherent for parameters failed\n", ioc->name); |
542 | return -EINVAL; | 542 | return -EINVAL; |
@@ -552,7 +552,7 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget, | |||
552 | memset(&cfg, 0, sizeof(cfg)); | 552 | memset(&cfg, 0, sizeof(cfg)); |
553 | 553 | ||
554 | cfg.cfghdr.hdr = &hdr; | 554 | cfg.cfghdr.hdr = &hdr; |
555 | cfg.physAddr = pg0_dma; | 555 | cfg.physAddr = spi_dev_pg0_dma; |
556 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; | 556 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; |
557 | cfg.dir = 0; | 557 | cfg.dir = 0; |
558 | cfg.pageAddr = starget->id; | 558 | cfg.pageAddr = starget->id; |
@@ -562,12 +562,12 @@ static int mptspi_read_spi_device_pg0(struct scsi_target *starget, | |||
562 | goto out_free; | 562 | goto out_free; |
563 | } | 563 | } |
564 | err = 0; | 564 | err = 0; |
565 | memcpy(pass_pg0, pg0, size); | 565 | memcpy(pass_pg0, spi_dev_pg0, size); |
566 | 566 | ||
567 | mptspi_print_read_nego(hd, starget, le32_to_cpu(pg0->NegotiatedParameters)); | 567 | mptspi_print_read_nego(hd, starget, le32_to_cpu(spi_dev_pg0->NegotiatedParameters)); |
568 | 568 | ||
569 | out_free: | 569 | out_free: |
570 | dma_free_coherent(&ioc->pcidev->dev, size, pg0, pg0_dma); | 570 | dma_free_coherent(&ioc->pcidev->dev, size, spi_dev_pg0, spi_dev_pg0_dma); |
571 | return err; | 571 | return err; |
572 | } | 572 | } |
573 | 573 | ||
@@ -594,11 +594,11 @@ static u32 mptspi_getRP(struct scsi_target *starget) | |||
594 | static void mptspi_read_parameters(struct scsi_target *starget) | 594 | static void mptspi_read_parameters(struct scsi_target *starget) |
595 | { | 595 | { |
596 | int nego; | 596 | int nego; |
597 | struct _CONFIG_PAGE_SCSI_DEVICE_0 pg0; | 597 | struct _CONFIG_PAGE_SCSI_DEVICE_0 spi_dev_pg0; |
598 | 598 | ||
599 | mptspi_read_spi_device_pg0(starget, &pg0); | 599 | mptspi_read_spi_device_pg0(starget, &spi_dev_pg0); |
600 | 600 | ||
601 | nego = le32_to_cpu(pg0.NegotiatedParameters); | 601 | nego = le32_to_cpu(spi_dev_pg0.NegotiatedParameters); |
602 | 602 | ||
603 | spi_iu(starget) = (nego & MPI_SCSIDEVPAGE0_NP_IU) ? 1 : 0; | 603 | spi_iu(starget) = (nego & MPI_SCSIDEVPAGE0_NP_IU) ? 1 : 0; |
604 | spi_dt(starget) = (nego & MPI_SCSIDEVPAGE0_NP_DT) ? 1 : 0; | 604 | spi_dt(starget) = (nego & MPI_SCSIDEVPAGE0_NP_DT) ? 1 : 0; |