From: Christoph Hellwig <hch@infradead.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: james.bottomley@suse.de, dave.jiang@intel.com,
linux-scsi@vger.kernel.org, jacek.danecki@intel.com,
ed.ciechanowski@intel.com, jeffrey.d.skirvin@intel.com,
edmund.nadolski@intel.com
Subject: Re: [RFC PATCH 1/6] isci: initialization
Date: Fri, 18 Mar 2011 12:51:07 -0400 [thread overview]
Message-ID: <20110318165107.GA10206@infradead.org> (raw)
In-Reply-To: <20110207003440.27040.22825.stgit@localhost6.localdomain6>
> + /*
> + * Since this is a legacy interrupt, either or both
> + * controllers could have triggered it. Thus, we have to call
> + * the legacy interrupt handler for all controllers on the
> + * PCI function.
> + */
> + for_each_isci_host(isci_host, pdev) {
Just one request_irq for each host, and the core irq layer will handle
it fine.
> +static inline struct isci_pci_info *to_pci_info(struct pci_dev *pdev)
> +{
> + return pci_get_drvdata(pdev);
> +}
Pretty pointless as pci_get_drvdata returns a void pointer, which you can
assign directly to a struct isci_pci_info *
> +static inline
> +enum isci_status isci_host_get_state(
> + struct isci_host *isci_host)
> +{
> + return isci_host->status;
> +}
Completely pointless.
> +/**
> + * isci_host_scan_start() -
> + *
> + * This function is one of the SCSI Host Template function, called by the SCSI
> + * mid layer berfore a target scan begins. The core library controller start
> + * routine is called from here.
> + */
Why do you have pseudo-kerneldoc comments in the headers? That's not
going to be parserd by the kerneldoc tools and just confuses everyone.
> +static int __devinit isci_pci_probe(
> + struct pci_dev *pdev,
> + const struct pci_device_id *device_id_p);
> +
> +static void __devexit isci_pci_remove(struct pci_dev *pdev);
Just move the pci_driver table behing the implementation.
> +#if defined(CONFIG_PBG_HBA_A0)
> +int isci_si_rev = ISCI_SI_REVA0;
> +#elif defined(CONFIG_PBG_HBA_A2)
> +int isci_si_rev = ISCI_SI_REVA2;
> +#else
> +int isci_si_rev = ISCI_SI_REVB0;
> +#endif
> +module_param(isci_si_rev, int, S_IRUGO | S_IWUSR);
> +MODULE_PARM_DESC(isci_si_rev, "override default si rev (0: A0 1: A2 2: B0)");
The revision needs to be in the device specific structure, not a global
variable.
> +/******************************************************************************
> +* P R O T E C T E D M E T H O D S
> +******************************************************************************/
Err, no..
> +/**
> + * isci_register_sas_ha() - This method initializes various lldd
> + * specific members of the sas_ha struct and calls the libsas
> + * sas_register_ha() function.
> + * @isci_host: This parameter specifies the lldd specific wrapper for the
> + * libsas sas_ha struct.
> + *
> + * This method returns an error code indicating sucess or failure. The user
> + * should check for possible memory allocation error return otherwise, a zero
> + * indicates success.
> + */
It's not a method but a function. And the documentation really doesn't
tell anything worthwhile while we're at it.
> +static void isci_unregister_sas_ha(struct isci_host *isci_host)
> +{
> + if (!isci_host)
> + return;
How could this happen?
> +/**
> + * This file contains the isci_module object definition.
> + *
> + * isci.h
> + */
Ok, and what exactly does this comment try to tell us?
> +
> +#if !defined(_SCI_MODULE_H_)
> +#define _SCI_MODULE_H_
> +
> +/**
> + * This file contains the SCI low level driver interface to the SCI and Libsas
> + * Libraries.
> + *
> + * isci.h
> + */
Or this one just five lines later?
next prev parent reply other threads:[~2011-03-18 16:51 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 0:34 [RFC PATCH 0/6] isci: initial driver release (part1: intro and lldd) Dan Williams
2011-02-07 0:34 ` [RFC PATCH 1/6] isci: initialization Dan Williams
2011-02-17 8:22 ` Jeff Garzik
2011-02-19 0:12 ` Dan Williams
2011-02-17 8:25 ` Christoph Hellwig
2011-02-19 0:23 ` Dan Williams
2011-03-04 23:35 ` James Bottomley
2011-03-08 1:51 ` Dan Williams
2011-03-18 16:51 ` Christoph Hellwig [this message]
2011-02-07 0:34 ` [RFC PATCH 2/6] isci: task (libsas interface support) Dan Williams
2011-02-09 15:01 ` David Milburn
2011-02-14 7:14 ` Dan Williams
2011-02-16 18:48 ` David Milburn
2011-02-16 19:35 ` David Milburn
2011-02-07 0:34 ` [RFC PATCH 3/6] isci: request (core request infrastructure) Dan Williams
2011-03-18 16:41 ` Christoph Hellwig
2011-02-07 0:34 ` [RFC PATCH 4/6] isci: hardware / topology event handling Dan Williams
2011-03-18 16:18 ` Christoph Hellwig
2011-03-23 8:15 ` Dan Williams
2011-03-23 8:40 ` Christoph Hellwig
2011-03-23 9:04 ` Dan Williams
2011-03-23 9:08 ` Christoph Hellwig
2011-03-24 0:07 ` Dan Williams
2011-03-24 6:26 ` Christoph Hellwig
2011-03-25 0:57 ` Dan Williams
2011-03-25 19:45 ` Christoph Hellwig
2011-03-25 21:39 ` Dan Williams
2011-03-25 22:07 ` Christoph Hellwig
2011-03-25 22:34 ` Dan Williams
2011-03-27 22:28 ` Christoph Hellwig
2011-03-29 1:11 ` Dan Williams
2011-03-30 0:37 ` Dan Williams
2011-02-07 0:35 ` [RFC PATCH 5/6] isci: phy, port, and remote device Dan Williams
2011-02-07 0:35 ` [RFC PATCH 6/6] isci: sata support and phy settings via request_firmware() Dan Williams
2011-02-07 7:58 ` [RFC PATCH 1/6] isci: initialization jack_wang
2011-02-14 7:49 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110318165107.GA10206@infradead.org \
--to=hch@infradead.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ed.ciechanowski@intel.com \
--cc=edmund.nadolski@intel.com \
--cc=jacek.danecki@intel.com \
--cc=james.bottomley@suse.de \
--cc=jeffrey.d.skirvin@intel.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).