• Home
  • Raw
  • Download

Lines Matching refs:port_info

128 		struct mptsas_portinfo *port_info, u8 force);
384 struct mptsas_portinfo *port_info, *rc=NULL; in mptsas_find_portinfo_by_handle() local
387 list_for_each_entry(port_info, &ioc->sas_topology, list) in mptsas_find_portinfo_by_handle()
388 for (i = 0; i < port_info->num_phys; i++) in mptsas_find_portinfo_by_handle()
389 if (port_info->phy_info[i].identify.handle == handle) { in mptsas_find_portinfo_by_handle()
390 rc = port_info; in mptsas_find_portinfo_by_handle()
408 struct mptsas_portinfo *port_info, *rc = NULL; in mptsas_find_portinfo_by_sas_address() local
417 list_for_each_entry(port_info, &ioc->sas_topology, list) in mptsas_find_portinfo_by_sas_address()
418 for (i = 0; i < port_info->num_phys; i++) in mptsas_find_portinfo_by_sas_address()
419 if (port_info->phy_info[i].identify.sas_address == in mptsas_find_portinfo_by_sas_address()
421 rc = port_info; in mptsas_find_portinfo_by_sas_address()
453 struct mptsas_portinfo *port_info; in mptsas_port_delete() local
460 port_info = port_details->port_info; in mptsas_port_delete()
461 phy_info = port_info->phy_info; in mptsas_port_delete()
468 for (i = 0; i < port_info->num_phys; i++, phy_info++) { in mptsas_port_delete()
831 mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) in mptsas_setup_wide_ports() argument
840 phy_info = port_info->phy_info; in mptsas_setup_wide_ports()
841 for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { in mptsas_setup_wide_ports()
872 phy_info = port_info->phy_info; in mptsas_setup_wide_ports()
873 for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { in mptsas_setup_wide_ports()
889 port_details->port_info = port_info; in mptsas_setup_wide_ports()
900 if (i == port_info->num_phys - 1) in mptsas_setup_wide_ports()
902 phy_info_cmp = &port_info->phy_info[i + 1]; in mptsas_setup_wide_ports()
903 for (j = i + 1 ; j < port_info->num_phys ; j++, in mptsas_setup_wide_ports()
941 for (i = 0; i < port_info->num_phys; i++) { in mptsas_setup_wide_ports()
942 port_details = port_info->phy_info[i].port_details; in mptsas_setup_wide_ports()
1496 struct mptsas_portinfo *port_info; in mptsas_del_end_device() local
1552 port_info = phy_info->portinfo; in mptsas_del_end_device()
1553 phy_info_parent = port_info->phy_info; in mptsas_del_end_device()
1554 for (i = 0; i < port_info->num_phys; i++, phy_info_parent++) { in mptsas_del_end_device()
1580 struct mptsas_portinfo *port_info; in mptsas_refreshing_device_handles() local
1587 port_info = phy_info->portinfo; in mptsas_refreshing_device_handles()
1588 if (!port_info) in mptsas_refreshing_device_handles()
1591 for (i = 0; i < port_info->num_phys; i++) { in mptsas_refreshing_device_handles()
1592 if (port_info->phy_info[i].attached.sas_address != in mptsas_refreshing_device_handles()
1595 port_info->phy_info[i].attached.channel = sas_device->channel; in mptsas_refreshing_device_handles()
1596 port_info->phy_info[i].attached.id = sas_device->id; in mptsas_refreshing_device_handles()
1597 port_info->phy_info[i].attached.sas_address = in mptsas_refreshing_device_handles()
1599 port_info->phy_info[i].attached.handle = sas_device->handle; in mptsas_refreshing_device_handles()
1600 port_info->phy_info[i].attached.handle_parent = in mptsas_refreshing_device_handles()
1602 port_info->phy_info[i].attached.handle_enclosure = in mptsas_refreshing_device_handles()
2254 struct mptsas_portinfo *port_info; in mptsas_smp_handler() local
2257 port_info = ioc->hba_port_info; in mptsas_smp_handler()
2258 if (port_info && port_info->phy_info) in mptsas_smp_handler()
2260 port_info->phy_info[0].phy->identify.sas_address; in mptsas_smp_handler()
2356 mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) in mptsas_sas_io_unit_pg0() argument
2401 port_info->num_phys = buffer->NumPhys; in mptsas_sas_io_unit_pg0()
2402 port_info->phy_info = kcalloc(port_info->num_phys, in mptsas_sas_io_unit_pg0()
2404 if (!port_info->phy_info) { in mptsas_sas_io_unit_pg0()
2414 for (i = 0; i < port_info->num_phys; i++) { in mptsas_sas_io_unit_pg0()
2416 port_info->phy_info[i].phy_id = i; in mptsas_sas_io_unit_pg0()
2417 port_info->phy_info[i].port_id = in mptsas_sas_io_unit_pg0()
2419 port_info->phy_info[i].negotiated_link_rate = in mptsas_sas_io_unit_pg0()
2421 port_info->phy_info[i].portinfo = port_info; in mptsas_sas_io_unit_pg0()
2422 port_info->phy_info[i].handle = in mptsas_sas_io_unit_pg0()
2636 mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info, in mptsas_sas_expander_pg0() argument
2646 memset(port_info, 0, sizeof(struct mptsas_portinfo)); in mptsas_sas_expander_pg0()
2662 memset(port_info, 0, sizeof(struct mptsas_portinfo)); in mptsas_sas_expander_pg0()
2692 port_info->num_phys = (buffer->NumPhys) ? buffer->NumPhys : 1; in mptsas_sas_expander_pg0()
2693 port_info->phy_info = kcalloc(port_info->num_phys, in mptsas_sas_expander_pg0()
2695 if (!port_info->phy_info) { in mptsas_sas_expander_pg0()
2701 for (i = 0; i < port_info->num_phys; i++) { in mptsas_sas_expander_pg0()
2702 port_info->phy_info[i].portinfo = port_info; in mptsas_sas_expander_pg0()
2703 port_info->phy_info[i].handle = in mptsas_sas_expander_pg0()
2705 port_info->phy_info[i].identify.sas_address = in mptsas_sas_expander_pg0()
2707 port_info->phy_info[i].identify.handle_parent = in mptsas_sas_expander_pg0()
3207 struct mptsas_portinfo *port_info; in mptsas_probe_one_phy() local
3210 port_info = ioc->hba_port_info; in mptsas_probe_one_phy()
3212 for (i = 0; i < port_info->num_phys; i++) in mptsas_probe_one_phy()
3213 if (port_info->phy_info[i].identify.sas_address == in mptsas_probe_one_phy()
3281 struct mptsas_portinfo *port_info, *hba; in mptsas_probe_hba_phys() local
3294 port_info = ioc->hba_port_info; in mptsas_probe_hba_phys()
3295 if (!port_info) { in mptsas_probe_hba_phys()
3296 ioc->hba_port_info = port_info = hba; in mptsas_probe_hba_phys()
3297 ioc->hba_port_num_phy = port_info->num_phys; in mptsas_probe_hba_phys()
3298 list_add_tail(&port_info->list, &ioc->sas_topology); in mptsas_probe_hba_phys()
3301 port_info->phy_info[i].negotiated_link_rate = in mptsas_probe_hba_phys()
3303 port_info->phy_info[i].handle = in mptsas_probe_hba_phys()
3305 port_info->phy_info[i].port_id = in mptsas_probe_hba_phys()
3314 ioc->num_ports = port_info->num_phys; in mptsas_probe_hba_phys()
3316 for (i = 0; i < port_info->num_phys; i++) { in mptsas_probe_hba_phys()
3317 mptsas_sas_phy_pg0(ioc, &port_info->phy_info[i], in mptsas_probe_hba_phys()
3320 port_info->phy_info[i].identify.handle = in mptsas_probe_hba_phys()
3321 port_info->phy_info[i].handle; in mptsas_probe_hba_phys()
3322 mptsas_sas_device_pg0(ioc, &port_info->phy_info[i].identify, in mptsas_probe_hba_phys()
3325 port_info->phy_info[i].identify.handle); in mptsas_probe_hba_phys()
3328 port_info->phy_info[i].identify.sas_address; in mptsas_probe_hba_phys()
3329 port_info->phy_info[i].identify.phy_id = in mptsas_probe_hba_phys()
3330 port_info->phy_info[i].phy_id = i; in mptsas_probe_hba_phys()
3331 if (port_info->phy_info[i].attached.handle) in mptsas_probe_hba_phys()
3333 &port_info->phy_info[i].attached, in mptsas_probe_hba_phys()
3336 port_info->phy_info[i].attached.handle); in mptsas_probe_hba_phys()
3339 mptsas_setup_wide_ports(ioc, port_info); in mptsas_probe_hba_phys()
3341 for (i = 0; i < port_info->num_phys; i++, ioc->sas_index++) in mptsas_probe_hba_phys()
3343 &port_info->phy_info[i], ioc->sas_index, 1); in mptsas_probe_hba_phys()
3354 mptsas_expander_refresh(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) in mptsas_expander_refresh() argument
3363 handle = port_info->phy_info[0].handle; in mptsas_expander_refresh()
3364 sas_address = port_info->phy_info[0].identify.sas_address; in mptsas_expander_refresh()
3365 for (i = 0; i < port_info->num_phys; i++) { in mptsas_expander_refresh()
3366 mptsas_sas_expander_pg1(ioc, &port_info->phy_info[i], in mptsas_expander_refresh()
3371 &port_info->phy_info[i].identify, in mptsas_expander_refresh()
3374 port_info->phy_info[i].identify.handle); in mptsas_expander_refresh()
3375 port_info->phy_info[i].identify.phy_id = in mptsas_expander_refresh()
3376 port_info->phy_info[i].phy_id; in mptsas_expander_refresh()
3378 if (port_info->phy_info[i].attached.handle) { in mptsas_expander_refresh()
3380 &port_info->phy_info[i].attached, in mptsas_expander_refresh()
3383 port_info->phy_info[i].attached.handle); in mptsas_expander_refresh()
3384 port_info->phy_info[i].attached.phy_id = in mptsas_expander_refresh()
3385 port_info->phy_info[i].phy_id; in mptsas_expander_refresh()
3391 port_info->phy_info[0].identify.handle_parent); in mptsas_expander_refresh()
3405 mptsas_setup_wide_ports(ioc, port_info); in mptsas_expander_refresh()
3406 for (i = 0; i < port_info->num_phys; i++, ioc->sas_index++) in mptsas_expander_refresh()
3407 mptsas_probe_one_phy(parent_dev, &port_info->phy_info[i], in mptsas_expander_refresh()
3415 struct mptsas_portinfo *port_info; in mptsas_expander_event_add() local
3419 port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_KERNEL); in mptsas_expander_event_add()
3420 if (!port_info) in mptsas_expander_event_add()
3422 port_info->num_phys = (expander_data->NumPhys) ? in mptsas_expander_event_add()
3424 port_info->phy_info = kcalloc(port_info->num_phys, in mptsas_expander_event_add()
3426 if (!port_info->phy_info) in mptsas_expander_event_add()
3429 for (i = 0; i < port_info->num_phys; i++) { in mptsas_expander_event_add()
3430 port_info->phy_info[i].portinfo = port_info; in mptsas_expander_event_add()
3431 port_info->phy_info[i].handle = in mptsas_expander_event_add()
3433 port_info->phy_info[i].identify.sas_address = in mptsas_expander_event_add()
3435 port_info->phy_info[i].identify.handle_parent = in mptsas_expander_event_add()
3440 list_add_tail(&port_info->list, &ioc->sas_topology); in mptsas_expander_event_add()
3444 "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, in mptsas_expander_event_add()
3447 mptsas_expander_refresh(ioc, port_info); in mptsas_expander_event_add()
3461 struct mptsas_portinfo *port_info; in mptsas_delete_expander_siblings() local
3483 port_info = mptsas_find_portinfo_by_sas_address(ioc, in mptsas_delete_expander_siblings()
3485 if (!port_info) in mptsas_delete_expander_siblings()
3487 if (port_info == parent) /* backlink rphy */ in mptsas_delete_expander_siblings()
3493 mptsas_expander_delete(ioc, port_info, 1); in mptsas_delete_expander_siblings()
3508 struct mptsas_portinfo *port_info, u8 force) in mptsas_expander_delete() argument
3519 if (!port_info) in mptsas_expander_delete()
3526 port_info->phy_info[0].identify.handle); in mptsas_expander_delete()
3540 port_info->phy_info[0].identify.sas_address; in mptsas_expander_delete()
3542 port_info->phy_info[0].identify.handle_parent); in mptsas_expander_delete()
3543 mptsas_delete_expander_siblings(ioc, parent, port_info); in mptsas_expander_delete()
3579 "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, in mptsas_expander_delete()
3585 list_del(&port_info->list); in mptsas_expander_delete()
3586 kfree(port_info->phy_info); in mptsas_expander_delete()
3587 kfree(port_info); in mptsas_expander_delete()
3605 struct mptsas_portinfo *port_info; in mptsas_send_expander_event() local
3614 port_info = mptsas_find_portinfo_by_sas_address(ioc, sas_address); in mptsas_send_expander_event()
3617 if (port_info) { in mptsas_send_expander_event()
3618 for (i = 0; i < port_info->num_phys; i++) { in mptsas_send_expander_event()
3619 port_info->phy_info[i].portinfo = port_info; in mptsas_send_expander_event()
3620 port_info->phy_info[i].handle = in mptsas_send_expander_event()
3622 port_info->phy_info[i].identify.sas_address = in mptsas_send_expander_event()
3624 port_info->phy_info[i].identify.handle_parent = in mptsas_send_expander_event()
3627 mptsas_expander_refresh(ioc, port_info); in mptsas_send_expander_event()
3628 } else if (!port_info && expander_data->NumPhys) in mptsas_send_expander_event()
3632 mptsas_expander_delete(ioc, port_info, 0); in mptsas_send_expander_event()
3647 struct mptsas_portinfo buffer, *port_info; in mptsas_expander_add() local
3655 port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_ATOMIC); in mptsas_expander_add()
3656 if (!port_info) { in mptsas_expander_add()
3662 port_info->num_phys = buffer.num_phys; in mptsas_expander_add()
3663 port_info->phy_info = buffer.phy_info; in mptsas_expander_add()
3664 for (i = 0; i < port_info->num_phys; i++) in mptsas_expander_add()
3665 port_info->phy_info[i].portinfo = port_info; in mptsas_expander_add()
3667 list_add_tail(&port_info->list, &ioc->sas_topology); in mptsas_expander_add()
3670 "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, in mptsas_expander_add()
3672 mptsas_expander_refresh(ioc, port_info); in mptsas_expander_add()
3673 return port_info; in mptsas_expander_add()
3681 struct mptsas_portinfo *port_info; in mptsas_send_link_status_event() local
3695 port_info = mptsas_find_portinfo_by_sas_address(ioc, sas_address); in mptsas_send_link_status_event()
3696 if (port_info) { in mptsas_send_link_status_event()
3697 phy_info = &port_info->phy_info[phy_num]; in mptsas_send_link_status_event()
3706 if (!port_info) { in mptsas_send_link_status_event()
3708 port_info = mptsas_expander_add(ioc, in mptsas_send_link_status_event()
3710 if (port_info) in mptsas_send_link_status_event()
3716 if (port_info == ioc->hba_port_info) in mptsas_send_link_status_event()
3719 mptsas_expander_refresh(ioc, port_info); in mptsas_send_link_status_event()
3772 struct mptsas_portinfo buffer, *port_info; in mptsas_not_responding_devices() local
3862 list_for_each_entry(port_info, &ioc->sas_topology, list) { in mptsas_not_responding_devices()
3864 if (!(port_info->phy_info[0].identify.device_info & in mptsas_not_responding_devices()
3876 port_info->phy_info[0].identify.sas_address) { in mptsas_not_responding_devices()
3883 mptsas_expander_delete(ioc, port_info, 0); in mptsas_not_responding_devices()
3898 struct mptsas_portinfo buffer, *port_info; in mptsas_probe_expanders() local
3908 port_info = mptsas_find_portinfo_by_sas_address(ioc, in mptsas_probe_expanders()
3911 if (port_info) { in mptsas_probe_expanders()
3914 port_info->phy_info[i].handle = handle; in mptsas_probe_expanders()
3915 port_info->phy_info[i].identify.handle_parent = in mptsas_probe_expanders()
3918 mptsas_expander_refresh(ioc, port_info); in mptsas_probe_expanders()
3923 port_info = kzalloc(sizeof(struct mptsas_portinfo), GFP_KERNEL); in mptsas_probe_expanders()
3924 if (!port_info) { in mptsas_probe_expanders()
3930 port_info->num_phys = buffer.num_phys; in mptsas_probe_expanders()
3931 port_info->phy_info = buffer.phy_info; in mptsas_probe_expanders()
3932 for (i = 0; i < port_info->num_phys; i++) in mptsas_probe_expanders()
3933 port_info->phy_info[i].portinfo = port_info; in mptsas_probe_expanders()
3935 list_add_tail(&port_info->list, &ioc->sas_topology); in mptsas_probe_expanders()
3938 "sas_addr (0x%llx)\n", ioc->name, port_info->num_phys, in mptsas_probe_expanders()
3940 mptsas_expander_refresh(ioc, port_info); in mptsas_probe_expanders()
4110 struct mptsas_portinfo *port_info; in mptsas_find_phyinfo_by_sas_address() local
4115 list_for_each_entry(port_info, &ioc->sas_topology, list) { in mptsas_find_phyinfo_by_sas_address()
4116 for (i = 0; i < port_info->num_phys; i++) { in mptsas_find_phyinfo_by_sas_address()
4118 &port_info->phy_info[i].attached)) in mptsas_find_phyinfo_by_sas_address()
4120 if (port_info->phy_info[i].attached.sas_address in mptsas_find_phyinfo_by_sas_address()
4123 phy_info = &port_info->phy_info[i]; in mptsas_find_phyinfo_by_sas_address()
4144 struct mptsas_portinfo *port_info; in mptsas_find_phyinfo_by_phys_disk_num() local
4186 list_for_each_entry(port_info, &ioc->sas_topology, list) { in mptsas_find_phyinfo_by_phys_disk_num()
4187 for (i = 0; i < port_info->num_phys && !phy_info; i++) { in mptsas_find_phyinfo_by_phys_disk_num()
4189 &port_info->phy_info[i].attached)) in mptsas_find_phyinfo_by_phys_disk_num()
4191 if (port_info->phy_info[i].attached.phys_disk_num == ~0) in mptsas_find_phyinfo_by_phys_disk_num()
4193 if ((port_info->phy_info[i].attached.phys_disk_num == in mptsas_find_phyinfo_by_phys_disk_num()
4195 (port_info->phy_info[i].attached.id == id) && in mptsas_find_phyinfo_by_phys_disk_num()
4196 (port_info->phy_info[i].attached.channel == in mptsas_find_phyinfo_by_phys_disk_num()
4198 phy_info = &port_info->phy_info[i]; in mptsas_find_phyinfo_by_phys_disk_num()
4309 struct mptsas_portinfo *port_info; in mptsas_hotplug_work() local
4356 port_info = mptsas_find_portinfo_by_handle(ioc, in mptsas_hotplug_work()
4359 if (port_info == ioc->hba_port_info) in mptsas_hotplug_work()
4361 else if (port_info) in mptsas_hotplug_work()
4362 mptsas_expander_refresh(ioc, port_info); in mptsas_hotplug_work()