Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1365078
| From | "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 20/31] scsi: use parity32 in isci/phy.c |
| Date | 2016-03-27 09:30 +0200 |
| Message-ID | <rhdj4-4RD-5@gated-at.bofh.it> (permalink) |
| References | <rg3ON-4FE-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
---
drivers/scsi/isci/phy.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index cb87b2e..0b87ff4 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -122,8 +122,6 @@ sci_phy_link_layer_initialization(struct isci_phy *iphy,
int phy_idx = iphy->phy_index;
struct sci_phy_cap phy_cap;
u32 phy_configuration;
- u32 parity_check = 0;
- u32 parity_count = 0;
u32 llctl, link_rate;
u32 clksm_value = 0;
u32 sp_timeouts = 0;
@@ -223,19 +221,11 @@ sci_phy_link_layer_initialization(struct isci_phy *iphy,
}
/* The SAS specification indicates that the phy_capabilities that
- * are transmitted shall have an even parity. Calculate the parity.
+ * are transmitted shall have an even parity. If parity indicates
+ * there are an odd number of bits set, then set the parity bit
+ * to 1 in the phy capabilities.
*/
- parity_check = phy_cap.all;
- while (parity_check != 0) {
- if (parity_check & 0x1)
- parity_count++;
- parity_check >>= 1;
- }
-
- /* If parity indicates there are an odd number of bits set, then
- * set the parity bit to 1 in the phy capabilities.
- */
- if ((parity_count % 2) != 0)
+ if (parity32(phy_cap.all))
phy_cap.parity = 1;
writel(phy_cap.all, &llr->phy_capabilities);
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 01/31] bitops: add parity functions Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com> - 2016-03-24 04:10 +0100
Re: [PATCH 01/31] bitops: add parity functions Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-24 09:40 +0100
Re: [PATCH 01/31] bitops: add parity functions Andrew Morton <akpm@linux-foundation.org> - 2016-03-24 23:30 +0100
Re: [PATCH 01/31] bitops: add parity functions Martin Kepplinger <martink@posteo.de> - 2016-03-26 23:10 +0100
Re: [PATCH 01/31] bitops: add parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 10:00 +0200
Re: [PATCH 01/31] bitops: add parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 05:40 +0200
Re: [PATCH 01/31] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-27 14:50 +0200
Re: [PATCH 01/31] bitops: add parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 15:40 +0200
Re: [PATCH 01/31] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-27 20:00 +0200
Re: [PATCH 01/31] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-28 04:50 +0200
Re: [PATCH 01/31] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-28 04:20 +0200
Re: [PATCH 01/31] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-28 09:00 +0200
Re: [PATCH 01/31] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-29 04:30 +0200
Re: [PATCH 01/31] bitops: add parity functions Joe Perches <joe@perches.com> - 2016-03-29 05:00 +0200
[PATCH 02/31] Include generic parity.h in some architectures' bitops.h "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 06:10 +0200
[PATCH 03/31] Add alpha-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 07:50 +0200
Re: [PATCH 03/31] Add alpha-specific parity functions Richard Henderson <rth@twiddle.net> - 2016-03-28 20:40 +0200
[PATCH 04/31] Add avr32-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 07:50 +0200
Re: [PATCH 04/31] Add avr32-specific parity functions Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> - 2016-03-28 22:10 +0200
[PATCH 05/31] Add blackfin-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:00 +0200
[PATCH 07/31] Add mips-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:10 +0200
Re: [PATCH 07/31] Add mips-specific parity functions David Daney <ddaney.cavm@gmail.com> - 2016-03-28 19:30 +0200
Re: [PATCH 07/31] Add mips-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-29 04:20 +0200
[PATCH 06/31] Add ia64-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:10 +0200
[PATCH 08/31] Add tile-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:20 +0200
[PATCH 09/31] Add powerpc-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:40 +0200
[PATCH 11/31] Add x86-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:50 +0200
Re: [PATCH 11/31] Add x86-specific parity functions One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-03-29 14:20 +0200
[PATCH 10/31] Add sparc-specific parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 08:50 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions David Miller <davem@davemloft.net> - 2016-03-28 04:50 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-03-28 07:50 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions David Miller <davem@davemloft.net> - 2016-03-28 17:30 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-03-28 17:40 +0200
Re: [PATCH 10/31] Add sparc-specific parity functions David Miller <davem@davemloft.net> - 2016-03-28 17:50 +0200
[PATCH 12/31] sunrpc: auth_gss: use parity8 "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:00 +0200
[PATCH 13/31] mips: use parity functions in cerr-sb1.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:00 +0200
[PATCH 15/31] media: use parity8 in vivid-vbi-gen.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:10 +0200
[PATCH 14/31] lib: bch: use parity32 "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:10 +0200
[PATCH 17/31] input: joystick: use parity32 in grip_mp.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 18/31] input: joystick: use parity64 in sidewinder.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 16/31] media: saa7115: use parity functions "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 19/31] input: serio: use parity16 in ams_delta_serio.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:20 +0200
[PATCH 22/31] mtd: use parity functions in inftlcore.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:30 +0200
[PATCH 21/31] mtd: use parity16 in ssfdc.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:30 +0200
Re: [PATCH 21/31] mtd: use parity16 in ssfdc.c Brian Norris <computersforpeace@gmail.com> - 2016-04-02 01:50 +0200
[PATCH 20/31] scsi: use parity32 in isci/phy.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:30 +0200
[PATCH 26/31] input: serio: use parity8 in pcips2.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
[PATCH 25/31] ethernet: use parity8 in sun/niu.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
Re: [PATCH 25/31] ethernet: use parity8 in sun/niu.c Michal Nazarewicz <mina86@mina86.com> - 2016-03-28 16:40 +0200
[PATCH 24/31] mtd: use parity16 in sm_ftl.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
[PATCH 23/31] crypto: qat: use parity functions in qat_hal.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:40 +0200
[PATCH 28/31] iio: gyro: use parity32 in adxrs450.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
Re: [PATCH 28/31] iio: gyro: use parity32 in adxrs450.c Jonathan Cameron <jic23@kernel.org> - 2016-03-28 10:40 +0200
Re: [PATCH 28/31] iio: gyro: use parity32 in adxrs450.c Lars-Peter Clausen <lars@metafoo.de> - 2016-03-28 11:30 +0200
[PATCH 29/31] serial: use parity32 in max3100.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
[PATCH 30/31] input: mouse: use parity8 in elantech "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
[PATCH 27/31] input: serio: use parity8 in sa1111ps2.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 09:50 +0200
[PATCH 31/31] ethernet: broadcom: use parity8 in tg3.c "zhaoxiu.zeng" <zhaoxiu.zeng@gmail.com> - 2016-03-27 10:00 +0200
csiph-web