diff options
author | Mark Salyzyn <mark_salyzyn@us.xyratex.com> | 2011-09-26 10:57:36 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-02 14:05:11 -0400 |
commit | 6fbc769219a7a8060ea33f397304f05b1cdf8a00 (patch) | |
tree | 31751b6a4996e2caaccb96c855b783f9f5a89b28 /drivers/scsi/pm8001 | |
parent | b90b378ad5767c0743113c675b09ac00fa534c33 (diff) |
[SCSI] pm8001: missing break statements
Code Inspection: found two missing break directives. First one will
result in not retrying an a task that report
IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY, the second will result in cosmetic
debug printk conflicting statement stutter. Because checkpatch.pl came
up with a warning regarding unnecessary space before a newline on one of
the fragments associated with the diff context, I took the liberty of
fixing all the cases of this issue in the pair of files touched by this
defect. These cosmetic changes hide the break changes :-(
To help focus, break changes are in pm8001_hwi.c fragment line 1649 for
the IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY case statement and pm8001_sas.c
line 1000 deals with the conflicting debug print stutter.
Signed-off-by: Mark Salyzyn <mark_salyzyn@us.xyratex.com>
Acked-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/pm8001')
-rw-r--r-- | drivers/scsi/pm8001/pm8001_hwi.c | 73 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm8001_sas.c | 7 |
2 files changed, 41 insertions, 39 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 8b7db1e53c10..b7b92f7be2aa 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c | |||
@@ -567,11 +567,11 @@ static void init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha) | |||
567 | value = pm8001_cr32(pm8001_ha, 0, 0x44); | 567 | value = pm8001_cr32(pm8001_ha, 0, 0x44); |
568 | offset = value & 0x03FFFFFF; | 568 | offset = value & 0x03FFFFFF; |
569 | PM8001_INIT_DBG(pm8001_ha, | 569 | PM8001_INIT_DBG(pm8001_ha, |
570 | pm8001_printk("Scratchpad 0 Offset: %x \n", offset)); | 570 | pm8001_printk("Scratchpad 0 Offset: %x\n", offset)); |
571 | pcilogic = (value & 0xFC000000) >> 26; | 571 | pcilogic = (value & 0xFC000000) >> 26; |
572 | pcibar = get_pci_bar_index(pcilogic); | 572 | pcibar = get_pci_bar_index(pcilogic); |
573 | PM8001_INIT_DBG(pm8001_ha, | 573 | PM8001_INIT_DBG(pm8001_ha, |
574 | pm8001_printk("Scratchpad 0 PCI BAR: %d \n", pcibar)); | 574 | pm8001_printk("Scratchpad 0 PCI BAR: %d\n", pcibar)); |
575 | pm8001_ha->main_cfg_tbl_addr = base_addr = | 575 | pm8001_ha->main_cfg_tbl_addr = base_addr = |
576 | pm8001_ha->io_mem[pcibar].memvirtaddr + offset; | 576 | pm8001_ha->io_mem[pcibar].memvirtaddr + offset; |
577 | pm8001_ha->general_stat_tbl_addr = | 577 | pm8001_ha->general_stat_tbl_addr = |
@@ -1245,7 +1245,7 @@ static int mpi_build_cmd(struct pm8001_hba_info *pm8001_ha, | |||
1245 | 1245 | ||
1246 | if (mpi_msg_free_get(circularQ, 64, &pMessage) < 0) { | 1246 | if (mpi_msg_free_get(circularQ, 64, &pMessage) < 0) { |
1247 | PM8001_IO_DBG(pm8001_ha, | 1247 | PM8001_IO_DBG(pm8001_ha, |
1248 | pm8001_printk("No free mpi buffer \n")); | 1248 | pm8001_printk("No free mpi buffer\n")); |
1249 | return -1; | 1249 | return -1; |
1250 | } | 1250 | } |
1251 | BUG_ON(!payload); | 1251 | BUG_ON(!payload); |
@@ -1262,7 +1262,7 @@ static int mpi_build_cmd(struct pm8001_hba_info *pm8001_ha, | |||
1262 | pm8001_cw32(pm8001_ha, circularQ->pi_pci_bar, | 1262 | pm8001_cw32(pm8001_ha, circularQ->pi_pci_bar, |
1263 | circularQ->pi_offset, circularQ->producer_idx); | 1263 | circularQ->pi_offset, circularQ->producer_idx); |
1264 | PM8001_IO_DBG(pm8001_ha, | 1264 | PM8001_IO_DBG(pm8001_ha, |
1265 | pm8001_printk("after PI= %d CI= %d \n", circularQ->producer_idx, | 1265 | pm8001_printk("after PI= %d CI= %d\n", circularQ->producer_idx, |
1266 | circularQ->consumer_index)); | 1266 | circularQ->consumer_index)); |
1267 | return 0; | 1267 | return 0; |
1268 | } | 1268 | } |
@@ -1474,7 +1474,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb) | |||
1474 | switch (status) { | 1474 | switch (status) { |
1475 | case IO_SUCCESS: | 1475 | case IO_SUCCESS: |
1476 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_SUCCESS" | 1476 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_SUCCESS" |
1477 | ",param = %d \n", param)); | 1477 | ",param = %d\n", param)); |
1478 | if (param == 0) { | 1478 | if (param == 0) { |
1479 | ts->resp = SAS_TASK_COMPLETE; | 1479 | ts->resp = SAS_TASK_COMPLETE; |
1480 | ts->stat = SAM_STAT_GOOD; | 1480 | ts->stat = SAM_STAT_GOOD; |
@@ -1490,14 +1490,14 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb) | |||
1490 | break; | 1490 | break; |
1491 | case IO_ABORTED: | 1491 | case IO_ABORTED: |
1492 | PM8001_IO_DBG(pm8001_ha, | 1492 | PM8001_IO_DBG(pm8001_ha, |
1493 | pm8001_printk("IO_ABORTED IOMB Tag \n")); | 1493 | pm8001_printk("IO_ABORTED IOMB Tag\n")); |
1494 | ts->resp = SAS_TASK_COMPLETE; | 1494 | ts->resp = SAS_TASK_COMPLETE; |
1495 | ts->stat = SAS_ABORTED_TASK; | 1495 | ts->stat = SAS_ABORTED_TASK; |
1496 | break; | 1496 | break; |
1497 | case IO_UNDERFLOW: | 1497 | case IO_UNDERFLOW: |
1498 | /* SSP Completion with error */ | 1498 | /* SSP Completion with error */ |
1499 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_UNDERFLOW" | 1499 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("IO_UNDERFLOW" |
1500 | ",param = %d \n", param)); | 1500 | ",param = %d\n", param)); |
1501 | ts->resp = SAS_TASK_COMPLETE; | 1501 | ts->resp = SAS_TASK_COMPLETE; |
1502 | ts->stat = SAS_DATA_UNDERRUN; | 1502 | ts->stat = SAS_DATA_UNDERRUN; |
1503 | ts->residual = param; | 1503 | ts->residual = param; |
@@ -1649,6 +1649,7 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb) | |||
1649 | ts->resp = SAS_TASK_COMPLETE; | 1649 | ts->resp = SAS_TASK_COMPLETE; |
1650 | ts->stat = SAS_OPEN_REJECT; | 1650 | ts->stat = SAS_OPEN_REJECT; |
1651 | ts->open_rej_reason = SAS_OREJ_RSVD_RETRY; | 1651 | ts->open_rej_reason = SAS_OREJ_RSVD_RETRY; |
1652 | break; | ||
1652 | default: | 1653 | default: |
1653 | PM8001_IO_DBG(pm8001_ha, | 1654 | PM8001_IO_DBG(pm8001_ha, |
1654 | pm8001_printk("Unknown status 0x%x\n", status)); | 1655 | pm8001_printk("Unknown status 0x%x\n", status)); |
@@ -1937,14 +1938,14 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
1937 | ts->buf_valid_size = sizeof(*resp); | 1938 | ts->buf_valid_size = sizeof(*resp); |
1938 | } else | 1939 | } else |
1939 | PM8001_IO_DBG(pm8001_ha, | 1940 | PM8001_IO_DBG(pm8001_ha, |
1940 | pm8001_printk("response to large \n")); | 1941 | pm8001_printk("response to large\n")); |
1941 | } | 1942 | } |
1942 | if (pm8001_dev) | 1943 | if (pm8001_dev) |
1943 | pm8001_dev->running_req--; | 1944 | pm8001_dev->running_req--; |
1944 | break; | 1945 | break; |
1945 | case IO_ABORTED: | 1946 | case IO_ABORTED: |
1946 | PM8001_IO_DBG(pm8001_ha, | 1947 | PM8001_IO_DBG(pm8001_ha, |
1947 | pm8001_printk("IO_ABORTED IOMB Tag \n")); | 1948 | pm8001_printk("IO_ABORTED IOMB Tag\n")); |
1948 | ts->resp = SAS_TASK_COMPLETE; | 1949 | ts->resp = SAS_TASK_COMPLETE; |
1949 | ts->stat = SAS_ABORTED_TASK; | 1950 | ts->stat = SAS_ABORTED_TASK; |
1950 | if (pm8001_dev) | 1951 | if (pm8001_dev) |
@@ -2728,11 +2729,11 @@ static int mpi_local_phy_ctl(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
2728 | u32 phy_op = le32_to_cpu(pPayload->phyop_phyid) & OP_BITS; | 2729 | u32 phy_op = le32_to_cpu(pPayload->phyop_phyid) & OP_BITS; |
2729 | if (status != 0) { | 2730 | if (status != 0) { |
2730 | PM8001_MSG_DBG(pm8001_ha, | 2731 | PM8001_MSG_DBG(pm8001_ha, |
2731 | pm8001_printk("%x phy execute %x phy op failed! \n", | 2732 | pm8001_printk("%x phy execute %x phy op failed!\n", |
2732 | phy_id, phy_op)); | 2733 | phy_id, phy_op)); |
2733 | } else | 2734 | } else |
2734 | PM8001_MSG_DBG(pm8001_ha, | 2735 | PM8001_MSG_DBG(pm8001_ha, |
2735 | pm8001_printk("%x phy execute %x phy op success! \n", | 2736 | pm8001_printk("%x phy execute %x phy op success!\n", |
2736 | phy_id, phy_op)); | 2737 | phy_id, phy_op)); |
2737 | return 0; | 2738 | return 0; |
2738 | } | 2739 | } |
@@ -3018,7 +3019,7 @@ hw_event_phy_down(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
3018 | break; | 3019 | break; |
3019 | case PORT_INVALID: | 3020 | case PORT_INVALID: |
3020 | PM8001_MSG_DBG(pm8001_ha, | 3021 | PM8001_MSG_DBG(pm8001_ha, |
3021 | pm8001_printk(" PortInvalid portID %d \n", port_id)); | 3022 | pm8001_printk(" PortInvalid portID %d\n", port_id)); |
3022 | PM8001_MSG_DBG(pm8001_ha, | 3023 | PM8001_MSG_DBG(pm8001_ha, |
3023 | pm8001_printk(" Last phy Down and port invalid\n")); | 3024 | pm8001_printk(" Last phy Down and port invalid\n")); |
3024 | port->port_attached = 0; | 3025 | port->port_attached = 0; |
@@ -3027,7 +3028,7 @@ hw_event_phy_down(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
3027 | break; | 3028 | break; |
3028 | case PORT_IN_RESET: | 3029 | case PORT_IN_RESET: |
3029 | PM8001_MSG_DBG(pm8001_ha, | 3030 | PM8001_MSG_DBG(pm8001_ha, |
3030 | pm8001_printk(" Port In Reset portID %d \n", port_id)); | 3031 | pm8001_printk(" Port In Reset portID %d\n", port_id)); |
3031 | break; | 3032 | break; |
3032 | case PORT_NOT_ESTABLISHED: | 3033 | case PORT_NOT_ESTABLISHED: |
3033 | PM8001_MSG_DBG(pm8001_ha, | 3034 | PM8001_MSG_DBG(pm8001_ha, |
@@ -3220,7 +3221,7 @@ mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb) | |||
3220 | pm8001_printk(" status = 0x%x\n", status)); | 3221 | pm8001_printk(" status = 0x%x\n", status)); |
3221 | for (i = 0; i < GENERAL_EVENT_PAYLOAD; i++) | 3222 | for (i = 0; i < GENERAL_EVENT_PAYLOAD; i++) |
3222 | PM8001_MSG_DBG(pm8001_ha, | 3223 | PM8001_MSG_DBG(pm8001_ha, |
3223 | pm8001_printk("inb_IOMB_payload[0x%x] 0x%x, \n", i, | 3224 | pm8001_printk("inb_IOMB_payload[0x%x] 0x%x,\n", i, |
3224 | pPayload->inb_IOMB_payload[i])); | 3225 | pPayload->inb_IOMB_payload[i])); |
3225 | return 0; | 3226 | return 0; |
3226 | } | 3227 | } |
@@ -3312,12 +3313,12 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void* piomb) | |||
3312 | break; | 3313 | break; |
3313 | case HW_EVENT_SAS_PHY_UP: | 3314 | case HW_EVENT_SAS_PHY_UP: |
3314 | PM8001_MSG_DBG(pm8001_ha, | 3315 | PM8001_MSG_DBG(pm8001_ha, |
3315 | pm8001_printk("HW_EVENT_PHY_START_STATUS \n")); | 3316 | pm8001_printk("HW_EVENT_PHY_START_STATUS\n")); |
3316 | hw_event_sas_phy_up(pm8001_ha, piomb); | 3317 | hw_event_sas_phy_up(pm8001_ha, piomb); |
3317 | break; | 3318 | break; |
3318 | case HW_EVENT_SATA_PHY_UP: | 3319 | case HW_EVENT_SATA_PHY_UP: |
3319 | PM8001_MSG_DBG(pm8001_ha, | 3320 | PM8001_MSG_DBG(pm8001_ha, |
3320 | pm8001_printk("HW_EVENT_SATA_PHY_UP \n")); | 3321 | pm8001_printk("HW_EVENT_SATA_PHY_UP\n")); |
3321 | hw_event_sata_phy_up(pm8001_ha, piomb); | 3322 | hw_event_sata_phy_up(pm8001_ha, piomb); |
3322 | break; | 3323 | break; |
3323 | case HW_EVENT_PHY_STOP_STATUS: | 3324 | case HW_EVENT_PHY_STOP_STATUS: |
@@ -3329,12 +3330,12 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void* piomb) | |||
3329 | break; | 3330 | break; |
3330 | case HW_EVENT_SATA_SPINUP_HOLD: | 3331 | case HW_EVENT_SATA_SPINUP_HOLD: |
3331 | PM8001_MSG_DBG(pm8001_ha, | 3332 | PM8001_MSG_DBG(pm8001_ha, |
3332 | pm8001_printk("HW_EVENT_SATA_SPINUP_HOLD \n")); | 3333 | pm8001_printk("HW_EVENT_SATA_SPINUP_HOLD\n")); |
3333 | sas_ha->notify_phy_event(&phy->sas_phy, PHYE_SPINUP_HOLD); | 3334 | sas_ha->notify_phy_event(&phy->sas_phy, PHYE_SPINUP_HOLD); |
3334 | break; | 3335 | break; |
3335 | case HW_EVENT_PHY_DOWN: | 3336 | case HW_EVENT_PHY_DOWN: |
3336 | PM8001_MSG_DBG(pm8001_ha, | 3337 | PM8001_MSG_DBG(pm8001_ha, |
3337 | pm8001_printk("HW_EVENT_PHY_DOWN \n")); | 3338 | pm8001_printk("HW_EVENT_PHY_DOWN\n")); |
3338 | sas_ha->notify_phy_event(&phy->sas_phy, PHYE_LOSS_OF_SIGNAL); | 3339 | sas_ha->notify_phy_event(&phy->sas_phy, PHYE_LOSS_OF_SIGNAL); |
3339 | phy->phy_attached = 0; | 3340 | phy->phy_attached = 0; |
3340 | phy->phy_state = 0; | 3341 | phy->phy_state = 0; |
@@ -3446,7 +3447,7 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void* piomb) | |||
3446 | break; | 3447 | break; |
3447 | case HW_EVENT_LINK_ERR_PHY_RESET_FAILED: | 3448 | case HW_EVENT_LINK_ERR_PHY_RESET_FAILED: |
3448 | PM8001_MSG_DBG(pm8001_ha, | 3449 | PM8001_MSG_DBG(pm8001_ha, |
3449 | pm8001_printk("HW_EVENT_LINK_ERR_PHY_RESET_FAILED \n")); | 3450 | pm8001_printk("HW_EVENT_LINK_ERR_PHY_RESET_FAILED\n")); |
3450 | pm8001_hw_event_ack_req(pm8001_ha, 0, | 3451 | pm8001_hw_event_ack_req(pm8001_ha, 0, |
3451 | HW_EVENT_LINK_ERR_PHY_RESET_FAILED, | 3452 | HW_EVENT_LINK_ERR_PHY_RESET_FAILED, |
3452 | port_id, phy_id, 0, 0); | 3453 | port_id, phy_id, 0, 0); |
@@ -3456,25 +3457,25 @@ static int mpi_hw_event(struct pm8001_hba_info *pm8001_ha, void* piomb) | |||
3456 | break; | 3457 | break; |
3457 | case HW_EVENT_PORT_RESET_TIMER_TMO: | 3458 | case HW_EVENT_PORT_RESET_TIMER_TMO: |
3458 | PM8001_MSG_DBG(pm8001_ha, | 3459 | PM8001_MSG_DBG(pm8001_ha, |
3459 | pm8001_printk("HW_EVENT_PORT_RESET_TIMER_TMO \n")); | 3460 | pm8001_printk("HW_EVENT_PORT_RESET_TIMER_TMO\n")); |
3460 | sas_phy_disconnected(sas_phy); | 3461 | sas_phy_disconnected(sas_phy); |
3461 | phy->phy_attached = 0; | 3462 | phy->phy_attached = 0; |
3462 | sas_ha->notify_port_event(sas_phy, PORTE_LINK_RESET_ERR); | 3463 | sas_ha->notify_port_event(sas_phy, PORTE_LINK_RESET_ERR); |
3463 | break; | 3464 | break; |
3464 | case HW_EVENT_PORT_RECOVERY_TIMER_TMO: | 3465 | case HW_EVENT_PORT_RECOVERY_TIMER_TMO: |
3465 | PM8001_MSG_DBG(pm8001_ha, | 3466 | PM8001_MSG_DBG(pm8001_ha, |
3466 | pm8001_printk("HW_EVENT_PORT_RECOVERY_TIMER_TMO \n")); | 3467 | pm8001_printk("HW_EVENT_PORT_RECOVERY_TIMER_TMO\n")); |
3467 | sas_phy_disconnected(sas_phy); | 3468 | sas_phy_disconnected(sas_phy); |
3468 | phy->phy_attached = 0; | 3469 | phy->phy_attached = 0; |
3469 | sas_ha->notify_port_event(sas_phy, PORTE_LINK_RESET_ERR); | 3470 | sas_ha->notify_port_event(sas_phy, PORTE_LINK_RESET_ERR); |
3470 | break; | 3471 | break; |
3471 | case HW_EVENT_PORT_RECOVER: | 3472 | case HW_EVENT_PORT_RECOVER: |
3472 | PM8001_MSG_DBG(pm8001_ha, | 3473 | PM8001_MSG_DBG(pm8001_ha, |
3473 | pm8001_printk("HW_EVENT_PORT_RECOVER \n")); | 3474 | pm8001_printk("HW_EVENT_PORT_RECOVER\n")); |
3474 | break; | 3475 | break; |
3475 | case HW_EVENT_PORT_RESET_COMPLETE: | 3476 | case HW_EVENT_PORT_RESET_COMPLETE: |
3476 | PM8001_MSG_DBG(pm8001_ha, | 3477 | PM8001_MSG_DBG(pm8001_ha, |
3477 | pm8001_printk("HW_EVENT_PORT_RESET_COMPLETE \n")); | 3478 | pm8001_printk("HW_EVENT_PORT_RESET_COMPLETE\n")); |
3478 | break; | 3479 | break; |
3479 | case EVENT_BROADCAST_ASYNCH_EVENT: | 3480 | case EVENT_BROADCAST_ASYNCH_EVENT: |
3480 | PM8001_MSG_DBG(pm8001_ha, | 3481 | PM8001_MSG_DBG(pm8001_ha, |
@@ -3502,21 +3503,21 @@ static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
3502 | 3503 | ||
3503 | switch (opc) { | 3504 | switch (opc) { |
3504 | case OPC_OUB_ECHO: | 3505 | case OPC_OUB_ECHO: |
3505 | PM8001_MSG_DBG(pm8001_ha, pm8001_printk("OPC_OUB_ECHO \n")); | 3506 | PM8001_MSG_DBG(pm8001_ha, pm8001_printk("OPC_OUB_ECHO\n")); |
3506 | break; | 3507 | break; |
3507 | case OPC_OUB_HW_EVENT: | 3508 | case OPC_OUB_HW_EVENT: |
3508 | PM8001_MSG_DBG(pm8001_ha, | 3509 | PM8001_MSG_DBG(pm8001_ha, |
3509 | pm8001_printk("OPC_OUB_HW_EVENT \n")); | 3510 | pm8001_printk("OPC_OUB_HW_EVENT\n")); |
3510 | mpi_hw_event(pm8001_ha, piomb); | 3511 | mpi_hw_event(pm8001_ha, piomb); |
3511 | break; | 3512 | break; |
3512 | case OPC_OUB_SSP_COMP: | 3513 | case OPC_OUB_SSP_COMP: |
3513 | PM8001_MSG_DBG(pm8001_ha, | 3514 | PM8001_MSG_DBG(pm8001_ha, |
3514 | pm8001_printk("OPC_OUB_SSP_COMP \n")); | 3515 | pm8001_printk("OPC_OUB_SSP_COMP\n")); |
3515 | mpi_ssp_completion(pm8001_ha, piomb); | 3516 | mpi_ssp_completion(pm8001_ha, piomb); |
3516 | break; | 3517 | break; |
3517 | case OPC_OUB_SMP_COMP: | 3518 | case OPC_OUB_SMP_COMP: |
3518 | PM8001_MSG_DBG(pm8001_ha, | 3519 | PM8001_MSG_DBG(pm8001_ha, |
3519 | pm8001_printk("OPC_OUB_SMP_COMP \n")); | 3520 | pm8001_printk("OPC_OUB_SMP_COMP\n")); |
3520 | mpi_smp_completion(pm8001_ha, piomb); | 3521 | mpi_smp_completion(pm8001_ha, piomb); |
3521 | break; | 3522 | break; |
3522 | case OPC_OUB_LOCAL_PHY_CNTRL: | 3523 | case OPC_OUB_LOCAL_PHY_CNTRL: |
@@ -3526,26 +3527,26 @@ static void process_one_iomb(struct pm8001_hba_info *pm8001_ha, void *piomb) | |||
3526 | break; | 3527 | break; |
3527 | case OPC_OUB_DEV_REGIST: | 3528 | case OPC_OUB_DEV_REGIST: |
3528 | PM8001_MSG_DBG(pm8001_ha, | 3529 | PM8001_MSG_DBG(pm8001_ha, |
3529 | pm8001_printk("OPC_OUB_DEV_REGIST \n")); | 3530 | pm8001_printk("OPC_OUB_DEV_REGIST\n")); |
3530 | mpi_reg_resp(pm8001_ha, piomb); | 3531 | mpi_reg_resp(pm8001_ha, piomb); |
3531 | break; | 3532 | break; |
3532 | case OPC_OUB_DEREG_DEV: | 3533 | case OPC_OUB_DEREG_DEV: |
3533 | PM8001_MSG_DBG(pm8001_ha, | 3534 | PM8001_MSG_DBG(pm8001_ha, |
3534 | pm8001_printk("unresgister the deviece \n")); | 3535 | pm8001_printk("unresgister the deviece\n")); |
3535 | mpi_dereg_resp(pm8001_ha, piomb); | 3536 | mpi_dereg_resp(pm8001_ha, piomb); |
3536 | break; | 3537 | break; |
3537 | case OPC_OUB_GET_DEV_HANDLE: | 3538 | case OPC_OUB_GET_DEV_HANDLE: |
3538 | PM8001_MSG_DBG(pm8001_ha, | 3539 | PM8001_MSG_DBG(pm8001_ha, |
3539 | pm8001_printk("OPC_OUB_GET_DEV_HANDLE \n")); | 3540 | pm8001_printk("OPC_OUB_GET_DEV_HANDLE\n")); |
3540 | break; | 3541 | break; |
3541 | case OPC_OUB_SATA_COMP: | 3542 | case OPC_OUB_SATA_COMP: |
3542 | PM8001_MSG_DBG(pm8001_ha, | 3543 | PM8001_MSG_DBG(pm8001_ha, |
3543 | pm8001_printk("OPC_OUB_SATA_COMP \n")); | 3544 | pm8001_printk("OPC_OUB_SATA_COMP\n")); |
3544 | mpi_sata_completion(pm8001_ha, piomb); | 3545 | mpi_sata_completion(pm8001_ha, piomb); |
3545 | break; | 3546 | break; |
3546 | case OPC_OUB_SATA_EVENT: | 3547 | case OPC_OUB_SATA_EVENT: |
3547 | PM8001_MSG_DBG(pm8001_ha, | 3548 | PM8001_MSG_DBG(pm8001_ha, |
3548 | pm8001_printk("OPC_OUB_SATA_EVENT \n")); | 3549 | pm8001_printk("OPC_OUB_SATA_EVENT\n")); |
3549 | mpi_sata_event(pm8001_ha, piomb); | 3550 | mpi_sata_event(pm8001_ha, piomb); |
3550 | break; | 3551 | break; |
3551 | case OPC_OUB_SSP_EVENT: | 3552 | case OPC_OUB_SSP_EVENT: |
@@ -3858,19 +3859,19 @@ static int pm8001_chip_sata_req(struct pm8001_hba_info *pm8001_ha, | |||
3858 | circularQ = &pm8001_ha->inbnd_q_tbl[0]; | 3859 | circularQ = &pm8001_ha->inbnd_q_tbl[0]; |
3859 | if (task->data_dir == PCI_DMA_NONE) { | 3860 | if (task->data_dir == PCI_DMA_NONE) { |
3860 | ATAP = 0x04; /* no data*/ | 3861 | ATAP = 0x04; /* no data*/ |
3861 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("no data \n")); | 3862 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("no data\n")); |
3862 | } else if (likely(!task->ata_task.device_control_reg_update)) { | 3863 | } else if (likely(!task->ata_task.device_control_reg_update)) { |
3863 | if (task->ata_task.dma_xfer) { | 3864 | if (task->ata_task.dma_xfer) { |
3864 | ATAP = 0x06; /* DMA */ | 3865 | ATAP = 0x06; /* DMA */ |
3865 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("DMA \n")); | 3866 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("DMA\n")); |
3866 | } else { | 3867 | } else { |
3867 | ATAP = 0x05; /* PIO*/ | 3868 | ATAP = 0x05; /* PIO*/ |
3868 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("PIO \n")); | 3869 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("PIO\n")); |
3869 | } | 3870 | } |
3870 | if (task->ata_task.use_ncq && | 3871 | if (task->ata_task.use_ncq && |
3871 | dev->sata_dev.command_set != ATAPI_COMMAND_SET) { | 3872 | dev->sata_dev.command_set != ATAPI_COMMAND_SET) { |
3872 | ATAP = 0x07; /* FPDMA */ | 3873 | ATAP = 0x07; /* FPDMA */ |
3873 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("FPDMA \n")); | 3874 | PM8001_IO_DBG(pm8001_ha, pm8001_printk("FPDMA\n")); |
3874 | } | 3875 | } |
3875 | } | 3876 | } |
3876 | if (task->ata_task.use_ncq && pm8001_get_ncq_tag(task, &hdr_tag)) | 3877 | if (task->ata_task.use_ncq && pm8001_get_ncq_tag(task, &hdr_tag)) |
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index dfda00d43326..5ac90c3d4cc1 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c | |||
@@ -609,7 +609,7 @@ static int pm8001_dev_found_notify(struct domain_device *dev) | |||
609 | flag = 1; /* directly sata*/ | 609 | flag = 1; /* directly sata*/ |
610 | } | 610 | } |
611 | } /*register this device to HBA*/ | 611 | } /*register this device to HBA*/ |
612 | PM8001_DISC_DBG(pm8001_ha, pm8001_printk("Found device \n")); | 612 | PM8001_DISC_DBG(pm8001_ha, pm8001_printk("Found device\n")); |
613 | PM8001_CHIP_DISP->reg_dev_req(pm8001_ha, pm8001_device, flag); | 613 | PM8001_CHIP_DISP->reg_dev_req(pm8001_ha, pm8001_device, flag); |
614 | spin_unlock_irqrestore(&pm8001_ha->lock, flags); | 614 | spin_unlock_irqrestore(&pm8001_ha->lock, flags); |
615 | wait_for_completion(&completion); | 615 | wait_for_completion(&completion); |
@@ -958,13 +958,14 @@ int pm8001_query_task(struct sas_task *task) | |||
958 | /* The task is still in Lun, release it then */ | 958 | /* The task is still in Lun, release it then */ |
959 | case TMF_RESP_FUNC_SUCC: | 959 | case TMF_RESP_FUNC_SUCC: |
960 | PM8001_EH_DBG(pm8001_ha, | 960 | PM8001_EH_DBG(pm8001_ha, |
961 | pm8001_printk("The task is still in Lun \n")); | 961 | pm8001_printk("The task is still in Lun\n")); |
962 | break; | ||
962 | /* The task is not in Lun or failed, reset the phy */ | 963 | /* The task is not in Lun or failed, reset the phy */ |
963 | case TMF_RESP_FUNC_FAILED: | 964 | case TMF_RESP_FUNC_FAILED: |
964 | case TMF_RESP_FUNC_COMPLETE: | 965 | case TMF_RESP_FUNC_COMPLETE: |
965 | PM8001_EH_DBG(pm8001_ha, | 966 | PM8001_EH_DBG(pm8001_ha, |
966 | pm8001_printk("The task is not in Lun or failed," | 967 | pm8001_printk("The task is not in Lun or failed," |
967 | " reset the phy \n")); | 968 | " reset the phy\n")); |
968 | break; | 969 | break; |
969 | } | 970 | } |
970 | } | 971 | } |