summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-23 18:05:28 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-23 18:05:28 -0800
commiteab99d9b97d136ddfd66af66e0536a58195b3040 (patch)
tree92d1151553c0a929ce8ed4eac1cffdeb778ff5bd /drivers
parent53256f59116b541f087eb9423c1578e09a1b4b2f (diff)
parente2d435ea4084022ab88efa74214accb45b1f9e92 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] initio: fix module hangs on loading
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/initio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 01bf0189367d..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
{
#if DEBUG_QUEUE
- printk("append busy SCB %o; ", scbp);
+ printk("append busy SCB %p; ", scbp);
#endif
if (scbp->tagmsg)
host->act_tags[scbp->target]++;
@@ -2609,6 +2609,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c
cblk->bufptr = cpu_to_le32((u32)dma_addr);
cmnd->SCp.dma_handle = dma_addr;
+ cblk->sglen = nseg;
cblk->flags |= SCF_SG; /* Turn on SG list flag */
total_len = 0;
@@ -2869,6 +2870,7 @@ static int initio_probe_one(struct pci_dev *pdev,
host = (struct initio_host *)shost->hostdata;
memset(host, 0, sizeof(struct initio_host));
host->addr = pci_resource_start(pdev, 0);
+ host->bios_addr = bios_seg;
if (!request_region(host->addr, 256, "i91u")) {
printk(KERN_WARNING "initio: I/O port range 0x%x is busy.\n", host->addr);
@@ -2895,6 +2897,8 @@ static int initio_probe_one(struct pci_dev *pdev,
host->pci_dev = pdev;
+ host->semaph = 1;
+ spin_lock_init(&host->semaph_lock);
host->num_scbs = num_scb;
host->scb = scb;
host->next_pending = scb;
@@ -2911,7 +2915,7 @@ static int initio_probe_one(struct pci_dev *pdev,
host->last_avail = prev;
spin_lock_init(&host->avail_lock);
- initio_init(host, phys_to_virt(bios_seg << 4));
+ initio_init(host, phys_to_virt(((u32)bios_seg << 4)));
host->jsstatus0 = 0;