Lines Matching defs:port
206 * @VP_ID: virtual port id
268 * @VP_ID: virtual port id
375 * mpt3sas_get_port_by_id - get hba port entry corresponding to provided
376 * port number from port list
378 * @port_id: port number
379 * @bypass_dirty_port_flag: when set look the matching hba port entry even
380 * if hba port entry is marked as dirty.
382 * Search for hba port entry corresponding to provided port number,
383 * if available return port object otherwise return NULL.
389 struct hba_port *port, *port_next;
394 * port id i.e. 255
399 list_for_each_entry_safe(port, port_next,
401 if (port->port_id != port_id)
404 return port;
405 if (port->flags & HBA_PORT_FLAG_DIRTY_PORT)
407 return port;
411 * Allocate hba_port object for default port id (i.e. 255)
416 port = kzalloc(sizeof(struct hba_port), GFP_ATOMIC);
417 if (!port)
420 port->port_id = port_id;
422 "hba_port entry: %p, port: %d is added to hba_port list\n",
423 port, port->port_id);
424 list_add_tail(&port->list,
426 return port;
434 * @port: hba_port object
441 struct hba_port *port, u32 phy)
445 if (!port->vphys_mask)
448 list_for_each_entry_safe(vphy, vphy_next, &port->vphys_list, list) {
756 * @port: port number
763 u64 sas_address, struct hba_port *port)
767 if (!port)
775 if (sas_device->port != port)
784 if (sas_device->port != port)
797 * @port: hba port entry
800 * This searches for sas_device based on sas_address & port number,
805 u64 sas_address, struct hba_port *port)
812 sas_address, port);
982 * sas address & port number
985 * @port: hba port entry
991 u64 sas_address, struct hba_port *port)
1000 sas_device = __mpt3sas_get_sdev_by_addr(ioc, sas_address, port);
1045 sas_device->sas_address_parent, sas_device->port)) {
1057 sas_device->port);
1594 * @port: hba port entry
1597 * This searches for expander device based on sas_address & port number,
1602 u64 sas_address, struct hba_port *port)
1606 if (!port)
1612 if (sas_expander->port != port)
1913 sas_target_priv_data->port = NULL;
1936 sas_target_priv_data->port = sas_device->port;
2093 sas_target_priv_data->port);
2662 "%s: handle(0x%04x), wwid(0x%016llx), port(%d)\n",
2699 sas_device_priv_data->sas_target->port);
3241 "handle(0x%04x), wwid(0x%016llx), port(%d)\n",
3645 * mpt3sas_port_enable_complete - port enable completed (fake event)
3736 * new port enable request as part of current diag reset.
3858 * @port: hba port entry
3864 u64 sas_address, struct hba_port *port)
3876 if (sas_device_priv_data->sas_target->port != port)
4088 struct hba_port *port = NULL;
4117 port = sas_device->port;
4165 _scsih_ublock_io_device(ioc, sas_address, port);
5470 ioc_info(ioc, "\twwid(0x%016llx), port(%d)\n",
5949 struct hba_port *port, *port_next, *mport;
5956 list_for_each_entry_safe(port, port_next,
5958 if (!port->vphys_mask)
5961 &port->vphys_list, list) {
6028 port = port_next = NULL;
6031 * each port's vphys_list.
6033 list_for_each_entry_safe(port,
6035 if (!port->vphys_mask)
6038 &port->vphys_list, list) {
6075 "%s: hba_port entry: %p, port: %d is added to hba_port list\n",
6081 * If mport & port pointers are not pointing to
6085 * port's vphys_list to mport's vphys_list.
6087 if (port != mport) {
6092 port->vphys_mask &= ~(1 << i);
6096 ioc, attached_sas_addr, port);
6098 sas_device->port = mport;
6130 * _scsih_get_port_table_after_reset - Construct temporary port table
6132 * @port_table: address where port table needs to be constructed
6134 * return number of HBA port entries available after reset.
6210 * _scsih_look_and_get_matched_port_entry - Get matched hba port entry
6211 * from HBA port table
6213 * @port_entry: hba port entry from temporary port table which needs to be
6214 * searched for matched entry in the HBA port table
6215 * @matched_port_entry: save matched hba port entry here
6279 * is a part of anther port
6281 *@port_table: port table after reset
6282 *@index: hba port entry index
6312 * right port
6314 *@hba_port_entry: hba port table entry
6315 *@port_table: temporary port table
6316 *@index: hba port entry index
6358 struct hba_port *port, *port_next;
6361 list_for_each_entry_safe(port, port_next,
6363 if (!port->vphys_mask)
6366 &port->vphys_list, list) {
6369 "Deleting vphy %p entry from port id: %d\t, Phy_mask 0x%08x\n",
6370 vphy, port->port_id,
6372 port->vphys_mask &= ~vphy->phy_mask;
6377 if (!port->vphys_mask && !port->sas_address)
6378 port->flags |= HBA_PORT_FLAG_DIRTY_PORT;
6383 * _scsih_del_dirty_port_entries - delete dirty port entries from port list
6391 struct hba_port *port, *port_next;
6393 list_for_each_entry_safe(port, port_next,
6395 if (!(port->flags & HBA_PORT_FLAG_DIRTY_PORT) ||
6396 port->flags & HBA_PORT_FLAG_NEW_PORT)
6400 "Deleting port table entry %p having Port: %d\t Phy_mask 0x%08x\n",
6401 port, port->port_id, port->phy_mask));
6402 list_del(&port->list);
6403 kfree(port);
6408 * _scsih_sas_port_refresh - Update HBA port table after host reset
6525 struct hba_port *port;
6527 port = mpt3sas_get_port_by_id(ioc, port_id, 0);
6528 if (!port)
6531 vphy = mpt3sas_get_vphy_by_phy(ioc, port, phy_num);
6537 if (!port->vphys_mask)
6538 INIT_LIST_HEAD(&port->vphys_list);
6544 port->vphys_mask |= (1 << phy_num);
6547 list_add_tail(&vphy->list, &port->vphys_list);
6550 "vphy entry: %p, port id: %d, phy:%d is added to port's vphys_list\n",
6551 vphy, port->port_id, phy_num);
6561 * During port enable, fw will send topology events for every device. Its
6575 struct hba_port *port;
6604 port = kzalloc(sizeof(struct hba_port), GFP_KERNEL);
6605 if (!port)
6608 port->port_id = port_id;
6610 "hba_port entry: %p, port: %d is added to hba_port list\n",
6611 port, port->port_id);
6613 port->flags = HBA_PORT_FLAG_NEW_PORT;
6614 list_add_tail(&port->list, &ioc->port_table_list);
6670 ioc->sas_hba.phy[i].port =
6674 ioc->sas_hba.phy[i].port);
6713 struct hba_port *port;
6812 port = kzalloc(sizeof(struct hba_port), GFP_KERNEL);
6813 if (!port)
6816 port->port_id = port_id;
6818 "hba_port entry: %p, port: %d is added to hba_port list\n",
6819 port, port->port_id);
6820 list_add_tail(&port->list,
6841 ioc->sas_hba.phy[i].port =
6965 sas_expander->port = mpt3sas_get_port_by_id(ioc, port_id, 0);
6966 if (!sas_expander->port) {
6992 sas_address_parent, sas_expander->port);
7012 sas_expander->phy[i].port =
7041 sas_address_parent, sas_expander->port);
7050 * @port: hba port entry
7054 struct hba_port *port)
7062 if (!port)
7067 sas_address, port);
7198 struct hba_port *port;
7208 /* wide port handling ~ we need only handle device once for the phy that
7221 port = mpt3sas_get_port_by_id(ioc, sas_device_pg0.PhysicalPort, 0);
7222 if (!port)
7225 sas_address, port);
7281 _scsih_ublock_io_device(ioc, sas_address, port);
7395 sas_device->port = mpt3sas_get_port_by_id(ioc, port_id, 0);
7396 if (!sas_device->port) {
7472 sas_device->port);
7481 sas_device->port);
7592 struct hba_port *port;
7614 port = mpt3sas_get_port_by_id(ioc, event_data->PhysicalPort, 0);
7627 port = sas_expander->port;
7670 handle, phy_number, link_rate, port);
7689 handle, phy_number, link_rate, port);
7704 mpt3sas_expander_remove(ioc, sas_address, port);
9717 struct hba_port *port = mpt3sas_get_port_by_id(
9735 if (sas_device->port != port)
10145 struct hba_port *port = mpt3sas_get_port_by_id(
10157 if (sas_expander->port != port)
10198 u8 port;
10216 port = expander_pg0.PhysicalPort;
10218 "\texpander present: handle(0x%04x), sas_addr(0x%016llx), port:%d\n",
10221 port : MULTIPATH_DISABLED_PORT_ID));
10365 sas_expander->port);
10774 ioc_info(ioc, "port enable: complete from worker thread\n"));
11071 port_id = sas_expander->port->port_id;
11074 sas_expander->sas_address_parent, sas_expander->port);
11077 "expander_remove: handle(0x%04x), sas_addr(0x%016llx), port:%d\n",
11272 struct hba_port *port, *port_next;
11339 list_for_each_entry_safe(port, port_next,
11341 list_del(&port->list);
11342 kfree(port);
11432 struct hba_port *port;
11495 port = sas_device->port;
11502 if (!port)
11506 sas_address_parent, port)) {
11512 sas_address_parent, port);
11600 sas_device->sas_address_parent, sas_device->port)) {
11615 sas_device->port);
11786 ioc_info(ioc, "port enable: FAILED\n");
11832 ioc_info(ioc, "port enable: FAILED with timeout (timeout=300s)\n");
11857 "port enable: aborted due to diag reset\n");
11862 ioc_info(ioc, "port enable: FAILED with (ioc_status=0x%08x)\n",
11870 ioc_info(ioc, "port enable: SUCCESS\n");