Commit 0f069788c32ea7af108c6032dfb0594cc718bde8

Authored by Alan Cox
Committed by Jeff Garzik
1 parent 0eaea364ed

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>

Showing 1 changed file with 4 additions and 5 deletions Side-by-side Diff

drivers/ata/pata_serverworks.c
... ... @@ -41,7 +41,7 @@
41 41 #include <linux/libata.h>
42 42  
43 43 #define DRV_NAME "pata_serverworks"
44   -#define DRV_VERSION "0.4.2"
  44 +#define DRV_VERSION "0.4.3"
45 45  
46 46 #define SVWKS_CSB5_REVISION_NEW 0x92 /* min PCI_REVISION_ID for UDMA5 (A2.0) */
47 47 #define SVWKS_CSB6_REVISION 0xa0 /* min PCI_REVISION_ID for UDMA4 (A1.0) */
... ... @@ -102,7 +102,7 @@
102 102 }
103 103  
104 104 /**
105   - * csb4_cable - CSB5/6 cable detect
  105 + * csb_cable - CSB5/6 cable detect
106 106 * @ap: ATA port to check
107 107 *
108 108 * Serverworks default arrangement is to use the drive side detection
... ... @@ -110,7 +110,7 @@
110 110 */
111 111  
112 112 static int csb_cable(struct ata_port *ap) {
113   - return ATA_CBL_PATA80;
  113 + return ATA_CBL_PATA_UNK;
114 114 }
115 115  
116 116 struct sv_cable_table {
... ... @@ -231,7 +231,6 @@
231 231 return ata_pci_default_filter(adev, mask);
232 232 }
233 233  
234   -
235 234 /**
236 235 * serverworks_set_piomode - set initial PIO mode data
237 236 * @ap: ATA interface
... ... @@ -243,7 +242,7 @@
243 242 static void serverworks_set_piomode(struct ata_port *ap, struct ata_device *adev)
244 243 {
245 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 246 int devbits = (2 * ap->port_no + adev->devno) * 4;
248 247 u16 csb5_pio;
249 248 struct pci_dev *pdev = to_pci_dev(ap->host->dev);