lkml.org 
[lkml]   [2005]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
From
Date
On Mon, 2005-09-12 at 11:06 -0400, Luben Tuikov wrote:
> On 09/10/05 12:01, James Bottomley wrote:
> > On Fri, 2005-09-09 at 19:44 -0700, Luben Tuikov wrote:
> >
> >>>this one completely duplicates the
> >>>mid-layer infrastructure for handling devices with Logical Units.
> >>
> >>No, it does *not*. James, you have _stop_ spreading FUD, relying
> >>that other people have not read the SCSI Core code.
> >
> >
> > We have an infrastructure in the mid-layer for doing report lun scans.
> > You have a parallel one in your code. In my book, that's duplication.
>
> This infrastructure is broken. Its interface is broken. It is a horrible
> excuse of LUN scanning written initially to support a certain hardware.
>
> LUN scanning is done a tad bit differently with a tad bit different
> interface. Read the specs, study the code I submitted.
>
> It is poinless for you to argue back just with a sentence and for
> me to reply back to you with *code*.
>
> Again, unless you point out code, you're spreading FUD!
>
> Here is excerpt from my previous message to the list:
> ---cut-start----
> Look at scsi_scan_target() declaration:
>
> void scsi_scan_target(struct device *parent, unsigned int channel,
> unsigned int id, unsigned int lun, int rescan);
>
> Channel, id, lun, rescan? WTF?
>
> Do you see any of this in the proprely implemented LU discovery
> code in the SAS discovery code I submitted?

Well there is this in sas_discover.h:

struct scsi_core_mapping {
int channel;
int id;
};
struct LU {
[...]
struct scsi_core_mapping map;

so if you use channel, id and scsilun_to_int() (or your SCSI_LUN
reimplementation of that) on your LUN structure, you have everything
necessary to interface to scsi_scan_target, yes.

You have to have this, otherwise you wouldn't be able to use
scsi_add_device in sas_scsi_host.c:sas_register_with_scsi().

Based on this it does look like your refusal to use scsi_scan_target is
based on ideological rather than technical objections.

It also looks like you have a bug in your id mapping code: you allocate
one id per lun, not per target, so you're going to run out pretty
quickly when you meet a device with actual logical units, since you hard
code max_ids to 128 in sas_port.c

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-12 19:55    [from the cache]
©2003-2011 Jasper Spaans