hisi_hba 88 drivers/scsi/hisi_sas/hisi_sas.h struct hisi_hba; hisi_hba 121 drivers/scsi/hisi_sas/hisi_sas.h struct hisi_hba *hisi_hba; hisi_hba 128 drivers/scsi/hisi_sas/hisi_sas.h { .hisi_hba = hisi_hba, \ hisi_hba 152 drivers/scsi/hisi_sas/hisi_sas.h struct hisi_hba *hisi_hba; hisi_hba 179 drivers/scsi/hisi_sas/hisi_sas.h struct hisi_hba *hisi_hba; hisi_hba 187 drivers/scsi/hisi_sas/hisi_sas.h struct hisi_hba *hisi_hba; hisi_hba 195 drivers/scsi/hisi_sas/hisi_sas.h struct hisi_hba *hisi_hba; hisi_hba 251 drivers/scsi/hisi_sas/hisi_sas.h u32 (*read_global_reg)(struct hisi_hba *hisi_hba, u32 off); hisi_hba 252 drivers/scsi/hisi_sas/hisi_sas.h u32 (*read_port_reg)(struct hisi_hba *hisi_hba, int port, hisi_hba 274 drivers/scsi/hisi_sas/hisi_sas.h int (*hw_init)(struct hisi_hba *hisi_hba); hisi_hba 275 drivers/scsi/hisi_sas/hisi_sas.h void (*setup_itct)(struct hisi_hba *hisi_hba, hisi_hba 277 drivers/scsi/hisi_sas/hisi_sas.h int (*slot_index_alloc)(struct hisi_hba *hisi_hba, hisi_hba 280 drivers/scsi/hisi_sas/hisi_sas.h void (*sl_notify_ssp)(struct hisi_hba *hisi_hba, int phy_no); hisi_hba 282 drivers/scsi/hisi_sas/hisi_sas.h void (*prep_ssp)(struct hisi_hba *hisi_hba, hisi_hba 284 drivers/scsi/hisi_sas/hisi_sas.h void (*prep_smp)(struct hisi_hba *hisi_hba, hisi_hba 286 drivers/scsi/hisi_sas/hisi_sas.h void (*prep_stp)(struct hisi_hba *hisi_hba, hisi_hba 288 drivers/scsi/hisi_sas/hisi_sas.h void (*prep_abort)(struct hisi_hba *hisi_hba, hisi_hba 291 drivers/scsi/hisi_sas/hisi_sas.h void (*phys_init)(struct hisi_hba *hisi_hba); hisi_hba 292 drivers/scsi/hisi_sas/hisi_sas.h void (*phy_start)(struct hisi_hba *hisi_hba, int phy_no); hisi_hba 293 drivers/scsi/hisi_sas/hisi_sas.h void (*phy_disable)(struct hisi_hba *hisi_hba, int phy_no); hisi_hba 294 drivers/scsi/hisi_sas/hisi_sas.h void (*phy_hard_reset)(struct hisi_hba *hisi_hba, int phy_no); hisi_hba 295 drivers/scsi/hisi_sas/hisi_sas.h void (*get_events)(struct hisi_hba *hisi_hba, int phy_no); hisi_hba 296 drivers/scsi/hisi_sas/hisi_sas.h void (*phy_set_linkrate)(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 299 drivers/scsi/hisi_sas/hisi_sas.h void (*clear_itct)(struct hisi_hba *hisi_hba, hisi_hba 302 drivers/scsi/hisi_sas/hisi_sas.h int (*get_wideport_bitmap)(struct hisi_hba *hisi_hba, int port_id); hisi_hba 303 drivers/scsi/hisi_sas/hisi_sas.h void (*dereg_device)(struct hisi_hba *hisi_hba, hisi_hba 305 drivers/scsi/hisi_sas/hisi_sas.h int (*soft_reset)(struct hisi_hba *hisi_hba); hisi_hba 306 drivers/scsi/hisi_sas/hisi_sas.h u32 (*get_phys_state)(struct hisi_hba *hisi_hba); hisi_hba 307 drivers/scsi/hisi_sas/hisi_sas.h int (*write_gpio)(struct hisi_hba *hisi_hba, u8 reg_type, hisi_hba 309 drivers/scsi/hisi_sas/hisi_sas.h void (*wait_cmds_complete_timeout)(struct hisi_hba *hisi_hba, hisi_hba 311 drivers/scsi/hisi_sas/hisi_sas.h void (*snapshot_prepare)(struct hisi_hba *hisi_hba); hisi_hba 312 drivers/scsi/hisi_sas/hisi_sas.h void (*snapshot_restore)(struct hisi_hba *hisi_hba); hisi_hba 313 drivers/scsi/hisi_sas/hisi_sas.h int (*set_bist)(struct hisi_hba *hisi_hba, bool enable); hisi_hba 314 drivers/scsi/hisi_sas/hisi_sas.h void (*read_iost_itct_cache)(struct hisi_hba *hisi_hba, hisi_hba 561 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_stop_phys(struct hisi_hba *hisi_hba); hisi_hba 562 drivers/scsi/hisi_sas/hisi_sas.h extern int hisi_sas_alloc(struct hisi_hba *hisi_hba); hisi_hba 563 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_free(struct hisi_hba *hisi_hba); hisi_hba 569 drivers/scsi/hisi_sas/hisi_sas.h extern int hisi_sas_get_fw_info(struct hisi_hba *hisi_hba); hisi_hba 578 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_phy_enable(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 580 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_phy_down(struct hisi_hba *hisi_hba, int phy_no, int rdy); hisi_hba 581 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, hisi_hba 584 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_init_mem(struct hisi_hba *hisi_hba); hisi_hba 587 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_kill_tasklets(struct hisi_hba *hisi_hba); hisi_hba 588 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_phy_oob_ready(struct hisi_hba *hisi_hba, int phy_no); hisi_hba 591 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_release_tasks(struct hisi_hba *hisi_hba); hisi_hba 593 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_controller_reset_prepare(struct hisi_hba *hisi_hba); hisi_hba 594 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_controller_reset_done(struct hisi_hba *hisi_hba); hisi_hba 595 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_debugfs_init(struct hisi_hba *hisi_hba); hisi_hba 596 drivers/scsi/hisi_sas/hisi_sas.h extern void hisi_sas_debugfs_exit(struct hisi_hba *hisi_hba); hisi_hba 16 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, hisi_hba 22 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_release_task(struct hisi_hba *hisi_hba, hisi_hba 137 drivers/scsi/hisi_sas/hisi_sas_main.c static struct hisi_hba *dev_to_hisi_hba(struct domain_device *device) hisi_hba 148 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_stop_phys(struct hisi_hba *hisi_hba) hisi_hba 152 drivers/scsi/hisi_sas/hisi_sas_main.c for (phy_no = 0; phy_no < hisi_hba->n_phy; phy_no++) hisi_hba 153 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_enable(hisi_hba, phy_no, 0); hisi_hba 157 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_slot_index_clear(struct hisi_hba *hisi_hba, int slot_idx) hisi_hba 159 drivers/scsi/hisi_sas/hisi_sas_main.c void *bitmap = hisi_hba->slot_index_tags; hisi_hba 164 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_slot_index_free(struct hisi_hba *hisi_hba, int slot_idx) hisi_hba 168 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->hw->slot_index_alloc || hisi_hba 170 drivers/scsi/hisi_sas/hisi_sas_main.c spin_lock_irqsave(&hisi_hba->lock, flags); hisi_hba 171 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_slot_index_clear(hisi_hba, slot_idx); hisi_hba 172 drivers/scsi/hisi_sas/hisi_sas_main.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 176 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_slot_index_set(struct hisi_hba *hisi_hba, int slot_idx) hisi_hba 178 drivers/scsi/hisi_sas/hisi_sas_main.c void *bitmap = hisi_hba->slot_index_tags; hisi_hba 183 drivers/scsi/hisi_sas/hisi_sas_main.c static int hisi_sas_slot_index_alloc(struct hisi_hba *hisi_hba, hisi_hba 187 drivers/scsi/hisi_sas/hisi_sas_main.c void *bitmap = hisi_hba->slot_index_tags; hisi_hba 193 drivers/scsi/hisi_sas/hisi_sas_main.c spin_lock_irqsave(&hisi_hba->lock, flags); hisi_hba 194 drivers/scsi/hisi_sas/hisi_sas_main.c index = find_next_zero_bit(bitmap, hisi_hba->slot_index_count, hisi_hba 195 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->last_slot_index + 1); hisi_hba 196 drivers/scsi/hisi_sas/hisi_sas_main.c if (index >= hisi_hba->slot_index_count) { hisi_hba 198 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->slot_index_count, hisi_hba 200 drivers/scsi/hisi_sas/hisi_sas_main.c if (index >= hisi_hba->slot_index_count) { hisi_hba 201 drivers/scsi/hisi_sas/hisi_sas_main.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 205 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_slot_index_set(hisi_hba, index); hisi_hba 206 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->last_slot_index = index; hisi_hba 207 drivers/scsi/hisi_sas/hisi_sas_main.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 212 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_slot_index_init(struct hisi_hba *hisi_hba) hisi_hba 216 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->slot_index_count; ++i) hisi_hba 217 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_slot_index_clear(hisi_hba, i); hisi_hba 220 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, hisi_hba 225 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_device *sas_dev = &hisi_hba->devices[device_id]; hisi_hba 228 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 256 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_slot_index_free(hisi_hba, slot->idx); hisi_hba 260 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_task_prep_smp(struct hisi_hba *hisi_hba, hisi_hba 263 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->prep_smp(hisi_hba, slot); hisi_hba 266 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_task_prep_ssp(struct hisi_hba *hisi_hba, hisi_hba 269 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->prep_ssp(hisi_hba, slot); hisi_hba 272 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_task_prep_ata(struct hisi_hba *hisi_hba, hisi_hba 275 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->prep_stp(hisi_hba, slot); hisi_hba 278 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_task_prep_abort(struct hisi_hba *hisi_hba, hisi_hba 282 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->prep_abort(hisi_hba, slot, hisi_hba 286 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_dma_unmap(struct hisi_hba *hisi_hba, hisi_hba 290 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 306 drivers/scsi/hisi_sas/hisi_sas_main.c static int hisi_sas_dma_map(struct hisi_hba *hisi_hba, hisi_hba 310 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 350 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dma_unmap(hisi_hba, task, *n_elem, hisi_hba 356 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_dif_dma_unmap(struct hisi_hba *hisi_hba, hisi_hba 359 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 371 drivers/scsi/hisi_sas/hisi_sas_main.c static int hisi_sas_dif_dma_map(struct hisi_hba *hisi_hba, hisi_hba 374 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 415 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 421 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 439 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->reply_map) { hisi_hba 441 drivers/scsi/hisi_sas/hisi_sas_main.c unsigned int dq_index = hisi_hba->reply_map[cpu]; hisi_hba 443 drivers/scsi/hisi_sas/hisi_sas_main.c *dq_pointer = dq = &hisi_hba->dq[dq_index]; hisi_hba 458 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_dma_map(hisi_hba, task, &n_elem, hisi_hba 464 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_dif_dma_map(hisi_hba, &n_elem_dif, task); hisi_hba 469 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->hw->slot_index_alloc) hisi_hba 470 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device); hisi_hba 484 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_slot_index_alloc(hisi_hba, scsi_cmnd); hisi_hba 490 drivers/scsi/hisi_sas/hisi_sas_main.c slot = &hisi_hba->slot_info[slot_idx]; hisi_hba 509 drivers/scsi/hisi_sas/hisi_sas_main.c cmd_hdr_base = hisi_hba->cmd_hdr[dlvry_queue]; hisi_hba 524 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_task_prep_smp(hisi_hba, slot); hisi_hba 527 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_task_prep_ssp(hisi_hba, slot); hisi_hba 532 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_task_prep_ata(hisi_hba, slot); hisi_hba 551 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dif_dma_unmap(hisi_hba, task, n_elem_dif); hisi_hba 553 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dma_unmap(hisi_hba, task, n_elem, hisi_hba 566 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba; hisi_hba 586 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba = dev_to_hisi_hba(device); hisi_hba 587 drivers/scsi/hisi_sas/hisi_sas_main.c dev = hisi_hba->dev; hisi_hba 589 drivers/scsi/hisi_sas/hisi_sas_main.c if (unlikely(test_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags))) { hisi_hba 599 drivers/scsi/hisi_sas/hisi_sas_main.c down(&hisi_hba->sem); hisi_hba 600 drivers/scsi/hisi_sas/hisi_sas_main.c up(&hisi_hba->sem); hisi_hba 610 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->start_delivery(dq); hisi_hba 617 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_bytes_dmaed(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 619 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 626 drivers/scsi/hisi_sas/hisi_sas_main.c sas_ha = &hisi_hba->sha; hisi_hba 635 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->phy_get_max_linkrate(); hisi_hba 660 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 663 drivers/scsi/hisi_sas/hisi_sas_main.c int last = hisi_hba->last_dev_id; hisi_hba 664 drivers/scsi/hisi_sas/hisi_sas_main.c int first = (hisi_hba->last_dev_id + 1) % HISI_SAS_MAX_DEVICES; hisi_hba 667 drivers/scsi/hisi_sas/hisi_sas_main.c spin_lock_irqsave(&hisi_hba->lock, flags); hisi_hba 669 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->devices[i].dev_type == SAS_PHY_UNUSED) { hisi_hba 670 drivers/scsi/hisi_sas/hisi_sas_main.c int queue = i % hisi_hba->queue_count; hisi_hba 671 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_dq *dq = &hisi_hba->dq[queue]; hisi_hba 673 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->devices[i].device_id = i; hisi_hba 674 drivers/scsi/hisi_sas/hisi_sas_main.c sas_dev = &hisi_hba->devices[i]; hisi_hba 677 drivers/scsi/hisi_sas/hisi_sas_main.c sas_dev->hisi_hba = hisi_hba; hisi_hba 681 drivers/scsi/hisi_sas/hisi_sas_main.c INIT_LIST_HEAD(&hisi_hba->devices[i].list); hisi_hba 686 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->last_dev_id = i; hisi_hba 687 drivers/scsi/hisi_sas/hisi_sas_main.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 699 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 700 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 712 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_task(hisi_hba, device); hisi_hba 727 drivers/scsi/hisi_sas/hisi_sas_main.c !test_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags)) { hisi_hba 761 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 764 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 767 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->hw->alloc_dev) hisi_hba 768 drivers/scsi/hisi_sas/hisi_sas_main.c sas_dev = hisi_hba->hw->alloc_dev(device); hisi_hba 778 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->setup_itct(hisi_hba, sas_dev); hisi_hba 832 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = shost_priv(shost); hisi_hba 834 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->phys_init(hisi_hba); hisi_hba 840 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = shost_priv(shost); hisi_hba 841 drivers/scsi/hisi_sas/hisi_sas_main.c struct sas_ha_struct *sha = &hisi_hba->sha; hisi_hba 856 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 861 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->sl_notify_ssp(hisi_hba, phy_no); hisi_hba 862 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_bytes_dmaed(hisi_hba, phy_no); hisi_hba 882 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 887 drivers/scsi/hisi_sas/hisi_sas_main.c return queue_work(hisi_hba->wq, &phy->works[event]); hisi_hba 894 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 895 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 902 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_phy_oob_ready(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 904 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 905 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 915 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_phy_init(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 917 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 921 drivers/scsi/hisi_sas/hisi_sas_main.c phy->hisi_hba = hisi_hba; hisi_hba 924 drivers/scsi/hisi_sas/hisi_sas_main.c phy->maximum_linkrate = hisi_hba->hw->phy_get_max_linkrate(); hisi_hba 925 drivers/scsi/hisi_sas/hisi_sas_main.c sas_phy->enabled = (phy_no < hisi_hba->n_phy) ? 1 : 0; hisi_hba 934 drivers/scsi/hisi_sas/hisi_sas_main.c sas_phy->sas_addr = &hisi_hba->sas_addr[0]; hisi_hba 936 drivers/scsi/hisi_sas/hisi_sas_main.c sas_phy->ha = (struct sas_ha_struct *)hisi_hba->shost->hostdata; hisi_hba 948 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_phy_enable(struct hisi_hba *hisi_hba, int phy_no, int enable) hisi_hba 950 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 961 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->phy_start(hisi_hba, phy_no); hisi_hba 964 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->phy_disable(hisi_hba, phy_no); hisi_hba 974 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = sas_ha->lldd_ha; hisi_hba 984 drivers/scsi/hisi_sas/hisi_sas_main.c spin_lock_irqsave(&hisi_hba->lock, flags); hisi_hba 989 drivers/scsi/hisi_sas/hisi_sas_main.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 992 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_do_release_task(struct hisi_hba *hisi_hba, struct sas_task *task, hisi_hba 1011 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_slot_task_free(hisi_hba, task, slot); hisi_hba 1014 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_release_task(struct hisi_hba *hisi_hba, hisi_hba 1021 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_do_release_task(hisi_hba, slot->task, slot); hisi_hba 1024 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_release_tasks(struct hisi_hba *hisi_hba) hisi_hba 1031 drivers/scsi/hisi_sas/hisi_sas_main.c sas_dev = &hisi_hba->devices[i]; hisi_hba 1038 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_task(hisi_hba, device); hisi_hba 1043 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_dereg_device(struct hisi_hba *hisi_hba, hisi_hba 1046 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->hw->dereg_device) hisi_hba 1047 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->dereg_device(hisi_hba, device); hisi_hba 1053 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 1054 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1059 drivers/scsi/hisi_sas/hisi_sas_main.c down(&hisi_hba->sem); hisi_hba 1060 drivers/scsi/hisi_sas/hisi_sas_main.c if (!test_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags)) { hisi_hba 1061 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1064 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dereg_device(hisi_hba, device); hisi_hba 1066 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->clear_itct(hisi_hba, sas_dev); hisi_hba 1070 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->hw->free_device) hisi_hba 1071 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->free_device(sas_dev); hisi_hba 1074 drivers/scsi/hisi_sas/hisi_sas_main.c up(&hisi_hba->sem); hisi_hba 1082 drivers/scsi/hisi_sas/hisi_sas_main.c static int hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 1087 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1109 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_enable(hisi_hba, phy_no, 0); hisi_hba 1111 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->phy_set_linkrate(hisi_hba, phy_no, &_r); hisi_hba 1112 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_enable(hisi_hba, phy_no, 1); hisi_hba 1121 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = sas_ha->lldd_ha; hisi_hba 1126 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->phy_hard_reset(hisi_hba, phy_no); hisi_hba 1130 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_enable(hisi_hba, phy_no, 0); hisi_hba 1132 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_enable(hisi_hba, phy_no, 1); hisi_hba 1136 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_enable(hisi_hba, phy_no, 0); hisi_hba 1140 drivers/scsi/hisi_sas/hisi_sas_main.c return hisi_sas_phy_set_linkrate(hisi_hba, phy_no, funcdata); hisi_hba 1142 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->hw->get_events) { hisi_hba 1143 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->get_events(hisi_hba, phy_no); hisi_hba 1186 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = sas_dev->hisi_hba; hisi_hba 1187 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1230 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->cq[slot->dlvry_queue]; hisi_hba 1316 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 1317 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1344 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_task(hisi_hba, device); hisi_hba 1363 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_refresh_port_id(struct hisi_hba *hisi_hba) hisi_hba 1365 drivers/scsi/hisi_sas/hisi_sas_main.c u32 state = hisi_hba->hw->get_phys_state(hisi_hba); hisi_hba 1369 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; hisi_hba 1396 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->setup_itct(hisi_hba, sas_dev); hisi_hba 1402 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_rescan_topology(struct hisi_hba *hisi_hba, u32 state) hisi_hba 1404 drivers/scsi/hisi_sas/hisi_sas_main.c struct sas_ha_struct *sas_ha = &hisi_hba->sha; hisi_hba 1408 drivers/scsi/hisi_sas/hisi_sas_main.c for (phy_no = 0; phy_no < hisi_hba->n_phy; phy_no++) { hisi_hba 1409 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1429 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_down(hisi_hba, phy_no, 0); hisi_hba 1435 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_reset_init_all_devices(struct hisi_hba *hisi_hba) hisi_hba 1442 drivers/scsi/hisi_sas/hisi_sas_main.c sas_dev = &hisi_hba->devices[i]; hisi_hba 1452 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_send_ata_reset_each_phy(struct hisi_hba *hisi_hba, hisi_hba 1458 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1466 drivers/scsi/hisi_sas/hisi_sas_main.c state = hisi_hba->hw->get_phys_state(hisi_hba); hisi_hba 1487 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_terminate_stp_reject(struct hisi_hba *hisi_hba) hisi_hba 1489 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1493 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; hisi_hba 1499 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1505 drivers/scsi/hisi_sas/hisi_sas_main.c for (port_no = 0; port_no < hisi_hba->n_phy; port_no++) { hisi_hba 1506 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_port *port = &hisi_hba->port[port_no]; hisi_hba 1518 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_send_ata_reset_each_phy(hisi_hba, hisi_hba 1527 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_controller_reset_prepare(struct hisi_hba *hisi_hba) hisi_hba 1529 drivers/scsi/hisi_sas/hisi_sas_main.c struct Scsi_Host *shost = hisi_hba->shost; hisi_hba 1531 drivers/scsi/hisi_sas/hisi_sas_main.c down(&hisi_hba->sem); hisi_hba 1532 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->phy_state = hisi_hba->hw->get_phys_state(hisi_hba); hisi_hba 1535 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->wait_cmds_complete_timeout(hisi_hba, 100, 5000); hisi_hba 1537 drivers/scsi/hisi_sas/hisi_sas_main.c if (timer_pending(&hisi_hba->timer)) hisi_hba 1538 drivers/scsi/hisi_sas/hisi_sas_main.c del_timer_sync(&hisi_hba->timer); hisi_hba 1540 drivers/scsi/hisi_sas/hisi_sas_main.c set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 1544 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_controller_reset_done(struct hisi_hba *hisi_hba) hisi_hba 1546 drivers/scsi/hisi_sas/hisi_sas_main.c struct Scsi_Host *shost = hisi_hba->shost; hisi_hba 1550 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->phys_init(hisi_hba); hisi_hba 1552 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_refresh_port_id(hisi_hba); hisi_hba 1553 drivers/scsi/hisi_sas/hisi_sas_main.c clear_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 1555 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->reject_stp_links_msk) hisi_hba 1556 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_terminate_stp_reject(hisi_hba); hisi_hba 1557 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_reset_init_all_devices(hisi_hba); hisi_hba 1558 drivers/scsi/hisi_sas/hisi_sas_main.c up(&hisi_hba->sem); hisi_hba 1560 drivers/scsi/hisi_sas/hisi_sas_main.c clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags); hisi_hba 1562 drivers/scsi/hisi_sas/hisi_sas_main.c state = hisi_hba->hw->get_phys_state(hisi_hba); hisi_hba 1563 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_rescan_topology(hisi_hba, state); hisi_hba 1567 drivers/scsi/hisi_sas/hisi_sas_main.c static int hisi_sas_controller_reset(struct hisi_hba *hisi_hba) hisi_hba 1569 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1570 drivers/scsi/hisi_sas/hisi_sas_main.c struct Scsi_Host *shost = hisi_hba->shost; hisi_hba 1573 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct) hisi_hba 1574 drivers/scsi/hisi_sas/hisi_sas_main.c queue_work(hisi_hba->wq, &hisi_hba->debugfs_work); hisi_hba 1576 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->hw->soft_reset) hisi_hba 1579 drivers/scsi/hisi_sas/hisi_sas_main.c if (test_and_set_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags)) hisi_hba 1583 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_controller_reset_prepare(hisi_hba); hisi_hba 1585 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_hba->hw->soft_reset(hisi_hba); hisi_hba 1588 drivers/scsi/hisi_sas/hisi_sas_main.c clear_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 1589 drivers/scsi/hisi_sas/hisi_sas_main.c up(&hisi_hba->sem); hisi_hba 1591 drivers/scsi/hisi_sas/hisi_sas_main.c clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags); hisi_hba 1595 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_controller_reset_done(hisi_hba); hisi_hba 1607 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba; hisi_hba 1615 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba = dev_to_hisi_hba(task->dev); hisi_hba 1616 drivers/scsi/hisi_sas/hisi_sas_main.c dev = hisi_hba->dev; hisi_hba 1628 drivers/scsi/hisi_sas/hisi_sas_main.c cq = &hisi_hba->cq[slot->dlvry_queue]; hisi_hba 1651 drivers/scsi/hisi_sas/hisi_sas_main.c rc2 = hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1667 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_do_release_task(hisi_hba, task, slot); hisi_hba 1672 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1679 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dereg_device(hisi_hba, device); hisi_hba 1686 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_cq *cq = &hisi_hba->cq[slot->dlvry_queue]; hisi_hba 1688 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1709 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 1710 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1714 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1720 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dereg_device(hisi_hba, device); hisi_hba 1726 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_task(hisi_hba, device); hisi_hba 1746 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 1747 drivers/scsi/hisi_sas/hisi_sas_main.c struct sas_ha_struct *sas_ha = &hisi_hba->sha; hisi_hba 1786 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_down(hisi_hba, sas_phy->id, 0); hisi_hba 1801 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 1802 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1805 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1811 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dereg_device(hisi_hba, device); hisi_hba 1822 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_task(hisi_hba, device); hisi_hba 1830 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dev_to_hisi_hba(device); hisi_hba 1831 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1835 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 1841 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_dereg_device(hisi_hba, device); hisi_hba 1851 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_task(hisi_hba, device); hisi_hba 1858 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_task(hisi_hba, device); hisi_hba 1869 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = sas_ha->lldd_ha; hisi_hba 1870 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1874 drivers/scsi/hisi_sas/hisi_sas_main.c queue_work(hisi_hba->wq, &r.work); hisi_hba 1880 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; hisi_hba 1893 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_release_tasks(hisi_hba); hisi_hba 1933 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_internal_abort_task_exec(struct hisi_hba *hisi_hba, int device_id, hisi_hba 1939 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 1948 drivers/scsi/hisi_sas/hisi_sas_main.c if (unlikely(test_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags))) hisi_hba 1957 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_sas_slot_index_alloc(hisi_hba, NULL); hisi_hba 1962 drivers/scsi/hisi_sas/hisi_sas_main.c slot = &hisi_hba->slot_info[slot_idx]; hisi_hba 1980 drivers/scsi/hisi_sas/hisi_sas_main.c cmd_hdr_base = hisi_hba->cmd_hdr[dlvry_queue]; hisi_hba 1992 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_task_prep_abort(hisi_hba, slot, device_id, hisi_hba 2001 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->start_delivery(dq); hisi_hba 2023 drivers/scsi/hisi_sas/hisi_sas_main.c _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, hisi_hba 2029 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 2038 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->hw->prep_abort) hisi_hba 2052 drivers/scsi/hisi_sas/hisi_sas_main.c res = hisi_sas_internal_abort_task_exec(hisi_hba, sas_dev->device_id, hisi_hba 2065 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct) hisi_hba 2066 drivers/scsi/hisi_sas/hisi_sas_main.c queue_work(hisi_hba->wq, &hisi_hba->debugfs_work); hisi_hba 2073 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->cq[slot->dlvry_queue]; hisi_hba 2112 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, hisi_hba 2117 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 2123 drivers/scsi/hisi_sas/hisi_sas_main.c slot = &hisi_hba->slot_info[tag]; hisi_hba 2124 drivers/scsi/hisi_sas/hisi_sas_main.c dq = &hisi_hba->dq[slot->dlvry_queue]; hisi_hba 2125 drivers/scsi/hisi_sas/hisi_sas_main.c return _hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 2128 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->cq_nvecs; i++) { hisi_hba 2129 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_cq *cq = &hisi_hba->cq[i]; hisi_hba 2134 drivers/scsi/hisi_sas/hisi_sas_main.c dq = &hisi_hba->dq[i]; hisi_hba 2135 drivers/scsi/hisi_sas/hisi_sas_main.c rc = _hisi_sas_internal_task_abort(hisi_hba, device, hisi_hba 2159 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 2161 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->hw->write_gpio) hisi_hba 2164 drivers/scsi/hisi_sas/hisi_sas_main.c return hisi_hba->hw->write_gpio(hisi_hba, reg_type, hisi_hba 2186 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_phy_down(struct hisi_hba *hisi_hba, int phy_no, int rdy) hisi_hba 2188 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 2190 drivers/scsi/hisi_sas/hisi_sas_main.c struct sas_ha_struct *sas_ha = &hisi_hba->sha; hisi_hba 2191 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 2195 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_bytes_dmaed(hisi_hba, phy_no); hisi_hba 2200 drivers/scsi/hisi_sas/hisi_sas_main.c if (test_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags) || hisi_hba 2213 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->hw->get_wideport_bitmap(hisi_hba, hisi_hba 2224 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_kill_tasklets(struct hisi_hba *hisi_hba) hisi_hba 2228 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->cq_nvecs; i++) { hisi_hba 2229 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_cq *cq = &hisi_hba->cq[i]; hisi_hba 2238 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = shost_priv(shost); hisi_hba 2243 drivers/scsi/hisi_sas/hisi_sas_main.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 2268 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_init_mem(struct hisi_hba *hisi_hba) hisi_hba 2271 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_breakpoint *sata_breakpoint = hisi_hba->sata_breakpoint; hisi_hba 2273 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->queue_count; i++) { hisi_hba 2274 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_cq *cq = &hisi_hba->cq[i]; hisi_hba 2275 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_dq *dq = &hisi_hba->dq[i]; hisi_hba 2276 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_cmd_hdr *cmd_hdr = hisi_hba->cmd_hdr[i]; hisi_hba 2284 drivers/scsi/hisi_sas/hisi_sas_main.c s = hisi_hba->hw->complete_hdr_size * HISI_SAS_QUEUE_SLOTS; hisi_hba 2285 drivers/scsi/hisi_sas/hisi_sas_main.c memset(hisi_hba->complete_hdr[i], 0, s); hisi_hba 2289 drivers/scsi/hisi_sas/hisi_sas_main.c s = sizeof(struct hisi_sas_initial_fis) * hisi_hba->n_phy; hisi_hba 2290 drivers/scsi/hisi_sas/hisi_sas_main.c memset(hisi_hba->initial_fis, 0, s); hisi_hba 2293 drivers/scsi/hisi_sas/hisi_sas_main.c memset(hisi_hba->iost, 0, s); hisi_hba 2296 drivers/scsi/hisi_sas/hisi_sas_main.c memset(hisi_hba->breakpoint, 0, s); hisi_hba 2304 drivers/scsi/hisi_sas/hisi_sas_main.c int hisi_sas_alloc(struct hisi_hba *hisi_hba) hisi_hba 2306 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 2311 drivers/scsi/hisi_sas/hisi_sas_main.c sema_init(&hisi_hba->sem, 1); hisi_hba 2312 drivers/scsi/hisi_sas/hisi_sas_main.c spin_lock_init(&hisi_hba->lock); hisi_hba 2313 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 2314 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_phy_init(hisi_hba, i); hisi_hba 2315 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->port[i].port_attached = 0; hisi_hba 2316 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->port[i].id = -1; hisi_hba 2320 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->devices[i].dev_type = SAS_PHY_UNUSED; hisi_hba 2321 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->devices[i].device_id = i; hisi_hba 2322 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->devices[i].dev_status = HISI_SAS_DEV_INIT; hisi_hba 2325 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->queue_count; i++) { hisi_hba 2326 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_cq *cq = &hisi_hba->cq[i]; hisi_hba 2327 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_dq *dq = &hisi_hba->dq[i]; hisi_hba 2331 drivers/scsi/hisi_sas/hisi_sas_main.c cq->hisi_hba = hisi_hba; hisi_hba 2337 drivers/scsi/hisi_sas/hisi_sas_main.c dq->hisi_hba = hisi_hba; hisi_hba 2341 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->cmd_hdr[i] = dmam_alloc_coherent(dev, s, hisi_hba 2342 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->cmd_hdr_dma[i], hisi_hba 2344 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->cmd_hdr[i]) hisi_hba 2348 drivers/scsi/hisi_sas/hisi_sas_main.c s = hisi_hba->hw->complete_hdr_size * HISI_SAS_QUEUE_SLOTS; hisi_hba 2349 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->complete_hdr[i] = dmam_alloc_coherent(dev, s, hisi_hba 2350 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->complete_hdr_dma[i], hisi_hba 2352 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->complete_hdr[i]) hisi_hba 2357 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->itct = dmam_alloc_coherent(dev, s, &hisi_hba->itct_dma, hisi_hba 2359 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->itct) hisi_hba 2362 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->slot_info = devm_kcalloc(dev, max_command_entries, hisi_hba 2365 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->slot_info) hisi_hba 2370 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->prot_mask & HISI_SAS_DIX_PROT_MASK) hisi_hba 2392 drivers/scsi/hisi_sas/hisi_sas_main.c slot = &hisi_hba->slot_info[slot_index]; hisi_hba 2403 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->iost = dmam_alloc_coherent(dev, s, &hisi_hba->iost_dma, hisi_hba 2405 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->iost) hisi_hba 2409 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->breakpoint = dmam_alloc_coherent(dev, s, hisi_hba 2410 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->breakpoint_dma, hisi_hba 2412 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->breakpoint) hisi_hba 2415 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->slot_index_count = max_command_entries; hisi_hba 2416 drivers/scsi/hisi_sas/hisi_sas_main.c s = hisi_hba->slot_index_count / BITS_PER_BYTE; hisi_hba 2417 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->slot_index_tags = devm_kzalloc(dev, s, GFP_KERNEL); hisi_hba 2418 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->slot_index_tags) hisi_hba 2422 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->initial_fis = dmam_alloc_coherent(dev, s, hisi_hba 2423 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->initial_fis_dma, hisi_hba 2425 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->initial_fis) hisi_hba 2429 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->sata_breakpoint = dmam_alloc_coherent(dev, s, hisi_hba 2430 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->sata_breakpoint_dma, hisi_hba 2432 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->sata_breakpoint) hisi_hba 2435 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_slot_index_init(hisi_hba); hisi_hba 2436 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->last_slot_index = HISI_SAS_UNRESERVED_IPTT; hisi_hba 2438 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->wq = create_singlethread_workqueue(dev_name(dev)); hisi_hba 2439 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->wq) { hisi_hba 2450 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_free(struct hisi_hba *hisi_hba) hisi_hba 2454 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 2455 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_phy *phy = &hisi_hba->phy[i]; hisi_hba 2460 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->wq) hisi_hba 2461 drivers/scsi/hisi_sas/hisi_sas_main.c destroy_workqueue(hisi_hba->wq); hisi_hba 2467 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = hisi_hba 2468 drivers/scsi/hisi_sas/hisi_sas_main.c container_of(work, struct hisi_hba, rst_work); hisi_hba 2470 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_controller_reset(hisi_hba); hisi_hba 2479 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_sas_controller_reset(rst->hisi_hba)) hisi_hba 2485 drivers/scsi/hisi_sas/hisi_sas_main.c int hisi_sas_get_fw_info(struct hisi_hba *hisi_hba) hisi_hba 2487 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 2488 drivers/scsi/hisi_sas/hisi_sas_main.c struct platform_device *pdev = hisi_hba->platform_dev; hisi_hba 2492 drivers/scsi/hisi_sas/hisi_sas_main.c if (device_property_read_u8_array(dev, "sas-addr", hisi_hba->sas_addr, hisi_hba 2503 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->ctrl = syscon_regmap_lookup_by_phandle(np, hisi_hba 2505 drivers/scsi/hisi_sas/hisi_sas_main.c if (IS_ERR(hisi_hba->ctrl)) { hisi_hba 2511 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->ctrl_reset_reg)) { hisi_hba 2517 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->ctrl_reset_sts_reg)) { hisi_hba 2523 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->ctrl_clock_ena_reg)) { hisi_hba 2533 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->refclk_frequency_mhz = clk_get_rate(refclk) / 1000000; hisi_hba 2535 drivers/scsi/hisi_sas/hisi_sas_main.c if (device_property_read_u32(dev, "phy-count", &hisi_hba->n_phy)) { hisi_hba 2541 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->queue_count)) { hisi_hba 2555 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba; hisi_hba 2559 drivers/scsi/hisi_sas/hisi_sas_main.c shost = scsi_host_alloc(hw->sht, sizeof(*hisi_hba)); hisi_hba 2564 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba = shost_priv(shost); hisi_hba 2566 drivers/scsi/hisi_sas/hisi_sas_main.c INIT_WORK(&hisi_hba->rst_work, hisi_sas_rst_work_handler); hisi_hba 2567 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw = hw; hisi_hba 2568 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->dev = dev; hisi_hba 2569 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->platform_dev = pdev; hisi_hba 2570 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->shost = shost; hisi_hba 2571 drivers/scsi/hisi_sas/hisi_sas_main.c SHOST_TO_SAS_HA(shost) = &hisi_hba->sha; hisi_hba 2573 drivers/scsi/hisi_sas/hisi_sas_main.c timer_setup(&hisi_hba->timer, NULL, 0); hisi_hba 2575 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_sas_get_fw_info(hisi_hba) < 0) hisi_hba 2587 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->regs = devm_platform_ioremap_resource(pdev, 0); hisi_hba 2588 drivers/scsi/hisi_sas/hisi_sas_main.c if (IS_ERR(hisi_hba->regs)) hisi_hba 2593 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->sgpio_regs = devm_ioremap_resource(dev, res); hisi_hba 2594 drivers/scsi/hisi_sas/hisi_sas_main.c if (IS_ERR(hisi_hba->sgpio_regs)) hisi_hba 2598 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_sas_alloc(hisi_hba)) { hisi_hba 2599 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_free(hisi_hba); hisi_hba 2614 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba; hisi_hba 2626 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba = shost_priv(shost); hisi_hba 2629 drivers/scsi/hisi_sas/hisi_sas_main.c phy_nr = port_nr = hisi_hba->n_phy; hisi_hba 2640 drivers/scsi/hisi_sas/hisi_sas_main.c sha->lldd_ha = hisi_hba; hisi_hba 2647 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->hw->slot_index_alloc) { hisi_hba 2656 drivers/scsi/hisi_sas/hisi_sas_main.c sha->dev = hisi_hba->dev; hisi_hba 2658 drivers/scsi/hisi_sas/hisi_sas_main.c sha->sas_addr = &hisi_hba->sas_addr[0]; hisi_hba 2659 drivers/scsi/hisi_sas/hisi_sas_main.c sha->num_phys = hisi_hba->n_phy; hisi_hba 2660 drivers/scsi/hisi_sas/hisi_sas_main.c sha->core.shost = hisi_hba->shost; hisi_hba 2662 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 2663 drivers/scsi/hisi_sas/hisi_sas_main.c sha->sas_phy[i] = &hisi_hba->phy[i].sas_phy; hisi_hba 2664 drivers/scsi/hisi_sas/hisi_sas_main.c sha->sas_port[i] = &hisi_hba->port[i].sas_port; hisi_hba 2675 drivers/scsi/hisi_sas/hisi_sas_main.c rc = hisi_hba->hw->hw_init(hisi_hba); hisi_hba 2686 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_exit(hisi_hba); hisi_hba 2687 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_free(hisi_hba); hisi_hba 2695 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_cq_reg(struct hisi_hba *hisi_hba) hisi_hba 2697 drivers/scsi/hisi_sas/hisi_sas_main.c int queue_entry_size = hisi_hba->hw->complete_hdr_size; hisi_hba 2700 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->queue_count; i++) hisi_hba 2701 drivers/scsi/hisi_sas/hisi_sas_main.c memcpy(hisi_hba->debugfs_complete_hdr[i], hisi_hba 2702 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->complete_hdr[i], hisi_hba 2706 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_dq_reg(struct hisi_hba *hisi_hba) hisi_hba 2711 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->queue_count; i++) { hisi_hba 2715 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_cmd_hdr = hisi_hba->debugfs_cmd_hdr[i]; hisi_hba 2716 drivers/scsi/hisi_sas/hisi_sas_main.c cmd_hdr = hisi_hba->cmd_hdr[i]; hisi_hba 2724 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_port_reg(struct hisi_hba *hisi_hba) hisi_hba 2727 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->debugfs_reg_port; hisi_hba 2732 drivers/scsi/hisi_sas/hisi_sas_main.c for (phy_cnt = 0; phy_cnt < hisi_hba->n_phy; phy_cnt++) { hisi_hba 2733 drivers/scsi/hisi_sas/hisi_sas_main.c databuf = (u32 *)hisi_hba->debugfs_port_reg[phy_cnt]; hisi_hba 2736 drivers/scsi/hisi_sas/hisi_sas_main.c *databuf = port->read_port_reg(hisi_hba, phy_cnt, hisi_hba 2742 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_global_reg(struct hisi_hba *hisi_hba) hisi_hba 2744 drivers/scsi/hisi_sas/hisi_sas_main.c u32 *databuf = hisi_hba->debugfs_regs[DEBUGFS_GLOBAL]; hisi_hba 2745 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 2751 drivers/scsi/hisi_sas/hisi_sas_main.c *databuf = global->read_global_reg(hisi_hba, 4 * i); hisi_hba 2754 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_axi_reg(struct hisi_hba *hisi_hba) hisi_hba 2756 drivers/scsi/hisi_sas/hisi_sas_main.c u32 *databuf = hisi_hba->debugfs_regs[DEBUGFS_AXI]; hisi_hba 2757 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 2763 drivers/scsi/hisi_sas/hisi_sas_main.c *databuf = axi->read_global_reg(hisi_hba, hisi_hba 2767 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_ras_reg(struct hisi_hba *hisi_hba) hisi_hba 2769 drivers/scsi/hisi_sas/hisi_sas_main.c u32 *databuf = hisi_hba->debugfs_regs[DEBUGFS_RAS]; hisi_hba 2770 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 2776 drivers/scsi/hisi_sas/hisi_sas_main.c *databuf = ras->read_global_reg(hisi_hba, hisi_hba 2780 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_itct_reg(struct hisi_hba *hisi_hba) hisi_hba 2782 drivers/scsi/hisi_sas/hisi_sas_main.c void *cachebuf = hisi_hba->debugfs_itct_cache; hisi_hba 2783 drivers/scsi/hisi_sas/hisi_sas_main.c void *databuf = hisi_hba->debugfs_itct; hisi_hba 2787 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->read_iost_itct_cache(hisi_hba, HISI_SAS_ITCT_CACHE, hisi_hba 2790 drivers/scsi/hisi_sas/hisi_sas_main.c itct = hisi_hba->itct; hisi_hba 2798 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_iost_reg(struct hisi_hba *hisi_hba) hisi_hba 2801 drivers/scsi/hisi_sas/hisi_sas_main.c void *cachebuf = hisi_hba->debugfs_iost_cache; hisi_hba 2802 drivers/scsi/hisi_sas/hisi_sas_main.c void *databuf = hisi_hba->debugfs_iost; hisi_hba 2806 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->read_iost_itct_cache(hisi_hba, HISI_SAS_IOST_CACHE, hisi_hba 2809 drivers/scsi/hisi_sas/hisi_sas_main.c iost = hisi_hba->iost; hisi_hba 2853 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 2854 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 2857 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_print_reg(hisi_hba->debugfs_regs[DEBUGFS_GLOBAL], hisi_hba 2879 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 2880 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 2883 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_print_reg(hisi_hba->debugfs_regs[DEBUGFS_AXI], hisi_hba 2905 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 2906 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 2909 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_print_reg(hisi_hba->debugfs_regs[DEBUGFS_RAS], hisi_hba 2932 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 2933 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 2935 drivers/scsi/hisi_sas/hisi_sas_main.c u32 *databuf = hisi_hba->debugfs_port_reg[phy->sas_phy.id]; hisi_hba 2989 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = cq->hisi_hba; hisi_hba 2990 drivers/scsi/hisi_sas/hisi_sas_main.c void *complete_queue = hisi_hba->debugfs_complete_hdr[cq->id]; hisi_hba 2992 drivers/scsi/hisi_sas/hisi_sas_main.c (hisi_hba->hw->complete_hdr_size * slot); hisi_hba 2995 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->complete_hdr_size, hisi_hba 3026 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = dq->hisi_hba; hisi_hba 3027 drivers/scsi/hisi_sas/hisi_sas_main.c void *cmd_queue = hisi_hba->debugfs_cmd_hdr[dq->id]; hisi_hba 3059 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3060 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_iost *debugfs_iost = hisi_hba->debugfs_iost; hisi_hba 3087 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3089 drivers/scsi/hisi_sas/hisi_sas_main.c (struct hisi_sas_iost_itct_cache *)hisi_hba->debugfs_iost_cache; hisi_hba 3128 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3129 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_sas_itct *debugfs_itct = hisi_hba->debugfs_itct; hisi_hba 3155 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3157 drivers/scsi/hisi_sas/hisi_sas_main.c (struct hisi_sas_iost_itct_cache *)hisi_hba->debugfs_itct_cache; hisi_hba 3193 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_create_files(struct hisi_hba *hisi_hba) hisi_hba 3203 drivers/scsi/hisi_sas/hisi_sas_main.c dump_dentry = debugfs_create_dir("dump", hisi_hba->debugfs_dir); hisi_hba 3204 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_dump_dentry = dump_dentry; hisi_hba 3206 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("global", 0400, dump_dentry, hisi_hba, hisi_hba 3211 drivers/scsi/hisi_sas/hisi_sas_main.c for (p = 0; p < hisi_hba->n_phy; p++) { hisi_hba 3214 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file(name, 0400, dentry, &hisi_hba->phy[p], hisi_hba 3220 drivers/scsi/hisi_sas/hisi_sas_main.c for (c = 0; c < hisi_hba->queue_count; c++) { hisi_hba 3223 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file(name, 0400, dentry, &hisi_hba->cq[c], hisi_hba 3229 drivers/scsi/hisi_sas/hisi_sas_main.c for (d = 0; d < hisi_hba->queue_count; d++) { hisi_hba 3232 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file(name, 0400, dentry, &hisi_hba->dq[d], hisi_hba 3236 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("iost", 0400, dump_dentry, hisi_hba, hisi_hba 3239 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("iost_cache", 0400, dump_dentry, hisi_hba, hisi_hba 3242 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("itct", 0400, dump_dentry, hisi_hba, hisi_hba 3245 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("itct_cache", 0400, dump_dentry, hisi_hba, hisi_hba 3248 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("axi", 0400, dump_dentry, hisi_hba, hisi_hba 3251 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("ras", 0400, dump_dentry, hisi_hba, hisi_hba 3257 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_snapshot_regs(struct hisi_hba *hisi_hba) hisi_hba 3259 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->snapshot_prepare(hisi_hba); hisi_hba 3261 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_global_reg(hisi_hba); hisi_hba 3262 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_port_reg(hisi_hba); hisi_hba 3263 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_axi_reg(hisi_hba); hisi_hba 3264 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_ras_reg(hisi_hba); hisi_hba 3265 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_cq_reg(hisi_hba); hisi_hba 3266 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_dq_reg(hisi_hba); hisi_hba 3267 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_itct_reg(hisi_hba); hisi_hba 3268 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_iost_reg(hisi_hba); hisi_hba 3270 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_create_files(hisi_hba); hisi_hba 3272 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->hw->snapshot_restore(hisi_hba); hisi_hba 3279 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = file->f_inode->i_private; hisi_hba 3283 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->debugfs_snapshot) hisi_hba 3295 drivers/scsi/hisi_sas/hisi_sas_main.c queue_work(hisi_hba->wq, &hisi_hba->debugfs_work); hisi_hba 3338 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3342 drivers/scsi/hisi_sas/hisi_sas_main.c int match = (hisi_hba->debugfs_bist_linkrate == hisi_hba 3359 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = m->private; hisi_hba 3364 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->debugfs_bist_enable) hisi_hba 3378 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_linkrate = hisi_hba 3427 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3431 drivers/scsi/hisi_sas/hisi_sas_main.c int match = (hisi_hba->debugfs_bist_code_mode == hisi_hba 3449 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = m->private; hisi_hba 3454 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->debugfs_bist_enable) hisi_hba 3468 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_code_mode = hisi_hba 3502 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = m->private; hisi_hba 3506 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->debugfs_bist_enable) hisi_hba 3513 drivers/scsi/hisi_sas/hisi_sas_main.c if (phy_no >= hisi_hba->n_phy) hisi_hba 3516 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_phy_no = phy_no; hisi_hba 3523 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3525 drivers/scsi/hisi_sas/hisi_sas_main.c seq_printf(s, "%d\n", hisi_hba->debugfs_bist_phy_no); hisi_hba 3557 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3561 drivers/scsi/hisi_sas/hisi_sas_main.c int match = (hisi_hba->debugfs_bist_mode == hisi_hba 3578 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = m->private; hisi_hba 3583 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->debugfs_bist_enable) hisi_hba 3596 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_mode = hisi_hba 3630 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = m->private; hisi_hba 3641 drivers/scsi/hisi_sas/hisi_sas_main.c if (enable == hisi_hba->debugfs_bist_enable) hisi_hba 3644 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->hw->set_bist) hisi_hba 3647 drivers/scsi/hisi_sas/hisi_sas_main.c val = hisi_hba->hw->set_bist(hisi_hba, enable); hisi_hba 3651 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_enable = enable; hisi_hba 3658 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = s->private; hisi_hba 3660 drivers/scsi/hisi_sas/hisi_sas_main.c seq_printf(s, "%d\n", hisi_hba->debugfs_bist_enable); hisi_hba 3683 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = hisi_hba 3684 drivers/scsi/hisi_sas/hisi_sas_main.c container_of(work, struct hisi_hba, debugfs_work); hisi_hba 3686 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_hba->debugfs_snapshot) hisi_hba 3688 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_snapshot = true; hisi_hba 3690 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_snapshot_regs(hisi_hba); hisi_hba 3694 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_release(struct hisi_hba *hisi_hba) hisi_hba 3696 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 3699 drivers/scsi/hisi_sas/hisi_sas_main.c devm_kfree(dev, hisi_hba->debugfs_iost_cache); hisi_hba 3700 drivers/scsi/hisi_sas/hisi_sas_main.c devm_kfree(dev, hisi_hba->debugfs_itct_cache); hisi_hba 3701 drivers/scsi/hisi_sas/hisi_sas_main.c devm_kfree(dev, hisi_hba->debugfs_iost); hisi_hba 3703 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->queue_count; i++) hisi_hba 3704 drivers/scsi/hisi_sas/hisi_sas_main.c devm_kfree(dev, hisi_hba->debugfs_cmd_hdr[i]); hisi_hba 3706 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->queue_count; i++) hisi_hba 3707 drivers/scsi/hisi_sas/hisi_sas_main.c devm_kfree(dev, hisi_hba->debugfs_complete_hdr[i]); hisi_hba 3710 drivers/scsi/hisi_sas/hisi_sas_main.c devm_kfree(dev, hisi_hba->debugfs_regs[i]); hisi_hba 3712 drivers/scsi/hisi_sas/hisi_sas_main.c for (i = 0; i < hisi_hba->n_phy; i++) hisi_hba 3713 drivers/scsi/hisi_sas/hisi_sas_main.c devm_kfree(dev, hisi_hba->debugfs_port_reg[i]); hisi_hba 3716 drivers/scsi/hisi_sas/hisi_sas_main.c static int hisi_sas_debugfs_alloc(struct hisi_hba *hisi_hba) hisi_hba 3718 drivers/scsi/hisi_sas/hisi_sas_main.c const struct hisi_sas_hw *hw = hisi_hba->hw; hisi_hba 3719 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 3724 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_regs[DEBUGFS_GLOBAL] = hisi_hba 3727 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_regs[DEBUGFS_GLOBAL]) hisi_hba 3731 drivers/scsi/hisi_sas/hisi_sas_main.c for (p = 0; p < hisi_hba->n_phy; p++) { hisi_hba 3732 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_port_reg[p] = hisi_hba 3735 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_port_reg[p]) hisi_hba 3740 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_regs[DEBUGFS_AXI] = hisi_hba 3743 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_regs[DEBUGFS_AXI]) hisi_hba 3747 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_regs[DEBUGFS_RAS] = hisi_hba 3750 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_regs[DEBUGFS_RAS]) hisi_hba 3754 drivers/scsi/hisi_sas/hisi_sas_main.c for (c = 0; c < hisi_hba->queue_count; c++) { hisi_hba 3755 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_complete_hdr[c] = hisi_hba 3758 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_complete_hdr[c]) hisi_hba 3763 drivers/scsi/hisi_sas/hisi_sas_main.c for (d = 0; d < hisi_hba->queue_count; d++) { hisi_hba 3764 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_cmd_hdr[d] = hisi_hba 3767 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_cmd_hdr[d]) hisi_hba 3773 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_iost = devm_kmalloc(dev, sz, GFP_KERNEL); hisi_hba 3774 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_iost) hisi_hba 3780 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_iost_cache = devm_kmalloc(dev, sz, GFP_KERNEL); hisi_hba 3781 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_iost_cache) hisi_hba 3787 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_itct_cache = devm_kmalloc(dev, sz, GFP_KERNEL); hisi_hba 3788 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_itct_cache) hisi_hba 3794 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_itct = devm_kmalloc(dev, sz, GFP_KERNEL); hisi_hba 3795 drivers/scsi/hisi_sas/hisi_sas_main.c if (!hisi_hba->debugfs_itct) hisi_hba 3800 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_release(hisi_hba); hisi_hba 3804 drivers/scsi/hisi_sas/hisi_sas_main.c static void hisi_sas_debugfs_bist_init(struct hisi_hba *hisi_hba) hisi_hba 3806 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_dentry = hisi_hba 3807 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_dir("bist", hisi_hba->debugfs_dir); hisi_hba 3809 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_dentry, hisi_hba, hisi_hba 3813 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_dentry, hisi_hba, hisi_hba 3816 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("phy_id", 0600, hisi_hba->debugfs_bist_dentry, hisi_hba 3817 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba, &hisi_sas_debugfs_bist_phy_ops); hisi_hba 3819 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_u32("cnt", 0600, hisi_hba->debugfs_bist_dentry, hisi_hba 3820 drivers/scsi/hisi_sas/hisi_sas_main.c &hisi_hba->debugfs_bist_cnt); hisi_hba 3823 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_dentry, hisi_hba 3824 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba, &hisi_sas_debugfs_bist_mode_ops); hisi_hba 3826 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_create_file("enable", 0600, hisi_hba->debugfs_bist_dentry, hisi_hba 3827 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba, &hisi_sas_debugfs_bist_enable_ops); hisi_hba 3829 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_bist_linkrate = SAS_LINK_RATE_1_5_GBPS; hisi_hba 3832 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_debugfs_init(struct hisi_hba *hisi_hba) hisi_hba 3834 drivers/scsi/hisi_sas/hisi_sas_main.c struct device *dev = hisi_hba->dev; hisi_hba 3836 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_dir = debugfs_create_dir(dev_name(dev), hisi_hba 3839 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba->debugfs_dir, hisi_hba 3840 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_hba, hisi_hba 3844 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_debugfs_bist_init(hisi_hba); hisi_hba 3846 drivers/scsi/hisi_sas/hisi_sas_main.c if (hisi_sas_debugfs_alloc(hisi_hba)) { hisi_hba 3847 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_remove_recursive(hisi_hba->debugfs_dir); hisi_hba 3853 drivers/scsi/hisi_sas/hisi_sas_main.c void hisi_sas_debugfs_exit(struct hisi_hba *hisi_hba) hisi_hba 3855 drivers/scsi/hisi_sas/hisi_sas_main.c debugfs_remove_recursive(hisi_hba->debugfs_dir); hisi_hba 3862 drivers/scsi/hisi_sas/hisi_sas_main.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 3865 drivers/scsi/hisi_sas/hisi_sas_main.c if (timer_pending(&hisi_hba->timer)) hisi_hba 3866 drivers/scsi/hisi_sas/hisi_sas_main.c del_timer(&hisi_hba->timer); hisi_hba 3871 drivers/scsi/hisi_sas/hisi_sas_main.c hisi_sas_free(hisi_hba); hisi_hba 412 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static u32 hisi_sas_read32(struct hisi_hba *hisi_hba, u32 off) hisi_hba 414 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c void __iomem *regs = hisi_hba->regs + off; hisi_hba 419 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void hisi_sas_write32(struct hisi_hba *hisi_hba, hisi_hba 422 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c void __iomem *regs = hisi_hba->regs + off; hisi_hba 427 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void hisi_sas_phy_write32(struct hisi_hba *hisi_hba, hisi_hba 430 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c void __iomem *regs = hisi_hba->regs + (0x400 * phy_no) + off; hisi_hba 435 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static u32 hisi_sas_phy_read32(struct hisi_hba *hisi_hba, hisi_hba 438 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c void __iomem *regs = hisi_hba->regs + (0x400 * phy_no) + off; hisi_hba 443 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void config_phy_opt_mode_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 445 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 449 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 452 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void config_tx_tfe_autoneg_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 454 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CONFIG2); hisi_hba 457 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CONFIG2, cfg); hisi_hba 460 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void config_id_frame_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 471 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c memcpy(&identify_frame._un4_11[0], hisi_hba->sas_addr, SAS_ADDR_SIZE); hisi_hba 472 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c memcpy(&identify_frame.sas_addr[0], hisi_hba->sas_addr, SAS_ADDR_SIZE); hisi_hba 476 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD0, hisi_hba 478 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD1, hisi_hba 480 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD2, hisi_hba 482 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD3, hisi_hba 484 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD4, hisi_hba 486 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD5, hisi_hba 490 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void setup_itct_v1_hw(struct hisi_hba *hisi_hba, hisi_hba 494 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 496 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_sas_itct *itct = &hisi_hba->itct[device_id]; hisi_hba 534 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void clear_itct_v1_hw(struct hisi_hba *hisi_hba, hisi_hba 538 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id]; hisi_hba 540 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME); hisi_hba 543 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, CFG_AGING_TIME, reg_val); hisi_hba 547 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME); hisi_hba 549 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, CFG_AGING_TIME, reg_val); hisi_hba 556 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static int reset_hw_v1_hw(struct hisi_hba *hisi_hba) hisi_hba 561 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 563 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 564 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 phy_ctrl = hisi_sas_phy_read32(hisi_hba, i, PHY_CTRL); hisi_hba 567 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_CTRL, phy_ctrl); hisi_hba 572 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 578 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c dma_tx_status = hisi_sas_phy_read32(hisi_hba, i, hisi_hba 580 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c dma_rx_status = hisi_sas_phy_read32(hisi_hba, i, hisi_hba 597 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_read32(hisi_hba, AXI_CFG); hisi_hba 615 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c } else if (hisi_hba->ctrl) { hisi_hba 618 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_reset_reg, hisi_hba 620 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_clock_ena_reg + 4, hisi_hba 623 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c regmap_read(hisi_hba->ctrl, hisi_hba->ctrl_reset_sts_reg, &val); hisi_hba 631 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_reset_reg + 4, hisi_hba 633 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_clock_ena_reg, hisi_hba 636 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c regmap_read(hisi_hba->ctrl, hisi_hba->ctrl_reset_sts_reg, &val); hisi_hba 649 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void init_reg_v1_hw(struct hisi_hba *hisi_hba) hisi_hba 654 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, hisi_hba 655 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c (u32)((1ULL << hisi_hba->queue_count) - 1)); hisi_hba 656 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, HGC_TRANS_TASK_CNT_LIMIT, 0x11); hisi_hba 657 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, DEVICE_MSG_WORK_MODE, 0x1); hisi_hba 658 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, HGC_SAS_TXFAIL_RETRY_CTRL, 0x1ff); hisi_hba 659 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, HGC_ERR_STAT_EN, 0x401); hisi_hba 660 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, CFG_1US_TIMER_TRSH, 0x64); hisi_hba 661 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, HGC_GET_ITV_TIME, 0x1); hisi_hba 662 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, I_T_NEXUS_LOSS_TIME, 0x64); hisi_hba 663 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, BUS_INACTIVE_LIMIT_TIME, 0x2710); hisi_hba 664 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, REJECT_TO_OPEN_LIMIT_TIME, 0x1); hisi_hba 665 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, CFG_AGING_TIME, 0x7a12); hisi_hba 666 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, HGC_DFX_CFG2, 0x9c40); hisi_hba 667 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, FIS_LIST_BADDR_L, 0x2); hisi_hba 668 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, INT_COAL_EN, 0xc); hisi_hba 669 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0x186a0); hisi_hba 670 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 1); hisi_hba 671 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ENT_INT_COAL_TIME, 0x1); hisi_hba 672 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ENT_INT_COAL_CNT, 0x1); hisi_hba 673 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, OQ_INT_SRC, 0xffffffff); hisi_hba 674 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, OQ_INT_SRC_MSK, 0); hisi_hba 675 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC1, 0xffffffff); hisi_hba 676 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, 0); hisi_hba 677 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC2, 0xffffffff); hisi_hba 678 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK2, 0); hisi_hba 679 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, 0); hisi_hba 680 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, AXI_AHB_CLK_CFG, 0x2); hisi_hba 681 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, CFG_SAS_CONFIG, 0x22000000); hisi_hba 683 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 684 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, PROG_PHY_LINK_RATE, 0x88a); hisi_hba 685 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_CONFIG2, 0x7c080); hisi_hba 686 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_RATE_NEGO, 0x415ee00); hisi_hba 687 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_PCN, 0x80a80000); hisi_hba 688 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, SL_TOUT_CFG, 0x7d7d7d7d); hisi_hba 689 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, DONE_RECEIVED_TIME, 0x0); hisi_hba 690 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, RXOP_CHECK_CFG_H, 0x1000); hisi_hba 691 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, DONE_RECEIVED_TIME, 0); hisi_hba 692 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CON_CFG_DRIVER, 0x13f0a); hisi_hba 693 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT_COAL_EN, 3); hisi_hba 694 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, DONE_RECEIVED_TIME, 8); hisi_hba 697 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->queue_count; i++) { hisi_hba 699 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, hisi_hba 701 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c upper_32_bits(hisi_hba->cmd_hdr_dma[i])); hisi_hba 703 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, hisi_hba 705 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c lower_32_bits(hisi_hba->cmd_hdr_dma[i])); hisi_hba 707 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, hisi_hba 712 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, hisi_hba 714 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c upper_32_bits(hisi_hba->complete_hdr_dma[i])); hisi_hba 716 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, hisi_hba 718 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c lower_32_bits(hisi_hba->complete_hdr_dma[i])); hisi_hba 720 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_DEPTH + (i * 0x14), hisi_hba 725 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ITCT_BASE_ADDR_LO, hisi_hba 726 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c lower_32_bits(hisi_hba->itct_dma)); hisi_hba 728 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ITCT_BASE_ADDR_HI, hisi_hba 729 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c upper_32_bits(hisi_hba->itct_dma)); hisi_hba 732 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, IOST_BASE_ADDR_LO, hisi_hba 733 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c lower_32_bits(hisi_hba->iost_dma)); hisi_hba 735 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, IOST_BASE_ADDR_HI, hisi_hba 736 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c upper_32_bits(hisi_hba->iost_dma)); hisi_hba 739 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, BROKEN_MSG_ADDR_LO, hisi_hba 740 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c lower_32_bits(hisi_hba->breakpoint_dma)); hisi_hba 742 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, BROKEN_MSG_ADDR_HI, hisi_hba 743 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c upper_32_bits(hisi_hba->breakpoint_dma)); hisi_hba 746 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static int hw_init_v1_hw(struct hisi_hba *hisi_hba) hisi_hba 748 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 751 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c rc = reset_hw_v1_hw(hisi_hba); hisi_hba 758 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c init_reg_v1_hw(hisi_hba); hisi_hba 763 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void enable_phy_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 765 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 768 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 771 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void disable_phy_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 773 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 776 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 779 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void start_phy_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 781 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c config_id_frame_v1_hw(hisi_hba, phy_no); hisi_hba 782 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c config_phy_opt_mode_v1_hw(hisi_hba, phy_no); hisi_hba 783 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c config_tx_tfe_autoneg_v1_hw(hisi_hba, phy_no); hisi_hba 784 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c enable_phy_v1_hw(hisi_hba, phy_no); hisi_hba 787 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void phy_hard_reset_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 789 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_enable(hisi_hba, phy_no, 0); hisi_hba 791 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_enable(hisi_hba, phy_no, 1); hisi_hba 796 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = from_timer(hisi_hba, t, timer); hisi_hba 799 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 800 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2_MSK, 0x12a); hisi_hba 801 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_enable(hisi_hba, i, 1); hisi_hba 805 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void phys_init_v1_hw(struct hisi_hba *hisi_hba) hisi_hba 808 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct timer_list *timer = &hisi_hba->timer; hisi_hba 810 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 811 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2_MSK, 0x6a); hisi_hba 812 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_read32(hisi_hba, i, CHL_INT2_MSK); hisi_hba 819 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void sl_notify_ssp_v1_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 823 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c sl_control = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 825 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, sl_control); hisi_hba 827 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c sl_control = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 829 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, sl_control); hisi_hba 837 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void phy_set_linkrate_v1_hw(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 844 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PROG_PHY_LINK_RATE, hisi_hba 848 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static int get_wideport_bitmap_v1_hw(struct hisi_hba *hisi_hba, int port_id) hisi_hba 851 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 phy_port_num_ma = hisi_sas_read32(hisi_hba, PHY_PORT_NUM_MA); hisi_hba 853 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) hisi_hba 863 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = dq->hisi_hba; hisi_hba 884 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, DLVRY_Q_0_WR_PTR + (dlvry_queue * 0x14), wp); hisi_hba 887 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void prep_prd_sge_v1_hw(struct hisi_hba *hisi_hba, hisi_hba 911 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void prep_smp_v1_hw(struct hisi_hba *hisi_hba, hisi_hba 949 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void prep_ssp_v1_hw(struct hisi_hba *hisi_hba, hisi_hba 1010 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c prep_prd_sge_v1_hw(hisi_hba, slot, hdr, task->scatter, hisi_hba 1048 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static void slot_err_v1_hw(struct hisi_hba *hisi_hba, hisi_hba 1055 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1176 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static int slot_complete_v1_hw(struct hisi_hba *hisi_hba, hisi_hba 1181 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1186 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_hba->complete_hdr[slot->cmplt_queue]; hisi_hba 1217 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 info_reg = hisi_sas_read32(hisi_hba, HGC_INVLD_DQE_INFO); hisi_hba 1259 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c slot_err_v1_hw(hisi_hba, task, slot); hisi_hba 1309 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_slot_task_free(hisi_hba, task, slot); hisi_hba 1322 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 1323 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1332 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c irq_value = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT2); hisi_hba 1340 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c context = hisi_sas_read32(hisi_hba, PHY_CONTEXT); hisi_hba 1347 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c port_id = (hisi_sas_read32(hisi_hba, PHY_PORT_NUM_MA) >> (4 * phy_no)) hisi_hba 1356 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 idaf = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 1362 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c link_rate = hisi_sas_read32(hisi_hba, PHY_CONN_RATE); hisi_hba 1392 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT2, hisi_hba 1396 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 chl_int0 = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT0); hisi_hba 1399 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, chl_int0); hisi_hba 1400 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0_MSK, 0x3ce3ee); hisi_hba 1409 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 1411 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct sas_ha_struct *sha = &hisi_hba->sha; hisi_hba 1412 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1417 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c irq_value = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT2); hisi_hba 1426 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c if (!test_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags)) hisi_hba 1430 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT2, hisi_hba 1439 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 1440 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1446 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c irq_mask_old = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT0_MSK); hisi_hba 1447 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0_MSK, 0x3fffff); hisi_hba 1450 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c irq_value = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT0); hisi_hba 1453 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 phy_state = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 1455 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_down(hisi_hba, phy_no, hisi_hba 1479 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, irq_value); hisi_hba 1482 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0_MSK, hisi_hba 1485 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0_MSK, hisi_hba 1494 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = cq->hisi_hba; hisi_hba 1499 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_hba->complete_hdr[queue]; hisi_hba 1502 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c spin_lock(&hisi_hba->lock); hisi_hba 1503 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, OQ_INT_SRC, 1 << queue); hisi_hba 1504 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c wr_point = hisi_sas_read32(hisi_hba, hisi_hba 1516 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c slot = &hisi_hba->slot_info[idx]; hisi_hba 1524 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c slot_complete_v1_hw(hisi_hba, slot); hisi_hba 1532 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_RD_PTR + (0x14 * queue), rd_point); hisi_hba 1533 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c spin_unlock(&hisi_hba->lock); hisi_hba 1540 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 1541 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1542 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 ecc_int = hisi_sas_read32(hisi_hba, SAS_ECC_INTR); hisi_hba 1545 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 ecc_err = hisi_sas_read32(hisi_hba, HGC_ECC_ERR); hisi_hba 1552 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 addr = (hisi_sas_read32(hisi_hba, HGC_DQ_ECC_ADDR) & hisi_hba 1561 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 ecc_err = hisi_sas_read32(hisi_hba, HGC_ECC_ERR); hisi_hba 1568 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 addr = (hisi_sas_read32(hisi_hba, HGC_IOST_ECC_ADDR) & hisi_hba 1577 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 addr = (hisi_sas_read32(hisi_hba, HGC_ITCT_ECC_ADDR) & hisi_hba 1586 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 ecc_err = hisi_sas_read32(hisi_hba, HGC_ECC_ERR); hisi_hba 1592 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR, ecc_int | 0x3f); hisi_hba 1599 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 1600 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1601 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 axi_int = hisi_sas_read32(hisi_hba, ENT_INT_SRC2); hisi_hba 1602 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c u32 axi_info = hisi_sas_read32(hisi_hba, HGC_AXI_FIFO_ERR_INFO); hisi_hba 1620 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC2, axi_int | 0x30000000); hisi_hba 1636 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba) hisi_hba 1638 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct platform_device *pdev = hisi_hba->platform_dev; hisi_hba 1642 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 1643 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[i]; hisi_hba 1664 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c idx = hisi_hba->n_phy * HISI_SAS_PHY_INT_NR; hisi_hba 1665 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->queue_count; i++, idx++) { hisi_hba 1674 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c DRV_NAME " cq", &hisi_hba->cq[i]); hisi_hba 1682 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c idx = (hisi_hba->n_phy * HISI_SAS_PHY_INT_NR) + hisi_hba->queue_count; hisi_hba 1692 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c DRV_NAME " fatal", hisi_hba); hisi_hba 1700 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_hba->cq_nvecs = hisi_hba->queue_count; hisi_hba 1705 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static int interrupt_openall_v1_hw(struct hisi_hba *hisi_hba) hisi_hba 1710 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 1712 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c val = hisi_sas_phy_read32(hisi_hba, i, CHL_INT0); hisi_hba 1713 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT0, val); hisi_hba 1714 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c val = hisi_sas_phy_read32(hisi_hba, i, CHL_INT1); hisi_hba 1715 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1, val); hisi_hba 1716 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c val = hisi_sas_phy_read32(hisi_hba, i, CHL_INT2); hisi_hba 1717 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2, val); hisi_hba 1720 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT0_MSK, 0x3ce3ee); hisi_hba 1721 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1_MSK, 0x17fff); hisi_hba 1722 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2_MSK, 0x8000012a); hisi_hba 1725 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT0_MSK, hisi_hba 1732 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c static int hisi_sas_v1_init(struct hisi_hba *hisi_hba) hisi_hba 1736 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c rc = hw_init_v1_hw(hisi_hba); hisi_hba 1740 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c rc = interrupt_init_v1_hw(hisi_hba); hisi_hba 1744 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c rc = interrupt_openall_v1_hw(hisi_hba); hisi_hba 729 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static u32 hisi_sas_read32(struct hisi_hba *hisi_hba, u32 off) hisi_hba 731 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void __iomem *regs = hisi_hba->regs + off; hisi_hba 736 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static u32 hisi_sas_read32_relaxed(struct hisi_hba *hisi_hba, u32 off) hisi_hba 738 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void __iomem *regs = hisi_hba->regs + off; hisi_hba 743 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void hisi_sas_write32(struct hisi_hba *hisi_hba, u32 off, u32 val) hisi_hba 745 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void __iomem *regs = hisi_hba->regs + off; hisi_hba 750 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void hisi_sas_phy_write32(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 753 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void __iomem *regs = hisi_hba->regs + (0x400 * phy_no) + off; hisi_hba 758 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static u32 hisi_sas_phy_read32(struct hisi_hba *hisi_hba, hisi_hba 761 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void __iomem *regs = hisi_hba->regs + (0x400 * phy_no) + off; hisi_hba 768 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot_index_alloc_quirk_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 772 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void *bitmap = hisi_hba->slot_index_tags; hisi_hba 785 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c end = hisi_hba->slot_index_count; hisi_hba 800 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c spin_lock_irqsave(&hisi_hba->lock, flags); hisi_hba 803 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->slot_index_count, start); hisi_hba 805 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 817 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 821 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static bool sata_index_alloc_v2_hw(struct hisi_hba *hisi_hba, int *idx) hisi_hba 824 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 825 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void *bitmap = hisi_hba->sata_dev_bitmap; hisi_hba 842 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = device->port->ha->lldd_ha; hisi_hba 848 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c spin_lock_irqsave(&hisi_hba->lock, flags); hisi_hba 851 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!sata_index_alloc_v2_hw(hisi_hba, &sata_idx)) hisi_hba 860 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (hisi_hba->devices[i].dev_type == SAS_PHY_UNUSED) { hisi_hba 861 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c int queue = i % hisi_hba->queue_count; hisi_hba 862 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_dq *dq = &hisi_hba->dq[queue]; hisi_hba 864 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->devices[i].device_id = i; hisi_hba 865 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c sas_dev = &hisi_hba->devices[i]; hisi_hba 868 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c sas_dev->hisi_hba = hisi_hba; hisi_hba 873 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c INIT_LIST_HEAD(&hisi_hba->devices[i].list); hisi_hba 879 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c spin_unlock_irqrestore(&hisi_hba->lock, flags); hisi_hba 884 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void config_phy_opt_mode_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 886 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 890 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 893 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void config_id_frame_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 904 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c memcpy(&identify_frame._un4_11[0], hisi_hba->sas_addr, SAS_ADDR_SIZE); hisi_hba 905 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c memcpy(&identify_frame.sas_addr[0], hisi_hba->sas_addr, SAS_ADDR_SIZE); hisi_hba 909 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD0, hisi_hba 911 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD1, hisi_hba 913 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD2, hisi_hba 915 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD3, hisi_hba 917 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD4, hisi_hba 919 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD5, hisi_hba 923 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void setup_itct_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 927 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 929 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_itct *itct = &hisi_hba->itct[device_id]; hisi_hba 977 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void clear_itct_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 982 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id]; hisi_hba 983 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 reg_val = hisi_sas_read32(hisi_hba, ENT_INT_SRC3); hisi_hba 990 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC3, hisi_hba 995 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ITCT_CLR, reg_val); hisi_hba 1004 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = sas_dev->hisi_hba; hisi_hba 1008 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c clear_bit(sas_dev->sata_idx, hisi_hba->sata_dev_bitmap); hisi_hba 1011 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int reset_hw_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 1016 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1019 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (hisi_hba->n_phy == 9) hisi_hba 1024 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0); hisi_hba 1027 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 1028 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 phy_cfg = hisi_sas_phy_read32(hisi_hba, i, PHY_CFG); hisi_hba 1031 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_CFG, phy_cfg); hisi_hba 1036 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 1042 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c dma_tx_status = hisi_sas_phy_read32(hisi_hba, i, hisi_hba 1044 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c dma_rx_status = hisi_sas_phy_read32(hisi_hba, i, hisi_hba 1061 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_read32(hisi_hba, AXI_CFG); hisi_hba 1079 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c } else if (hisi_hba->ctrl) { hisi_hba 1081 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_reset_reg, hisi_hba 1083 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_clock_ena_reg + 4, hisi_hba 1086 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c regmap_read(hisi_hba->ctrl, hisi_hba->ctrl_reset_sts_reg, &val); hisi_hba 1093 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_reset_reg + 4, hisi_hba 1095 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c regmap_write(hisi_hba->ctrl, hisi_hba->ctrl_clock_ena_reg, hisi_hba 1098 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c regmap_read(hisi_hba->ctrl, hisi_hba->ctrl_reset_sts_reg, hisi_hba 1113 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void phys_reject_stp_links_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 1118 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->reject_stp_links_msk = (1 << hisi_hba->n_phy) - 1; hisi_hba 1119 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (phy_no = 0; phy_no < hisi_hba->n_phy; phy_no++) { hisi_hba 1120 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c cfg = hisi_sas_phy_read32(hisi_hba, phy_no, CON_CONTROL); hisi_hba 1125 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CON_CONTROL, cfg); hisi_hba 1129 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void phys_try_accept_stp_links_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 1134 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (phy_no = 0; phy_no < hisi_hba->n_phy; phy_no++) { hisi_hba 1135 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!(hisi_hba->reject_stp_links_msk & BIT(phy_no))) hisi_hba 1138 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c dma_tx_dfx1 = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 1141 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, hisi_hba 1145 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, hisi_hba 1147 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c clear_bit(phy_no, &hisi_hba->reject_stp_links_msk); hisi_hba 1157 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void init_reg_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 1159 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1168 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AM_CFG_MAX_TRANS, 0x2020); hisi_hba 1169 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AM_CFG_SINGLE_PORT_MAX_TRANS, hisi_hba 1173 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, hisi_hba 1174 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c (u32)((1ULL << hisi_hba->queue_count) - 1)); hisi_hba 1175 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AXI_USER1, 0xc0000000); hisi_hba 1176 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AXI_USER2, 0x10000); hisi_hba 1177 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, HGC_SAS_TXFAIL_RETRY_CTRL, 0x0); hisi_hba 1178 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, HGC_SAS_TX_OPEN_FAIL_RETRY_CTRL, 0x7FF); hisi_hba 1179 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, OPENA_WT_CONTI_TIME, 0x1); hisi_hba 1180 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, I_T_NEXUS_LOSS_TIME, 0x1F4); hisi_hba 1181 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, MAX_CON_TIME_LIMIT_TIME, 0x32); hisi_hba 1182 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, BUS_INACTIVE_LIMIT_TIME, 0x1); hisi_hba 1183 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, CFG_AGING_TIME, 0x1); hisi_hba 1184 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, HGC_ERR_STAT_EN, 0x1); hisi_hba 1185 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, HGC_GET_ITV_TIME, 0x1); hisi_hba 1186 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, INT_COAL_EN, 0xc); hisi_hba 1187 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0x60); hisi_hba 1188 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 0x3); hisi_hba 1189 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_COAL_TIME, 0x1); hisi_hba 1190 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_COAL_CNT, 0x1); hisi_hba 1191 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, OQ_INT_SRC, 0x0); hisi_hba 1192 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC1, 0xffffffff); hisi_hba 1193 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC2, 0xffffffff); hisi_hba 1194 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC3, 0xffffffff); hisi_hba 1195 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, 0x7efefefe); hisi_hba 1196 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK2, 0x7efefefe); hisi_hba 1197 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, 0x7ffe20fe); hisi_hba 1198 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, 0xfff00c30); hisi_hba 1199 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->queue_count; i++) hisi_hba 1200 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, OQ0_INT_SRC_MSK+0x4*i, 0); hisi_hba 1202 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AXI_AHB_CLK_CFG, 1); hisi_hba 1203 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, HYPER_STREAM_ID_EN_CFG, 1); hisi_hba 1224 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 1225 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[i]; hisi_hba 1239 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PROG_PHY_LINK_RATE, hisi_hba 1241 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, SAS_PHY_CTRL, sas_phy_ctrl); hisi_hba 1242 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, SL_TOUT_CFG, 0x7d7d7d7d); hisi_hba 1243 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, SL_CONTROL, 0x0); hisi_hba 1244 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, TXID_AUTO, 0x2); hisi_hba 1245 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, DONE_RECEIVED_TIME, 0x8); hisi_hba 1246 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT0, 0xffffffff); hisi_hba 1247 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1, 0xffffffff); hisi_hba 1248 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2, 0xfff87fff); hisi_hba 1249 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, RXOP_CHECK_CFG_H, 0x1000); hisi_hba 1250 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1_MSK, 0xff857fff); hisi_hba 1251 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2_MSK, 0x8ffffbfe); hisi_hba 1252 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, SL_CFG, 0x13f801fc); hisi_hba 1253 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_CTRL_RDY_MSK, 0x0); hisi_hba 1254 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_NOT_RDY_MSK, 0x0); hisi_hba 1255 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_DWS_RESET_MSK, 0x0); hisi_hba 1256 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_PHY_ENA_MSK, 0x0); hisi_hba 1257 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, SL_RX_BCAST_CHK_MSK, 0x0); hisi_hba 1258 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT_COAL_EN, 0x0); hisi_hba 1259 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_OOB_RESTART_MSK, 0x0); hisi_hba 1260 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (hisi_hba->refclk_frequency_mhz == 66) hisi_hba 1261 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_CTRL, 0x199B694); hisi_hba 1265 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->queue_count; i++) { hisi_hba 1267 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, hisi_hba 1269 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c upper_32_bits(hisi_hba->cmd_hdr_dma[i])); hisi_hba 1271 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, DLVRY_Q_0_BASE_ADDR_LO + (i * 0x14), hisi_hba 1272 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c lower_32_bits(hisi_hba->cmd_hdr_dma[i])); hisi_hba 1274 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, DLVRY_Q_0_DEPTH + (i * 0x14), hisi_hba 1278 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_BASE_ADDR_HI + (i * 0x14), hisi_hba 1279 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c upper_32_bits(hisi_hba->complete_hdr_dma[i])); hisi_hba 1281 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_BASE_ADDR_LO + (i * 0x14), hisi_hba 1282 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c lower_32_bits(hisi_hba->complete_hdr_dma[i])); hisi_hba 1284 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_DEPTH + (i * 0x14), hisi_hba 1289 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ITCT_BASE_ADDR_LO, hisi_hba 1290 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c lower_32_bits(hisi_hba->itct_dma)); hisi_hba 1292 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ITCT_BASE_ADDR_HI, hisi_hba 1293 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c upper_32_bits(hisi_hba->itct_dma)); hisi_hba 1296 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, IOST_BASE_ADDR_LO, hisi_hba 1297 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c lower_32_bits(hisi_hba->iost_dma)); hisi_hba 1299 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, IOST_BASE_ADDR_HI, hisi_hba 1300 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c upper_32_bits(hisi_hba->iost_dma)); hisi_hba 1303 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, IO_BROKEN_MSG_ADDR_LO, hisi_hba 1304 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c lower_32_bits(hisi_hba->breakpoint_dma)); hisi_hba 1306 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, IO_BROKEN_MSG_ADDR_HI, hisi_hba 1307 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c upper_32_bits(hisi_hba->breakpoint_dma)); hisi_hba 1310 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, IO_SATA_BROKEN_MSG_ADDR_LO, hisi_hba 1311 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c lower_32_bits(hisi_hba->sata_breakpoint_dma)); hisi_hba 1313 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, IO_SATA_BROKEN_MSG_ADDR_HI, hisi_hba 1314 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c upper_32_bits(hisi_hba->sata_breakpoint_dma)); hisi_hba 1317 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, SATA_INITI_D2H_STORE_ADDR_LO, hisi_hba 1318 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c lower_32_bits(hisi_hba->initial_fis_dma)); hisi_hba 1320 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, SATA_INITI_D2H_STORE_ADDR_HI, hisi_hba 1321 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c upper_32_bits(hisi_hba->initial_fis_dma)); hisi_hba 1326 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = from_timer(hisi_hba, t, timer); hisi_hba 1329 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 1330 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (hisi_hba->reject_stp_links_msk & BIT(i)) hisi_hba 1333 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c reg_val = hisi_sas_phy_read32(hisi_hba, i, CON_CONTROL); hisi_hba 1335 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, hisi_hba 1341 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->timer.function = link_timeout_disable_link; hisi_hba 1342 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900)); hisi_hba 1347 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = from_timer(hisi_hba, t, timer); hisi_hba 1350 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c reg_val = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 1351 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->n_phy && reg_val; i++) { hisi_hba 1352 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (hisi_hba->reject_stp_links_msk & BIT(i)) hisi_hba 1356 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, hisi_hba 1362 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->timer.function = link_timeout_enable_link; hisi_hba 1363 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100)); hisi_hba 1366 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void set_link_timer_quirk(struct hisi_hba *hisi_hba) hisi_hba 1368 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->timer.function = link_timeout_disable_link; hisi_hba 1369 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000); hisi_hba 1370 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c add_timer(&hisi_hba->timer); hisi_hba 1373 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int hw_init_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 1375 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1378 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c rc = reset_hw_v2_hw(hisi_hba); hisi_hba 1385 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c init_reg_v2_hw(hisi_hba); hisi_hba 1390 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void enable_phy_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1392 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 1395 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 1398 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static bool is_sata_phy_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1402 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c context = hisi_sas_read32(hisi_hba, PHY_CONTEXT); hisi_hba 1409 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static bool tx_fifo_is_empty_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1413 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c dfx_val = hisi_sas_phy_read32(hisi_hba, phy_no, DMA_TX_DFX1); hisi_hba 1421 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static bool axi_bus_is_idle_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1424 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1428 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c status = hisi_sas_read32_relaxed(hisi_hba, hisi_hba 1431 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c axi_status = hisi_sas_read32(hisi_hba, AXI_CFG); hisi_hba 1432 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c dfx_val = hisi_sas_phy_read32(hisi_hba, phy_no, DMA_TX_DFX1); hisi_hba 1433 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c dfx_tx_val = hisi_sas_phy_read32(hisi_hba, hisi_hba 1447 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static bool wait_io_done_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1450 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1454 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c status = hisi_sas_phy_read32(hisi_hba, phy_no, LINK_DFX2); hisi_hba 1460 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c tx_dfx0 = hisi_sas_phy_read32(hisi_hba, phy_no, DMA_TX_DFX0); hisi_hba 1470 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static bool allowed_disable_phy_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1472 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (tx_fifo_is_empty_v2_hw(hisi_hba, phy_no)) hisi_hba 1475 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!axi_bus_is_idle_v2_hw(hisi_hba, phy_no)) hisi_hba 1478 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!wait_io_done_v2_hw(hisi_hba, phy_no)) hisi_hba 1485 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void disable_phy_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1488 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1491 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c axi_val = hisi_sas_read32(hisi_hba, AXI_MASTER_CFG_BASE + hisi_hba 1494 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AXI_MASTER_CFG_BASE + hisi_hba 1497 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (is_sata_phy_v2_hw(hisi_hba, phy_no)) { hisi_hba 1498 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (allowed_disable_phy_v2_hw(hisi_hba, phy_no)) hisi_hba 1502 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 1506 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c dfx0_val = hisi_sas_phy_read32(hisi_hba, phy_no, PORT_DFX0); hisi_hba 1511 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!tx_fifo_is_empty_v2_hw(hisi_hba, phy_no)) { hisi_hba 1514 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c txid_auto = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 1517 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TXID_AUTO, hisi_hba 1522 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 1524 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 1528 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AXI_MASTER_CFG_BASE + hisi_hba 1532 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void start_phy_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1534 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c config_id_frame_v2_hw(hisi_hba, phy_no); hisi_hba 1535 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c config_phy_opt_mode_v2_hw(hisi_hba, phy_no); hisi_hba 1536 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c enable_phy_v2_hw(hisi_hba, phy_no); hisi_hba 1539 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void phy_hard_reset_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1541 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1544 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_enable(hisi_hba, phy_no, 0); hisi_hba 1546 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c txid_auto = hisi_sas_phy_read32(hisi_hba, phy_no, TXID_AUTO); hisi_hba 1547 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TXID_AUTO, hisi_hba 1551 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_enable(hisi_hba, phy_no, 1); hisi_hba 1554 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void phy_get_events_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1556 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1562 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c err4_reg_val = hisi_sas_phy_read32(hisi_hba, phy_no, SAS_ERR_CNT4_REG); hisi_hba 1565 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c err6_reg_val = hisi_sas_phy_read32(hisi_hba, phy_no, SAS_ERR_CNT6_REG); hisi_hba 1573 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void phys_init_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 1577 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 1578 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[i]; hisi_hba 1584 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_enable(hisi_hba, i, 1); hisi_hba 1588 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void sl_notify_ssp_v2_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1592 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c sl_control = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 1594 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, sl_control); hisi_hba 1596 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c sl_control = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 1598 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, sl_control); hisi_hba 1606 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void phy_set_linkrate_v2_hw(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 1613 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PROG_PHY_LINK_RATE, hisi_hba 1617 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int get_wideport_bitmap_v2_hw(struct hisi_hba *hisi_hba, int port_id) hisi_hba 1620 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 phy_port_num_ma = hisi_sas_read32(hisi_hba, PHY_PORT_NUM_MA); hisi_hba 1621 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 phy_state = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 1623 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < (hisi_hba->n_phy < 9 ? hisi_hba->n_phy : 8); i++) hisi_hba 1628 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (hisi_hba->n_phy == 9) { hisi_hba 1629 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 port_state = hisi_sas_read32(hisi_hba, PORT_STATE); hisi_hba 1643 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = dq->hisi_hba; hisi_hba 1664 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, DLVRY_Q_0_WR_PTR + (dlvry_queue * 0x14), wp); hisi_hba 1667 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void prep_prd_sge_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 1691 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void prep_smp_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 1730 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void prep_ssp_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 1784 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c prep_prd_sge_v2_hw(hisi_hba, slot, hdr, task->scatter, hisi_hba 2011 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void slot_err_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 2317 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot_complete_v2_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) hisi_hba 2321 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2327 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->complete_hdr[slot->cmplt_queue]; hisi_hba 2391 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot_err_v2_hw(hisi_hba, task, slot, 1); hisi_hba 2393 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot_err_v2_hw(hisi_hba, task, slot, 2); hisi_hba 2463 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_slot_task_free(hisi_hba, task, slot); hisi_hba 2482 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void prep_ata_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 2553 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c prep_prd_sge_v2_hw(hisi_hba, slot, hdr, task->scatter, hisi_hba 2583 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 2587 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c link_dfx2 = hisi_sas_phy_read32(hisi_hba, phy_no, LINK_DFX2); hisi_hba 2592 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c txid_auto = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 2595 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TXID_AUTO, hisi_hba 2602 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void prep_abort_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 2632 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int phy_up_v2_hw(int phy_no, struct hisi_hba *hisi_hba) hisi_hba 2636 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 2638 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2643 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_PHY_ENA_MSK, 1); hisi_hba 2645 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (is_sata_phy_v2_hw(hisi_hba, phy_no)) hisi_hba 2651 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 port_state = hisi_sas_read32(hisi_hba, PORT_STATE); hisi_hba 2658 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c port_id = hisi_sas_read32(hisi_hba, PHY_PORT_NUM_MA); hisi_hba 2660 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c link_rate = hisi_sas_read32(hisi_hba, PHY_CONN_RATE); hisi_hba 2671 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 idaf = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 2692 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!timer_pending(&hisi_hba->timer)) hisi_hba 2693 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c set_link_timer_quirk(hisi_hba); hisi_hba 2704 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, hisi_hba 2706 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_PHY_ENA_MSK, 0); hisi_hba 2711 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static bool check_any_wideports_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 2715 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c port_state = hisi_sas_read32(hisi_hba, PORT_STATE); hisi_hba 2722 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int phy_down_v2_hw(int phy_no, struct hisi_hba *hisi_hba) hisi_hba 2725 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 2727 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2730 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_NOT_RDY_MSK, 1); hisi_hba 2732 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c phy_state = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 2734 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_down(hisi_hba, phy_no, (phy_state & 1 << phy_no) ? 1 : 0); hisi_hba 2736 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c sl_ctrl = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 2737 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, hisi_hba 2739 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (port && !get_wideport_bitmap_v2_hw(hisi_hba, port->id)) hisi_hba 2740 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!check_any_wideports_v2_hw(hisi_hba) && hisi_hba 2741 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c timer_pending(&hisi_hba->timer)) hisi_hba 2742 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c del_timer(&hisi_hba->timer); hisi_hba 2744 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c txid_auto = hisi_sas_phy_read32(hisi_hba, phy_no, TXID_AUTO); hisi_hba 2745 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TXID_AUTO, hisi_hba 2748 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, CHL_INT0_NOT_RDY_MSK); hisi_hba 2749 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_NOT_RDY_MSK, 0); hisi_hba 2756 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 2761 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c irq_msk = (hisi_sas_read32(hisi_hba, HGC_INVLD_DQE_INFO) hisi_hba 2765 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 reg_value = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 2773 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (phy_up_v2_hw(phy_no, hisi_hba) == hisi_hba 2780 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (phy_down_v2_hw(phy_no, hisi_hba) == hisi_hba 2787 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c reg_value = hisi_sas_read32(hisi_hba, hisi_hba 2791 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (phy_up_v2_hw(phy_no, hisi_hba) == hisi_hba 2796 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (phy_down_v2_hw(phy_no, hisi_hba) == hisi_hba 2814 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void phy_bcast_v2_hw(int phy_no, struct hisi_hba *hisi_hba) hisi_hba 2816 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 2818 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct sas_ha_struct *sas_ha = &hisi_hba->sha; hisi_hba 2821 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_RX_BCAST_CHK_MSK, 1); hisi_hba 2822 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c bcast_status = hisi_sas_phy_read32(hisi_hba, phy_no, RX_PRIMS_STATUS); hisi_hba 2824 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c !test_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags)) hisi_hba 2826 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, hisi_hba 2828 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_RX_BCAST_CHK_MSK, 0); hisi_hba 2860 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 2861 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2865 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c ent_msk = hisi_sas_read32(hisi_hba, ENT_INT_SRC_MSK3); hisi_hba 2868 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, ent_msk); hisi_hba 2870 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c irq_msk = (hisi_sas_read32(hisi_hba, HGC_INVLD_DQE_INFO) >> hisi_hba 2874 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 irq_value0 = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 2876 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 irq_value1 = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 2878 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 irq_value2 = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 2893 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 2896 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, hisi_hba 2901 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 2910 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, hisi_hba 2916 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c phy_bcast_v2_hw(phy_no, hisi_hba); hisi_hba 2919 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_oob_ready(hisi_hba, phy_no); hisi_hba 2921 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, hisi_hba 2931 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, ent_tmp); hisi_hba 2937 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c one_bit_ecc_error_process_v2_hw(struct hisi_hba *hisi_hba, u32 irq_value) hisi_hba 2939 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2947 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c val = hisi_sas_read32(hisi_hba, ecc_error->reg); hisi_hba 2956 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void multi_bit_ecc_error_process_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 2959 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2967 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c val = hisi_sas_read32(hisi_hba, ecc_error->reg); hisi_hba 2972 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 2981 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 2984 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c irq_msk = hisi_sas_read32(hisi_hba, SAS_ECC_INTR_MSK); hisi_hba 2985 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, irq_msk | 0xffffffff); hisi_hba 2987 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c irq_value = hisi_sas_read32(hisi_hba, SAS_ECC_INTR); hisi_hba 2989 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c one_bit_ecc_error_process_v2_hw(hisi_hba, irq_value); hisi_hba 2990 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c multi_bit_ecc_error_process_v2_hw(hisi_hba, irq_value); hisi_hba 2993 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR, irq_value); hisi_hba 2994 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, irq_msk); hisi_hba 3055 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 3057 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3061 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c irq_msk = hisi_sas_read32(hisi_hba, ENT_INT_SRC_MSK3); hisi_hba 3062 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, irq_msk | 0xfffffffe); hisi_hba 3064 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c irq_value = hisi_sas_read32(hisi_hba, ENT_INT_SRC3); hisi_hba 3071 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC3, hisi_hba 3076 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c err_value = hisi_sas_read32(hisi_hba, axi_error->reg); hisi_hba 3082 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 3087 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 3092 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 reg_val = hisi_sas_read32(hisi_hba, ITCT_CLR); hisi_hba 3094 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_device *sas_dev = &hisi_hba->devices[dev_id]; hisi_hba 3096 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ITCT_CLR, 0); hisi_hba 3101 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC3, irq_value); hisi_hba 3102 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, irq_msk); hisi_hba 3110 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = cq->hisi_hba; hisi_hba 3117 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (unlikely(hisi_hba->reject_stp_links_msk)) hisi_hba 3118 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c phys_try_accept_stp_links_v2_hw(hisi_hba); hisi_hba 3120 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c complete_queue = hisi_hba->complete_hdr[queue]; hisi_hba 3122 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c wr_point = hisi_sas_read32(hisi_hba, COMPL_Q_0_WR_PTR + hisi_hba 3139 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c itct = &hisi_hba->itct[dev_id]; hisi_hba 3152 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot = &hisi_hba->slot_info[iptt]; hisi_hba 3155 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot_complete_v2_hw(hisi_hba, slot); hisi_hba 3164 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot = &hisi_hba->slot_info[iptt]; hisi_hba 3167 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c slot_complete_v2_hw(hisi_hba, slot); hisi_hba 3176 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_RD_PTR + (0x14 * queue), rd_point); hisi_hba 3182 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = cq->hisi_hba; hisi_hba 3185 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, OQ_INT_SRC, 1 << queue); hisi_hba 3195 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = phy->hisi_hba; hisi_hba 3197 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3209 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c initial_fis = &hisi_hba->initial_fis[phy_no]; hisi_hba 3213 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c ent_msk = hisi_sas_read32(hisi_hba, ENT_INT_SRC_MSK1 + offset); hisi_hba 3214 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1 + offset, hisi_hba 3217 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c ent_int = hisi_sas_read32(hisi_hba, ENT_INT_SRC1 + offset); hisi_hba 3237 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 port_state = hisi_sas_read32(hisi_hba, PORT_STATE); hisi_hba 3244 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c port_id = hisi_sas_read32(hisi_hba, PHY_PORT_NUM_MA); hisi_hba 3246 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c link_rate = hisi_sas_read32(hisi_hba, PHY_CONN_RATE); hisi_hba 3257 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hard_phy_linkrate = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 3265 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c attached_sas_addr[6] = hisi_hba->shost->host_no; hisi_hba 3286 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC1 + offset, ent_tmp); hisi_hba 3287 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1 + offset, ent_msk); hisi_hba 3306 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int interrupt_init_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 3308 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct platform_device *pdev = hisi_hba->platform_dev; hisi_hba 3319 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c DRV_NAME " phy", hisi_hba); hisi_hba 3328 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (phy_no = 0; phy_no < hisi_hba->n_phy; phy_no++) { hisi_hba 3329 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 3345 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c DRV_NAME " fatal", hisi_hba); hisi_hba 3354 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (queue_no = 0; queue_no < hisi_hba->queue_count; queue_no++) { hisi_hba 3355 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_sas_cq *cq = &hisi_hba->cq[queue_no]; hisi_hba 3370 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_hba->cq_nvecs = hisi_hba->queue_count; hisi_hba 3376 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int hisi_sas_v2_init(struct hisi_hba *hisi_hba) hisi_hba 3380 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c memset(hisi_hba->sata_dev_bitmap, 0, sizeof(hisi_hba->sata_dev_bitmap)); hisi_hba 3382 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c rc = hw_init_v2_hw(hisi_hba); hisi_hba 3386 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c rc = interrupt_init_v2_hw(hisi_hba); hisi_hba 3393 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void interrupt_disable_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 3395 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct platform_device *pdev = hisi_hba->platform_dev; hisi_hba 3398 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->queue_count; i++) hisi_hba 3399 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, OQ0_INT_SRC_MSK + 0x4 * i, 0x1); hisi_hba 3401 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, 0xffffffff); hisi_hba 3402 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK2, 0xffffffff); hisi_hba 3403 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, 0xffffffff); hisi_hba 3404 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, 0xffffffff); hisi_hba 3406 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 3407 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1_MSK, 0xffffffff); hisi_hba 3408 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2_MSK, 0xffffffff); hisi_hba 3416 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static u32 get_phys_state_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 3418 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c return hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 3421 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int soft_reset_v2_hw(struct hisi_hba *hisi_hba) hisi_hba 3423 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3426 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c interrupt_disable_v2_hw(hisi_hba); hisi_hba 3427 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0x0); hisi_hba 3428 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_kill_tasklets(hisi_hba); hisi_hba 3430 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_stop_phys(hisi_hba); hisi_hba 3434 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_write32(hisi_hba, AXI_MASTER_CFG_BASE + AM_CTRL_GLOBAL, 0x1); hisi_hba 3439 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c u32 status = hisi_sas_read32_relaxed(hisi_hba, hisi_hba 3452 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_init_mem(hisi_hba); hisi_hba 3454 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c rc = hw_init_v2_hw(hisi_hba); hisi_hba 3458 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c phys_reject_stp_links_v2_hw(hisi_hba); hisi_hba 3463 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static int write_gpio_v2_hw(struct hisi_hba *hisi_hba, u8 reg_type, hisi_hba 3466 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3469 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c if (!hisi_hba->sgpio_regs) hisi_hba 3475 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c count = min(count, hisi_hba->n_phy); hisi_hba 3484 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c void __iomem *reg_addr = hisi_hba->sgpio_regs + hisi_hba 3501 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c static void wait_cmds_complete_timeout_v2_hw(struct hisi_hba *hisi_hba, hisi_hba 3504 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3508 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c entries = hisi_sas_read32(hisi_hba, CQE_SEND_CNT); hisi_hba 3600 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 3602 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c hisi_sas_kill_tasklets(hisi_hba); hisi_hba 515 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static u32 hisi_sas_read32(struct hisi_hba *hisi_hba, u32 off) hisi_hba 517 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c void __iomem *regs = hisi_hba->regs + off; hisi_hba 522 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void hisi_sas_write32(struct hisi_hba *hisi_hba, u32 off, u32 val) hisi_hba 524 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c void __iomem *regs = hisi_hba->regs + off; hisi_hba 529 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void hisi_sas_phy_write32(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 532 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c void __iomem *regs = hisi_hba->regs + (0x400 * phy_no) + off; hisi_hba 537 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static u32 hisi_sas_phy_read32(struct hisi_hba *hisi_hba, hisi_hba 540 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c void __iomem *regs = hisi_hba->regs + (0x400 * phy_no) + off; hisi_hba 548 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c void __iomem *regs = hisi_hba->regs + off; \ hisi_hba 555 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c void __iomem *regs = hisi_hba->regs + off; \ hisi_hba 559 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void init_reg_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 564 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, hisi_hba 565 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c (u32)((1ULL << hisi_hba->queue_count) - 1)); hisi_hba 566 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_AXI_USER3, 0); hisi_hba 567 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CFG_MAX_TAG, 0xfff0400); hisi_hba 568 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, HGC_SAS_TXFAIL_RETRY_CTRL, 0x108); hisi_hba 569 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CFG_AGING_TIME, 0x1); hisi_hba 570 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, INT_COAL_EN, 0x1); hisi_hba 571 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0x1); hisi_hba 572 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 0x1); hisi_hba 573 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CQ_INT_CONVERGE_EN, hisi_hba 575 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_SRC, 0xffff); hisi_hba 576 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC1, 0xffffffff); hisi_hba 577 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC2, 0xffffffff); hisi_hba 578 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC3, 0xffffffff); hisi_hba 579 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, 0xfefefefe); hisi_hba 580 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK2, 0xfefefefe); hisi_hba 581 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, 0xffc220ff); hisi_hba 582 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CHNL_PHYUPDOWN_INT_MSK, 0x0); hisi_hba 583 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CHNL_ENT_INT_MSK, 0x0); hisi_hba 584 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, HGC_COM_INT_MSK, 0x0); hisi_hba 585 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, 0x155555); hisi_hba 586 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, AWQOS_AWCACHE_CFG, 0xf0f0); hisi_hba 587 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ARQOS_ARCACHE_CFG, 0xf0f0); hisi_hba 588 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->queue_count; i++) hisi_hba 589 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ0_INT_SRC_MSK+0x4*i, 0); hisi_hba 591 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, HYPER_STREAM_ID_EN_CFG, 1); hisi_hba 593 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 594 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[i]; hisi_hba 608 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PROG_PHY_LINK_RATE, hisi_hba 610 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, SERDES_CFG, 0xffc00); hisi_hba 611 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, SAS_RX_TRAIN_TIMER, 0x13e80); hisi_hba 612 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT0, 0xffffffff); hisi_hba 613 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1, 0xffffffff); hisi_hba 614 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2, 0xffffffff); hisi_hba 615 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, RXOP_CHECK_CFG_H, 0x1000); hisi_hba 616 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1_MSK, 0xf2057fff); hisi_hba 617 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2_MSK, 0xffffbfe); hisi_hba 618 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PHY_CTRL_RDY_MSK, 0x0); hisi_hba 619 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_NOT_RDY_MSK, 0x0); hisi_hba 620 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_DWS_RESET_MSK, 0x0); hisi_hba 621 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_PHY_ENA_MSK, 0x0); hisi_hba 622 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, SL_RX_BCAST_CHK_MSK, 0x0); hisi_hba 623 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_OOB_RESTART_MSK, 0x1); hisi_hba 624 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, STP_LINK_TIMER, 0x7f7a120); hisi_hba 625 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CON_CFG_DRIVER, 0x2a0a01); hisi_hba 626 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, SAS_SSP_CON_TIMER_CFG, 0x32); hisi_hba 627 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, SAS_EC_INT_COAL_TIME, hisi_hba 630 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, COARSETUNE_TIME, 0x1e); hisi_hba 631 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, AIP_LIMIT, 0x2ffff); hisi_hba 634 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->queue_count; i++) { hisi_hba 636 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, hisi_hba 638 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c upper_32_bits(hisi_hba->cmd_hdr_dma[i])); hisi_hba 640 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_Q_0_BASE_ADDR_LO + (i * 0x14), hisi_hba 641 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c lower_32_bits(hisi_hba->cmd_hdr_dma[i])); hisi_hba 643 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_Q_0_DEPTH + (i * 0x14), hisi_hba 647 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_BASE_ADDR_HI + (i * 0x14), hisi_hba 648 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c upper_32_bits(hisi_hba->complete_hdr_dma[i])); hisi_hba 650 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_BASE_ADDR_LO + (i * 0x14), hisi_hba 651 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c lower_32_bits(hisi_hba->complete_hdr_dma[i])); hisi_hba 653 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_DEPTH + (i * 0x14), hisi_hba 658 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ITCT_BASE_ADDR_LO, hisi_hba 659 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c lower_32_bits(hisi_hba->itct_dma)); hisi_hba 661 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ITCT_BASE_ADDR_HI, hisi_hba 662 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c upper_32_bits(hisi_hba->itct_dma)); hisi_hba 665 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, IOST_BASE_ADDR_LO, hisi_hba 666 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c lower_32_bits(hisi_hba->iost_dma)); hisi_hba 668 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, IOST_BASE_ADDR_HI, hisi_hba 669 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c upper_32_bits(hisi_hba->iost_dma)); hisi_hba 672 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, IO_BROKEN_MSG_ADDR_LO, hisi_hba 673 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c lower_32_bits(hisi_hba->breakpoint_dma)); hisi_hba 675 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, IO_BROKEN_MSG_ADDR_HI, hisi_hba 676 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c upper_32_bits(hisi_hba->breakpoint_dma)); hisi_hba 679 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, IO_SATA_BROKEN_MSG_ADDR_LO, hisi_hba 680 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c lower_32_bits(hisi_hba->sata_breakpoint_dma)); hisi_hba 682 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, IO_SATA_BROKEN_MSG_ADDR_HI, hisi_hba 683 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c upper_32_bits(hisi_hba->sata_breakpoint_dma)); hisi_hba 686 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SATA_INITI_D2H_STORE_ADDR_LO, hisi_hba 687 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c lower_32_bits(hisi_hba->initial_fis_dma)); hisi_hba 689 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SATA_INITI_D2H_STORE_ADDR_HI, hisi_hba 690 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c upper_32_bits(hisi_hba->initial_fis_dma)); hisi_hba 693 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_RAS_INTR0_MASK, 0x0); hisi_hba 694 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_RAS_INTR1_MASK, 0x0); hisi_hba 695 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_RAS_INTR2_MASK, 0x0); hisi_hba 696 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CFG_SAS_RAS_INTR_MASK, 0x0); hisi_hba 699 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_CFG_DRIVE_VLD, 0x80000ff); hisi_hba 700 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_GPIO_TX_0_1, 0x80808080); hisi_hba 701 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_GPIO_TX_0_1 + 0x4, 0x80808080); hisi_hba 703 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_GPIO_CFG_1, 0x121700); hisi_hba 704 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_GPIO_CFG_0, 0x800000); hisi_hba 707 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void config_phy_opt_mode_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 709 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 713 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 716 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void config_id_frame_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 727 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c memcpy(&identify_frame._un4_11[0], hisi_hba->sas_addr, SAS_ADDR_SIZE); hisi_hba 728 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c memcpy(&identify_frame.sas_addr[0], hisi_hba->sas_addr, SAS_ADDR_SIZE); hisi_hba 732 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD0, hisi_hba 734 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD1, hisi_hba 736 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD2, hisi_hba 738 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD3, hisi_hba 740 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD4, hisi_hba 742 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TX_ID_DWORD5, hisi_hba 746 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void setup_itct_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 750 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 752 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_itct *itct = &hisi_hba->itct[device_id]; hisi_hba 798 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void clear_itct_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 803 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id]; hisi_hba 804 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 reg_val = hisi_sas_read32(hisi_hba, ENT_INT_SRC3); hisi_hba 810 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC3, hisi_hba 815 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ITCT_CLR, reg_val); hisi_hba 821 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void dereg_device_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 828 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c cfg_abt_set_query_iptt = hisi_sas_read32(hisi_hba, hisi_hba 834 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CFG_ABT_SET_QUERY_IPTT, hisi_hba 838 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CFG_ABT_SET_QUERY_IPTT, hisi_hba 840 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, CFG_ABT_SET_IPTT_DONE, hisi_hba 844 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int reset_hw_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 846 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 850 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0); hisi_hba 853 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_stop_phys(hisi_hba); hisi_hba 880 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int hw_init_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 882 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 887 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = reset_hw_v3_hw(hisi_hba); hisi_hba 894 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c init_reg_v3_hw(hisi_hba); hisi_hba 912 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void enable_phy_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 914 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 918 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 921 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void disable_phy_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 923 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 cfg = hisi_sas_phy_read32(hisi_hba, phy_no, PHY_CFG); hisi_hba 924 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 irq_msk = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT2_MSK); hisi_hba 930 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT2_MSK, msk | irq_msk); hisi_hba 933 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 937 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c state = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 940 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHY_CFG, cfg); hisi_hba 945 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_INVLD_DW); hisi_hba 946 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_DISP_ERR); hisi_hba 947 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_CODE_ERR); hisi_hba 949 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT2, msk); hisi_hba 950 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT2_MSK, irq_msk); hisi_hba 953 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void start_phy_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 955 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c config_id_frame_v3_hw(hisi_hba, phy_no); hisi_hba 956 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c config_phy_opt_mode_v3_hw(hisi_hba, phy_no); hisi_hba 957 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c enable_phy_v3_hw(hisi_hba, phy_no); hisi_hba 960 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void phy_hard_reset_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 962 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 965 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_enable(hisi_hba, phy_no, 0); hisi_hba 967 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c txid_auto = hisi_sas_phy_read32(hisi_hba, phy_no, TXID_AUTO); hisi_hba 968 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TXID_AUTO, hisi_hba 972 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_enable(hisi_hba, phy_no, 1); hisi_hba 980 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void phys_init_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 984 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 985 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[i]; hisi_hba 991 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_enable(hisi_hba, i, 1); hisi_hba 995 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void sl_notify_ssp_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 999 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sl_control = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 1001 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, sl_control); hisi_hba 1003 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sl_control = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 1005 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, sl_control); hisi_hba 1008 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int get_wideport_bitmap_v3_hw(struct hisi_hba *hisi_hba, int port_id) hisi_hba 1011 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 phy_port_num_ma = hisi_sas_read32(hisi_hba, PHY_PORT_NUM_MA); hisi_hba 1012 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 phy_state = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 1014 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->n_phy; i++) hisi_hba 1024 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = dq->hisi_hba; hisi_hba 1045 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_Q_0_WR_PTR + (dlvry_queue * 0x14), wp); hisi_hba 1048 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void prep_prd_sge_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 1072 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void prep_prd_sge_dif_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 1167 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void prep_ssp_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 1221 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c prep_prd_sge_v3_hw(hisi_hba, slot, hdr, task->scatter, hisi_hba 1225 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c prep_prd_sge_dif_v3_hw(hisi_hba, slot, hdr, hisi_hba 1289 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void prep_smp_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 1329 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void prep_ata_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 1393 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c prep_prd_sge_v3_hw(hisi_hba, slot, hdr, task->scatter, hisi_hba 1408 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void prep_abort_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 1435 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static irqreturn_t phy_up_v3_hw(int phy_no, struct hisi_hba *hisi_hba) hisi_hba 1440 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1442 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1446 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_PHY_ENA_MSK, 1); hisi_hba 1448 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c port_id = hisi_sas_read32(hisi_hba, PHY_PORT_NUM_MA); hisi_hba 1450 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c link_rate = hisi_sas_read32(hisi_hba, PHY_CONN_RATE); hisi_hba 1462 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c context = hisi_sas_read32(hisi_hba, PHY_CONTEXT); hisi_hba 1467 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct Scsi_Host *shost = hisi_hba->shost; hisi_hba 1470 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c initial_fis = &hisi_hba->initial_fis[phy_no]; hisi_hba 1502 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 idaf = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 1532 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, hisi_hba 1534 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_PHY_ENA_MSK, 0); hisi_hba 1539 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static irqreturn_t phy_down_v3_hw(int phy_no, struct hisi_hba *hisi_hba) hisi_hba 1541 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1543 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1546 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_NOT_RDY_MSK, 1); hisi_hba 1548 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c phy_state = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 1550 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_down(hisi_hba, phy_no, (phy_state & 1 << phy_no) ? 1 : 0); hisi_hba 1552 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sl_ctrl = hisi_sas_phy_read32(hisi_hba, phy_no, SL_CONTROL); hisi_hba 1553 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_CONTROL, hisi_hba 1556 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c txid_auto = hisi_sas_phy_read32(hisi_hba, phy_no, TXID_AUTO); hisi_hba 1557 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, TXID_AUTO, hisi_hba 1560 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, CHL_INT0_NOT_RDY_MSK); hisi_hba 1561 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PHYCTRL_NOT_RDY_MSK, 0); hisi_hba 1566 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static irqreturn_t phy_bcast_v3_hw(int phy_no, struct hisi_hba *hisi_hba) hisi_hba 1568 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1570 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct sas_ha_struct *sas_ha = &hisi_hba->sha; hisi_hba 1573 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_RX_BCAST_CHK_MSK, 1); hisi_hba 1574 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c bcast_status = hisi_sas_phy_read32(hisi_hba, phy_no, RX_PRIMS_STATUS); hisi_hba 1576 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c !test_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags)) hisi_hba 1578 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, hisi_hba 1580 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, SL_RX_BCAST_CHK_MSK, 0); hisi_hba 1587 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 1592 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c irq_msk = hisi_sas_read32(hisi_hba, CHNL_INT_STATUS) hisi_hba 1596 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 irq_value = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 1598 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 phy_state = hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 1604 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (phy_up_v3_hw(phy_no, hisi_hba) hisi_hba 1609 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (phy_bcast_v3_hw(phy_no, hisi_hba) hisi_hba 1615 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (phy_down_v3_hw(phy_no, hisi_hba) hisi_hba 1670 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void handle_chl_int1_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1672 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 irq_value = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT1); hisi_hba 1673 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 irq_msk = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT1_MSK); hisi_hba 1674 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1689 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 1692 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT1, irq_value); hisi_hba 1695 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void phy_get_events_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1697 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1706 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_value = hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_DWS_LOST); hisi_hba 1710 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_value = hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_RESET_PROB); hisi_hba 1714 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_value = hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_INVLD_DW); hisi_hba 1718 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_value = hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_DISP_ERR); hisi_hba 1722 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_value = hisi_sas_phy_read32(hisi_hba, phy_no, ERR_CNT_CODE_ERR); hisi_hba 1728 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void handle_chl_int2_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1730 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 irq_msk = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT2_MSK); hisi_hba 1731 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 irq_value = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT2); hisi_hba 1732 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; hisi_hba 1733 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct pci_dev *pci_dev = hisi_hba->pci_dev; hisi_hba 1734 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1749 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 reg_value = hisi_sas_phy_read32(hisi_hba, phy_no, hisi_hba 1762 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c phy_get_events_v3_hw(hisi_hba, phy_no); hisi_hba 1790 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT2, irq_value); hisi_hba 1793 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void handle_chl_int0_v3_hw(struct hisi_hba *hisi_hba, int phy_no) hisi_hba 1795 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 irq_value0 = hisi_sas_phy_read32(hisi_hba, phy_no, CHL_INT0); hisi_hba 1798 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_oob_ready(hisi_hba, phy_no); hisi_hba 1800 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, CHL_INT0, hisi_hba 1808 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 1812 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c irq_msk = hisi_sas_read32(hisi_hba, CHNL_INT_STATUS) hisi_hba 1817 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c handle_chl_int0_v3_hw(hisi_hba, phy_no); hisi_hba 1820 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c handle_chl_int1_v3_hw(hisi_hba, phy_no); hisi_hba 1823 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c handle_chl_int2_v3_hw(hisi_hba, phy_no); hisi_hba 1912 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void multi_bit_ecc_error_process_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 1915 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 1923 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c val = hisi_sas_read32(hisi_hba, ecc_error->reg); hisi_hba 1928 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 1933 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void fatal_ecc_int_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 1937 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c irq_msk = hisi_sas_read32(hisi_hba, SAS_ECC_INTR_MSK); hisi_hba 1938 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, 0xffffffff); hisi_hba 1940 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c irq_value = hisi_sas_read32(hisi_hba, SAS_ECC_INTR); hisi_hba 1942 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c multi_bit_ecc_error_process_v3_hw(hisi_hba, irq_value); hisi_hba 1944 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR, irq_value); hisi_hba 1945 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, irq_msk); hisi_hba 2022 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = p; hisi_hba 2023 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2024 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct pci_dev *pdev = hisi_hba->pci_dev; hisi_hba 2027 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c irq_msk = hisi_sas_read32(hisi_hba, ENT_INT_SRC_MSK3); hisi_hba 2028 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, irq_msk | 0x1df00); hisi_hba 2030 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c irq_value = hisi_sas_read32(hisi_hba, ENT_INT_SRC3); hisi_hba 2041 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 err_value = hisi_sas_read32(hisi_hba, error->reg); hisi_hba 2049 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 2054 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c queue_work(hisi_hba->wq, &hisi_hba->rst_work); hisi_hba 2060 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_read32(hisi_hba, hisi_hba 2064 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, AXI_MASTER_CFG_BASE + hisi_hba 2069 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c fatal_ecc_int_v3_hw(hisi_hba); hisi_hba 2072 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 reg_val = hisi_sas_read32(hisi_hba, ITCT_CLR); hisi_hba 2075 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c &hisi_hba->devices[dev_id]; hisi_hba 2077 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ITCT_CLR, 0); hisi_hba 2082 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC3, irq_value & 0x1df00); hisi_hba 2083 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, irq_msk); hisi_hba 2089 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task, hisi_hba 2094 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->complete_hdr[slot->cmplt_queue]; hisi_hba 2140 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c slot_complete_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot) hisi_hba 2144 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2150 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->complete_hdr[slot->cmplt_queue]; hisi_hba 2212 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c slot_err_v3_hw(hisi_hba, task, slot); hisi_hba 2274 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_slot_task_free(hisi_hba, task, slot); hisi_hba 2296 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = cq->hisi_hba; hisi_hba 2302 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c complete_queue = hisi_hba->complete_hdr[queue]; hisi_hba 2304 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c wr_point = hisi_sas_read32(hisi_hba, COMPL_Q_0_WR_PTR + hisi_hba 2309 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2318 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c slot = &hisi_hba->slot_info[iptt]; hisi_hba 2321 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c slot_complete_v3_hw(hisi_hba, slot); hisi_hba 2331 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, COMPL_Q_0_RD_PTR + (0x14 * queue), rd_point); hisi_hba 2337 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = cq->hisi_hba; hisi_hba 2340 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_SRC, 1 << queue); hisi_hba 2347 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void setup_reply_map_v3_hw(struct hisi_hba *hisi_hba, int nvecs) hisi_hba 2353 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_cq *cq = &hisi_hba->cq[queue]; hisi_hba 2355 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c mask = pci_irq_get_affinity(hisi_hba->pci_dev, queue + hisi_hba 2361 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->reply_map[cpu] = queue; hisi_hba 2367 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->reply_map[cpu] = cpu % hisi_hba->queue_count; hisi_hba 2371 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2373 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2374 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct pci_dev *pdev = hisi_hba->pci_dev; hisi_hba 2385 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->reply_map = devm_kcalloc(dev, nr_cpu_ids, hisi_hba 2388 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (!hisi_hba->reply_map) hisi_hba 2390 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c vectors = pci_alloc_irq_vectors_affinity(hisi_hba->pci_dev, hisi_hba 2397 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c setup_reply_map_v3_hw(hisi_hba, vectors - BASE_VECTORS_V3_HW); hisi_hba 2400 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c vectors = pci_alloc_irq_vectors(hisi_hba->pci_dev, min_msi, hisi_hba 2406 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->cq_nvecs = vectors - BASE_VECTORS_V3_HW; hisi_hba 2410 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c DRV_NAME " phy", hisi_hba); hisi_hba 2419 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c DRV_NAME " channel", hisi_hba); hisi_hba 2428 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c DRV_NAME " fatal", hisi_hba); hisi_hba 2436 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->cq_nvecs; i++) { hisi_hba 2437 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_cq *cq = &hisi_hba->cq[i]; hisi_hba 2462 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int hisi_sas_v3_init(struct hisi_hba *hisi_hba) hisi_hba 2466 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = hw_init_v3_hw(hisi_hba); hisi_hba 2470 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = interrupt_init_v3_hw(hisi_hba); hisi_hba 2477 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void phy_set_linkrate_v3_hw(struct hisi_hba *hisi_hba, int phy_no, hisi_hba 2484 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_no, PROG_PHY_LINK_RATE, hisi_hba 2488 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void interrupt_disable_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2490 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct pci_dev *pdev = hisi_hba->pci_dev; hisi_hba 2496 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->queue_count; i++) { hisi_hba 2497 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ0_INT_SRC_MSK + 0x4 * i, 0x1); hisi_hba 2501 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK1, 0xffffffff); hisi_hba 2502 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK2, 0xffffffff); hisi_hba 2503 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, ENT_INT_SRC_MSK3, 0xffffffff); hisi_hba 2504 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, SAS_ECC_INTR_MSK, 0xffffffff); hisi_hba 2506 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 2507 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT1_MSK, 0xffffffff); hisi_hba 2508 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, CHL_INT2_MSK, 0xffffffff); hisi_hba 2509 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_NOT_RDY_MSK, 0x1); hisi_hba 2510 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, PHYCTRL_PHY_ENA_MSK, 0x1); hisi_hba 2511 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, i, SL_RX_BCAST_CHK_MSK, 0x1); hisi_hba 2515 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static u32 get_phys_state_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2517 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c return hisi_sas_read32(hisi_hba, PHY_STATE); hisi_hba 2520 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int disable_host_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2522 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2526 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c interrupt_disable_v3_hw(hisi_hba); hisi_hba 2527 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0x0); hisi_hba 2528 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_kill_tasklets(hisi_hba); hisi_hba 2530 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_stop_phys(hisi_hba); hisi_hba 2534 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_read32(hisi_hba, AXI_MASTER_CFG_BASE + hisi_hba 2537 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, AXI_MASTER_CFG_BASE + hisi_hba 2552 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int soft_reset_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2554 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2557 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = disable_host_v3_hw(hisi_hba); hisi_hba 2563 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_init_mem(hisi_hba); hisi_hba 2565 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c return hw_init_v3_hw(hisi_hba); hisi_hba 2568 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int write_gpio_v3_hw(struct hisi_hba *hisi_hba, u8 reg_type, hisi_hba 2571 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2577 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if ((reg_index + reg_count) > ((hisi_hba->n_phy + 3) / 4)) { hisi_hba 2584 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, hisi_hba 2597 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void wait_cmds_complete_timeout_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 2600 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 2604 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c entries = hisi_sas_read32(hisi_hba, CQE_SEND_CNT); hisi_hba 2627 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void config_intr_coal_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2630 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_stop_phys(hisi_hba); hisi_hba 2632 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (hisi_hba->intr_coal_ticks == 0 || hisi_hba 2633 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->intr_coal_count == 0) { hisi_hba 2634 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, INT_COAL_EN, 0x1); hisi_hba 2635 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0x1); hisi_hba 2636 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 0x1); hisi_hba 2638 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, INT_COAL_EN, 0x3); hisi_hba 2639 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, hisi_hba 2640 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->intr_coal_ticks); hisi_hba 2641 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, hisi_hba 2642 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->intr_coal_count); hisi_hba 2644 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c phys_init_v3_hw(hisi_hba); hisi_hba 2652 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = shost_priv(shost); hisi_hba 2655 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->intr_coal_ticks); hisi_hba 2663 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = shost_priv(shost); hisi_hba 2678 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->intr_coal_ticks = intr_coal_ticks; hisi_hba 2680 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c config_intr_coal_v3_hw(hisi_hba); hisi_hba 2691 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = shost_priv(shost); hisi_hba 2694 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->intr_coal_count); hisi_hba 2702 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = shost_priv(shost); hisi_hba 2717 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->intr_coal_count = intr_coal_count; hisi_hba 2719 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c config_intr_coal_v3_hw(hisi_hba); hisi_hba 2896 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void debugfs_snapshot_prepare_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2898 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 2900 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0); hisi_hba 2902 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c wait_cmds_complete_timeout_v3_hw(hisi_hba, 100, 5000); hisi_hba 2904 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_kill_tasklets(hisi_hba); hisi_hba 2907 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void debugfs_snapshot_restore_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2909 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, hisi_hba 2910 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c (u32)((1ULL << hisi_hba->queue_count) - 1)); hisi_hba 2912 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c clear_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 2915 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void read_iost_itct_cache_v3_hw(struct hisi_hba *hisi_hba, hisi_hba 2924 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_write32(hisi_hba, TAB_RD_TYPE, type); hisi_hba 2927 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c val = hisi_sas_read32(hisi_hba, TAB_DFX); hisi_hba 2941 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c buf[i] = hisi_sas_read32(hisi_hba, TAB_DFX); hisi_hba 2944 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void hisi_sas_bist_test_prep_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2947 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c int phy_id = hisi_hba->debugfs_bist_phy_no; hisi_hba 2950 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_enable(hisi_hba, phy_id, 0); hisi_hba 2953 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_phy_read32(hisi_hba, phy_id, SERDES_CFG); hisi_hba 2955 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, SERDES_CFG, reg_val); hisi_hba 2958 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static void hisi_sas_bist_test_restore_v3_hw(struct hisi_hba *hisi_hba) hisi_hba 2961 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c int phy_id = hisi_hba->debugfs_bist_phy_no; hisi_hba 2964 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_phy_read32(hisi_hba, phy_id, SAS_PHY_BIST_CTRL); hisi_hba 2967 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, SAS_PHY_BIST_CTRL, reg_val); hisi_hba 2970 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_phy_read32(hisi_hba, phy_id, SERDES_CFG); hisi_hba 2972 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, SERDES_CFG, reg_val); hisi_hba 2975 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_phy_read32(hisi_hba, phy_id, PROG_PHY_LINK_RATE); hisi_hba 2979 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, PROG_PHY_LINK_RATE, reg_val); hisi_hba 2982 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_enable(hisi_hba, phy_id, 1); hisi_hba 2987 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c static int debugfs_set_bist_v3_hw(struct hisi_hba *hisi_hba, bool enable) hisi_hba 2990 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 linkrate = hisi_hba->debugfs_bist_linkrate; hisi_hba 2991 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 phy_id = hisi_hba->debugfs_bist_phy_no; hisi_hba 2992 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 code_mode = hisi_hba->debugfs_bist_code_mode; hisi_hba 2993 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c u32 path_mode = hisi_hba->debugfs_bist_mode; hisi_hba 2994 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3001 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_bist_test_prep_v3_hw(hisi_hba); hisi_hba 3004 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_phy_read32(hisi_hba, phy_id, hisi_hba 3008 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, hisi_hba 3012 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c reg_val = hisi_sas_phy_read32(hisi_hba, phy_id, hisi_hba 3022 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, hisi_hba 3026 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, hisi_hba 3029 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, hisi_hba 3035 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_write32(hisi_hba, phy_id, hisi_hba 3040 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_phy_read32(hisi_hba, phy_id, SAS_BIST_ERR_CNT); hisi_hba 3043 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->debugfs_bist_cnt += hisi_sas_phy_read32(hisi_hba, hisi_hba 3045 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_bist_test_restore_v3_hw(hisi_hba); hisi_hba 3112 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba; hisi_hba 3115 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c shost = scsi_host_alloc(&sht_v3_hw, sizeof(*hisi_hba)); hisi_hba 3120 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba = shost_priv(shost); hisi_hba 3122 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c INIT_WORK(&hisi_hba->rst_work, hisi_sas_rst_work_handler); hisi_hba 3123 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c INIT_WORK(&hisi_hba->debugfs_work, hisi_sas_debugfs_work_handler); hisi_hba 3124 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->hw = &hisi_sas_v3_hw; hisi_hba 3125 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->pci_dev = pdev; hisi_hba 3126 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->dev = dev; hisi_hba 3127 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->shost = shost; hisi_hba 3128 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c SHOST_TO_SAS_HA(shost) = &hisi_hba->sha; hisi_hba 3134 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->prot_mask = prot_mask; hisi_hba 3136 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (hisi_sas_get_fw_info(hisi_hba) < 0) hisi_hba 3139 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (hisi_sas_alloc(hisi_hba)) { hisi_hba 3140 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_free(hisi_hba); hisi_hba 3155 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba; hisi_hba 3188 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba = shost_priv(shost); hisi_hba 3191 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->regs = pcim_iomap(pdev, 5, 0); hisi_hba 3192 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (!hisi_hba->regs) { hisi_hba 3198 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c phy_nr = port_nr = hisi_hba->n_phy; hisi_hba 3210 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sha->lldd_ha = hisi_hba; hisi_hba 3223 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sha->sas_addr = &hisi_hba->sas_addr[0]; hisi_hba 3224 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sha->num_phys = hisi_hba->n_phy; hisi_hba 3226 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->n_phy; i++) { hisi_hba 3227 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sha->sas_phy[i] = &hisi_hba->phy[i].sas_phy; hisi_hba 3228 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c sha->sas_port[i] = &hisi_hba->port[i].sas_port; hisi_hba 3231 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (hisi_hba->prot_mask) { hisi_hba 3234 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c scsi_host_set_prot(hisi_hba->shost, prot_mask); hisi_hba 3235 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (hisi_hba->prot_mask & HISI_SAS_DIX_PROT_MASK) hisi_hba 3236 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c scsi_host_set_guard(hisi_hba->shost, hisi_hba 3241 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_debugfs_init(hisi_hba); hisi_hba 3251 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = hisi_hba->hw->hw_init(hisi_hba); hisi_hba 3262 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_debugfs_exit(hisi_hba); hisi_hba 3273 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_v3_destroy_irqs(struct pci_dev *pdev, struct hisi_hba *hisi_hba) hisi_hba 3277 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c free_irq(pci_irq_vector(pdev, 1), hisi_hba); hisi_hba 3278 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c free_irq(pci_irq_vector(pdev, 2), hisi_hba); hisi_hba 3279 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c free_irq(pci_irq_vector(pdev, 11), hisi_hba); hisi_hba 3280 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c for (i = 0; i < hisi_hba->cq_nvecs; i++) { hisi_hba 3281 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_sas_cq *cq = &hisi_hba->cq[i]; hisi_hba 3293 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 3296 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_debugfs_exit(hisi_hba); hisi_hba 3298 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (timer_pending(&hisi_hba->timer)) hisi_hba 3299 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c del_timer(&hisi_hba->timer); hisi_hba 3304 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_v3_destroy_irqs(pdev, hisi_hba); hisi_hba 3305 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_kill_tasklets(hisi_hba); hisi_hba 3308 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_free(hisi_hba); hisi_hba 3315 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 3316 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3320 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c set_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags); hisi_hba 3321 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_controller_reset_prepare(hisi_hba); hisi_hba 3323 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = disable_host_v3_hw(hisi_hba); hisi_hba 3331 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 3332 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3335 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_init_mem(hisi_hba); hisi_hba 3337 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = hw_init_v3_hw(hisi_hba); hisi_hba 3343 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_controller_reset_done(hisi_hba); hisi_hba 3355 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 3356 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3357 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct Scsi_Host *shost = hisi_hba->shost; hisi_hba 3366 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c if (test_and_set_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags)) hisi_hba 3370 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 3371 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c flush_workqueue(hisi_hba->wq); hisi_hba 3373 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = disable_host_v3_hw(hisi_hba); hisi_hba 3376 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c clear_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 3377 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags); hisi_hba 3382 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_init_mem(hisi_hba); hisi_hba 3391 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_sas_release_tasks(hisi_hba); hisi_hba 3400 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct hisi_hba *hisi_hba = sha->lldd_ha; hisi_hba 3401 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct Scsi_Host *shost = hisi_hba->shost; hisi_hba 3402 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c struct device *dev = hisi_hba->dev; hisi_hba 3419 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c clear_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags); hisi_hba 3422 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c rc = hw_init_v3_hw(hisi_hba); hisi_hba 3428 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c hisi_hba->hw->phys_init(hisi_hba); hisi_hba 3430 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c clear_bit(HISI_SAS_RESET_BIT, &hisi_hba->flags);