Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82059
b: refs/heads/master
c: 92ba5d0
h: refs/heads/master
i:
  82057: cf44d9f
  82055: 112f346
v: v3
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Feb 1, 2008
1 parent c2a34c3 commit 4fb5c35
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 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: 4a537a5518e81dba342eccbffcfa5c27cb5781d4
refs/heads/master: 92ba5d02d993ccf4a87b945779fe052f67c3c334
33 changes: 31 additions & 2 deletions trunk/drivers/ata/pata_sl82c105.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_sl82c105"
#define DRV_VERSION "0.3.2"
#define DRV_VERSION "0.3.3"

enum {
/*
Expand Down Expand Up @@ -206,6 +206,34 @@ static void sl82c105_bmdma_stop(struct ata_queued_cmd *qc)
sl82c105_set_piomode(ap, qc->dev);
}

/**
* sl82c105_qc_defer - implement serialization
* @qc: command
*
* We must issue one command per host not per channel because
* of the reset bug.
*
* Q: is the scsi host lock sufficient ?
*/

static int sl82c105_qc_defer(struct ata_queued_cmd *qc)
{
struct ata_host *host = qc->ap->host;
struct ata_port *alt = host->ports[1 ^ qc->ap->port_no];
int rc;

/* First apply the usual rules */
rc = ata_std_qc_defer(qc);
if (rc != 0)
return rc;

/* Now apply serialization rules. Only allow a command if the
other channel state machine is idle */
if (alt && alt->qc_active)
return ATA_DEFER_PORT;
return 0;
}

static struct scsi_host_template sl82c105_sht = {
.module = THIS_MODULE,
.name = DRV_NAME,
Expand Down Expand Up @@ -245,6 +273,7 @@ static struct ata_port_operations sl82c105_port_ops = {
.bmdma_stop = sl82c105_bmdma_stop,
.bmdma_status = ata_bmdma_status,

.qc_defer = sl82c105_qc_defer,
.qc_prep = ata_qc_prep,
.qc_issue = ata_qc_issue_prot,

Expand Down Expand Up @@ -312,7 +341,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
};
/* for now use only the first port */
const struct ata_port_info *ppi[] = { &info_early,
&ata_dummy_port_info };
NULL };
u32 val;
int rev;

Expand Down

0 comments on commit 4fb5c35

Please sign in to comment.