Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269351
b: refs/heads/master
c: 4780c0b
h: refs/heads/master
i:
  269349: 10dd36d
  269347: 09c4dc9
  269343: 57c7c1c
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Oct 14, 2011
1 parent 3851940 commit f6f0fd6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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: 11e872a3e1e93ba00e5ec04a74c4d2fe3e14e708
refs/heads/master: 4780c0b25e3f9d77122fb03ca000d3aa53992677
20 changes: 10 additions & 10 deletions trunk/drivers/ata/pata_it8213.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev)
{
unsigned int pio = adev->pio_mode - XFER_PIO_0;
struct pci_dev *dev = to_pci_dev(ap->host->dev);
unsigned int idetm_port= ap->port_no ? 0x42 : 0x40;
u16 idetm_data;
unsigned int master_port = ap->port_no ? 0x42 : 0x40;
u16 master_data;
int control = 0;

/*
Expand All @@ -100,19 +100,19 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev)
if (adev->class != ATA_DEV_ATA)
control |= 4; /* PPE */

pci_read_config_word(dev, idetm_port, &idetm_data);
pci_read_config_word(dev, master_port, &master_data);

/* Set PPE, IE, and TIME as appropriate */
if (adev->devno == 0) {
idetm_data &= 0xCCF0;
idetm_data |= control;
idetm_data |= (timings[pio][0] << 12) |
master_data &= 0xCCF0;
master_data |= control;
master_data |= (timings[pio][0] << 12) |
(timings[pio][1] << 8);
} else {
u8 slave_data;

idetm_data &= 0xFF0F;
idetm_data |= (control << 4);
master_data &= 0xFF0F;
master_data |= (control << 4);

/* Slave timing in separate register */
pci_read_config_byte(dev, 0x44, &slave_data);
Expand All @@ -121,8 +121,8 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev)
pci_write_config_byte(dev, 0x44, slave_data);
}

idetm_data |= 0x4000; /* Ensure SITRE is set */
pci_write_config_word(dev, idetm_port, idetm_data);
master_data |= 0x4000; /* Ensure SITRE is set */
pci_write_config_word(dev, master_port, master_data);
}

/**
Expand Down

0 comments on commit f6f0fd6

Please sign in to comment.