Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183150
b: refs/heads/master
c: 859faa8
h: refs/heads/master
v: v3
  • Loading branch information
Sergei Shtylyov authored and Jeff Garzik committed Mar 1, 2010
1 parent 80e8b8c commit ccab5cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a1b172b9672e88d37adb5925b509e9236625d7e
refs/heads/master: 859faa875ed6760fcdfaf6f1fec1155a7e43dc21
17 changes: 4 additions & 13 deletions trunk/drivers/ata/pata_hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_hpt366"
#define DRV_VERSION "0.6.7"
#define DRV_VERSION "0.6.8"

struct hpt_clock {
u8 xfer_mode;
Expand Down Expand Up @@ -207,17 +207,8 @@ static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
{
struct hpt_clock *clocks = ap->host->private_data;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u32 addr1 = 0x40 + 4 * (adev->devno + 2 * ap->port_no);
u32 addr2 = 0x51 + 4 * ap->port_no;
u32 addr = 0x40 + 4 * adev->devno;
u32 mask, reg;
u8 fast;

/* Fast interrupt prediction disable, hold off interrupt disable */
pci_read_config_byte(pdev, addr2, &fast);
if (fast & 0x80) {
fast &= ~0x80;
pci_write_config_byte(pdev, addr2, fast);
}

/* determine timing mask and find matching clock entry */
if (mode < XFER_MW_DMA_0)
Expand All @@ -240,9 +231,9 @@ static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
* on-chip PIO FIFO/buffer (and PIO MST mode as well) to avoid
* problems handling I/O errors later.
*/
pci_read_config_dword(pdev, addr1, &reg);
pci_read_config_dword(pdev, addr, &reg);
reg = ((reg & ~mask) | (clocks->timing & mask)) & ~0xc0000000;
pci_write_config_dword(pdev, addr1, reg);
pci_write_config_dword(pdev, addr, reg);
}

/**
Expand Down

0 comments on commit ccab5cd

Please sign in to comment.