diff options
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_init.c')
-rw-r--r-- | drivers/scsi/pm8001/pm8001_init.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 42ebe725d5a5..c2f1032496cb 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c | |||
@@ -200,8 +200,13 @@ static int __devinit pm8001_alloc(struct pm8001_hba_info *pm8001_ha) | |||
200 | { | 200 | { |
201 | int i; | 201 | int i; |
202 | spin_lock_init(&pm8001_ha->lock); | 202 | spin_lock_init(&pm8001_ha->lock); |
203 | for (i = 0; i < pm8001_ha->chip->n_phy; i++) | 203 | for (i = 0; i < pm8001_ha->chip->n_phy; i++) { |
204 | pm8001_phy_init(pm8001_ha, i); | 204 | pm8001_phy_init(pm8001_ha, i); |
205 | pm8001_ha->port[i].wide_port_phymap = 0; | ||
206 | pm8001_ha->port[i].port_attached = 0; | ||
207 | pm8001_ha->port[i].port_state = 0; | ||
208 | INIT_LIST_HEAD(&pm8001_ha->port[i].list); | ||
209 | } | ||
205 | 210 | ||
206 | pm8001_ha->tags = kzalloc(PM8001_MAX_CCB, GFP_KERNEL); | 211 | pm8001_ha->tags = kzalloc(PM8001_MAX_CCB, GFP_KERNEL); |
207 | if (!pm8001_ha->tags) | 212 | if (!pm8001_ha->tags) |
@@ -511,19 +516,23 @@ static void pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha) | |||
511 | u8 i; | 516 | u8 i; |
512 | #ifdef PM8001_READ_VPD | 517 | #ifdef PM8001_READ_VPD |
513 | DECLARE_COMPLETION_ONSTACK(completion); | 518 | DECLARE_COMPLETION_ONSTACK(completion); |
519 | struct pm8001_ioctl_payload payload; | ||
514 | pm8001_ha->nvmd_completion = &completion; | 520 | pm8001_ha->nvmd_completion = &completion; |
515 | PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, 0, 0); | 521 | payload.minor_function = 0; |
522 | payload.length = 128; | ||
523 | payload.func_specific = kzalloc(128, GFP_KERNEL); | ||
524 | PM8001_CHIP_DISP->get_nvmd_req(pm8001_ha, &payload); | ||
516 | wait_for_completion(&completion); | 525 | wait_for_completion(&completion); |
517 | for (i = 0; i < pm8001_ha->chip->n_phy; i++) { | 526 | for (i = 0; i < pm8001_ha->chip->n_phy; i++) { |
518 | memcpy(&pm8001_ha->phy[i].dev_sas_addr, pm8001_ha->sas_addr, | 527 | memcpy(&pm8001_ha->phy[i].dev_sas_addr, pm8001_ha->sas_addr, |
519 | SAS_ADDR_SIZE); | 528 | SAS_ADDR_SIZE); |
520 | PM8001_INIT_DBG(pm8001_ha, | 529 | PM8001_INIT_DBG(pm8001_ha, |
521 | pm8001_printk("phy %d sas_addr = %x \n", i, | 530 | pm8001_printk("phy %d sas_addr = %016llx \n", i, |
522 | (u64)pm8001_ha->phy[i].dev_sas_addr)); | 531 | pm8001_ha->phy[i].dev_sas_addr)); |
523 | } | 532 | } |
524 | #else | 533 | #else |
525 | for (i = 0; i < pm8001_ha->chip->n_phy; i++) { | 534 | for (i = 0; i < pm8001_ha->chip->n_phy; i++) { |
526 | pm8001_ha->phy[i].dev_sas_addr = 0x500e004010000004ULL; | 535 | pm8001_ha->phy[i].dev_sas_addr = 0x50010c600047f9d0ULL; |
527 | pm8001_ha->phy[i].dev_sas_addr = | 536 | pm8001_ha->phy[i].dev_sas_addr = |
528 | cpu_to_be64((u64) | 537 | cpu_to_be64((u64) |
529 | (*(u64 *)&pm8001_ha->phy[i].dev_sas_addr)); | 538 | (*(u64 *)&pm8001_ha->phy[i].dev_sas_addr)); |