aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r--drivers/scsi/isci/host.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h
index ec0bba5367ba..062101a39f79 100644
--- a/drivers/scsi/isci/host.h
+++ b/drivers/scsi/isci/host.h
@@ -416,33 +416,25 @@ static inline struct device *scirdev_to_dev(struct isci_remote_device *idev)
416 return &idev->isci_port->isci_host->pdev->dev; 416 return &idev->isci_port->isci_host->pdev->dev;
417} 417}
418 418
419enum { 419static inline bool is_a2(struct pci_dev *pdev)
420 ISCI_SI_REVA0,
421 ISCI_SI_REVA2,
422 ISCI_SI_REVB0,
423 ISCI_SI_REVC0
424};
425
426extern int isci_si_rev;
427
428static inline bool is_a0(void)
429{
430 return isci_si_rev == ISCI_SI_REVA0;
431}
432
433static inline bool is_a2(void)
434{ 420{
435 return isci_si_rev == ISCI_SI_REVA2; 421 if (pdev->revision < 4)
422 return true;
423 return false;
436} 424}
437 425
438static inline bool is_b0(void) 426static inline bool is_b0(struct pci_dev *pdev)
439{ 427{
440 return isci_si_rev == ISCI_SI_REVB0; 428 if (pdev->revision == 4)
429 return true;
430 return false;
441} 431}
442 432
443static inline bool is_c0(void) 433static inline bool is_c0(struct pci_dev *pdev)
444{ 434{
445 return isci_si_rev > ISCI_SI_REVB0; 435 if (pdev->revision >= 5)
436 return true;
437 return false;
446} 438}
447 439
448void sci_controller_post_request(struct isci_host *ihost, 440void sci_controller_post_request(struct isci_host *ihost,