diff options
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_hwi.c')
| -rw-r--r-- | drivers/scsi/pm8001/pm8001_hwi.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index bf54aafc2d71..b8dd05074abb 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | * read_main_config_table - read the configure table and save it. | 47 | * read_main_config_table - read the configure table and save it. |
| 48 | * @pm8001_ha: our hba card information | 48 | * @pm8001_ha: our hba card information |
| 49 | */ | 49 | */ |
| 50 | static void __devinit read_main_config_table(struct pm8001_hba_info *pm8001_ha) | 50 | static void read_main_config_table(struct pm8001_hba_info *pm8001_ha) |
| 51 | { | 51 | { |
| 52 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; | 52 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; |
| 53 | pm8001_ha->main_cfg_tbl.signature = pm8001_mr32(address, 0x00); | 53 | pm8001_ha->main_cfg_tbl.signature = pm8001_mr32(address, 0x00); |
| @@ -83,8 +83,7 @@ static void __devinit read_main_config_table(struct pm8001_hba_info *pm8001_ha) | |||
| 83 | * read_general_status_table - read the general status table and save it. | 83 | * read_general_status_table - read the general status table and save it. |
| 84 | * @pm8001_ha: our hba card information | 84 | * @pm8001_ha: our hba card information |
| 85 | */ | 85 | */ |
| 86 | static void __devinit | 86 | static void read_general_status_table(struct pm8001_hba_info *pm8001_ha) |
| 87 | read_general_status_table(struct pm8001_hba_info *pm8001_ha) | ||
| 88 | { | 87 | { |
| 89 | void __iomem *address = pm8001_ha->general_stat_tbl_addr; | 88 | void __iomem *address = pm8001_ha->general_stat_tbl_addr; |
| 90 | pm8001_ha->gs_tbl.gst_len_mpistate = pm8001_mr32(address, 0x00); | 89 | pm8001_ha->gs_tbl.gst_len_mpistate = pm8001_mr32(address, 0x00); |
| @@ -118,8 +117,7 @@ read_general_status_table(struct pm8001_hba_info *pm8001_ha) | |||
| 118 | * read_inbnd_queue_table - read the inbound queue table and save it. | 117 | * read_inbnd_queue_table - read the inbound queue table and save it. |
| 119 | * @pm8001_ha: our hba card information | 118 | * @pm8001_ha: our hba card information |
| 120 | */ | 119 | */ |
| 121 | static void __devinit | 120 | static void read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha) |
| 122 | read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | ||
| 123 | { | 121 | { |
| 124 | int inbQ_num = 1; | 122 | int inbQ_num = 1; |
| 125 | int i; | 123 | int i; |
| @@ -137,8 +135,7 @@ read_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | |||
| 137 | * read_outbnd_queue_table - read the outbound queue table and save it. | 135 | * read_outbnd_queue_table - read the outbound queue table and save it. |
| 138 | * @pm8001_ha: our hba card information | 136 | * @pm8001_ha: our hba card information |
| 139 | */ | 137 | */ |
| 140 | static void __devinit | 138 | static void read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha) |
| 141 | read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | ||
| 142 | { | 139 | { |
| 143 | int outbQ_num = 1; | 140 | int outbQ_num = 1; |
| 144 | int i; | 141 | int i; |
| @@ -156,8 +153,7 @@ read_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha) | |||
| 156 | * init_default_table_values - init the default table. | 153 | * init_default_table_values - init the default table. |
| 157 | * @pm8001_ha: our hba card information | 154 | * @pm8001_ha: our hba card information |
| 158 | */ | 155 | */ |
| 159 | static void __devinit | 156 | static void init_default_table_values(struct pm8001_hba_info *pm8001_ha) |
| 160 | init_default_table_values(struct pm8001_hba_info *pm8001_ha) | ||
| 161 | { | 157 | { |
| 162 | int qn = 1; | 158 | int qn = 1; |
| 163 | int i; | 159 | int i; |
| @@ -250,8 +246,7 @@ init_default_table_values(struct pm8001_hba_info *pm8001_ha) | |||
| 250 | * update_main_config_table - update the main default table to the HBA. | 246 | * update_main_config_table - update the main default table to the HBA. |
| 251 | * @pm8001_ha: our hba card information | 247 | * @pm8001_ha: our hba card information |
| 252 | */ | 248 | */ |
| 253 | static void __devinit | 249 | static void update_main_config_table(struct pm8001_hba_info *pm8001_ha) |
| 254 | update_main_config_table(struct pm8001_hba_info *pm8001_ha) | ||
| 255 | { | 250 | { |
| 256 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; | 251 | void __iomem *address = pm8001_ha->main_cfg_tbl_addr; |
| 257 | pm8001_mw32(address, 0x24, | 252 | pm8001_mw32(address, 0x24, |
| @@ -297,8 +292,8 @@ update_main_config_table(struct pm8001_hba_info *pm8001_ha) | |||
| 297 | * update_inbnd_queue_table - update the inbound queue table to the HBA. | 292 | * update_inbnd_queue_table - update the inbound queue table to the HBA. |
| 298 | * @pm8001_ha: our hba card information | 293 | * @pm8001_ha: our hba card information |
| 299 | */ | 294 | */ |
| 300 | static void __devinit | 295 | static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 301 | update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) | 296 | int number) |
| 302 | { | 297 | { |
| 303 | void __iomem *address = pm8001_ha->inbnd_q_tbl_addr; | 298 | void __iomem *address = pm8001_ha->inbnd_q_tbl_addr; |
| 304 | u16 offset = number * 0x20; | 299 | u16 offset = number * 0x20; |
| @@ -318,8 +313,8 @@ update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) | |||
| 318 | * update_outbnd_queue_table - update the outbound queue table to the HBA. | 313 | * update_outbnd_queue_table - update the outbound queue table to the HBA. |
| 319 | * @pm8001_ha: our hba card information | 314 | * @pm8001_ha: our hba card information |
| 320 | */ | 315 | */ |
| 321 | static void __devinit | 316 | static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 322 | update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, int number) | 317 | int number) |
| 323 | { | 318 | { |
| 324 | void __iomem *address = pm8001_ha->outbnd_q_tbl_addr; | 319 | void __iomem *address = pm8001_ha->outbnd_q_tbl_addr; |
| 325 | u16 offset = number * 0x24; | 320 | u16 offset = number * 0x24; |
| @@ -370,8 +365,8 @@ int pm8001_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue) | |||
| 370 | * @pm8001_ha: our hba card information | 365 | * @pm8001_ha: our hba card information |
| 371 | * @SSCbit: set SSCbit to 0 to disable all phys ssc; 1 to enable all phys ssc. | 366 | * @SSCbit: set SSCbit to 0 to disable all phys ssc; 1 to enable all phys ssc. |
| 372 | */ | 367 | */ |
| 373 | static void __devinit | 368 | static void mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, |
| 374 | mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, u32 SSCbit) | 369 | u32 SSCbit) |
| 375 | { | 370 | { |
| 376 | u32 value, offset, i; | 371 | u32 value, offset, i; |
| 377 | unsigned long flags; | 372 | unsigned long flags; |
| @@ -438,9 +433,8 @@ mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, u32 SSCbit) | |||
| 438 | * @pm8001_ha: our hba card information | 433 | * @pm8001_ha: our hba card information |
| 439 | * @interval - interval time for each OPEN_REJECT (RETRY). The units are in 1us. | 434 | * @interval - interval time for each OPEN_REJECT (RETRY). The units are in 1us. |
| 440 | */ | 435 | */ |
| 441 | static void __devinit | 436 | static void mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha, |
| 442 | mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha, | 437 | u32 interval) |
| 443 | u32 interval) | ||
| 444 | { | 438 | { |
| 445 | u32 offset; | 439 | u32 offset; |
| 446 | u32 value; | 440 | u32 value; |
| @@ -601,7 +595,7 @@ static void init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha) | |||
| 601 | * pm8001_chip_init - the main init function that initialize whole PM8001 chip. | 595 | * pm8001_chip_init - the main init function that initialize whole PM8001 chip. |
| 602 | * @pm8001_ha: our hba card information | 596 | * @pm8001_ha: our hba card information |
| 603 | */ | 597 | */ |
| 604 | static int __devinit pm8001_chip_init(struct pm8001_hba_info *pm8001_ha) | 598 | static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha) |
| 605 | { | 599 | { |
| 606 | /* check the firmware status */ | 600 | /* check the firmware status */ |
| 607 | if (-1 == check_fw_ready(pm8001_ha)) { | 601 | if (-1 == check_fw_ready(pm8001_ha)) { |
