Lines Matching defs:host

296 		scsi_unblock_requests(hba->host);
302 scsi_block_requests(hba->host);
521 hba->auto_bkops_enabled, hba->host->host_self_blocked);
658 * the host controller
720 * @reg: Register value of host controller status
845 * host controller that it can process the requests
896 * If both host and device support UniPro ver1.6 or later, PA layer
899 * We can manually tune PA layer parameters if either host or device
1049 spin_lock_irqsave(hba->host->host_lock, flags);
1070 spin_unlock_irqrestore(hba->host->host_lock, flags);
1082 spin_lock_irqsave(hba->host->host_lock, flags);
1092 spin_unlock_irqrestore(hba->host->host_lock, flags);
1229 spin_lock_irqsave(hba->host->host_lock, irq_flags);
1231 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1235 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1246 spin_lock_irqsave(hba->host->host_lock, irq_flags);
1248 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1252 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1274 spin_lock_irqsave(hba->host->host_lock, irq_flags);
1276 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1284 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1294 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1298 spin_unlock_irqrestore(hba->host->host_lock, irq_flags);
1356 spin_lock_irqsave(hba->host->host_lock, flags);
1385 spin_unlock_irqrestore(hba->host->host_lock, flags);
1445 spin_lock_irqsave(hba->host->host_lock, flags);
1447 spin_unlock_irqrestore(hba->host->host_lock, flags);
1458 spin_lock_irqsave(hba->host->host_lock, flags);
1463 spin_unlock_irqrestore(hba->host->host_lock, flags);
1477 spin_lock_irqsave(hba->host->host_lock, flags);
1482 spin_unlock_irqrestore(hba->host->host_lock, flags);
1554 spin_lock_irqsave(hba->host->host_lock, flags);
1556 spin_unlock_irqrestore(hba->host->host_lock, flags);
1560 spin_unlock_irqrestore(hba->host->host_lock, flags);
1597 spin_lock_irqsave(hba->host->host_lock, flags);
1618 spin_unlock_irqrestore(hba->host->host_lock, flags);
1622 spin_lock_irqsave(hba->host->host_lock, flags);
1658 spin_unlock_irqrestore(hba->host->host_lock, flags);
1661 spin_lock_irqsave(hba->host->host_lock, flags);
1668 spin_unlock_irqrestore(hba->host->host_lock, flags);
1681 spin_lock_irqsave(hba->host->host_lock, flags);
1702 spin_unlock_irqrestore(hba->host->host_lock, flags);
1731 spin_lock_irqsave(hba->host->host_lock, flags);
1738 spin_unlock_irqrestore(hba->host->host_lock, flags);
1743 /* host lock must be held before calling this variant */
1769 spin_lock_irqsave(hba->host->host_lock, flags);
1771 spin_unlock_irqrestore(hba->host->host_lock, flags);
1792 spin_lock_irqsave(hba->host->host_lock, flags);
1794 spin_unlock_irqrestore(hba->host->host_lock, flags);
1823 spin_lock_irqsave(hba->host->host_lock, flags);
1825 spin_unlock_irqrestore(hba->host->host_lock, flags);
1846 hba->host->host_no);
1875 hba->host->host_no);
1909 /* Must be called with host lock acquired */
2140 spin_lock_irqsave(hba->host->host_lock, flags);
2142 spin_unlock_irqrestore(hba->host->host_lock, flags);
2192 spin_lock_irqsave(hba->host->host_lock, flags);
2194 spin_unlock_irqrestore(hba->host->host_lock, flags);
2523 * @host: SCSI host pointer
2528 static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
2536 hba = shost_priv(host);
2584 spin_lock_irqsave(hba->host->host_lock, flags);
2619 spin_unlock_irqrestore(hba->host->host_lock, flags);
2625 spin_unlock_irqrestore(hba->host->host_lock, flags);
2657 spin_lock_irqsave(hba->host->host_lock, flags);
2659 spin_unlock_irqrestore(hba->host->host_lock, flags);
2738 spin_lock_irqsave(hba->host->host_lock, flags);
2745 spin_unlock_irqrestore(hba->host->host_lock, flags);
2815 spin_lock_irqsave(hba->host->host_lock, flags);
2817 spin_unlock_irqrestore(hba->host->host_lock, flags);
3417 * ufshcd_memory_alloc - allocate memory for host memory space data structures
3790 * DME_HIBERNATE_EXIT commands take some time to take its effect on both host
3810 spin_lock_irqsave(hba->host->host_lock, flags);
3826 spin_unlock_irqrestore(hba->host->host_lock, flags);
3854 "pwr ctrl cmd 0x%x failed, host upmcrs:0x%x\n",
3865 spin_lock_irqsave(hba->host->host_lock, flags);
3875 spin_unlock_irqrestore(hba->host->host_lock, flags);
3920 spin_lock_irqsave(hba->host->host_lock, flags);
3923 spin_unlock_irqrestore(hba->host->host_lock, flags);
3930 spin_lock_irqsave(hba->host->host_lock, flags);
3934 spin_unlock_irqrestore(hba->host->host_lock, flags);
4002 spin_lock_irqsave(hba->host->host_lock, flags);
4007 spin_unlock_irqrestore(hba->host->host_lock, flags);
4026 spin_lock_irqsave(hba->host->host_lock, flags);
4028 spin_unlock_irqrestore(hba->host->host_lock, flags);
4270 * To bring UFS host controller to operational state,
4334 * Obtain the host lock to prevent that the controller is disabled
4337 spin_lock_irqsave(hba->host->host_lock, flags);
4339 spin_unlock_irqrestore(hba->host->host_lock, flags);
4375 * To initialize a UFS host controller HCE bit must be set to 1.
4377 * When the host controller completes initialization sequence
4386 /* wait for the host controller to complete initialization */
4548 /* Include any host controller configuration via UIC commands */
4607 * value that host can queue.
4615 hba = shost_priv(sdev->host);
4704 hba = shost_priv(sdev->host);
4737 struct ufs_hba *hba = shost_priv(sdev->host);
4750 struct ufs_hba *hba = shost_priv(sdev->host);
4773 hba = shost_priv(sdev->host);
4778 spin_lock_irqsave(hba->host->host_lock, flags);
4780 spin_unlock_irqrestore(hba->host->host_lock, flags);
5079 * device to alert host in critical scenarios.
5146 * host is idle so that BKOPS are managed effectively without any negative
5159 * If host assisted BKOPs is to be enabled, make sure
5559 spin_lock_irqsave(hba->host->host_lock, flags);
5578 spin_unlock_irqrestore(hba->host->host_lock, flags);
5580 spin_lock_irqsave(hba->host->host_lock, flags);
5598 spin_unlock_irqrestore(hba->host->host_lock, flags);
5600 spin_lock_irqsave(hba->host->host_lock, flags);
5614 spin_unlock_irqrestore(hba->host->host_lock, flags);
5618 /* host lock must be held before calling this func */
5625 /* host lock must be held before calling this func */
5686 struct Scsi_Host *shost = hba->host;
5749 spin_lock_irqsave(hba->host->host_lock, flags);
5753 spin_unlock_irqrestore(hba->host->host_lock, flags);
5757 spin_unlock_irqrestore(hba->host->host_lock, flags);
5759 spin_lock_irqsave(hba->host->host_lock, flags);
5778 spin_unlock_irqrestore(hba->host->host_lock, flags);
5781 spin_lock_irqsave(hba->host->host_lock, flags);
5798 spin_unlock_irqrestore(hba->host->host_lock, flags);
5804 spin_lock_irqsave(hba->host->host_lock, flags);
5808 * if host reset is required then skip clearing the pending
5810 * host reset and restore
5823 spin_unlock_irqrestore(hba->host->host_lock, flags);
5826 spin_lock_irqsave(hba->host->host_lock, flags);
5833 spin_unlock_irqrestore(hba->host->host_lock, flags);
5851 spin_lock_irqsave(hba->host->host_lock, flags);
5867 spin_unlock_irqrestore(hba->host->host_lock, flags);
5883 spin_lock_irqsave(hba->host->host_lock, flags);
5903 spin_unlock_irqrestore(hba->host->host_lock, flags);
5910 spin_lock_irqsave(hba->host->host_lock, flags);
5924 spin_unlock_irqrestore(hba->host->host_lock, flags);
6100 * Other errors are either non-fatal where host recovers
6184 spin_lock(hba->host->host_lock);
6216 spin_unlock(hba->host->host_lock);
6229 spin_lock_irqsave(hba->host->host_lock, flags);
6231 spin_unlock_irqrestore(hba->host->host_lock, flags);
6245 struct Scsi_Host *host = hba->host;
6261 spin_lock_irqsave(host->host_lock, flags);
6280 spin_unlock_irqrestore(host->host_lock, flags);
6302 spin_lock_irqsave(hba->host->host_lock, flags);
6305 spin_unlock_irqrestore(hba->host->host_lock, flags);
6339 * The host shall provide the same value for LUN field in the basic
6447 spin_lock_irqsave(hba->host->host_lock, flags);
6449 spin_unlock_irqrestore(hba->host->host_lock, flags);
6563 struct Scsi_Host *host;
6570 host = cmd->device->host;
6571 hba = shost_priv(host);
6589 spin_lock_irqsave(host->host_lock, flags);
6591 spin_unlock_irqrestore(host->host_lock, flags);
6621 * command, and in host controller by clearing the door-bell register. There can
6697 * ufshcd_abort - scsi host template eh_abort_handler callback
6704 struct Scsi_Host *host;
6712 host = cmd->device->host;
6713 hba = shost_priv(host);
6780 spin_lock_irqsave(host->host_lock, flags);
6782 spin_unlock_irqrestore(host->host_lock, flags);
6800 * ufshcd_host_reset_and_restore - reset and restore host controller
6803 * Note that host controller reset may issue DME_RESET to
6815 * Stop the host controller and complete the requests
6820 spin_lock_irqsave(hba->host->host_lock, flags);
6824 spin_unlock_irqrestore(hba->host->host_lock, flags);
6844 * ufshcd_reset_and_restore - reset and re-initialize host/device
6847 * Reset and recover device, host and re-establish link. This
6864 spin_lock_irqsave(hba->host->host_lock, flags);
6869 spin_unlock_irqrestore(hba->host->host_lock, flags);
6878 spin_lock_irqsave(hba->host->host_lock, flags);
6883 scsi_report_bus_reset(hba->host, 0);
6888 spin_unlock_irqrestore(hba->host->host_lock, flags);
6894 * ufshcd_eh_host_reset_handler - host reset handler registered to scsi layer
6905 hba = shost_priv(cmd->device->host);
6907 spin_lock_irqsave(hba->host->host_lock, flags);
6911 spin_unlock_irqrestore(hba->host->host_lock, flags);
6915 spin_lock_irqsave(hba->host->host_lock, flags);
6918 spin_unlock_irqrestore(hba->host->host_lock, flags);
7071 * order for the UFS host driver to send the SSU command for power management.
7088 hba->sdev_ufs_device = __scsi_add_device(hba->host, 0, 0,
7098 hba->sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
7107 sdev_boot = __scsi_add_device(hba->host, 0, 0,
7364 * ufshcd_quirk_tune_host_pa_tactivate - Ensures that host PA_TACTIVATE is
7368 * Some UFS devices require host PA_TACTIVATE to be lower than device
7394 dev_err(hba->dev, "%s: invalid host PA_GRANULARITY %d",
7584 /* Probe maximum power mode co-supported by both UFS host and device */
7622 scsi_scan_host(hba->host);
7638 spin_lock_irqsave(hba->host->host_lock, flags);
7654 spin_unlock_irqrestore(hba->host->host_lock, flags);
7766 spin_lock_irqsave(hba->host->host_lock, flags);
7771 spin_unlock_irqrestore(hba->host->host_lock, flags);
8094 spin_lock_irqsave(hba->host->host_lock, flags);
8098 spin_unlock_irqrestore(hba->host->host_lock, flags);
8191 * Handle host controller power separately from the UFS device power
8192 * rails as it will help controlling the UFS host controller power
8194 * Also, enable the host controller power before we go ahead with rest
8301 spin_lock_irqsave(hba->host->host_lock, flags);
8312 spin_unlock_irqrestore(hba->host->host_lock, flags);
8319 * handling, which would wait for host to be resumed. Since we know
8320 * we are functional while we are here, skip host resume in error
8323 hba->host->eh_noresume = 1;
8353 hba->host->eh_noresume = 0;
8614 * vendor specific host controller register space call them before the
8615 * host clocks are ON.
8621 * Disable the host irq as host controller as there won't be any
8622 * host controller transaction expected till resume.
8634 /* Put the host controller in low power mode if possible */
8692 /* enable the host irq as host controller would be active soon */
8701 * vendor specific host controller register space call them when the
8702 * host clocks are ON.
8719 * A full initialization of the host and the device is
8976 * ufshcd_remove - de-allocate SCSI host and host memory space
8987 scsi_remove_host(hba->host);
9008 scsi_host_put(hba->host);
9036 struct Scsi_Host *host;
9047 host = scsi_host_alloc(&ufshcd_driver_template,
9049 if (!host) {
9054 hba = shost_priv(host);
9055 hba->host = host;
9089 struct Scsi_Host *host = hba->host;
9139 /* Allocate memory for host memory space */
9149 host->can_queue = hba->nutrs;
9150 host->cmd_per_lun = hba->nutrs;
9151 host->max_id = UFSHCD_MAX_ID;
9152 host->max_lun = UFS_MAX_LUNS;
9153 host->max_channel = UFSHCD_MAX_CHANNEL;
9154 host->unique_id = host->host_no;
9155 host->max_cmd_len = UFS_CDB_SIZE;
9161 hba->host->host_no);
9207 err = scsi_add_host(host, hba->dev);
9213 hba->cmd_queue = blk_mq_init_queue(&hba->host->tag_set);
9298 scsi_remove_host(hba->host);
9313 MODULE_DESCRIPTION("Generic UFS host controller driver Core");