Print this page
7813 mpt_sas does not like concurrent HBA resets


 920 
 921         /* GEN3 support */
 922         uint8_t                 m_MPI25;
 923 
 924         /*
 925          * Event Replay flag (MUR support)
 926          */
 927         uint8_t                 m_event_replay;
 928 
 929         /*
 930          * IR Capable flag
 931          */
 932         uint8_t                 m_ir_capable;
 933 
 934         /*
 935          * Is HBA processing a diag reset?
 936          */
 937         uint8_t                 m_in_reset;
 938 
 939         /*





 940          * per instance cmd data structures for task management cmds
 941          */
 942         m_event_struct_t        m_event_task_mgmt;      /* must be last */
 943                                                         /* ... scsi_pkt_size */
 944 } mptsas_t;
 945 #define MPTSAS_SIZE     (sizeof (struct mptsas) - \
 946                         sizeof (struct scsi_pkt) + scsi_pkt_size())
 947 /*
 948  * Only one of below two conditions is satisfied, we
 949  * think the target is associated to the iport and
 950  * allow call into mptsas_probe_lun().
 951  * 1. physicalsport == physport
 952  * 2. (phymask & (1 << physport)) == 0
 953  * The condition #2 is because LSI uses lowest PHY
 954  * number as the value of physical port when auto port
 955  * configuration.
 956  */
 957 #define IS_SAME_PORT(physicalport, physport, phymask, dynamicport) \
 958         ((physicalport == physport) || (dynamicport && (phymask & \
 959         (1 << physport))))


1315 int mptsas_send_extended_config_request_msg(mptsas_t *mpt, uint8_t action,
1316     uint8_t extpagetype, uint32_t pageaddress, uint8_t pagenumber,
1317     uint8_t pageversion, uint16_t extpagelength,
1318     uint32_t SGEflagslength, uint64_t SGEaddress);
1319 
1320 int mptsas_request_from_pool(mptsas_t *mpt, mptsas_cmd_t **cmd,
1321     struct scsi_pkt **pkt);
1322 void mptsas_return_to_pool(mptsas_t *mpt, mptsas_cmd_t *cmd);
1323 void mptsas_destroy_ioc_event_cmd(mptsas_t *mpt);
1324 void mptsas_start_config_page_access(mptsas_t *mpt, mptsas_cmd_t *cmd);
1325 int mptsas_access_config_page(mptsas_t *mpt, uint8_t action, uint8_t page_type,
1326     uint8_t page_number, uint32_t page_address, int (*callback) (mptsas_t *,
1327     caddr_t, ddi_acc_handle_t, uint16_t, uint32_t, va_list), ...);
1328 
1329 int mptsas_ioc_task_management(mptsas_t *mpt, int task_type,
1330     uint16_t dev_handle, int lun, uint8_t *reply, uint32_t reply_size,
1331     int mode);
1332 int mptsas_send_event_ack(mptsas_t *mpt, uint32_t event, uint32_t eventcntx);
1333 void mptsas_send_pending_event_ack(mptsas_t *mpt);
1334 void mptsas_set_throttle(struct mptsas *mpt, mptsas_target_t *ptgt, int what);
1335 int mptsas_restart_ioc(mptsas_t *mpt);
1336 void mptsas_update_driver_data(struct mptsas *mpt);
1337 uint64_t mptsas_get_sata_guid(mptsas_t *mpt, mptsas_target_t *ptgt, int lun);
1338 
1339 /*
1340  * init functions
1341  */
1342 int mptsas_ioc_get_facts(mptsas_t *mpt);
1343 int mptsas_ioc_get_port_facts(mptsas_t *mpt, int port);
1344 int mptsas_ioc_enable_port(mptsas_t *mpt);
1345 int mptsas_ioc_enable_event_notification(mptsas_t *mpt);
1346 int mptsas_ioc_init(mptsas_t *mpt);
1347 
1348 /*
1349  * configuration pages operation
1350  */
1351 int mptsas_get_sas_device_page0(mptsas_t *mpt, uint32_t page_address,
1352     uint16_t *dev_handle, uint64_t *sas_wwn, uint32_t *dev_info,
1353     uint8_t *physport, uint8_t *phynum, uint16_t *pdevhandle,
1354     uint16_t *slot_num, uint16_t *enclosure, uint16_t *io_flags);
1355 int mptsas_get_sas_io_unit_page(mptsas_t *mpt);




 920 
 921         /* GEN3 support */
 922         uint8_t                 m_MPI25;
 923 
 924         /*
 925          * Event Replay flag (MUR support)
 926          */
 927         uint8_t                 m_event_replay;
 928 
 929         /*
 930          * IR Capable flag
 931          */
 932         uint8_t                 m_ir_capable;
 933 
 934         /*
 935          * Is HBA processing a diag reset?
 936          */
 937         uint8_t                 m_in_reset;
 938 
 939         /*
 940          * Task management protection
 941          */
 942         kmutex_t                m_taskmgmt_mutex;
 943 
 944         /*
 945          * per instance cmd data structures for task management cmds
 946          */
 947         m_event_struct_t        m_event_task_mgmt;      /* must be last */
 948                                                         /* ... scsi_pkt_size */
 949 } mptsas_t;
 950 #define MPTSAS_SIZE     (sizeof (struct mptsas) - \
 951                         sizeof (struct scsi_pkt) + scsi_pkt_size())
 952 /*
 953  * Only one of below two conditions is satisfied, we
 954  * think the target is associated to the iport and
 955  * allow call into mptsas_probe_lun().
 956  * 1. physicalsport == physport
 957  * 2. (phymask & (1 << physport)) == 0
 958  * The condition #2 is because LSI uses lowest PHY
 959  * number as the value of physical port when auto port
 960  * configuration.
 961  */
 962 #define IS_SAME_PORT(physicalport, physport, phymask, dynamicport) \
 963         ((physicalport == physport) || (dynamicport && (phymask & \
 964         (1 << physport))))


1320 int mptsas_send_extended_config_request_msg(mptsas_t *mpt, uint8_t action,
1321     uint8_t extpagetype, uint32_t pageaddress, uint8_t pagenumber,
1322     uint8_t pageversion, uint16_t extpagelength,
1323     uint32_t SGEflagslength, uint64_t SGEaddress);
1324 
1325 int mptsas_request_from_pool(mptsas_t *mpt, mptsas_cmd_t **cmd,
1326     struct scsi_pkt **pkt);
1327 void mptsas_return_to_pool(mptsas_t *mpt, mptsas_cmd_t *cmd);
1328 void mptsas_destroy_ioc_event_cmd(mptsas_t *mpt);
1329 void mptsas_start_config_page_access(mptsas_t *mpt, mptsas_cmd_t *cmd);
1330 int mptsas_access_config_page(mptsas_t *mpt, uint8_t action, uint8_t page_type,
1331     uint8_t page_number, uint32_t page_address, int (*callback) (mptsas_t *,
1332     caddr_t, ddi_acc_handle_t, uint16_t, uint32_t, va_list), ...);
1333 
1334 int mptsas_ioc_task_management(mptsas_t *mpt, int task_type,
1335     uint16_t dev_handle, int lun, uint8_t *reply, uint32_t reply_size,
1336     int mode);
1337 int mptsas_send_event_ack(mptsas_t *mpt, uint32_t event, uint32_t eventcntx);
1338 void mptsas_send_pending_event_ack(mptsas_t *mpt);
1339 void mptsas_set_throttle(struct mptsas *mpt, mptsas_target_t *ptgt, int what);
1340 int mptsas_reset_handler(mptsas_t *mpt);
1341 void mptsas_update_driver_data(struct mptsas *mpt);
1342 uint64_t mptsas_get_sata_guid(mptsas_t *mpt, mptsas_target_t *ptgt, int lun);
1343 
1344 /*
1345  * init functions
1346  */
1347 int mptsas_ioc_get_facts(mptsas_t *mpt);
1348 int mptsas_ioc_get_port_facts(mptsas_t *mpt, int port);
1349 int mptsas_ioc_enable_port(mptsas_t *mpt);
1350 int mptsas_ioc_enable_event_notification(mptsas_t *mpt);
1351 int mptsas_ioc_init(mptsas_t *mpt);
1352 
1353 /*
1354  * configuration pages operation
1355  */
1356 int mptsas_get_sas_device_page0(mptsas_t *mpt, uint32_t page_address,
1357     uint16_t *dev_handle, uint64_t *sas_wwn, uint32_t *dev_info,
1358     uint8_t *physport, uint8_t *phynum, uint16_t *pdevhandle,
1359     uint16_t *slot_num, uint16_t *enclosure, uint16_t *io_flags);
1360 int mptsas_get_sas_io_unit_page(mptsas_t *mpt);