diff options
-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) |