From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: jack wang <jack_wang@usish.com>
Cc: James.Bottomley@suse.de, matthew@wil.cx,
linux-scsi@vger.kernel.org, lindar_liu@usish.com,
tom_peng@usish.com, 'aoqingy' <aoqingyun@usish.com>
Subject: Re: [RFC][PATCH v2]Add pm8001 SAS/SATA HBA driver
Date: Tue, 15 Sep 2009 08:07:35 +0200 [thread overview]
Message-ID: <200909150807.36222.eike-kernel@sf-tec.de> (raw)
In-Reply-To: <9A9AF0C219C5433DB5A8D61D4914C599@usish.com.cn>
[-- Attachment #1: Type: Text/Plain, Size: 2661 bytes --]
jack wang wrote:
> Hi, James
> Sorry for the late response. Here is our driver next send with review input
> from Matthew:
> 1 Big endian support is added but not test because lack of equipment.
> 2 IOCTL interface is replaced by sysfs.
> 3 Delete some unused debug info
> 4 Move Vendor id to pci_ids.h
> 5 Kconfig && Makefile modification
> Any comments and reviews will be appreciated
> Best wishes,
> Jack
>
Just a bunch of random things I found, I didn't look into everything yet:
-LOW_32_BITS/HIGH_32_BITS should be replaced by upper_32_bits/lower_32_bits
from linux/kernel.h
-there are at least 2 typos where "memory" is written as "memery"
+static void read_inbound_queue_table(struct pm8001_hba_info *pm8001_ha)
+{
+ int inbQ_num = 1;
+ u32 offset;
Can be declared inside the loop.
+ int i;
+ dma_addr_t address = pm8001_ha->inb_addr;
+ for (i = 0; i < inbQ_num; i++) {
+ offset = i * 0x24;
+ pm8001_ha->inb_data[i].pi_pci_bar =
+ get_pci_bar_index(pm8001_mr32(address, (offset + 0x14)));
This need more identation as it's a continued line.
+ pm8001_ha->inb_data[i].pi_offset =
+ pm8001_mr32(address, (offset + 0x18));
+ }
+}
-read_outbound_queue_table(): the same
+ * check_fw_ready - The LLDD check if the FW is ready, if not,wait as long
There is a space mising behind the last ","
+ /* wait until scratch pad 1 and 2 registers in ready state */
+ do {
+ mdelay(10);
+ value = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_1)
+ & SCRATCH_PAD1_RDY;
+ value1 = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_2)
+ & SCRATCH_PAD2_RDY;
+ if ((--max_wait_count) == 0)
+ break;
+ } while ((value != SCRATCH_PAD1_RDY) || (value1 != SCRATCH_PAD2_RDY));
+
+ if (!max_wait_count)
+ return -1;
+ return 0;
Why not directly "return -1" inside the loop?
+ /*This register is a 16-bit timer with a resolution of 1us. This is the
+ timer used for interrupt delay/coalescing in the PCIe Application Layer.
+ Zero is not a valid value.A value of 1 in the register will cause the
^
Space missing
+/**
+ *Function to do BAR shifting function is called to shift BAR base address
+ *
+ * @pm8001_ha handles for this instance of SAS/SATA hardware
+ * @shiftValue shifting value
+ *
+ * return success or fail
+ */
-you should use proper kerneldoc comments
-the description text duplicates itself somehow
+ return 0;
+}
+static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha)
+{
Newline missing.
There are some more of those I bet. I'll have to leave now, I'm sure someone
will take care of the rest.
Eike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-09-15 6:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-15 3:10 [RFC][PATCH v2]Add pm8001 SAS/SATA HBA driver jack wang
2009-09-15 6:07 ` Rolf Eike Beer [this message]
2009-09-16 3:27 ` jack wang
2009-09-24 21:04 ` James Bottomley
2009-09-28 1:41 ` lindar_liu
2009-10-02 21:15 ` James Bottomley
2009-10-07 14:08 ` jack wang
2009-10-09 10:01 ` jack wang
2009-10-10 2:37 ` Grant Grundler
2009-10-10 19:27 ` Rolf Eike Beer
2009-10-12 2:37 ` jack wang
2009-10-12 2:35 ` jack wang
2009-10-13 9:58 ` [RFC][PATCH v3]Add " jack wang
2009-10-13 11:05 ` Rolf Eike Beer
2009-10-14 8:19 ` [RFC][PATCH v4]Add " jack wang
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=200909150807.36222.eike-kernel@sf-tec.de \
--to=eike-kernel@sf-tec.de \
--cc=James.Bottomley@suse.de \
--cc=aoqingyun@usish.com \
--cc=jack_wang@usish.com \
--cc=lindar_liu@usish.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=tom_peng@usish.com \
/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