* Re: [patch] qlogic: don't use qinfo as name
2004-02-19 15:07 ` Christoph Hellwig
@ 2004-02-19 17:26 ` Aristeu Sergio Rozanski Filho
2004-02-21 21:36 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2004-02-19 17:26 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-scsi
[-- Attachment #1.1: Type: text/plain, Size: 299 bytes --]
hi Christoph,
> do you have those qlogicfas patches from before the freeze still around?
> I just noticed they still aren't merged and without them the driver is
> pretty much useless..
yes, I'm sending it attached. I didn't changed them since, so I'm not sure if
they will apply cleanly.
--
aris
[-- Attachment #1.2: qlogic-dont_use_qinfo.patch --]
[-- Type: text/plain, Size: 348 bytes --]
--- linux/drivers/scsi/qlogicfas.c.orig 2003-10-17 16:47:54.000000000 -0200
+++ linux/drivers/scsi/qlogicfas.c 2003-10-17 16:48:30.000000000 -0200
@@ -665,7 +665,6 @@
sprintf(qinfo,
"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d",
qltyp, qbase, qlirq, QL_TURBO_PDMA);
- host->name = qinfo;
return hreg;
[-- Attachment #1.3: qlogic-force_can_queue.patch --]
[-- Type: text/plain, Size: 410 bytes --]
--- linux/drivers/scsi/qlogicfas.c.orig 2003-10-20 21:12:09.000000000 -0200
+++ linux/drivers/scsi/qlogicfas.c 2003-10-20 21:12:17.000000000 -0200
@@ -793,7 +793,7 @@
.eh_device_reset_handler= qlogicfas_device_reset,
.eh_host_reset_handler = qlogicfas_host_reset,
.bios_param = qlogicfas_biosparam,
- .can_queue = 0,
+ .can_queue = 1,
.this_id = -1,
.sg_tablesize = SG_ALL,
.cmd_per_lun = 1,
[-- Attachment #1.4: qlogic-kill_qluseirq.patch --]
[-- Type: text/plain, Size: 1335 bytes --]
--- linux-2.5/drivers/scsi/qlogicfas.c 2003-10-15 17:16:15.000000000 -0200
+++ build-2.5/drivers/scsi/qlogicfas.c 2003-10-17 16:44:41.000000000 -0200
@@ -48,11 +48,6 @@
#define QL_INT_ACTIVE_HIGH 2
-/* Set the following to 1 to enable the use of interrupts. Note that 0 tends
- to be more stable, but slower (or ties up the system more) */
-
-#define QL_USE_IRQ 1
-
/* Set the following to max out the speed of the PIO PseudoDMA transfers,
again, 0 tends to be slower, but more stable. */
@@ -500,8 +495,6 @@
return (result << 16) | (message << 8) | (status & STATUS_MASK);
}
-#if QL_USE_IRQ
-
/*
* Interrupt handler
*/
@@ -541,10 +534,6 @@
return IRQ_HANDLED;
}
-#endif
-
-#if QL_USE_IRQ
-
/*
* Queued command
*/
@@ -566,12 +555,6 @@
ql_icmd(cmd);
return 0;
}
-#else
-int qlogicfas_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
-{
- return 1;
-}
-#endif
#ifdef PCMCIA
@@ -641,7 +624,6 @@
REG0;
#endif
-#if QL_USE_IRQ
/*
* IRQ probe - toggle pin and check request pending
*/
@@ -670,7 +652,7 @@
if (qlirq >= 0 && !request_irq(qlirq, do_ql_ihandl, 0, "qlogicfas", NULL))
host->can_queue = 1;
-#endif
+
hreg = scsi_register(host, 0); /* no host data */
if (!hreg)
goto err_release_mem;
[-- Attachment #1.5: qlogic-pcmcia_dont_release_region.patch --]
[-- Type: text/plain, Size: 477 bytes --]
--- linux/drivers/scsi/pcmcia/qlogic_stub.c.orig 2003-10-22 22:31:05.000000000 -0200
+++ linux/drivers/scsi/pcmcia/qlogic_stub.c 2003-10-22 22:31:36.000000000 -0200
@@ -240,9 +240,6 @@
outb(0x04, link->io.BasePort1 + 0xd);
}
- /* A bad hack... */
- release_region(link->io.BasePort1, link->io.NumPorts1);
-
/* The KXL-810AN has a bigger IO port window */
if (link->io.NumPorts1 == 32)
qlogicfas_preset(link->io.BasePort1 + 16, link->irq.AssignedIRQ);
[-- Attachment #1.6: qlogic-pcmcia_uses_scsi_host_alloc.patch --]
[-- Type: text/plain, Size: 829 bytes --]
--- linux/drivers/scsi/qlogicfas.c.orig 2003-10-22 22:25:19.000000000 -0200
+++ linux/drivers/scsi/qlogicfas.c 2003-10-22 21:26:59.000000000 -0200
@@ -650,7 +650,11 @@
} else
printk(KERN_INFO "Ql: Using preset IRQ %d\n", qlirq);
+#ifdef PCMCIA
+ hreg = scsi_host_alloc(host, 0);
+#else
hreg = scsi_register(host, 0); /* no host data */
+#endif
if (!hreg)
goto err_release_mem;
hreg->io_port = qbase;
--- linux/drivers/scsi/pcmcia/qlogic_stub.c.orig 2003-10-20 21:04:02.000000000 -0200
+++ linux/drivers/scsi/pcmcia/qlogic_stub.c 2003-10-22 22:24:34.000000000 -0200
@@ -288,7 +288,7 @@
CardServices(ReleaseIO, link->handle, &link->io);
CardServices(ReleaseIRQ, link->handle, &link->irq);
- scsi_unregister(info->host);
+ scsi_host_put(info->host);
link->state &= ~DEV_CONFIG;
}
[-- Attachment #1.7: qlogic-request_irq_with_priv_data.patch --]
[-- Type: text/plain, Size: 929 bytes --]
--- linux/drivers/scsi/qlogicfas.c.orig 2003-10-17 16:49:30.000000000 -0200
+++ linux/drivers/scsi/qlogicfas.c 2003-10-17 16:54:06.000000000 -0200
@@ -650,9 +650,6 @@
} else
printk(KERN_INFO "Ql: Using preset IRQ %d\n", qlirq);
- if (qlirq >= 0 && !request_irq(qlirq, do_ql_ihandl, 0, "qlogicfas", NULL))
- host->can_queue = 1;
-
hreg = scsi_register(host, 0); /* no host data */
if (!hreg)
goto err_release_mem;
@@ -666,12 +663,20 @@
"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d",
qltyp, qbase, qlirq, QL_TURBO_PDMA);
+ if (request_irq(qlirq, do_ql_ihandl, 0, "qlogicfas", hreg))
+ goto free_scsi_host;
+
return hreg;
+free_scsi_host:
+#ifdef PCMCIA
+ scsi_host_put(hreg);
+#else
+ scsi_unregister(hreg);
+#endif
+
err_release_mem:
release_region(qbase, 0x10);
- if (host->can_queue)
- free_irq(qlirq, do_ql_ihandl);
return NULL;;
}
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread