2003-05-12 22:29:33

by Mukker, Atul

[permalink] [raw]
Subject: unique entry points for all driver hosts

Why doesn't mid-layer allow LLDs to specify separate entry points to various
hosts attached to the same driver. Like some other entries in the Scsi Host
Template, entry points should also allowed to be overridden.


Thanks

-Atul Mukker
Storage Systems
LSI Logic Corporation


2003-05-12 23:23:11

by Mike Anderson

[permalink] [raw]
Subject: Re: unique entry points for all driver hosts

Mukker, Atul [[email protected]] wrote:
> Why doesn't mid-layer allow LLDs to specify separate entry points to various
> hosts attached to the same driver. Like some other entries in the Scsi Host
> Template, entry points should also allowed to be overridden.
>
>
> Thanks

Is there a issue you are hitting of common host template functions and
selecting unique host instance functions using hostdata?

-andmike
--
Michael Anderson
[email protected]

2003-05-13 05:24:57

by Christoph Hellwig

[permalink] [raw]
Subject: Re: unique entry points for all driver hosts

On Mon, May 12, 2003 at 06:41:50PM -0400, Mukker, Atul wrote:
> Why doesn't mid-layer allow LLDs to specify separate entry points to various
> hosts attached to the same driver.

Just declare multiple host templates. If you use sccsi_add_host instead
of the crufty obsolete interfaces it'll work out nicely.

2003-05-13 13:31:16

by Mukker, Atul

[permalink] [raw]
Subject: RE: unique entry points for all driver hosts

> > Why doesn't mid-layer allow LLDs to specify separate entry
> > points to various
> > hosts attached to the same driver. Like some other entries
> > in the Scsi Host
> > Template, entry points should also allowed to be overridden.
>
> Is there a issue you are hitting of common host template functions and
> selecting unique host instance functions using hostdata?

No, We simply want to have unique hot-path entry point (queuecommand) and
error handling hooks for each class of supported hosts. This is required
because these classes of controllers have disparate queue and error handling
mechanisms.

The work around we have today is to have common queue routine for example.
This queue routine then routes the scsi packet to appropriate host's
queuecommand hook using hostdata information.

looks like it is limiting to have a 'driver' specific structure(SHT) instead
of a self sufficient host-centric view (struct Scsi_Host).

IMHO, declaring multiple SHTs as suggested by Christoph Hellwig may not be a
good idea since it might appear like a hack, would lose the "template"
ideology and is not object-oriented :-)

Host structure would be best place to have pointers to these hooks as well.

-Atul Mukker


> -----Original Message-----
> From: Mike Anderson [mailto:[email protected]]
> Sent: Monday, May 12, 2003 7:38 PM
> To: Mukker, Atul
> Cc: [email protected]; [email protected]
> Subject: Re: unique entry points for all driver hosts
>
>
> Mukker, Atul [[email protected]] wrote:
> > Why doesn't mid-layer allow LLDs to specify separate entry
> points to various
> > hosts attached to the same driver. Like some other entries
> in the Scsi Host
> > Template, entry points should also allowed to be overridden.
> >
> >
> > Thanks
>
> Is there a issue you are hitting of common host template functions and
> selecting unique host instance functions using hostdata?
>
> -andmike
> --
> Michael Anderson
> [email protected]
>

2003-05-13 14:56:28

by Christoph Hellwig

[permalink] [raw]
Subject: Re: unique entry points for all driver hosts

On Tue, May 13, 2003 at 09:43:52AM -0400, Mukker, Atul wrote:
> IMHO, declaring multiple SHTs as suggested by Christoph Hellwig may not be a
> good idea since it might appear like a hack, would lose the "template"
> ideology and is not object-oriented :-)

The linux kernel is a pragmatic mix of procedural and object oriented
concepts, if you want ideology please look elsewhere. The template is
exactly a template for multiple hosts and if you driver supports different
enouigh boards you need multiple templates - it's pretty simple. Not that
the template is used much at all..

> Host structure would be best place to have pointers to these hooks as well.

This is right but not how the linux scsi stack was written. Removing them
now causes more pain then it would solve - just live with the extra indirection.