diff options
Diffstat (limited to 'drivers/scsi/initio.c')
-rw-r--r-- | drivers/scsi/initio.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 4c4465d39a1d..a10a5c74b48d 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
@@ -823,7 +823,7 @@ static void initio_append_busy_scb(struct initio_host * host, struct scsi_ctrl_b | |||
823 | { | 823 | { |
824 | 824 | ||
825 | #if DEBUG_QUEUE | 825 | #if DEBUG_QUEUE |
826 | printk("append busy SCB %o; ", scbp); | 826 | printk("append busy SCB %p; ", scbp); |
827 | #endif | 827 | #endif |
828 | if (scbp->tagmsg) | 828 | if (scbp->tagmsg) |
829 | host->act_tags[scbp->target]++; | 829 | host->act_tags[scbp->target]++; |
@@ -2609,6 +2609,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c | |||
2609 | cblk->bufptr = cpu_to_le32((u32)dma_addr); | 2609 | cblk->bufptr = cpu_to_le32((u32)dma_addr); |
2610 | cmnd->SCp.dma_handle = dma_addr; | 2610 | cmnd->SCp.dma_handle = dma_addr; |
2611 | 2611 | ||
2612 | cblk->sglen = nseg; | ||
2612 | 2613 | ||
2613 | cblk->flags |= SCF_SG; /* Turn on SG list flag */ | 2614 | cblk->flags |= SCF_SG; /* Turn on SG list flag */ |
2614 | total_len = 0; | 2615 | total_len = 0; |
@@ -2616,6 +2617,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c | |||
2616 | scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { | 2617 | scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { |
2617 | sg->data = cpu_to_le32((u32)sg_dma_address(sglist)); | 2618 | sg->data = cpu_to_le32((u32)sg_dma_address(sglist)); |
2618 | total_len += sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); | 2619 | total_len += sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); |
2620 | ++sg; | ||
2619 | } | 2621 | } |
2620 | 2622 | ||
2621 | cblk->buflen = (scsi_bufflen(cmnd) > total_len) ? | 2623 | cblk->buflen = (scsi_bufflen(cmnd) > total_len) ? |
@@ -2867,6 +2869,8 @@ static int initio_probe_one(struct pci_dev *pdev, | |||
2867 | } | 2869 | } |
2868 | host = (struct initio_host *)shost->hostdata; | 2870 | host = (struct initio_host *)shost->hostdata; |
2869 | memset(host, 0, sizeof(struct initio_host)); | 2871 | memset(host, 0, sizeof(struct initio_host)); |
2872 | host->addr = pci_resource_start(pdev, 0); | ||
2873 | host->bios_addr = bios_seg; | ||
2870 | 2874 | ||
2871 | if (!request_region(host->addr, 256, "i91u")) { | 2875 | if (!request_region(host->addr, 256, "i91u")) { |
2872 | printk(KERN_WARNING "initio: I/O port range 0x%x is busy.\n", host->addr); | 2876 | printk(KERN_WARNING "initio: I/O port range 0x%x is busy.\n", host->addr); |
@@ -2893,6 +2897,8 @@ static int initio_probe_one(struct pci_dev *pdev, | |||
2893 | 2897 | ||
2894 | host->pci_dev = pdev; | 2898 | host->pci_dev = pdev; |
2895 | 2899 | ||
2900 | host->semaph = 1; | ||
2901 | spin_lock_init(&host->semaph_lock); | ||
2896 | host->num_scbs = num_scb; | 2902 | host->num_scbs = num_scb; |
2897 | host->scb = scb; | 2903 | host->scb = scb; |
2898 | host->next_pending = scb; | 2904 | host->next_pending = scb; |
@@ -2909,7 +2915,7 @@ static int initio_probe_one(struct pci_dev *pdev, | |||
2909 | host->last_avail = prev; | 2915 | host->last_avail = prev; |
2910 | spin_lock_init(&host->avail_lock); | 2916 | spin_lock_init(&host->avail_lock); |
2911 | 2917 | ||
2912 | initio_init(host, phys_to_virt(bios_seg << 4)); | 2918 | initio_init(host, phys_to_virt(((u32)bios_seg << 4))); |
2913 | 2919 | ||
2914 | host->jsstatus0 = 0; | 2920 | host->jsstatus0 = 0; |
2915 | 2921 | ||