diff options
Diffstat (limited to 'drivers/scsi/mvsas/mv_64xx.c')
| -rw-r--r-- | drivers/scsi/mvsas/mv_64xx.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/scsi/mvsas/mv_64xx.c b/drivers/scsi/mvsas/mv_64xx.c index 10a5077b6aed..afc7f6f3a13e 100644 --- a/drivers/scsi/mvsas/mv_64xx.c +++ b/drivers/scsi/mvsas/mv_64xx.c | |||
| @@ -132,9 +132,9 @@ static void mvs_64xx_phy_reset(struct mvs_info *mvi, u32 phy_id, int hard) | |||
| 132 | tmp &= ~PHYEV_RDY_CH; | 132 | tmp &= ~PHYEV_RDY_CH; |
| 133 | mvs_write_port_irq_stat(mvi, phy_id, tmp); | 133 | mvs_write_port_irq_stat(mvi, phy_id, tmp); |
| 134 | tmp = mvs_read_phy_ctl(mvi, phy_id); | 134 | tmp = mvs_read_phy_ctl(mvi, phy_id); |
| 135 | if (hard) | 135 | if (hard == 1) |
| 136 | tmp |= PHY_RST_HARD; | 136 | tmp |= PHY_RST_HARD; |
| 137 | else | 137 | else if (hard == 0) |
| 138 | tmp |= PHY_RST; | 138 | tmp |= PHY_RST; |
| 139 | mvs_write_phy_ctl(mvi, phy_id, tmp); | 139 | mvs_write_phy_ctl(mvi, phy_id, tmp); |
| 140 | if (hard) { | 140 | if (hard) { |
| @@ -144,6 +144,26 @@ static void mvs_64xx_phy_reset(struct mvs_info *mvi, u32 phy_id, int hard) | |||
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | void mvs_64xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all) | ||
| 148 | { | ||
| 149 | void __iomem *regs = mvi->regs; | ||
| 150 | u32 tmp; | ||
| 151 | if (clear_all) { | ||
| 152 | tmp = mr32(MVS_INT_STAT_SRS_0); | ||
| 153 | if (tmp) { | ||
| 154 | printk(KERN_DEBUG "check SRS 0 %08X.\n", tmp); | ||
| 155 | mw32(MVS_INT_STAT_SRS_0, tmp); | ||
| 156 | } | ||
| 157 | } else { | ||
| 158 | tmp = mr32(MVS_INT_STAT_SRS_0); | ||
| 159 | if (tmp & (1 << (reg_set % 32))) { | ||
| 160 | printk(KERN_DEBUG "register set 0x%x was stopped.\n", | ||
| 161 | reg_set); | ||
| 162 | mw32(MVS_INT_STAT_SRS_0, 1 << (reg_set % 32)); | ||
| 163 | } | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 147 | static int __devinit mvs_64xx_chip_reset(struct mvs_info *mvi) | 167 | static int __devinit mvs_64xx_chip_reset(struct mvs_info *mvi) |
| 148 | { | 168 | { |
| 149 | void __iomem *regs = mvi->regs; | 169 | void __iomem *regs = mvi->regs; |
| @@ -761,6 +781,7 @@ const struct mvs_dispatch mvs_64xx_dispatch = { | |||
| 761 | mvs_write_port_irq_mask, | 781 | mvs_write_port_irq_mask, |
| 762 | mvs_get_sas_addr, | 782 | mvs_get_sas_addr, |
| 763 | mvs_64xx_command_active, | 783 | mvs_64xx_command_active, |
| 784 | mvs_64xx_clear_srs_irq, | ||
| 764 | mvs_64xx_issue_stop, | 785 | mvs_64xx_issue_stop, |
| 765 | mvs_start_delivery, | 786 | mvs_start_delivery, |
| 766 | mvs_rx_update, | 787 | mvs_rx_update, |
