diff options
| -rw-r--r-- | drivers/scsi/mvsas/mv_64xx.c | 19 | ||||
| -rw-r--r-- | drivers/scsi/mvsas/mv_94xx.c | 41 | ||||
| -rw-r--r-- | drivers/scsi/mvsas/mv_sas.c | 16 |
3 files changed, 39 insertions, 37 deletions
diff --git a/drivers/scsi/mvsas/mv_64xx.c b/drivers/scsi/mvsas/mv_64xx.c index 8bb06995adfb..b757d389e32f 100644 --- a/drivers/scsi/mvsas/mv_64xx.c +++ b/drivers/scsi/mvsas/mv_64xx.c | |||
| @@ -136,7 +136,8 @@ static void mvs_64xx_phy_reset(struct mvs_info *mvi, u32 phy_id, int hard) | |||
| 136 | } | 136 | } |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | void mvs_64xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all) | 139 | static void |
| 140 | mvs_64xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all) | ||
| 140 | { | 141 | { |
| 141 | void __iomem *regs = mvi->regs; | 142 | void __iomem *regs = mvi->regs; |
| 142 | u32 tmp; | 143 | u32 tmp; |
| @@ -563,7 +564,7 @@ static u8 mvs_64xx_assign_reg_set(struct mvs_info *mvi, u8 *tfs) | |||
| 563 | return MVS_ID_NOT_MAPPED; | 564 | return MVS_ID_NOT_MAPPED; |
| 564 | } | 565 | } |
| 565 | 566 | ||
| 566 | void mvs_64xx_make_prd(struct scatterlist *scatter, int nr, void *prd) | 567 | static void mvs_64xx_make_prd(struct scatterlist *scatter, int nr, void *prd) |
| 567 | { | 568 | { |
| 568 | int i; | 569 | int i; |
| 569 | struct scatterlist *sg; | 570 | struct scatterlist *sg; |
| @@ -633,7 +634,7 @@ static void mvs_64xx_phy_work_around(struct mvs_info *mvi, int i) | |||
| 633 | mvs_write_port_vsr_data(mvi, i, tmp); | 634 | mvs_write_port_vsr_data(mvi, i, tmp); |
| 634 | } | 635 | } |
| 635 | 636 | ||
| 636 | void mvs_64xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id, | 637 | static void mvs_64xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id, |
| 637 | struct sas_phy_linkrates *rates) | 638 | struct sas_phy_linkrates *rates) |
| 638 | { | 639 | { |
| 639 | u32 lrmin = 0, lrmax = 0; | 640 | u32 lrmin = 0, lrmax = 0; |
| @@ -668,20 +669,20 @@ static void mvs_64xx_clear_active_cmds(struct mvs_info *mvi) | |||
| 668 | } | 669 | } |
| 669 | 670 | ||
| 670 | 671 | ||
| 671 | u32 mvs_64xx_spi_read_data(struct mvs_info *mvi) | 672 | static u32 mvs_64xx_spi_read_data(struct mvs_info *mvi) |
| 672 | { | 673 | { |
| 673 | void __iomem *regs = mvi->regs_ex; | 674 | void __iomem *regs = mvi->regs_ex; |
| 674 | return ior32(SPI_DATA_REG_64XX); | 675 | return ior32(SPI_DATA_REG_64XX); |
| 675 | } | 676 | } |
| 676 | 677 | ||
| 677 | void mvs_64xx_spi_write_data(struct mvs_info *mvi, u32 data) | 678 | static void mvs_64xx_spi_write_data(struct mvs_info *mvi, u32 data) |
| 678 | { | 679 | { |
| 679 | void __iomem *regs = mvi->regs_ex; | 680 | void __iomem *regs = mvi->regs_ex; |
| 680 | iow32(SPI_DATA_REG_64XX, data); | 681 | iow32(SPI_DATA_REG_64XX, data); |
| 681 | } | 682 | } |
| 682 | 683 | ||
| 683 | 684 | ||
| 684 | int mvs_64xx_spi_buildcmd(struct mvs_info *mvi, | 685 | static int mvs_64xx_spi_buildcmd(struct mvs_info *mvi, |
| 685 | u32 *dwCmd, | 686 | u32 *dwCmd, |
| 686 | u8 cmd, | 687 | u8 cmd, |
| 687 | u8 read, | 688 | u8 read, |
| @@ -705,7 +706,7 @@ int mvs_64xx_spi_buildcmd(struct mvs_info *mvi, | |||
| 705 | } | 706 | } |
| 706 | 707 | ||
| 707 | 708 | ||
| 708 | int mvs_64xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd) | 709 | static int mvs_64xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd) |
| 709 | { | 710 | { |
| 710 | void __iomem *regs = mvi->regs_ex; | 711 | void __iomem *regs = mvi->regs_ex; |
| 711 | int retry; | 712 | int retry; |
| @@ -720,7 +721,7 @@ int mvs_64xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd) | |||
| 720 | return 0; | 721 | return 0; |
| 721 | } | 722 | } |
| 722 | 723 | ||
| 723 | int mvs_64xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout) | 724 | static int mvs_64xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout) |
| 724 | { | 725 | { |
| 725 | void __iomem *regs = mvi->regs_ex; | 726 | void __iomem *regs = mvi->regs_ex; |
| 726 | u32 i, dwTmp; | 727 | u32 i, dwTmp; |
| @@ -735,7 +736,7 @@ int mvs_64xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout) | |||
| 735 | return -1; | 736 | return -1; |
| 736 | } | 737 | } |
| 737 | 738 | ||
| 738 | void mvs_64xx_fix_dma(struct mvs_info *mvi, u32 phy_mask, | 739 | static void mvs_64xx_fix_dma(struct mvs_info *mvi, u32 phy_mask, |
| 739 | int buf_len, int from, void *prd) | 740 | int buf_len, int from, void *prd) |
| 740 | { | 741 | { |
| 741 | int i; | 742 | int i; |
diff --git a/drivers/scsi/mvsas/mv_94xx.c b/drivers/scsi/mvsas/mv_94xx.c index f6fc4a705924..4c57d9abce7b 100644 --- a/drivers/scsi/mvsas/mv_94xx.c +++ b/drivers/scsi/mvsas/mv_94xx.c | |||
| @@ -48,8 +48,8 @@ static void mvs_94xx_detect_porttype(struct mvs_info *mvi, int i) | |||
| 48 | } | 48 | } |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void set_phy_tuning(struct mvs_info *mvi, int phy_id, | 51 | static void set_phy_tuning(struct mvs_info *mvi, int phy_id, |
| 52 | struct phy_tuning phy_tuning) | 52 | struct phy_tuning phy_tuning) |
| 53 | { | 53 | { |
| 54 | u32 tmp, setting_0 = 0, setting_1 = 0; | 54 | u32 tmp, setting_0 = 0, setting_1 = 0; |
| 55 | u8 i; | 55 | u8 i; |
| @@ -110,8 +110,8 @@ void set_phy_tuning(struct mvs_info *mvi, int phy_id, | |||
| 110 | } | 110 | } |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | void set_phy_ffe_tuning(struct mvs_info *mvi, int phy_id, | 113 | static void set_phy_ffe_tuning(struct mvs_info *mvi, int phy_id, |
| 114 | struct ffe_control ffe) | 114 | struct ffe_control ffe) |
| 115 | { | 115 | { |
| 116 | u32 tmp; | 116 | u32 tmp; |
| 117 | 117 | ||
| @@ -177,7 +177,7 @@ void set_phy_ffe_tuning(struct mvs_info *mvi, int phy_id, | |||
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | /*Notice: this function must be called when phy is disabled*/ | 179 | /*Notice: this function must be called when phy is disabled*/ |
| 180 | void set_phy_rate(struct mvs_info *mvi, int phy_id, u8 rate) | 180 | static void set_phy_rate(struct mvs_info *mvi, int phy_id, u8 rate) |
| 181 | { | 181 | { |
| 182 | union reg_phy_cfg phy_cfg, phy_cfg_tmp; | 182 | union reg_phy_cfg phy_cfg, phy_cfg_tmp; |
| 183 | mvs_write_port_vsr_addr(mvi, phy_id, VSR_PHY_MODE2); | 183 | mvs_write_port_vsr_addr(mvi, phy_id, VSR_PHY_MODE2); |
| @@ -679,7 +679,8 @@ static void mvs_94xx_command_active(struct mvs_info *mvi, u32 slot_idx) | |||
| 679 | } | 679 | } |
| 680 | } | 680 | } |
| 681 | 681 | ||
| 682 | void mvs_94xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all) | 682 | static void |
| 683 | mvs_94xx_clear_srs_irq(struct mvs_info *mvi, u8 reg_set, u8 clear_all) | ||
| 683 | { | 684 | { |
| 684 | void __iomem *regs = mvi->regs; | 685 | void __iomem *regs = mvi->regs; |
| 685 | u32 tmp; | 686 | u32 tmp; |
| @@ -906,8 +907,8 @@ static void mvs_94xx_fix_phy_info(struct mvs_info *mvi, int i, | |||
| 906 | 907 | ||
| 907 | } | 908 | } |
| 908 | 909 | ||
| 909 | void mvs_94xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id, | 910 | static void mvs_94xx_phy_set_link_rate(struct mvs_info *mvi, u32 phy_id, |
| 910 | struct sas_phy_linkrates *rates) | 911 | struct sas_phy_linkrates *rates) |
| 911 | { | 912 | { |
| 912 | u32 lrmax = 0; | 913 | u32 lrmax = 0; |
| 913 | u32 tmp; | 914 | u32 tmp; |
| @@ -936,25 +937,25 @@ static void mvs_94xx_clear_active_cmds(struct mvs_info *mvi) | |||
| 936 | } | 937 | } |
| 937 | 938 | ||
| 938 | 939 | ||
| 939 | u32 mvs_94xx_spi_read_data(struct mvs_info *mvi) | 940 | static u32 mvs_94xx_spi_read_data(struct mvs_info *mvi) |
| 940 | { | 941 | { |
| 941 | void __iomem *regs = mvi->regs_ex - 0x10200; | 942 | void __iomem *regs = mvi->regs_ex - 0x10200; |
| 942 | return mr32(SPI_RD_DATA_REG_94XX); | 943 | return mr32(SPI_RD_DATA_REG_94XX); |
| 943 | } | 944 | } |
| 944 | 945 | ||
| 945 | void mvs_94xx_spi_write_data(struct mvs_info *mvi, u32 data) | 946 | static void mvs_94xx_spi_write_data(struct mvs_info *mvi, u32 data) |
| 946 | { | 947 | { |
| 947 | void __iomem *regs = mvi->regs_ex - 0x10200; | 948 | void __iomem *regs = mvi->regs_ex - 0x10200; |
| 948 | mw32(SPI_RD_DATA_REG_94XX, data); | 949 | mw32(SPI_RD_DATA_REG_94XX, data); |
| 949 | } | 950 | } |
| 950 | 951 | ||
| 951 | 952 | ||
| 952 | int mvs_94xx_spi_buildcmd(struct mvs_info *mvi, | 953 | static int mvs_94xx_spi_buildcmd(struct mvs_info *mvi, |
| 953 | u32 *dwCmd, | 954 | u32 *dwCmd, |
| 954 | u8 cmd, | 955 | u8 cmd, |
| 955 | u8 read, | 956 | u8 read, |
| 956 | u8 length, | 957 | u8 length, |
| 957 | u32 addr | 958 | u32 addr |
| 958 | ) | 959 | ) |
| 959 | { | 960 | { |
| 960 | void __iomem *regs = mvi->regs_ex - 0x10200; | 961 | void __iomem *regs = mvi->regs_ex - 0x10200; |
| @@ -974,7 +975,7 @@ int mvs_94xx_spi_buildcmd(struct mvs_info *mvi, | |||
| 974 | } | 975 | } |
| 975 | 976 | ||
| 976 | 977 | ||
| 977 | int mvs_94xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd) | 978 | static int mvs_94xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd) |
| 978 | { | 979 | { |
| 979 | void __iomem *regs = mvi->regs_ex - 0x10200; | 980 | void __iomem *regs = mvi->regs_ex - 0x10200; |
| 980 | mw32(SPI_CTRL_REG_94XX, cmd | SPI_CTRL_SpiStart_94XX); | 981 | mw32(SPI_CTRL_REG_94XX, cmd | SPI_CTRL_SpiStart_94XX); |
| @@ -982,7 +983,7 @@ int mvs_94xx_spi_issuecmd(struct mvs_info *mvi, u32 cmd) | |||
| 982 | return 0; | 983 | return 0; |
| 983 | } | 984 | } |
| 984 | 985 | ||
| 985 | int mvs_94xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout) | 986 | static int mvs_94xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout) |
| 986 | { | 987 | { |
| 987 | void __iomem *regs = mvi->regs_ex - 0x10200; | 988 | void __iomem *regs = mvi->regs_ex - 0x10200; |
| 988 | u32 i, dwTmp; | 989 | u32 i, dwTmp; |
| @@ -997,8 +998,8 @@ int mvs_94xx_spi_waitdataready(struct mvs_info *mvi, u32 timeout) | |||
| 997 | return -1; | 998 | return -1; |
| 998 | } | 999 | } |
| 999 | 1000 | ||
| 1000 | void mvs_94xx_fix_dma(struct mvs_info *mvi, u32 phy_mask, | 1001 | static void mvs_94xx_fix_dma(struct mvs_info *mvi, u32 phy_mask, |
| 1001 | int buf_len, int from, void *prd) | 1002 | int buf_len, int from, void *prd) |
| 1002 | { | 1003 | { |
| 1003 | int i; | 1004 | int i; |
| 1004 | struct mvs_prd *buf_prd = prd; | 1005 | struct mvs_prd *buf_prd = prd; |
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index 5b9fcff6cd94..86eb19902bac 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c | |||
| @@ -74,7 +74,7 @@ void mvs_tag_init(struct mvs_info *mvi) | |||
| 74 | mvs_tag_clear(mvi, i); | 74 | mvs_tag_clear(mvi, i); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | struct mvs_info *mvs_find_dev_mvi(struct domain_device *dev) | 77 | static struct mvs_info *mvs_find_dev_mvi(struct domain_device *dev) |
| 78 | { | 78 | { |
| 79 | unsigned long i = 0, j = 0, hi = 0; | 79 | unsigned long i = 0, j = 0, hi = 0; |
| 80 | struct sas_ha_struct *sha = dev->port->ha; | 80 | struct sas_ha_struct *sha = dev->port->ha; |
| @@ -102,7 +102,7 @@ struct mvs_info *mvs_find_dev_mvi(struct domain_device *dev) | |||
| 102 | 102 | ||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | int mvs_find_dev_phyno(struct domain_device *dev, int *phyno) | 105 | static int mvs_find_dev_phyno(struct domain_device *dev, int *phyno) |
| 106 | { | 106 | { |
| 107 | unsigned long i = 0, j = 0, n = 0, num = 0; | 107 | unsigned long i = 0, j = 0, n = 0, num = 0; |
| 108 | struct mvs_device *mvi_dev = (struct mvs_device *)dev->lldd_dev; | 108 | struct mvs_device *mvi_dev = (struct mvs_device *)dev->lldd_dev; |
| @@ -1158,7 +1158,7 @@ void mvs_port_deformed(struct asd_sas_phy *sas_phy) | |||
| 1158 | mvs_port_notify_deformed(sas_phy, 1); | 1158 | mvs_port_notify_deformed(sas_phy, 1); |
| 1159 | } | 1159 | } |
| 1160 | 1160 | ||
| 1161 | struct mvs_device *mvs_alloc_dev(struct mvs_info *mvi) | 1161 | static struct mvs_device *mvs_alloc_dev(struct mvs_info *mvi) |
| 1162 | { | 1162 | { |
| 1163 | u32 dev; | 1163 | u32 dev; |
| 1164 | for (dev = 0; dev < MVS_MAX_DEVICES; dev++) { | 1164 | for (dev = 0; dev < MVS_MAX_DEVICES; dev++) { |
| @@ -1175,7 +1175,7 @@ struct mvs_device *mvs_alloc_dev(struct mvs_info *mvi) | |||
| 1175 | return NULL; | 1175 | return NULL; |
| 1176 | } | 1176 | } |
| 1177 | 1177 | ||
| 1178 | void mvs_free_dev(struct mvs_device *mvi_dev) | 1178 | static void mvs_free_dev(struct mvs_device *mvi_dev) |
| 1179 | { | 1179 | { |
| 1180 | u32 id = mvi_dev->device_id; | 1180 | u32 id = mvi_dev->device_id; |
| 1181 | memset(mvi_dev, 0, sizeof(*mvi_dev)); | 1181 | memset(mvi_dev, 0, sizeof(*mvi_dev)); |
| @@ -1185,7 +1185,7 @@ void mvs_free_dev(struct mvs_device *mvi_dev) | |||
| 1185 | mvi_dev->taskfileset = MVS_ID_NOT_MAPPED; | 1185 | mvi_dev->taskfileset = MVS_ID_NOT_MAPPED; |
| 1186 | } | 1186 | } |
| 1187 | 1187 | ||
| 1188 | int mvs_dev_found_notify(struct domain_device *dev, int lock) | 1188 | static int mvs_dev_found_notify(struct domain_device *dev, int lock) |
| 1189 | { | 1189 | { |
| 1190 | unsigned long flags = 0; | 1190 | unsigned long flags = 0; |
| 1191 | int res = 0; | 1191 | int res = 0; |
| @@ -1241,7 +1241,7 @@ int mvs_dev_found(struct domain_device *dev) | |||
| 1241 | return mvs_dev_found_notify(dev, 1); | 1241 | return mvs_dev_found_notify(dev, 1); |
| 1242 | } | 1242 | } |
| 1243 | 1243 | ||
| 1244 | void mvs_dev_gone_notify(struct domain_device *dev) | 1244 | static void mvs_dev_gone_notify(struct domain_device *dev) |
| 1245 | { | 1245 | { |
| 1246 | unsigned long flags = 0; | 1246 | unsigned long flags = 0; |
| 1247 | struct mvs_device *mvi_dev = dev->lldd_dev; | 1247 | struct mvs_device *mvi_dev = dev->lldd_dev; |
| @@ -1611,7 +1611,7 @@ static int mvs_sata_done(struct mvs_info *mvi, struct sas_task *task, | |||
| 1611 | return stat; | 1611 | return stat; |
| 1612 | } | 1612 | } |
| 1613 | 1613 | ||
| 1614 | void mvs_set_sense(u8 *buffer, int len, int d_sense, | 1614 | static void mvs_set_sense(u8 *buffer, int len, int d_sense, |
| 1615 | int key, int asc, int ascq) | 1615 | int key, int asc, int ascq) |
| 1616 | { | 1616 | { |
| 1617 | memset(buffer, 0, len); | 1617 | memset(buffer, 0, len); |
| @@ -1650,7 +1650,7 @@ void mvs_set_sense(u8 *buffer, int len, int d_sense, | |||
| 1650 | return; | 1650 | return; |
| 1651 | } | 1651 | } |
| 1652 | 1652 | ||
| 1653 | void mvs_fill_ssp_resp_iu(struct ssp_response_iu *iu, | 1653 | static void mvs_fill_ssp_resp_iu(struct ssp_response_iu *iu, |
| 1654 | u8 key, u8 asc, u8 asc_q) | 1654 | u8 key, u8 asc, u8 asc_q) |
| 1655 | { | 1655 | { |
| 1656 | iu->datapres = 2; | 1656 | iu->datapres = 2; |
