diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-25 19:57:42 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-10-01 16:03:38 -0400 |
commit | 7b75b990e3cb33fd529640d589e77950e72a607c (patch) | |
tree | 1e282b2af06644587687f02d86419f604d87a907 /drivers/scsi/aic7xxx/aic79xx_inline.h | |
parent | 02a0fa676cd453ce4254c2eee838307ffc5c37f4 (diff) |
[SCSI] aic7xxx: fix byte I/O order in ahd_inw
Comment says "Read high byte first as some registers increment..."
but code doesn't guarantee that, I think:
return ((ahd_inb(ahd, port+1) << 8) | ahd_inb(ahd, port));
Compiler can reorder it.
Make the order explicit.
Signed-off-by: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Fixed rejections and added aic7xxx code
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_inline.h')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_inline.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_inline.h b/drivers/scsi/aic7xxx/aic79xx_inline.h index 8ad3ce945b9e..a3266e066c00 100644 --- a/drivers/scsi/aic7xxx/aic79xx_inline.h +++ b/drivers/scsi/aic7xxx/aic79xx_inline.h | |||
@@ -527,7 +527,8 @@ ahd_inw(struct ahd_softc *ahd, u_int port) | |||
527 | * or have other side effects when the low byte is | 527 | * or have other side effects when the low byte is |
528 | * read. | 528 | * read. |
529 | */ | 529 | */ |
530 | return ((ahd_inb(ahd, port+1) << 8) | ahd_inb(ahd, port)); | 530 | uint16_t r = ahd_inb(ahd, port+1) << 8; |
531 | return r | ahd_inb(ahd, port); | ||
531 | } | 532 | } |
532 | 533 | ||
533 | static __inline void | 534 | static __inline void |