Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269342
b: refs/heads/master
c: e69a70d
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Oct 14, 2011
1 parent 42ff40a commit 1ada701
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5860a5545a308850fab11bd8dadd217973d3cc97
refs/heads/master: e69a70d951787013e5fe65e843edd5711571546c
37 changes: 7 additions & 30 deletions trunk/drivers/ata/pata_serverworks.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,14 @@ static const char *csb_bad_ata100[] = {
};

/**
* dell_cable - Dell serverworks cable detection
* oem_cable - Dell/Sun serverworks cable detection
* @ap: ATA port to do cable detect
*
* Dell hide the 40/80 pin select for their interfaces in the top two
* bits of the subsystem ID.
* Dell PowerEdge and Sun Cobalt 'Alpine' hide the 40/80 pin select
* for their interfaces in the top two bits of the subsystem ID.
*/

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)))
return ATA_CBL_PATA80;
return ATA_CBL_PATA40;
}

/**
* sun_cable - Sun Cobalt 'Alpine' cable detection
* @ap: ATA port to do cable select
*
* Cobalt CSB5 IDE hides the 40/80pin in the top two bits of the
* subsystem ID the same as dell. We could use one function but we may
* need to extend the Dell one in future
*/

static int sun_cable(struct ata_port *ap)
static int oem_cable(struct ata_port *ap)
{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);

Expand All @@ -98,15 +80,10 @@ struct sv_cable_table {
int (*cable_detect)(struct ata_port *ap);
};

/*
* Note that we don't copy the old serverworks code because the old
* code contains obvious mistakes
*/

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_CSB5IDE, PCI_VENDOR_ID_DELL, oem_cable },
{ PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_VENDOR_ID_DELL, oem_cable },
{ PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_VENDOR_ID_SUN, oem_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 },
Expand Down

0 comments on commit 1ada701

Please sign in to comment.