Skip to content

Commit

Permalink
pata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings
Browse files Browse the repository at this point in the history
* Don't program UDMA timings when programming PIO or MWDMA modes.

  This has also a nice side-effect of fixing regression added by commit
  681c80b ("libata: correct handling of
  SRST reset sequences") (->set_piomode method for PIO0 is called before
  ->cable_detect method which checks UDMA timings to get the cable type).

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tested-by: "Thomas Lindroth" <thomas.lindroth@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
bzolnier authored and Jeff Garzik committed Dec 4, 2007
1 parent 6ba8695 commit 943547a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions drivers/ata/pata_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_amd"
#define DRV_VERSION "0.3.9"
#define DRV_VERSION "0.3.10"

/**
* timing_setup - shared timing computation and load
Expand Down Expand Up @@ -115,7 +115,8 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse
}

/* UDMA timing */
pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t);
if (at.udma)
pci_write_config_byte(pdev, offset + 0x10 + (3 - dn), t);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#include <linux/dmi.h>

#define DRV_NAME "pata_via"
#define DRV_VERSION "0.3.2"
#define DRV_VERSION "0.3.3"

/*
* The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
Expand Down Expand Up @@ -296,7 +296,7 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
}

/* Set UDMA unless device is not UDMA capable */
if (udma_type) {
if (udma_type && t.udma) {
u8 cable80_status;

/* Get 80-wire cable detection bit */
Expand Down

0 comments on commit 943547a

Please sign in to comment.