Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/mega_sas/megaraid_sas.c
          +++ new/usr/src/uts/common/io/mega_sas/megaraid_sas.c
↓ open down ↓ 4557 lines elided ↑ open up ↑
4558 4558  
4559 4559  static int
4560 4560  read_fw_status_reg_ppc(struct megasas_instance *instance)
4561 4561  {
4562 4562          return ((int)RD_OB_SCRATCH_PAD_0(instance));
4563 4563  }
4564 4564  
4565 4565  static void
4566 4566  issue_cmd_xscale(struct megasas_cmd *cmd, struct megasas_instance *instance)
4567 4567  {
4568      -        atomic_add_16(&instance->fw_outstanding, 1);
     4568 +        atomic_inc_16(&instance->fw_outstanding);
4569 4569  
4570 4570          /* Issue the command to the FW */
4571 4571          WR_IB_QPORT((host_to_le32(cmd->frame_phys_addr) >> 3) |
4572 4572              (cmd->frame_count - 1), instance);
4573 4573  }
4574 4574  
4575 4575  static void
4576 4576  issue_cmd_ppc(struct megasas_cmd *cmd, struct megasas_instance *instance)
4577 4577  {
4578      -        atomic_add_16(&instance->fw_outstanding, 1);
     4578 +        atomic_inc_16(&instance->fw_outstanding);
4579 4579  
4580 4580          /* Issue the command to the FW */
4581 4581          WR_IB_QPORT((host_to_le32(cmd->frame_phys_addr)) |
4582 4582              (((cmd->frame_count - 1) << 1) | 1), instance);
4583 4583  }
4584 4584  
4585 4585  /*
4586 4586   * issue_cmd_in_sync_mode
4587 4587   */
4588 4588  static int
↓ open down ↓ 403 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX