diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-13 17:48:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-13 17:48:14 -0400 |
commit | 7c22a3d853804d2716ef4f90cdd693a83819ba11 (patch) | |
tree | b0f5f71166c85e4178d9b3658be9a2ab35591bd6 | |
parent | 0cb60efd03ed82d02f44a14594714367e59e8abc (diff) | |
parent | 97b697a11b07e2ebfa69c488132596cc5eb24119 (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] LBA28/LBA48 off-by-one bug in ata.h
sata_inic162x: enable LED blinking
ata: duplicate variable sparse warning
-rw-r--r-- | drivers/ata/ata_piix.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_inic162x.c | 3 | ||||
-rw-r--r-- | include/linux/ata.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index b1d08a8f5003..e6b4606e36b6 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -1499,7 +1499,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev, | |||
1499 | * off. | 1499 | * off. |
1500 | */ | 1500 | */ |
1501 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x2652) { | 1501 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x2652) { |
1502 | int rc = piix_disable_ahci(pdev); | 1502 | rc = piix_disable_ahci(pdev); |
1503 | if (rc) | 1503 | if (rc) |
1504 | return rc; | 1504 | return rc; |
1505 | } | 1505 | } |
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c index 3ead02fe379e..5032c32fa505 100644 --- a/drivers/ata/sata_inic162x.c +++ b/drivers/ata/sata_inic162x.c | |||
@@ -96,6 +96,7 @@ enum { | |||
96 | PORT_SCR = 0x20, | 96 | PORT_SCR = 0x20, |
97 | 97 | ||
98 | /* HOST_CTL bits */ | 98 | /* HOST_CTL bits */ |
99 | HCTL_LEDEN = (1 << 3), /* enable LED operation */ | ||
99 | HCTL_IRQOFF = (1 << 8), /* global IRQ off */ | 100 | HCTL_IRQOFF = (1 << 8), /* global IRQ off */ |
100 | HCTL_FTHD0 = (1 << 10), /* fifo threshold 0 */ | 101 | HCTL_FTHD0 = (1 << 10), /* fifo threshold 0 */ |
101 | HCTL_FTHD1 = (1 << 11), /* fifo threshold 1*/ | 102 | HCTL_FTHD1 = (1 << 11), /* fifo threshold 1*/ |
@@ -540,7 +541,7 @@ static unsigned int inic_qc_issue(struct ata_queued_cmd *qc) | |||
540 | void __iomem *port_base = inic_port_base(ap); | 541 | void __iomem *port_base = inic_port_base(ap); |
541 | 542 | ||
542 | /* fire up the ADMA engine */ | 543 | /* fire up the ADMA engine */ |
543 | writew(HCTL_FTHD0, port_base + HOST_CTL); | 544 | writew(HCTL_FTHD0 | HCTL_LEDEN, port_base + HOST_CTL); |
544 | writew(IDMA_CTL_GO, port_base + PORT_IDMA_CTL); | 545 | writew(IDMA_CTL_GO, port_base + PORT_IDMA_CTL); |
545 | writeb(0, port_base + PORT_CPB_PTQFIFO); | 546 | writeb(0, port_base + PORT_CPB_PTQFIFO); |
546 | 547 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1ce19c1ef0e9..8a12d718c169 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -745,7 +745,7 @@ static inline int ata_ok(u8 status) | |||
745 | static inline int lba_28_ok(u64 block, u32 n_block) | 745 | static inline int lba_28_ok(u64 block, u32 n_block) |
746 | { | 746 | { |
747 | /* check the ending block number */ | 747 | /* check the ending block number */ |
748 | return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256); | 748 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); |
749 | } | 749 | } |
750 | 750 | ||
751 | static inline int lba_48_ok(u64 block, u32 n_block) | 751 | static inline int lba_48_ok(u64 block, u32 n_block) |