* [PATCH 1/3] pata_serverworks: use standard cable detection methods
@ 2011-10-11 18:09 Bartlomiej Zolnierkiewicz
2011-10-11 19:49 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-11 18:09 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, linux-kernel
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] pata_serverworks: use standard cable detection methods
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
earlier references:
https://lkml.org/lkml/2009/11/25/375
drivers/ata/pata_serverworks.c | 45 ++++++++++-------------------------------
1 file changed, 12 insertions(+), 33 deletions(-)
Index: b/drivers/ata/pata_serverworks.c
===================================================================
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -64,7 +64,8 @@ static const char *csb_bad_ata100[] = {
* bits of the subsystem ID.
*/
-static int dell_cable(struct ata_port *ap) {
+static int dell_cable(struct ata_port *ap)
+{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
if (pdev->subsystem_device & (1 << (ap->port_no + 14)))
@@ -81,7 +82,8 @@ static int dell_cable(struct ata_port *a
* need to extend the Dell one in future
*/
-static int sun_cable(struct ata_port *ap) {
+static int sun_cable(struct ata_port *ap)
+{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
if (pdev->subsystem_device & (1 << (ap->port_no + 14)))
@@ -89,29 +91,6 @@ static int sun_cable(struct ata_port *ap
return ATA_CBL_PATA40;
}
-/**
- * osb4_cable - OSB4 cable detect
- * @ap: ATA port to check
- *
- * The OSB4 isn't UDMA66 capable so this is easy
- */
-
-static int osb4_cable(struct ata_port *ap) {
- return ATA_CBL_PATA40;
-}
-
-/**
- * csb_cable - CSB5/6 cable detect
- * @ap: ATA port to check
- *
- * Serverworks default arrangement is to use the drive side detection
- * only.
- */
-
-static int csb_cable(struct ata_port *ap) {
- return ATA_CBL_PATA_UNK;
-}
-
struct sv_cable_table {
int device;
int subvendor;
@@ -124,14 +103,14 @@ struct sv_cable_table {
*/
static struct sv_cable_table cable_detect[] = {
- { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_DELL, dell_cable },
- { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_VENDOR_ID_DELL, dell_cable },
- { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_SUN, sun_cable },
- { PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, osb4_cable },
- { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, csb_cable },
- { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, csb_cable },
- { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, csb_cable },
- { PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, csb_cable },
+ { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_DELL, dell_cable },
+ { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_VENDOR_ID_DELL, dell_cable },
+ { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_SUN, sun_cable },
+ { PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, ata_cable_40wire },
+ { PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, ata_cable_unknown },
+ { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, ata_cable_unknown },
+ { PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, ata_cable_unknown },
+ { PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, ata_cable_unknown },
{ }
};
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] pata_serverworks: use standard cable detection methods
2011-10-11 18:09 [PATCH 1/3] pata_serverworks: use standard cable detection methods Bartlomiej Zolnierkiewicz
@ 2011-10-11 19:49 ` Alan Cox
2011-10-12 15:03 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2011-10-11 19:49 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Jeff Garzik, linux-ide, linux-kernel
On Tue, 11 Oct 2011 20:09:31 +0200
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] pata_serverworks: use standard cable detection methods
You forgot to explain why, or why you want to do this given its
explicitly contradictory to the supporting documentation.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] pata_serverworks: use standard cable detection methods
2011-10-11 19:49 ` Alan Cox
@ 2011-10-12 15:03 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2011-10-12 15:03 UTC (permalink / raw)
To: Alan Cox; +Cc: Jeff Garzik, linux-ide, linux-kernel
Alan Cox wrote:
> On Tue, 11 Oct 2011 20:09:31 +0200
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Subject: [PATCH] pata_serverworks: use standard cable detection methods
>
> You forgot to explain why, or why you want to do this given its
> explicitly contradictory to the supporting documentation.
The patch doesn't change this. It only makes use of standard cable
helper routines instead of open-coding driver specific ones (the driver
was added before generic cable helpers were available IIRC).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-12 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 18:09 [PATCH 1/3] pata_serverworks: use standard cable detection methods Bartlomiej Zolnierkiewicz
2011-10-11 19:49 ` Alan Cox
2011-10-12 15:03 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).