diff options
Diffstat (limited to 'drivers/scsi/atp870u.c')
| -rw-r--r-- | drivers/scsi/atp870u.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index e6153fe5842a..a8cfbef304b5 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
| @@ -996,6 +996,7 @@ oktosend: | |||
| 996 | #ifdef ED_DBGP | 996 | #ifdef ED_DBGP |
| 997 | printk("send_s870: prdaddr_2 0x%8x tmpcip %x target_id %d\n", dev->id[c][target_id].prdaddr,tmpcip,target_id); | 997 | printk("send_s870: prdaddr_2 0x%8x tmpcip %x target_id %d\n", dev->id[c][target_id].prdaddr,tmpcip,target_id); |
| 998 | #endif | 998 | #endif |
| 999 | dev->id[c][target_id].prdaddr = dev->id[c][target_id].prd_bus; | ||
| 999 | outl(dev->id[c][target_id].prdaddr, tmpcip); | 1000 | outl(dev->id[c][target_id].prdaddr, tmpcip); |
| 1000 | tmpcip = tmpcip - 2; | 1001 | tmpcip = tmpcip - 2; |
| 1001 | outb(0x06, tmpcip); | 1002 | outb(0x06, tmpcip); |
| @@ -2572,7 +2573,7 @@ static void atp870u_free_tables(struct Scsi_Host *host) | |||
| 2572 | for (k = 0; k < 16; k++) { | 2573 | for (k = 0; k < 16; k++) { |
| 2573 | if (!atp_dev->id[j][k].prd_table) | 2574 | if (!atp_dev->id[j][k].prd_table) |
| 2574 | continue; | 2575 | continue; |
| 2575 | pci_free_consistent(atp_dev->pdev, 1024, atp_dev->id[j][k].prd_table, atp_dev->id[j][k].prdaddr); | 2576 | pci_free_consistent(atp_dev->pdev, 1024, atp_dev->id[j][k].prd_table, atp_dev->id[j][k].prd_bus); |
| 2576 | atp_dev->id[j][k].prd_table = NULL; | 2577 | atp_dev->id[j][k].prd_table = NULL; |
| 2577 | } | 2578 | } |
| 2578 | } | 2579 | } |
| @@ -2584,12 +2585,13 @@ static int atp870u_init_tables(struct Scsi_Host *host) | |||
| 2584 | int c,k; | 2585 | int c,k; |
| 2585 | for(c=0;c < 2;c++) { | 2586 | for(c=0;c < 2;c++) { |
| 2586 | for(k=0;k<16;k++) { | 2587 | for(k=0;k<16;k++) { |
| 2587 | atp_dev->id[c][k].prd_table = pci_alloc_consistent(atp_dev->pdev, 1024, &(atp_dev->id[c][k].prdaddr)); | 2588 | atp_dev->id[c][k].prd_table = pci_alloc_consistent(atp_dev->pdev, 1024, &(atp_dev->id[c][k].prd_bus)); |
| 2588 | if (!atp_dev->id[c][k].prd_table) { | 2589 | if (!atp_dev->id[c][k].prd_table) { |
| 2589 | printk("atp870u_init_tables fail\n"); | 2590 | printk("atp870u_init_tables fail\n"); |
| 2590 | atp870u_free_tables(host); | 2591 | atp870u_free_tables(host); |
| 2591 | return -ENOMEM; | 2592 | return -ENOMEM; |
| 2592 | } | 2593 | } |
| 2594 | atp_dev->id[c][k].prdaddr = atp_dev->id[c][k].prd_bus; | ||
| 2593 | atp_dev->id[c][k].devsp=0x20; | 2595 | atp_dev->id[c][k].devsp=0x20; |
| 2594 | atp_dev->id[c][k].devtype = 0x7f; | 2596 | atp_dev->id[c][k].devtype = 0x7f; |
| 2595 | atp_dev->id[c][k].curr_req = NULL; | 2597 | atp_dev->id[c][k].curr_req = NULL; |
