Skip to content

Commit

Permalink
[libata #pata-drivers] Trim trailing whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik committed Aug 31, 2006
1 parent 481ff12 commit 85cd725
Show file tree
Hide file tree
Showing 25 changed files with 456 additions and 456 deletions.
36 changes: 18 additions & 18 deletions drivers/ata/ata_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
* ata_generic.c - Generic PATA/SATA controller driver.
* Copyright 2005 Red Hat Inc <alan@redhat.com>, all rights reserved.
*
* Elements from ide/pci/generic.c
* Elements from ide/pci/generic.c
* Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
* Portions (C) Copyright 2002 Red Hat Inc <alan@redhat.com>
*
* May be copied or modified under the terms of the GNU General Public License
*
*
* Driver for PCI IDE interfaces implementing the standard bus mastering
* interface functionality. This assumes the BIOS did the drive set up and
* tuning for us. By default we do not grab all IDE class devices as they
* may have other drivers or need fixups to avoid problems. Instead we keep
* a default list of stuff without documentation/driver that appears to
* work.
* work.
*/

#include <linux/kernel.h>
Expand All @@ -38,7 +38,7 @@
*
* Set up cable type and use generic probe init
*/

static int generic_pre_reset(struct ata_port *ap)
{
ap->cbl = ATA_CBL_PATA80;
Expand All @@ -55,7 +55,7 @@ static int generic_pre_reset(struct ata_port *ap)
* None (inherited from caller).
*/


static void generic_error_handler(struct ata_port *ap)
{
ata_bmdma_drive_eh(ap, generic_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
Expand All @@ -68,9 +68,9 @@ static void generic_error_handler(struct ata_port *ap)
* Use a non standard set_mode function. We don't want to be tuned.
* The BIOS configured everything. Our job is not to fiddle. We
* read the dma enabled bits from the PCI configuration of the device
* and respect them.
* and respect them.
*/

static void generic_set_mode(struct ata_port *ap)
{
int dma_enabled = 0;
Expand All @@ -79,14 +79,14 @@ static void generic_set_mode(struct ata_port *ap)
/* Bits 5 and 6 indicate if DMA is active on master/slave */
if (ap->ioaddr.bmdma_addr)
dma_enabled = inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD);

for (i = 0; i < ATA_MAX_DEVICES; i++) {
struct ata_device *dev = &ap->device[i];
if (ata_dev_enabled(dev)) {
/* We don't really care */
dev->pio_mode = XFER_PIO_0;
dev->dma_mode = XFER_MW_DMA_0;
/* We do need the right mode information for DMA or PIO
/* We do need the right mode information for DMA or PIO
and this comes from the current configuration flags */
if (dma_enabled & (1 << (5 + i))) {
dev->xfer_mode = XFER_MW_DMA_0;
Expand Down Expand Up @@ -121,7 +121,7 @@ static struct scsi_host_template generic_sht = {

static struct ata_port_operations generic_port_ops = {
.set_mode = generic_set_mode,

.port_disable = ata_port_disable,
.tf_load = ata_tf_load,
.tf_read = ata_tf_read,
Expand All @@ -133,7 +133,7 @@ static struct ata_port_operations generic_port_ops = {
.bmdma_start = ata_bmdma_start,
.bmdma_stop = ata_bmdma_stop,
.bmdma_status = ata_bmdma_status,

.data_xfer = ata_pio_data_xfer,

.freeze = ata_bmdma_freeze,
Expand All @@ -150,8 +150,8 @@ static struct ata_port_operations generic_port_ops = {
.port_start = ata_port_start,
.port_stop = ata_port_stop,
.host_stop = ata_host_stop
};
};

static int all_generic_ide; /* Set to claim all devices */

/**
Expand All @@ -160,10 +160,10 @@ static int all_generic_ide; /* Set to claim all devices */
* @id: match entry
*
* Called each time a matching IDE interface is found. We check if the
* interface is one we wish to claim and if so we perform any chip
* interface is one we wish to claim and if so we perform any chip
* specific hacks then let the ATA layer do the heavy lifting.
*/

static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
u16 command;
Expand All @@ -176,7 +176,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
.port_ops = &generic_port_ops
};
static struct ata_port_info *port_info[2] = { &info, &info };

/* Don't use the generic entry unless instructed to do so */
if (id->driver_data == 1 && all_generic_ide == 0)
return -ENODEV;
Expand All @@ -197,7 +197,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
pci_read_config_word(dev, PCI_COMMAND, &command);
if (!(command & PCI_COMMAND_IO))
return -ENODEV;

if (dev->vendor == PCI_VENDOR_ID_AL)
ata_pci_clear_simplex(dev);

Expand All @@ -207,7 +207,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
static struct pci_device_id ata_generic[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), },
{ PCI_DEVICE(PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_6565), },
{ PCI_DEVICE(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8673F), },
{ PCI_DEVICE(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8673F), },
{ PCI_DEVICE(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886A), },
{ PCI_DEVICE(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF), },
{ PCI_DEVICE(PCI_VENDOR_ID_HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), },
Expand Down
36 changes: 18 additions & 18 deletions drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ enum {
ich6_sata_ahci = 8,
ich6m_sata_ahci = 9,
ich8_sata_ahci = 10,

/* constants for mapping table */
P0 = 0, /* port 0 */
P1 = 1, /* port 1 */
Expand Down Expand Up @@ -196,7 +196,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x24DB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_133 },
/* C-ICH (i810E2) */
{ 0x8086, 0x245B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* ESB (855GME/875P + 6300ESB) UDMA 100 */
/* ESB (855GME/875P + 6300ESB) UDMA 100 */
{ 0x8086, 0x25A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* ICH6 (and 6) (i915) UDMA 100 */
{ 0x8086, 0x266F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
Expand Down Expand Up @@ -458,7 +458,7 @@ static struct ata_port_info piix_port_info[] = {
.udma_mask = ATA_UDMA4,
.port_ops = &ich_pata_ops,
},

/* ich_pata_100: 3 */
{
.sht = &piix_sht,
Expand Down Expand Up @@ -759,7 +759,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)
u8 slave_data;
u8 udma_enable;
int control = 0;

/*
* See Intel Document 298600-004 for the timing programing rules
* for ICH controllers.
Expand All @@ -777,7 +777,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)
if (ata_pio_need_iordy(adev))
control |= 2; /* IE enable */

/* Intel specifies that the PPE functionality is for disk only */
/* Intel specifies that the PPE functionality is for disk only */
if (adev->class == ATA_DEV_ATA)
control |= 4; /* PPE enable */

Expand Down Expand Up @@ -806,7 +806,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)

/* Ensure the UDMA bit is off - it will be turned back on if
UDMA is selected */

if (ap->udma_mask) {
pci_read_config_byte(dev, 0x48, &udma_enable);
udma_enable &= ~(1 << (2 * ap->port_no + adev->devno));
Expand Down Expand Up @@ -835,7 +835,7 @@ static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, i
u8 speed = adev->dma_mode;
int devid = adev->devno + 2 * ap->port_no;
u8 udma_enable;

static const /* ISP RTC */
u8 timings[][2] = { { 0, 0 },
{ 0, 0 },
Expand All @@ -851,13 +851,13 @@ static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, i
u16 udma_timing;
u16 ideconf;
int u_clock, u_speed;

/*
* UDMA is handled by a combination of clock switching and
* selection of dividers
*
* selection of dividers
*
* Handy rule: Odd modes are UDMATIMx 01, even are 02
* except UDMA0 which is 00
* except UDMA0 which is 00
*/
u_speed = min(2 - (udma & 1), udma);
if (udma == 5)
Expand All @@ -866,16 +866,16 @@ static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, i
u_clock = 1; /* 66Mhz */
else
u_clock = 0; /* 33Mhz */

udma_enable |= (1 << devid);

/* Load the CT/RP selection */
pci_read_config_word(dev, 0x4A, &udma_timing);
udma_timing &= ~(3 << (4 * devid));
udma_timing |= u_speed << (4 * devid);
pci_write_config_word(dev, 0x4A, udma_timing);

if (isich) {
if (isich) {
/* Select a 33/66/100Mhz clock */
pci_read_config_word(dev, 0x54, &ideconf);
ideconf &= ~(0x1001 << devid);
Expand All @@ -897,12 +897,12 @@ static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, i
XFER_PIO_0, XFER_PIO_3, XFER_PIO_4
};
int pio = needed_pio[mwdma] - XFER_PIO_0;

control = 3; /* IORDY|TIME1 */

/* If the drive MWDMA is faster than it can do PIO then
we must force PIO into PIO0 */

if (adev->pio_mode < needed_pio[mwdma])
/* Enable DMA timing only */
control |= 8; /* PIO cycles in PIO0 */
Expand All @@ -916,7 +916,7 @@ static void do_pata_set_dmamode (struct ata_port *ap, struct ata_device *adev, i
slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << (ap->port_no ? 4 : 0);
pci_write_config_byte(dev, 0x44, slave_data);
} else { /* Master */
master_data &= 0xCCF4; /* Mask out IORDY|TIME1|DMAONLY
master_data &= 0xCCF4; /* Mask out IORDY|TIME1|DMAONLY
and master timing bits */
master_data |= control;
master_data |=
Expand Down
4 changes: 2 additions & 2 deletions drivers/ata/pata_ali.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static void ali_fifo_control(struct ata_port *ap, struct ata_device *adev, int o
/* ATA - FIFO on set nibble to 0x05, ATAPI - FIFO off, set nibble to
0x00. Not all the docs agree but the behaviour we now use is the
one stated in the BIOS Programming Guide */

pci_read_config_byte(pdev, pio_fifo, &fifo);
fifo &= ~(0x0F << shift);
if (on)
Expand Down Expand Up @@ -526,7 +526,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
.sht = &ali_sht,
.flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | ATA_FLAG_PIO_LBA48,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
.mwdma_mask = 0x07,
.udma_mask = 0x07, /* UDMA33 */
.port_ops = &ali_20_port_ops
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/pata_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int amd_pre_reset(struct ata_port *ap)

struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u8 ata66;

if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no])) {
ata_port_disable(ap);
printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
Expand Down
Loading

0 comments on commit 85cd725

Please sign in to comment.