[4606] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: [PATCH] SCSI host numbering

daemon@ATHENA.MIT.EDU (Eric Youngdale)
Tue Aug 25 01:43:57 1998

Date: 	Tue, 25 Aug 1998 00:54:48 -0400 (EDT)
From: Eric Youngdale <eric@andante.jic.com>
To: Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
cc: linux-scsi@vger.rutgers.edu, alan@lxorguk.ukuu.org.uk,
        torvalds@transmeta.com
In-Reply-To: <199808240829.KAA08851@green.mif.pg.gda.pl>


On Mon, 24 Aug 1998, Andrzej Krzysztofowicz wrote:

> Hi,
>    While testing behaviour of system with two or more different scsi
> adapters I found that sometimes different scsi hosts use the same
> host_no. It breaks at minimum proc info. I don't know what else can be
> broken in such situation, but allowing same host_no for different
> adapters means looking for trouble.
>    Problem appears both in 2.1.117 as well as in Alan's 2.0.36pre6. 
> Patches are included. The following example shows how to reproduce this 
> problem:

	While it certainly looks like we have a bug, I am not sure if I
agree with the proposed patch.  It looks like you are making a second
attempt to remove the entry from the linked list, when in fact this should
have already happened.  Wouldn't it be sufficient to simply do:

> -    if (max_scsi_hosts == next_scsi_host)
> -     max_scsi_hosts--;
> -
> +    if(max_scsi_hosts == next_scsi_host 
> +	&& sh->host_no == max_scsi_hosts - 1) {
> +     --max_scsi_hosts;
> +     }

-Eric

> 
> [root@xxx root]# modprobe qlogicfas
> scsi0 : Qlogicfas Driver version 0.46, chip 40 at 230, IRQ 12, TPdma:1
> scsi : 1 host.
> [root@xxx root]# modprobe aha1542
> Configuring Adaptec (SCSI-ID 7) at IO:334, IRQ 11, DMA priority 6
> scsi1 : Adaptec 1542
> scsi : 2 hosts.
> [root@xxx root]# rmmod qlogicfas
> scsi : 1 host.
> [root@xxx root]# modprobe qlogicfas
> scsi1 : Qlogicfas Driver version 0.46, chip 40 at 230, IRQ 12, TPdma:1
> scsi : 1 host.
> [root@xxx root]# ls -l /proc/scsi/*
> -rw-r--r--   1 root     root            0 Aug 23 21:51 /proc/scsi/scsi
> 
> /proc/scsi/aha1542:
> total 0
> -rw-r--r--   1 root     root            0 Aug 23 21:51 1
> 
> /proc/scsi/qlogic:
> total 0
> -rw-r--r--   1 root     root            0 Aug 23 21:51 1
> [root@xxx root]# cat /proc/scsi/qlogic/1
> Qlogicfas Driver version 0.46, chip 40 at 230, IRQ 12, TPdma:1
> [root@xxx root]# cat /proc/scsi/aha1542/1
> Qlogicfas Driver version 0.46, chip 40 at 230, IRQ 12, TPdma:1
> 
> ^^^^^^^^^^ !!! (should be from Adaptec)
> 
> Regards
>      Andrzej
> 


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post