All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch][1/3] qlogic: use scsi_host_alloc instead scsi_register
@ 2003-10-16  1:52 Aristeu Sergio Rozanski Filho
  2003-10-16 21:34 ` Mike Christie
  2003-10-17 11:57 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2003-10-16  1:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: Brard Roudier

[-- Attachment #1: Type: text/plain, Size: 77 bytes --]

hi,
	these patches fixes qlogic_cs module loading and unloading. 

-- 
aris


[-- Attachment #2: qlogic-alloc.patch --]
[-- Type: text/plain, Size: 666 bytes --]

--- linux/drivers/scsi/qlogicfas.c.orig	2003-10-15 23:41:52.000000000 -0200
+++ linux/drivers/scsi/qlogicfas.c	2003-10-15 23:41:28.000000000 -0200
@@ -671,7 +671,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 */
+	hreg = scsi_host_alloc(host, 0);	/* no host data */
 	if (!hreg)
 		goto err_release_mem;
 	hreg->io_port = qbase;
@@ -679,6 +679,7 @@
 	hreg->dma_channel = -1;
 	if (qlirq != -1)
 		hreg->irq = qlirq;
+	INIT_LIST_HEAD(&hreg->sht_legacy_list);
 
 	sprintf(qinfo,
 		"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d",

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch][1/3] qlogic: use scsi_host_alloc instead scsi_register
  2003-10-16  1:52 [patch][1/3] qlogic: use scsi_host_alloc instead scsi_register Aristeu Sergio Rozanski Filho
@ 2003-10-16 21:34 ` Mike Christie
  2003-10-17 11:57 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Christie @ 2003-10-16 21:34 UTC (permalink / raw)
  To: Aristeu Sergio Rozanski Filho; +Cc: linux-kernel, Brard Roudier

Aristeu Sergio Rozanski Filho wrote:

> --- linux/drivers/scsi/qlogicfas.c.orig	2003-10-15 23:41:52.000000000 -0200
> +++ linux/drivers/scsi/qlogicfas.c	2003-10-15 23:41:28.000000000 -0200
> @@ -671,7 +671,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 */
> +	hreg = scsi_host_alloc(host, 0);	/* no host data */
>  	if (!hreg)

I think this will break the non-PCMCIA version now. scsi_register also 
adds the host to the template's legacy_hosts list. With your patch 
init_this_scsi_driver will call the template's detect function then 
never call scsi_add_host and scsi_scan_host because that list is empty.


Mike


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch][1/3] qlogic: use scsi_host_alloc instead scsi_register
  2003-10-16  1:52 [patch][1/3] qlogic: use scsi_host_alloc instead scsi_register Aristeu Sergio Rozanski Filho
  2003-10-16 21:34 ` Mike Christie
@ 2003-10-17 11:57 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2003-10-17 11:57 UTC (permalink / raw)
  To: Aristeu Sergio Rozanski Filho; +Cc: linux-kernel, Brard Roudier

On Wed, Oct 15, 2003 at 11:52:13PM -0200, Aristeu Sergio Rozanski Filho wrote:
> +++ linux/drivers/scsi/qlogicfas.c	2003-10-15 23:41:28.000000000 -0200
> @@ -671,7 +671,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 */
> +	hreg = scsi_host_alloc(host, 0);	/* no host data */
>  	if (!hreg)
>  		goto err_release_mem;
>  	hreg->io_port = qbase;
> @@ -679,6 +679,7 @@
>  	hreg->dma_channel = -1;
>  	if (qlirq != -1)
>  		hreg->irq = qlirq;
> +	INIT_LIST_HEAD(&hreg->sht_legacy_list);

This is not good - please use scsi_register for the !PCMCIA case
instead of opencoding it - sht_legacy_list should be completely opaque
to drivers.  Maybe once the current freeze is over we can convert
qlogic.c to a proper new-style driver and merge qlogic_cs into it
instead of having two copies of the same codebase compiled with slightly
different cpp symbols.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-17 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-16  1:52 [patch][1/3] qlogic: use scsi_host_alloc instead scsi_register Aristeu Sergio Rozanski Filho
2003-10-16 21:34 ` Mike Christie
2003-10-17 11:57 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.