pm_runtime_forbid(&pdev->dev);
pm_runtime_get_noresume(&pdev->dev);
+
+ disable_irq(pdev->irq);
ufshcd_remove(hba);
+ pci_set_drvdata(pdev, NULL);
ufshcd_dealloc_host(hba);
}
ufshcd_pci_runtime_idle)
};
-static const struct pci_device_id ufshcd_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(ufshcd_pci_tbl) = {
{ PCI_VENDOR_ID_SAMSUNG, 0xC00C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ PCI_VDEVICE(INTEL, 0x9DFA), (kernel_ulong_t)&ufs_intel_cnl_hba_vops },
{ } /* terminate list */
/* issue command to the controller */
spin_lock_irqsave(hba->host->host_lock, flags);
- ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
+ if (hba->vops && hba->vops->set_nexus_t_xfer_req)
+ hba->vops->set_nexus_t_xfer_req(hba, tag, lrbp->cmd);
ufshcd_send_command(hba, tag);
out_unlock:
spin_unlock_irqrestore(hba->host->host_lock, flags);
/* Make sure descriptors are ready before ringing the doorbell */
wmb();
spin_lock_irqsave(hba->host->host_lock, flags);
- ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
+ if (hba->vops && hba->vops->set_nexus_t_xfer_req)
+ hba->vops->set_nexus_t_xfer_req(hba, tag, lrbp->cmd);
ufshcd_send_command(hba, tag);
spin_unlock_irqrestore(hba->host->host_lock, flags);
ufshcd_vops_setup_task_mgmt(hba, free_slot, tm_function);
/* send command to the controller */
+ if (hba->vops && hba->vops->set_nexus_t_task_mgmt)
+ hba->vops->set_nexus_t_task_mgmt(hba, free_slot, tm_function);
__set_bit(free_slot, &hba->outstanding_tasks);
/* Make sure descriptors are ready before ringing the task doorbell */
enum ufs_notify_change_status status,
struct ufs_pa_layer_attr *,
struct ufs_pa_layer_attr *);
- void (*setup_xfer_req)(struct ufs_hba *, int, bool);
- void (*setup_task_mgmt)(struct ufs_hba *, int, u8);
+ void (*set_nexus_t_xfer_req)(struct ufs_hba *,
+ int, struct scsi_cmnd *);
+ void (*set_nexus_t_task_mgmt)(struct ufs_hba *, int, u8);
void (*hibern8_notify)(struct ufs_hba *, u8, bool);
int (*apply_dev_quirks)(struct ufs_hba *);
int (*suspend)(struct ufs_hba *, enum ufs_pm_op);
int nutrs;
int nutmrs;
u32 ufs_version;
- struct ufs_hba_variant_ops *vops;
+ const struct ufs_hba_variant_ops *vops;
void *priv;
unsigned int irq;
bool is_irq_enabled;