* [PATCH 2.6.24-rc8-git6] initio module hangs on loading fix set
@ 2008-01-23 20:00 Stuart Swales
2008-01-23 23:45 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: Stuart Swales @ 2008-01-23 20:00 UTC (permalink / raw)
To: linux-scsi
I've verified (on my Initio 9100 with a DAT drive) that the
2.6.24-rc8-git6 initio module still hangs on loading.
These fixes (other than the printk) are needed to get the module to load
ok (and work correctly) with my adapter & tape drive.
a) printk cosmetic fix
b) cblk->sglen needs setting for later DMA I/O routines to use
c) host->bios_addr needs setting for debug output correctness
d) semaph & semaph_lock initialisation had got lost since 2.6.22
e) since 2.6.22 the bios data address was truncated to 16 bits (needs 20
when shifted left)
Stuart Swales
--- linux-2.6.24-rc8-git6/drivers/scsi/initio.c 2008-01-16
04:22:48.000000000 +0000
+++ linux-2.6.24-rc8-git6-sks/drivers/scsi/initio.c 2008-01-23
18:52:04.000000000 +0000
@@ -823,7 +823,7 @@ static void initio_append_busy_scb(struc
{
#if DEBUG_QUEUE
- printk("append busy SCB %o; ", scbp);
+ printk("append busy SCB %p; ", scbp); /* SKS: not %o */
#endif
if (scbp->tagmsg)
host->act_tags[scbp->target]++;
@@ -2609,6 +2609,7 @@ static void initio_build_scb(struct init
cblk->bufptr = cpu_to_le32((u32)dma_addr);
cmnd->SCp.dma_handle = dma_addr;
+ cblk->sglen = nseg; /* SKS: needs setting for DMA routine */
cblk->flags |= SCF_SG; /* Turn on SG list flag */
total_len = 0;
@@ -2869,6 +2870,7 @@ static int initio_probe_one(struct pci_d
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; /* SKS: required for debug output */
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_d
host->pci_dev = pdev;
+ host->semaph = 1; /* SKS */
+ 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_d
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))); /* SKS: u16
would lose bits when shifted left */
host->jsstatus0 = 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.24-rc8-git6] initio module hangs on loading fix set
2008-01-23 20:00 [PATCH 2.6.24-rc8-git6] initio module hangs on loading fix set Stuart Swales
@ 2008-01-23 23:45 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2008-01-23 23:45 UTC (permalink / raw)
To: Stuart Swales; +Cc: linux-scsi, Alan Cox
On Wed, 2008-01-23 at 20:00 +0000, Stuart Swales wrote:
> I've verified (on my Initio 9100 with a DAT drive) that the
> 2.6.24-rc8-git6 initio module still hangs on loading.
>
> These fixes (other than the printk) are needed to get the module to load
> ok (and work correctly) with my adapter & tape drive.
>
> a) printk cosmetic fix
>
> b) cblk->sglen needs setting for later DMA I/O routines to use
>
> c) host->bios_addr needs setting for debug output correctness
>
> d) semaph & semaph_lock initialisation had got lost since 2.6.22
>
> e) since 2.6.22 the bios data address was truncated to 16 bits (needs 20
> when shifted left)
That's brilliant, thanks! (Linus has been complaining about the broken
state of initio for a while, so this saves my bacon).
I made your patch actually apply (your mailer broke it in places) and
stripped out the comments, which won't make sense to anyone who doesn't
have the context of the actual patch to look at.
Thanks,
James
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-23 23:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-23 20:00 [PATCH 2.6.24-rc8-git6] initio module hangs on loading fix set Stuart Swales
2008-01-23 23:45 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox