aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-01-19 10:52:56 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-23 05:24:17 -0500
commit0f069788c32ea7af108c6032dfb0594cc718bde8 (patch)
tree752f3d058ddb8900238d158fbbfcc4c1b18bb5f2 /drivers/ata
parent0eaea364edec4132fe42ef33fe87edb15f00507b (diff)
pata_serverworks: Fix cable types and cosmetics
Minor tidying up. Only real change is to return UNK not 80 wire when we don't know the cable type. This didn't use to matter but with Tejun's reworking of cable detection it may. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_serverworks.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 8bed88873720..9c523fbf529e 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -41,7 +41,7 @@
41#include <linux/libata.h> 41#include <linux/libata.h>
42 42
43#define DRV_NAME "pata_serverworks" 43#define DRV_NAME "pata_serverworks"
44#define DRV_VERSION "0.4.2" 44#define DRV_VERSION "0.4.3"
45 45
46#define SVWKS_CSB5_REVISION_NEW 0x92 /* min PCI_REVISION_ID for UDMA5 (A2.0) */ 46#define SVWKS_CSB5_REVISION_NEW 0x92 /* min PCI_REVISION_ID for UDMA5 (A2.0) */
47#define SVWKS_CSB6_REVISION 0xa0 /* min PCI_REVISION_ID for UDMA4 (A1.0) */ 47#define SVWKS_CSB6_REVISION 0xa0 /* min PCI_REVISION_ID for UDMA4 (A1.0) */
@@ -102,7 +102,7 @@ static int osb4_cable(struct ata_port *ap) {
102} 102}
103 103
104/** 104/**
105 * csb4_cable - CSB5/6 cable detect 105 * csb_cable - CSB5/6 cable detect
106 * @ap: ATA port to check 106 * @ap: ATA port to check
107 * 107 *
108 * Serverworks default arrangement is to use the drive side detection 108 * Serverworks default arrangement is to use the drive side detection
@@ -110,7 +110,7 @@ static int osb4_cable(struct ata_port *ap) {
110 */ 110 */
111 111
112static int csb_cable(struct ata_port *ap) { 112static int csb_cable(struct ata_port *ap) {
113 return ATA_CBL_PATA80; 113 return ATA_CBL_PATA_UNK;
114} 114}
115 115
116struct sv_cable_table { 116struct sv_cable_table {
@@ -231,7 +231,6 @@ static unsigned long serverworks_csb_filter(struct ata_device *adev, unsigned lo
231 return ata_pci_default_filter(adev, mask); 231 return ata_pci_default_filter(adev, mask);
232} 232}
233 233
234
235/** 234/**
236 * serverworks_set_piomode - set initial PIO mode data 235 * serverworks_set_piomode - set initial PIO mode data
237 * @ap: ATA interface 236 * @ap: ATA interface
@@ -243,7 +242,7 @@ static unsigned long serverworks_csb_filter(struct ata_device *adev, unsigned lo
243static void serverworks_set_piomode(struct ata_port *ap, struct ata_device *adev) 242static void serverworks_set_piomode(struct ata_port *ap, struct ata_device *adev)
244{ 243{
245 static const u8 pio_mode[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 }; 244 static const u8 pio_mode[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 };
246 int offset = 1 + (2 * ap->port_no) - adev->devno; 245 int offset = 1 + 2 * ap->port_no - adev->devno;
247 int devbits = (2 * ap->port_no + adev->devno) * 4; 246 int devbits = (2 * ap->port_no + adev->devno) * 4;
248 u16 csb5_pio; 247 u16 csb5_pio;
249 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 248 struct pci_dev *pdev = to_pci_dev(ap->host->dev);