All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Patch?: linux-2.5.45/drivers/scsi/hosts.[ch] - Eliminate scsi_host_tmpl_list
@ 2002-11-06  0:51 Adam J. Richter
  2002-11-07 20:00 ` Patrick Mansfield
  0 siblings, 1 reply; 11+ messages in thread
From: Adam J. Richter @ 2002-11-06  0:51 UTC (permalink / raw)
  To: James.Bottomley; +Cc: hch, linux-scsi

	Although I haven't tested it, Christoph's version of my
patch to remove Scsi_Host_Name looks OK to me.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Patch?: linux-2.5.45/drivers/scsi/hosts.[ch] - Eliminate scsi_host_tmpl_list
@ 2002-11-10  5:40 Adam J. Richter
  0 siblings, 0 replies; 11+ messages in thread
From: Adam J. Richter @ 2002-11-10  5:40 UTC (permalink / raw)
  To: patmans; +Cc: hch, James.Bottomley, linux-scsi

Oops!  I wrote:
>        If you disagree with this, please walk me through how the
>second "insmod foo" gets scsi ID 4 when the scsihosts string has
                ^^^
>reserved that ID for something else.  If you can actually produce
>the behavior in real life, that would be even better.

        I meant the second "insmod bar".

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Miplitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Patch?: linux-2.5.45/drivers/scsi/hosts.[ch] - Eliminate scsi_host_tmpl_list
@ 2002-11-10  5:37 Adam J. Richter
  2002-11-10 17:46 ` Patrick Mansfield
  0 siblings, 1 reply; 11+ messages in thread
From: Adam J. Richter @ 2002-11-10  5:37 UTC (permalink / raw)
  To: patmans; +Cc: hch, James.Bottomley, linux-scsi

Patrick Mansfield wrote:
>But, there is no way to match the previous functionallity without having
>a host name list.
>
>That is before the patch we can do this:
>
>        insmod foo; insmod bar
>
>And foo gets scsi4, bar scsi5. And then:
>
>        rmmod foo; rmmod bar
>        insmod bar; insmod foo
>
>And foo should still be scsi4, bar scsi5.
>
>Without the host name list, the best we can do is have
>foo become scsi5, and bar scsi4.

	I do not understand why you think these is any change
in behavior.

	If you passed "scsihosts=host1,host2,host3,foo,bar", then
you should the first foo controller will always be assigned ID 4,
and the first bar controller will always be assigned ID 5, no matter
how you load, unload and reload the foo and bar SCSI drivers.
A successful scsi_register always calls scsi_hostnum; scsi_hostname
always checks the scsihosts variable.

	If you disagree with this, please walk me through how the
second "insmod foo" gets scsi ID 4 when the scsihosts string has
reserved that ID for something else.  If you can actually produce
the behavior in real life, that would be even better.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Miplitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Patch?: linux-2.5.45/drivers/scsi/hosts.[ch] - Eliminate scsi_host_tmpl_list
@ 2002-11-05 12:20 Adam J. Richter
  2002-11-05 22:58 ` Christoph Hellwig
  2002-11-05 23:54 ` Christoph Hellwig
  0 siblings, 2 replies; 11+ messages in thread
From: Adam J. Richter @ 2002-11-05 12:20 UTC (permalink / raw)
  To: hch, James.Bottomley; +Cc: linux-scsi

	Oops, I see that Chrisoph Hellwig posted a patch 19.5 earlier
than mine that did this clean up and some other related ones, so please
disregard my patch and apply Christoph's.

	Chistoph, since you're in the process of doing similar
clean-ups, you might want to try my untested patch that eliminated
Scsi_Host_Name:

	 http://marc.theaimsgroup.com/?l=linux-scsi&m=103643303212376&w=2

	If it works and looks OK to you, Christoph, I'd encourage you
to put it into your patch stream if you want, so as to reduce patch
conflicts for James, Linus, et al.  On the other hand, if that just
creates work for you that you weren't keen on doing, don't worry about
it.  I don't mean to impose.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Patch?: linux-2.5.45/drivers/scsi/hosts.[ch] - Eliminate scsi_host_tmpl_list
@ 2002-11-04 16:22 Adam J. Richter
  0 siblings, 0 replies; 11+ messages in thread
From: Adam J. Richter @ 2002-11-04 16:22 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi

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

	It looks like scsi_host_tmp_list and template.shtp_list are
not used.  This patch deletes them, but I have not tested beyond
verifying that my hosts.c still compiles.

	This is a step toward eliminating the need for a routine to
register scsi templates at all (modules would just register SCSI
hosts, simplifying hot plugging of controllers).

-- 
Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

[-- Attachment #2: scsi.diff --]
[-- Type: text/plain, Size: 1650 bytes --]

--- linux-2.5.45/drivers/scsi/hosts.h	2002-10-30 16:42:24.000000000 -0800
+++ linux/drivers/scsi/hosts.h	2002-11-04 08:10:05.000000000 -0800
@@ -58,8 +58,6 @@
 typedef struct	SHT
 {
 
-    struct list_head	shtp_list;
-
     /* Used with loadable modules so that we know when it is safe to unload */
     struct module * module;
 
@@ -326,6 +324,11 @@
      */
     unsigned use_blk_tcq:1;
 
+    /* Have the high level code automatically handle DMA mapping of
+       Scsi_Request->request_buffer and Scsi_Request->sense_buf. */
+    unsigned dma_map_request:1;
+    unsigned dma_map_sense:1;
+
     /*
      * Name of proc directory
      */
--- linux-2.5.45/drivers/scsi/hosts.c	2002-10-30 16:41:40.000000000 -0800
+++ linux/drivers/scsi/hosts.c	2002-11-04 08:09:58.000000000 -0800
@@ -45,7 +45,6 @@
 #include "scsi.h"
 #include "hosts.h"
 
-LIST_HEAD(scsi_host_tmpl_list);
 LIST_HEAD(scsi_host_hn_list);
 
 LIST_HEAD(scsi_host_list);
@@ -475,8 +474,6 @@
 	struct list_head *lh;
 	struct Scsi_Host *shost;
 
-	INIT_LIST_HEAD(&shost_tp->shtp_list);
-
 	/*
 	 * Check no detect routine.
 	 */
@@ -526,8 +523,6 @@
 			}
 		}
 
-		list_add_tail(&shost_tp->shtp_list, &scsi_host_tmpl_list);
-
 		/* The next step is to call scan_scsis here.  This generates the
 		 * Scsi_Devices entries
 		 */
@@ -614,14 +609,6 @@
 		printk(KERN_INFO "scsi : %d host%s left.\n", scsi_hosts_registered,
 		       (scsi_hosts_registered == 1) ? "" : "s");
 
-	/*
-	 * Remove it from the list if all
-	 * hosts were successfully removed (ie preset == 0)
-	 */
-	if (!shost_tp->present) {
-		list_del(&shost_tp->shtp_list);
-	}
-
 	MOD_DEC_USE_COUNT;
 
 	unlock_kernel();

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

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-06  0:51 Patch?: linux-2.5.45/drivers/scsi/hosts.[ch] - Eliminate scsi_host_tmpl_list Adam J. Richter
2002-11-07 20:00 ` Patrick Mansfield
2002-11-10  3:13   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2002-11-10  5:40 Adam J. Richter
2002-11-10  5:37 Adam J. Richter
2002-11-10 17:46 ` Patrick Mansfield
2002-11-05 12:20 Adam J. Richter
2002-11-05 22:58 ` Christoph Hellwig
2002-11-05 23:54 ` Christoph Hellwig
2002-11-07  1:13   ` Patrick Mansfield
2002-11-04 16:22 Adam J. Richter

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.