diff options
author | Christoph Hellwig <hch@lst.de> | 2005-07-04 11:48:30 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-02 12:43:45 -0400 |
commit | 2b55cac3d2d9f545c141748d00eae86e2c042ca5 (patch) | |
tree | 84d3fdf015dda660e05c9dbafbc953fa1b42192e /drivers/scsi/qla1280.c | |
parent | 8af50dcd22aa0a5840f18276ff10a6977abc3853 (diff) |
[SCSI] qla1280: misc cleanups
print message tidy ups and some excess brace removal.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thiemo Seufer <ths@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla1280.c')
-rw-r--r-- | drivers/scsi/qla1280.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 58ecdc696675..e5354550d762 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -1459,7 +1459,6 @@ qla1280_select_queue_depth(struct Scsi_Host *host, struct scsi_device *sdev_q) | |||
1459 | * | 1459 | * |
1460 | * Input: | 1460 | * Input: |
1461 | * ha = adapter block pointer. | 1461 | * ha = adapter block pointer. |
1462 | * done_q = done queue. | ||
1463 | */ | 1462 | */ |
1464 | static void | 1463 | static void |
1465 | qla1280_done(struct scsi_qla_host *ha) | 1464 | qla1280_done(struct scsi_qla_host *ha) |
@@ -1593,7 +1592,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
1593 | 1592 | ||
1594 | case CS_DATA_OVERRUN: | 1593 | case CS_DATA_OVERRUN: |
1595 | dprintk(2, "Data overrun 0x%x\n", residual_length); | 1594 | dprintk(2, "Data overrun 0x%x\n", residual_length); |
1596 | dprintk(2, "qla1280_isr: response packet data\n"); | 1595 | dprintk(2, "qla1280_return_status: response packet data\n"); |
1597 | qla1280_dump_buffer(2, (char *)sts, RESPONSE_ENTRY_SIZE); | 1596 | qla1280_dump_buffer(2, (char *)sts, RESPONSE_ENTRY_SIZE); |
1598 | host_status = DID_ERROR; | 1597 | host_status = DID_ERROR; |
1599 | break; | 1598 | break; |
@@ -2061,7 +2060,7 @@ qla1280_start_firmware(struct scsi_qla_host *ha) | |||
2061 | mb[1] = *ql1280_board_tbl[ha->devnum].fwstart; | 2060 | mb[1] = *ql1280_board_tbl[ha->devnum].fwstart; |
2062 | err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); | 2061 | err = qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb); |
2063 | if (err) { | 2062 | if (err) { |
2064 | printk(KERN_ERR "scsi(%li): Failed checksum\n", ha->host_no); | 2063 | printk(KERN_ERR "scsi(%li): RISC checksum failed.\n", ha->host_no); |
2065 | return err; | 2064 | return err; |
2066 | } | 2065 | } |
2067 | 2066 | ||
@@ -3080,10 +3079,13 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) | |||
3080 | REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); | 3079 | REQUEST_ENTRY_CNT - (ha->req_ring_index - cnt); |
3081 | } | 3080 | } |
3082 | 3081 | ||
3082 | dprintk(3, "Number of free entries=(%d) seg_cnt=0x%x\n", | ||
3083 | ha->req_q_cnt, seg_cnt); | ||
3084 | |||
3083 | /* If room for request in request ring. */ | 3085 | /* If room for request in request ring. */ |
3084 | if ((req_cnt + 2) >= ha->req_q_cnt) { | 3086 | if ((req_cnt + 2) >= ha->req_q_cnt) { |
3085 | status = 1; | 3087 | status = 1; |
3086 | dprintk(2, "qla1280_64bit_start_scsi: in-ptr=0x%x req_q_cnt=" | 3088 | dprintk(2, "qla1280_start_scsi: in-ptr=0x%x req_q_cnt=" |
3087 | "0x%xreq_cnt=0x%x", ha->req_ring_index, ha->req_q_cnt, | 3089 | "0x%xreq_cnt=0x%x", ha->req_ring_index, ha->req_q_cnt, |
3088 | req_cnt); | 3090 | req_cnt); |
3089 | goto out; | 3091 | goto out; |
@@ -3095,7 +3097,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) | |||
3095 | 3097 | ||
3096 | if (cnt >= MAX_OUTSTANDING_COMMANDS) { | 3098 | if (cnt >= MAX_OUTSTANDING_COMMANDS) { |
3097 | status = 1; | 3099 | status = 1; |
3098 | dprintk(2, "qla1280_64bit_start_scsi: NO ROOM IN " | 3100 | dprintk(2, "qla1280_start_scsi: NO ROOM IN " |
3099 | "OUTSTANDING ARRAY, req_q_cnt=0x%x", ha->req_q_cnt); | 3101 | "OUTSTANDING ARRAY, req_q_cnt=0x%x", ha->req_q_cnt); |
3100 | goto out; | 3102 | goto out; |
3101 | } | 3103 | } |
@@ -3104,7 +3106,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) | |||
3104 | ha->req_q_cnt -= req_cnt; | 3106 | ha->req_q_cnt -= req_cnt; |
3105 | CMD_HANDLE(sp->cmd) = (unsigned char *)(unsigned long)(cnt + 1); | 3107 | CMD_HANDLE(sp->cmd) = (unsigned char *)(unsigned long)(cnt + 1); |
3106 | 3108 | ||
3107 | dprintk(2, "64bit_start: cmd=%p sp=%p CDB=%xm, handle %lx\n", cmd, sp, | 3109 | dprintk(2, "start: cmd=%p sp=%p CDB=%xm, handle %lx\n", cmd, sp, |
3108 | cmd->cmnd[0], (long)CMD_HANDLE(sp->cmd)); | 3110 | cmd->cmnd[0], (long)CMD_HANDLE(sp->cmd)); |
3109 | dprintk(2, " bus %i, target %i, lun %i\n", | 3111 | dprintk(2, " bus %i, target %i, lun %i\n", |
3110 | SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); | 3112 | SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); |
@@ -4626,7 +4628,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4626 | if (pci_set_dma_mask(ha->pdev, (dma_addr_t) ~ 0ULL)) { | 4628 | if (pci_set_dma_mask(ha->pdev, (dma_addr_t) ~ 0ULL)) { |
4627 | if (pci_set_dma_mask(ha->pdev, 0xffffffff)) { | 4629 | if (pci_set_dma_mask(ha->pdev, 0xffffffff)) { |
4628 | printk(KERN_WARNING "scsi(%li): Unable to set a " | 4630 | printk(KERN_WARNING "scsi(%li): Unable to set a " |
4629 | " suitable DMA mask - aboring\n", ha->host_no); | 4631 | "suitable DMA mask - aborting\n", ha->host_no); |
4630 | error = -ENODEV; | 4632 | error = -ENODEV; |
4631 | goto error_free_irq; | 4633 | goto error_free_irq; |
4632 | } | 4634 | } |
@@ -4636,14 +4638,14 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4636 | #else | 4638 | #else |
4637 | if (pci_set_dma_mask(ha->pdev, 0xffffffff)) { | 4639 | if (pci_set_dma_mask(ha->pdev, 0xffffffff)) { |
4638 | printk(KERN_WARNING "scsi(%li): Unable to set a " | 4640 | printk(KERN_WARNING "scsi(%li): Unable to set a " |
4639 | " suitable DMA mask - aboring\n", ha->host_no); | 4641 | "suitable DMA mask - aborting\n", ha->host_no); |
4640 | error = -ENODEV; | 4642 | error = -ENODEV; |
4641 | goto error_free_irq; | 4643 | goto error_free_irq; |
4642 | } | 4644 | } |
4643 | #endif | 4645 | #endif |
4644 | 4646 | ||
4645 | ha->request_ring = pci_alloc_consistent(ha->pdev, | 4647 | ha->request_ring = pci_alloc_consistent(ha->pdev, |
4646 | ((REQUEST_ENTRY_CNT + 1) * (sizeof(request_t))), | 4648 | ((REQUEST_ENTRY_CNT + 1) * sizeof(request_t)), |
4647 | &ha->request_dma); | 4649 | &ha->request_dma); |
4648 | if (!ha->request_ring) { | 4650 | if (!ha->request_ring) { |
4649 | printk(KERN_INFO "qla1280: Failed to get request memory\n"); | 4651 | printk(KERN_INFO "qla1280: Failed to get request memory\n"); |
@@ -4651,7 +4653,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4651 | } | 4653 | } |
4652 | 4654 | ||
4653 | ha->response_ring = pci_alloc_consistent(ha->pdev, | 4655 | ha->response_ring = pci_alloc_consistent(ha->pdev, |
4654 | ((RESPONSE_ENTRY_CNT + 1) * (sizeof(struct response))), | 4656 | ((RESPONSE_ENTRY_CNT + 1) * sizeof(struct response)), |
4655 | &ha->response_dma); | 4657 | &ha->response_dma); |
4656 | if (!ha->response_ring) { | 4658 | if (!ha->response_ring) { |
4657 | printk(KERN_INFO "qla1280: Failed to get response memory\n"); | 4659 | printk(KERN_INFO "qla1280: Failed to get response memory\n"); |
@@ -4746,11 +4748,11 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4746 | #endif | 4748 | #endif |
4747 | error_free_response_ring: | 4749 | error_free_response_ring: |
4748 | pci_free_consistent(ha->pdev, | 4750 | pci_free_consistent(ha->pdev, |
4749 | ((RESPONSE_ENTRY_CNT + 1) * (sizeof(struct response))), | 4751 | ((RESPONSE_ENTRY_CNT + 1) * sizeof(struct response)), |
4750 | ha->response_ring, ha->response_dma); | 4752 | ha->response_ring, ha->response_dma); |
4751 | error_free_request_ring: | 4753 | error_free_request_ring: |
4752 | pci_free_consistent(ha->pdev, | 4754 | pci_free_consistent(ha->pdev, |
4753 | ((REQUEST_ENTRY_CNT + 1) * (sizeof(request_t))), | 4755 | ((REQUEST_ENTRY_CNT + 1) * sizeof(request_t)), |
4754 | ha->request_ring, ha->request_dma); | 4756 | ha->request_ring, ha->request_dma); |
4755 | error_put_host: | 4757 | error_put_host: |
4756 | scsi_host_put(host); | 4758 | scsi_host_put(host); |