Re: [PATCH 2.6.13 14/14] sas-class: SCSI Host glue

From: James Bottomley (James.Bottomley_at_SteelEye.com)
Date: 09/10/05

  • Next message: David Brownell: "Re: SPI redux ... [refresh 1/2]"
    To: Luben Tuikov <luben_tuikov@adaptec.com>
    Date:	Fri, 09 Sep 2005 18:35:49 -0500
    
    

    On Fri, 2005-09-09 at 15:42 -0400, Luben Tuikov wrote:
    > +static const struct scsi_host_template sas_host_template = {
    > + .module = THIS_MODULE,
    > + /* .name is initialized */
    > + .name = "",
    > + .queuecommand = sas_queuecommand,
    > + .eh_strategy_handler = sas_scsi_recover_host,
    > + .eh_timed_out = sas_scsi_timed_out,
    > + .slave_alloc = sas_slave_alloc,
    > + .slave_configure = sas_slave_configure,
    > + .slave_destroy = sas_slave_destroy,
    > + .change_queue_depth = sas_change_queue_depth,
    > + .change_queue_type = sas_change_queue_type,
    > + .bios_param = sas_bios_param,
    > + /* .can_queue is initialized */
    > + .this_id = -1,
    > + .sg_tablesize = SG_ALL,
    > + .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
    > + /* .cmd_per_lun is initilized to .can_queue */
    > + .use_clustering = ENABLE_CLUSTERING,
    > +};

    You can't do something like this and be generic. You intercept all of
    the slave_* calls and try to provide the template.

    This has produced a class that might wrapper nicely around the aic94xx
    but it won't attach nicely to any other SAS driver.

    You can't decide what table size and alignment your drivers are going to
    have because not all will conform to them. I already know that SATA (ex
    ATA) vendors are getting into the SAS market ... they have particularly
    weird SG allocation and alignment requirements for some of their stuff.

    To be an actual transport class, aside from actually using the transport
    class infrastructure, the code actually has to provide common routines
    that a class of drivers can use.

    There's already an embryonic SAS class working its way through the SCSI
    list. Could you look at enhancing that instead of trying to produce a
    competing class?

    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/


  • Next message: David Brownell: "Re: SPI redux ... [refresh 1/2]"

    Relevant Pages

    • Re: [ANNOUNCE 0/2] Serial Attached SCSI (SAS) support for the Linux kernel
      ... >> SAS transport class I posted, ... Just in case it was clear: I'm paid for this transport class by Dell. ... And we still want to cover it with a common base for what we ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.10-rc2 on VAIO laptop and PowerMac 8500/G3
      ... fbdev layer broke some of those old drivers. ... VT mode data structure, the driver is now sort-of supposed to re-invent ... but I suppose I'll have to fix controlfb (and platinumfb ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: Driver Model 2 Proposal - Linux Kernel Performance v Usability
      ... I agree that it is an extra interface ... > Windows has many faults but drivers are often compatible across ... common users in the Windows world can't handle installing a driver any better than they would be able to in Linux. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [Bug 1412] Copy from USB1 CF/SM reader stalls, no actual content is read (only directory structu
      ... For drivers like this that aren't performance critical and ... > depends on the capabilities of the USB host controller that our device ... and if the result is 0 then calling kmap() ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: HighPoint 374
      ... > I'm using two seagates, one Samsung and one Maxtor, ... > drivers, pretty much everything that does not relate directly to the IDE ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)