diff options
Diffstat (limited to 'drivers/scsi/pm8001')
-rw-r--r-- | drivers/scsi/pm8001/pm8001_hwi.c | 18 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm8001_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm8001_sas.c | 14 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm8001_sas.h | 4 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm80xx_hwi.c | 12 |
5 files changed, 25 insertions, 25 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 95d04cc78c0b..69dd49c05f1e 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c | |||
@@ -1505,7 +1505,7 @@ void pm8001_work_fn(struct work_struct *work) | |||
1505 | pm8001_dev = pw->data; /* Most stash device structure */ | 1505 | pm8001_dev = pw->data; /* Most stash device structure */ |
1506 | if ((pm8001_dev == NULL) | 1506 | if ((pm8001_dev == NULL) |
1507 | || ((pw->handler != IO_XFER_ERROR_BREAK) | 1507 | || ((pw->handler != IO_XFER_ERROR_BREAK) |
1508 | && (pm8001_dev->dev_type == NO_DEVICE))) { | 1508 | && (pm8001_dev->dev_type == SAS_PHY_UNUSED))) { |
1509 | kfree(pw); | 1509 | kfree(pw); |
1510 | return; | 1510 | return; |
1511 | } | 1511 | } |
@@ -3443,7 +3443,7 @@ hw_event_sata_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
3443 | sizeof(struct dev_to_host_fis)); | 3443 | sizeof(struct dev_to_host_fis)); |
3444 | phy->frame_rcvd_size = sizeof(struct dev_to_host_fis); | 3444 | phy->frame_rcvd_size = sizeof(struct dev_to_host_fis); |
3445 | phy->identify.target_port_protocols = SAS_PROTOCOL_SATA; | 3445 | phy->identify.target_port_protocols = SAS_PROTOCOL_SATA; |
3446 | phy->identify.device_type = SATA_DEV; | 3446 | phy->identify.device_type = SAS_SATA_DEV; |
3447 | pm8001_get_attached_sas_addr(phy, phy->sas_phy.attached_sas_addr); | 3447 | pm8001_get_attached_sas_addr(phy, phy->sas_phy.attached_sas_addr); |
3448 | spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags); | 3448 | spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags); |
3449 | pm8001_bytes_dmaed(pm8001_ha, phy_id); | 3449 | pm8001_bytes_dmaed(pm8001_ha, phy_id); |
@@ -4465,7 +4465,7 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id) | |||
4465 | payload.ase_sh_lm_slr_phyid = cpu_to_le32(SPINHOLD_DISABLE | | 4465 | payload.ase_sh_lm_slr_phyid = cpu_to_le32(SPINHOLD_DISABLE | |
4466 | LINKMODE_AUTO | LINKRATE_15 | | 4466 | LINKMODE_AUTO | LINKRATE_15 | |
4467 | LINKRATE_30 | LINKRATE_60 | phy_id); | 4467 | LINKRATE_30 | LINKRATE_60 | phy_id); |
4468 | payload.sas_identify.dev_type = SAS_END_DEV; | 4468 | payload.sas_identify.dev_type = SAS_END_DEVICE; |
4469 | payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL; | 4469 | payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL; |
4470 | memcpy(payload.sas_identify.sas_addr, | 4470 | memcpy(payload.sas_identify.sas_addr, |
4471 | pm8001_ha->sas_addr, SAS_ADDR_SIZE); | 4471 | pm8001_ha->sas_addr, SAS_ADDR_SIZE); |
@@ -4527,11 +4527,11 @@ static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, | |||
4527 | if (flag == 1) | 4527 | if (flag == 1) |
4528 | stp_sspsmp_sata = 0x02; /*direct attached sata */ | 4528 | stp_sspsmp_sata = 0x02; /*direct attached sata */ |
4529 | else { | 4529 | else { |
4530 | if (pm8001_dev->dev_type == SATA_DEV) | 4530 | if (pm8001_dev->dev_type == SAS_SATA_DEV) |
4531 | stp_sspsmp_sata = 0x00; /* stp*/ | 4531 | stp_sspsmp_sata = 0x00; /* stp*/ |
4532 | else if (pm8001_dev->dev_type == SAS_END_DEV || | 4532 | else if (pm8001_dev->dev_type == SAS_END_DEVICE || |
4533 | pm8001_dev->dev_type == EDGE_DEV || | 4533 | pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE || |
4534 | pm8001_dev->dev_type == FANOUT_DEV) | 4534 | pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE) |
4535 | stp_sspsmp_sata = 0x01; /*ssp or smp*/ | 4535 | stp_sspsmp_sata = 0x01; /*ssp or smp*/ |
4536 | } | 4536 | } |
4537 | if (parent_dev && DEV_IS_EXPANDER(parent_dev->dev_type)) | 4537 | if (parent_dev && DEV_IS_EXPANDER(parent_dev->dev_type)) |
@@ -4662,9 +4662,9 @@ int pm8001_chip_abort_task(struct pm8001_hba_info *pm8001_ha, | |||
4662 | PM8001_EH_DBG(pm8001_ha, | 4662 | PM8001_EH_DBG(pm8001_ha, |
4663 | pm8001_printk("cmd_tag = %x, abort task tag = 0x%x", | 4663 | pm8001_printk("cmd_tag = %x, abort task tag = 0x%x", |
4664 | cmd_tag, task_tag)); | 4664 | cmd_tag, task_tag)); |
4665 | if (pm8001_dev->dev_type == SAS_END_DEV) | 4665 | if (pm8001_dev->dev_type == SAS_END_DEVICE) |
4666 | opc = OPC_INB_SSP_ABORT; | 4666 | opc = OPC_INB_SSP_ABORT; |
4667 | else if (pm8001_dev->dev_type == SATA_DEV) | 4667 | else if (pm8001_dev->dev_type == SAS_SATA_DEV) |
4668 | opc = OPC_INB_SATA_ABORT; | 4668 | opc = OPC_INB_SATA_ABORT; |
4669 | else | 4669 | else |
4670 | opc = OPC_INB_SMP_ABORT;/* SMP */ | 4670 | opc = OPC_INB_SMP_ABORT;/* SMP */ |
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 1c718520036a..e4b9bc7f5410 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c | |||
@@ -361,7 +361,7 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha, | |||
361 | 361 | ||
362 | pm8001_ha->devices = pm8001_ha->memoryMap.region[DEV_MEM].virt_ptr; | 362 | pm8001_ha->devices = pm8001_ha->memoryMap.region[DEV_MEM].virt_ptr; |
363 | for (i = 0; i < PM8001_MAX_DEVICES; i++) { | 363 | for (i = 0; i < PM8001_MAX_DEVICES; i++) { |
364 | pm8001_ha->devices[i].dev_type = NO_DEVICE; | 364 | pm8001_ha->devices[i].dev_type = SAS_PHY_UNUSED; |
365 | pm8001_ha->devices[i].id = i; | 365 | pm8001_ha->devices[i].id = i; |
366 | pm8001_ha->devices[i].device_id = PM8001_MAX_DEVICES; | 366 | pm8001_ha->devices[i].device_id = PM8001_MAX_DEVICES; |
367 | pm8001_ha->devices[i].running_req = 0; | 367 | pm8001_ha->devices[i].running_req = 0; |
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 9af95853f840..a85d73de7c80 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c | |||
@@ -357,7 +357,7 @@ static int sas_find_local_port_id(struct domain_device *dev) | |||
357 | * @tmf: the task management IU | 357 | * @tmf: the task management IU |
358 | */ | 358 | */ |
359 | #define DEV_IS_GONE(pm8001_dev) \ | 359 | #define DEV_IS_GONE(pm8001_dev) \ |
360 | ((!pm8001_dev || (pm8001_dev->dev_type == NO_DEVICE))) | 360 | ((!pm8001_dev || (pm8001_dev->dev_type == SAS_PHY_UNUSED))) |
361 | static int pm8001_task_exec(struct sas_task *task, const int num, | 361 | static int pm8001_task_exec(struct sas_task *task, const int num, |
362 | gfp_t gfp_flags, int is_tmf, struct pm8001_tmf_task *tmf) | 362 | gfp_t gfp_flags, int is_tmf, struct pm8001_tmf_task *tmf) |
363 | { | 363 | { |
@@ -375,7 +375,7 @@ static int pm8001_task_exec(struct sas_task *task, const int num, | |||
375 | struct task_status_struct *tsm = &t->task_status; | 375 | struct task_status_struct *tsm = &t->task_status; |
376 | tsm->resp = SAS_TASK_UNDELIVERED; | 376 | tsm->resp = SAS_TASK_UNDELIVERED; |
377 | tsm->stat = SAS_PHY_DOWN; | 377 | tsm->stat = SAS_PHY_DOWN; |
378 | if (dev->dev_type != SATA_DEV) | 378 | if (dev->dev_type != SAS_SATA_DEV) |
379 | t->task_done(t); | 379 | t->task_done(t); |
380 | return 0; | 380 | return 0; |
381 | } | 381 | } |
@@ -553,7 +553,7 @@ struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha) | |||
553 | { | 553 | { |
554 | u32 dev; | 554 | u32 dev; |
555 | for (dev = 0; dev < PM8001_MAX_DEVICES; dev++) { | 555 | for (dev = 0; dev < PM8001_MAX_DEVICES; dev++) { |
556 | if (pm8001_ha->devices[dev].dev_type == NO_DEVICE) { | 556 | if (pm8001_ha->devices[dev].dev_type == SAS_PHY_UNUSED) { |
557 | pm8001_ha->devices[dev].id = dev; | 557 | pm8001_ha->devices[dev].id = dev; |
558 | return &pm8001_ha->devices[dev]; | 558 | return &pm8001_ha->devices[dev]; |
559 | } | 559 | } |
@@ -589,7 +589,7 @@ static void pm8001_free_dev(struct pm8001_device *pm8001_dev) | |||
589 | u32 id = pm8001_dev->id; | 589 | u32 id = pm8001_dev->id; |
590 | memset(pm8001_dev, 0, sizeof(*pm8001_dev)); | 590 | memset(pm8001_dev, 0, sizeof(*pm8001_dev)); |
591 | pm8001_dev->id = id; | 591 | pm8001_dev->id = id; |
592 | pm8001_dev->dev_type = NO_DEVICE; | 592 | pm8001_dev->dev_type = SAS_PHY_UNUSED; |
593 | pm8001_dev->device_id = PM8001_MAX_DEVICES; | 593 | pm8001_dev->device_id = PM8001_MAX_DEVICES; |
594 | pm8001_dev->sas_device = NULL; | 594 | pm8001_dev->sas_device = NULL; |
595 | } | 595 | } |
@@ -647,7 +647,7 @@ static int pm8001_dev_found_notify(struct domain_device *dev) | |||
647 | res = -1; | 647 | res = -1; |
648 | } | 648 | } |
649 | } else { | 649 | } else { |
650 | if (dev->dev_type == SATA_DEV) { | 650 | if (dev->dev_type == SAS_SATA_DEV) { |
651 | pm8001_device->attached_phy = | 651 | pm8001_device->attached_phy = |
652 | dev->rphy->identify.phy_identifier; | 652 | dev->rphy->identify.phy_identifier; |
653 | flag = 1; /* directly sata*/ | 653 | flag = 1; /* directly sata*/ |
@@ -657,7 +657,7 @@ static int pm8001_dev_found_notify(struct domain_device *dev) | |||
657 | PM8001_CHIP_DISP->reg_dev_req(pm8001_ha, pm8001_device, flag); | 657 | PM8001_CHIP_DISP->reg_dev_req(pm8001_ha, pm8001_device, flag); |
658 | spin_unlock_irqrestore(&pm8001_ha->lock, flags); | 658 | spin_unlock_irqrestore(&pm8001_ha->lock, flags); |
659 | wait_for_completion(&completion); | 659 | wait_for_completion(&completion); |
660 | if (dev->dev_type == SAS_END_DEV) | 660 | if (dev->dev_type == SAS_END_DEVICE) |
661 | msleep(50); | 661 | msleep(50); |
662 | pm8001_ha->flags = PM8001F_RUN_TIME; | 662 | pm8001_ha->flags = PM8001F_RUN_TIME; |
663 | return 0; | 663 | return 0; |
@@ -927,7 +927,7 @@ void pm8001_open_reject_retry( | |||
927 | struct pm8001_ccb_info *ccb = &pm8001_ha->ccb_info[i]; | 927 | struct pm8001_ccb_info *ccb = &pm8001_ha->ccb_info[i]; |
928 | 928 | ||
929 | pm8001_dev = ccb->device; | 929 | pm8001_dev = ccb->device; |
930 | if (!pm8001_dev || (pm8001_dev->dev_type == NO_DEVICE)) | 930 | if (!pm8001_dev || (pm8001_dev->dev_type == SAS_PHY_UNUSED)) |
931 | continue; | 931 | continue; |
932 | if (!device_to_close) { | 932 | if (!device_to_close) { |
933 | uintptr_t d = (uintptr_t)pm8001_dev | 933 | uintptr_t d = (uintptr_t)pm8001_dev |
diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h index 72d46ea398dc..570819464d90 100644 --- a/drivers/scsi/pm8001/pm8001_sas.h +++ b/drivers/scsi/pm8001/pm8001_sas.h | |||
@@ -103,7 +103,7 @@ do { \ | |||
103 | #define PM8001_READ_VPD | 103 | #define PM8001_READ_VPD |
104 | 104 | ||
105 | 105 | ||
106 | #define DEV_IS_EXPANDER(type) ((type == EDGE_DEV) || (type == FANOUT_DEV)) | 106 | #define DEV_IS_EXPANDER(type) ((type == SAS_EDGE_EXPANDER_DEVICE) || (type == SAS_FANOUT_EXPANDER_DEVICE)) |
107 | 107 | ||
108 | #define PM8001_NAME_LENGTH 32/* generic length of strings */ | 108 | #define PM8001_NAME_LENGTH 32/* generic length of strings */ |
109 | extern struct list_head hba_list; | 109 | extern struct list_head hba_list; |
@@ -206,7 +206,7 @@ struct pm8001_phy { | |||
206 | }; | 206 | }; |
207 | 207 | ||
208 | struct pm8001_device { | 208 | struct pm8001_device { |
209 | enum sas_dev_type dev_type; | 209 | enum sas_device_type dev_type; |
210 | struct domain_device *sas_device; | 210 | struct domain_device *sas_device; |
211 | u32 attached_phy; | 211 | u32 attached_phy; |
212 | u32 id; | 212 | u32 id; |
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 670998a8ca79..302514d8157b 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c | |||
@@ -2684,7 +2684,7 @@ hw_event_sata_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
2684 | sizeof(struct dev_to_host_fis)); | 2684 | sizeof(struct dev_to_host_fis)); |
2685 | phy->frame_rcvd_size = sizeof(struct dev_to_host_fis); | 2685 | phy->frame_rcvd_size = sizeof(struct dev_to_host_fis); |
2686 | phy->identify.target_port_protocols = SAS_PROTOCOL_SATA; | 2686 | phy->identify.target_port_protocols = SAS_PROTOCOL_SATA; |
2687 | phy->identify.device_type = SATA_DEV; | 2687 | phy->identify.device_type = SAS_SATA_DEV; |
2688 | pm8001_get_attached_sas_addr(phy, phy->sas_phy.attached_sas_addr); | 2688 | pm8001_get_attached_sas_addr(phy, phy->sas_phy.attached_sas_addr); |
2689 | spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags); | 2689 | spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags); |
2690 | pm8001_bytes_dmaed(pm8001_ha, phy_id); | 2690 | pm8001_bytes_dmaed(pm8001_ha, phy_id); |
@@ -3952,7 +3952,7 @@ pm80xx_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id) | |||
3952 | Have to add "SAS PHY Analog Setup SPASTI 1 Byte" Based on need | 3952 | Have to add "SAS PHY Analog Setup SPASTI 1 Byte" Based on need |
3953 | **/ | 3953 | **/ |
3954 | 3954 | ||
3955 | payload.sas_identify.dev_type = SAS_END_DEV; | 3955 | payload.sas_identify.dev_type = SAS_END_DEVICE; |
3956 | payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL; | 3956 | payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL; |
3957 | memcpy(payload.sas_identify.sas_addr, | 3957 | memcpy(payload.sas_identify.sas_addr, |
3958 | pm8001_ha->sas_addr, SAS_ADDR_SIZE); | 3958 | pm8001_ha->sas_addr, SAS_ADDR_SIZE); |
@@ -4015,11 +4015,11 @@ static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, | |||
4015 | if (flag == 1) { | 4015 | if (flag == 1) { |
4016 | stp_sspsmp_sata = 0x02; /*direct attached sata */ | 4016 | stp_sspsmp_sata = 0x02; /*direct attached sata */ |
4017 | } else { | 4017 | } else { |
4018 | if (pm8001_dev->dev_type == SATA_DEV) | 4018 | if (pm8001_dev->dev_type == SAS_SATA_DEV) |
4019 | stp_sspsmp_sata = 0x00; /* stp*/ | 4019 | stp_sspsmp_sata = 0x00; /* stp*/ |
4020 | else if (pm8001_dev->dev_type == SAS_END_DEV || | 4020 | else if (pm8001_dev->dev_type == SAS_END_DEVICE || |
4021 | pm8001_dev->dev_type == EDGE_DEV || | 4021 | pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE || |
4022 | pm8001_dev->dev_type == FANOUT_DEV) | 4022 | pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE) |
4023 | stp_sspsmp_sata = 0x01; /*ssp or smp*/ | 4023 | stp_sspsmp_sata = 0x01; /*ssp or smp*/ |
4024 | } | 4024 | } |
4025 | if (parent_dev && DEV_IS_EXPANDER(parent_dev->dev_type)) | 4025 | if (parent_dev && DEV_IS_EXPANDER(parent_dev->dev_type)) |