From: jack_wang <jack_wang@usish.com>
To: "Dan Williams" <dan.j.williams@intel.com>,
"james.bottomley" <james.bottomley@suse.de>
Cc: "dave.jiang" <dave.jiang@intel.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
"jacek.danecki" <jacek.danecki@intel.com>,
"ed.ciechanowski" <ed.ciechanowski@intel.com>,
"jeffrey.d.skirvin" <jeffrey.d.skirvin@intel.com>,
"edmund.nadolski" <edmund.nadolski@intel.com>
Subject: Re: [RFC PATCH 1/6] isci: initialization
Date: Mon, 7 Feb 2011 15:58:46 +0800 [thread overview]
Message-ID: <201102071558449371072@usish.com> (raw)
In-Reply-To: 20110207003056.27040.89174.stgit@localhost6.localdomain6
+
+ /**
+ * check interrupt_handler's status and call completion_handler if true,
+ * link_up events should be coming from the scu core lib, as phy's come
+ * online. for each link_up from the core, call
+ * get_received_identify_address_frame, copy the frame into the
+ * sas_phy object and call libsas notify_port_event(PORTE_BYTES_DMAED).
+ * continue to return zero from thee scan_finished routine until
[Jack] Here "thee" seams typo of "the"
+static struct coherent_memory_info *isci_host_alloc_mdl_struct(
+ struct isci_host *isci_host,
+ u32 size)
+{
+ struct coherent_memory_info *mdl_struct;
+ void *uncached_address = NULL;
+
+
+ mdl_struct = devm_kzalloc(&isci_host->pdev->dev,
+ sizeof(*mdl_struct),
+ GFP_KERNEL);
+ if (!mdl_struct)
+ return NULL;
+
+ INIT_LIST_HEAD(&mdl_struct->node);
+
+ uncached_address = dmam_alloc_coherent(&isci_host->pdev->dev,
+ size,
+ &mdl_struct->dma_handle,
+ GFP_KERNEL);
+ if (!uncached_address)
+ return NULL;
+
+ /* memset the whole memory area. */
+ memset((char *)uncached_address, 0, size);
[Jack] cast void * is not needed.
+ mdl_struct->vaddr = uncached_address;
+ mdl_struct->size = (size_t)size;
+
+ return mdl_struct;
+}
+
+static void isci_host_build_mde(
+ struct sci_physical_memory_descriptor *mde_struct,
+ struct coherent_memory_info *mdl_struct)
+{
+ unsigned long address = 0;
+ dma_addr_t dma_addr = 0;
+
+ address = (unsigned long)mdl_struct->vaddr;
[Jack] Why cast void vadd to usigned long? This may cause problem on x64.
+ dma_addr = mdl_struct->dma_handle;
+
+ /* to satisfy the alignment. */
+ if ((address % mde_struct->constant_memory_alignment) != 0) {
+ int align_offset
+ = (mde_struct->constant_memory_alignment
+ - (address % mde_struct->constant_memory_alignment));
+ address += align_offset;
+ dma_addr += align_offset;
+ }
+
+ mde_struct->virtual_address = (void *)address;
+ mde_struct->physical_address = dma_addr;
+ mdl_struct->mde = mde_struct;
+}
+
+
+ /* stop the comtroller and wait for completion. */
[Jack] controller.
+
+
+static inline struct isci_pci_info *to_pci_info(struct pci_dev *pdev)
+{
+ return pci_get_drvdata(pdev);
+}
+
[Jack] This wrap is not needed I think.
+static inline
+enum isci_status isci_host_get_state(
+ struct isci_host *isci_host)
+{
+ return isci_host->status;
+}
[Jack] This wrap is not needed too.
next prev parent reply other threads:[~2011-02-07 7:58 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
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 ` jack_wang [this message]
2011-02-14 7:49 ` [RFC PATCH 1/6] isci: initialization 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=201102071558449371072@usish.com \
--to=jack_wang@usish.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.