diff options
author | Xiangliang Yu <yuxiangl@marvell.com> | 2011-09-29 03:33:49 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-02 14:12:13 -0400 |
commit | 477f6d190bdebc9a3ec99e4bb396b981f747bf19 (patch) | |
tree | d3e7f2f96b7add89360f60a74485b0d303eb4175 /drivers/scsi/mvsas | |
parent | f7e45b6a09fad88b4d1e87d55c26e79578c5fa18 (diff) |
[SCSI] mvsas: fixed some disk spin up issue
spin up issue: some direct attached SAS device can't spin up
Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mvsas')
-rw-r--r-- | drivers/scsi/mvsas/mv_94xx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/mvsas/mv_sas.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c index 3501291618fd..8f32c7c567cf 100644 --- a/drivers/scsi/mvsas/mv_94xx.c +++ b/drivers/scsi/mvsas/mv_94xx.c | |||
@@ -823,6 +823,10 @@ static void mvs_94xx_fix_phy_info(struct mvs_info *mvi, int i, | |||
823 | phy->att_dev_info = PORT_DEV_STP_TRGT | 1; | 823 | phy->att_dev_info = PORT_DEV_STP_TRGT | 1; |
824 | } | 824 | } |
825 | 825 | ||
826 | /* enable spin up bit */ | ||
827 | mvs_write_port_cfg_addr(mvi, i, PHYR_PHY_STAT); | ||
828 | mvs_write_port_cfg_data(mvi, i, 0x04); | ||
829 | |||
826 | } | 830 | } |
827 | 831 | ||
828 | void mvs_94xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id, | 832 | void mvs_94xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id, |
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index ab2a71fd0fde..d4475d350847 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c | |||
@@ -265,6 +265,12 @@ static void mvs_bytes_dmaed(struct mvs_info *mvi, int i) | |||
265 | id->dev_type = phy->identify.device_type; | 265 | id->dev_type = phy->identify.device_type; |
266 | id->initiator_bits = SAS_PROTOCOL_ALL; | 266 | id->initiator_bits = SAS_PROTOCOL_ALL; |
267 | id->target_bits = phy->identify.target_port_protocols; | 267 | id->target_bits = phy->identify.target_port_protocols; |
268 | |||
269 | /* direct attached SAS device */ | ||
270 | if (phy->att_dev_info & PORT_SSP_TRGT_MASK) { | ||
271 | MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_PHY_STAT); | ||
272 | MVS_CHIP_DISP->write_port_cfg_data(mvi, i, 0x00); | ||
273 | } | ||
268 | } else if (phy->phy_type & PORT_TYPE_SATA) { | 274 | } else if (phy->phy_type & PORT_TYPE_SATA) { |
269 | /*Nothing*/ | 275 | /*Nothing*/ |
270 | } | 276 | } |
@@ -1211,6 +1217,12 @@ static void mvs_port_notify_formed(struct asd_sas_phy *sas_phy, int lock) | |||
1211 | port->wide_port_phymap = sas_port->phy_mask; | 1217 | port->wide_port_phymap = sas_port->phy_mask; |
1212 | mv_printk("set wide port phy map %x\n", sas_port->phy_mask); | 1218 | mv_printk("set wide port phy map %x\n", sas_port->phy_mask); |
1213 | mvs_update_wideport(mvi, sas_phy->id); | 1219 | mvs_update_wideport(mvi, sas_phy->id); |
1220 | |||
1221 | /* direct attached SAS device */ | ||
1222 | if (phy->att_dev_info & PORT_SSP_TRGT_MASK) { | ||
1223 | MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_PHY_STAT); | ||
1224 | MVS_CHIP_DISP->write_port_cfg_data(mvi, i, 0x04); | ||
1225 | } | ||
1214 | } | 1226 | } |
1215 | if (lock) | 1227 | if (lock) |
1216 | spin_unlock_irqrestore(&mvi->lock, flags); | 1228 | spin_unlock_irqrestore(&mvi->lock, flags); |