Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123524
b: refs/heads/master
c: 702c026
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Dec 29, 2008
1 parent 6bec1ad commit 19a4fd5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 54 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: b7876a6fb6e9bf6cbcf7b40cf034aa4138d7978f
refs/heads/master: 702c026be87ef8374ae58122969a4b0b081ce6f2
8 changes: 1 addition & 7 deletions trunk/drivers/ide/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
/* various tuning parameters */
#define HPT_RESET_STATE_ENGINE
#undef HPT_DELAY_INTERRUPT
#define HPT_SERIALIZE_IO 0

static const char *quirk_drives[] = {
"QUANTUM FIREBALLlct08 08",
Expand Down Expand Up @@ -1288,7 +1287,6 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif)
static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
{
struct hpt_info *info = hpt3xx_get_info(hwif->dev);
int serialize = HPT_SERIALIZE_IO;
u8 chip_type = info->chip_type;

/* Cache the channel's MISC. control registers' offset */
Expand All @@ -1305,13 +1303,9 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
* Clock is shared between the channels,
* so we'll have to serialize them... :-(
*/
serialize = 1;
hwif->host->host_flags |= IDE_HFLAG_SERIALIZE;
hwif->rw_disk = &hpt3xxn_rw_disk;
}

/* Serialize access to this device if needed */
if (serialize && hwif->mate)
hwif->serialized = hwif->mate->serialized = 1;
}

static int __devinit init_dma_hpt366(ide_hwif_t *hwif,
Expand Down
50 changes: 5 additions & 45 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,31 +863,6 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
}
}

/*
* save_match() is used to simplify logic in init_irq() below.
*
* A loophole here is that we may not know about a particular
* hwif's irq until after that hwif is actually probed/initialized..
* This could be a problem for the case where an hwif is on a
* dual interface that requires serialization (eg. cmd640) and another
* hwif using one of the same irqs is initialized beforehand.
*
* This routine detects and reports such situations, but does not fix them.
*/
static void save_match(ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match)
{
ide_hwif_t *m = *match;

if (m && m->hwgroup && m->hwgroup != new->hwgroup) {
if (!new->hwgroup)
return;
printk(KERN_WARNING "%s: potential IRQ problem with %s and %s\n",
hwif->name, new->name, m->name);
}
if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */
*match = new;
}

/*
* init request queue
*/
Expand Down Expand Up @@ -1052,26 +1027,13 @@ static int init_irq (ide_hwif_t *hwif)
mutex_lock(&ide_cfg_mtx);
hwif->hwgroup = NULL;

/*
* Group up with any other hwifs that share our irq(s).
*/
for (index = 0; index < MAX_HWIFS; index++) {
ide_hwif_t *h = ide_ports[index];

if (h && h->hwgroup) { /* scan only initialized ports */
if (hwif->irq == h->irq) {
if (hwif->chipset != ide_pci ||
h->chipset != ide_pci) {
save_match(hwif, h, &match);
}
}
if (hwif->serialized) {
if (hwif->mate && hwif->mate->irq == h->irq)
save_match(hwif, h, &match);
}
if (h->serialized) {
if (h->mate && hwif->irq == h->mate->irq)
save_match(hwif, h, &match);
if (hwif->host->host_flags & IDE_HFLAG_SERIALIZE) {
if (hwif->host == h->host)
match = h;
}
}
}
Expand Down Expand Up @@ -1437,10 +1399,8 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
}

if ((d->host_flags & IDE_HFLAG_SERIALIZE) ||
((d->host_flags & IDE_HFLAG_SERIALIZE_DMA) && hwif->dma_base)) {
if (hwif->mate)
hwif->mate->serialized = hwif->serialized = 1;
}
((d->host_flags & IDE_HFLAG_SERIALIZE_DMA) && hwif->dma_base))
hwif->host->host_flags |= IDE_HFLAG_SERIALIZE;

if (d->max_sectors)
hwif->rqsize = d->max_sectors;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ typedef struct hwif_s {
unsigned extra_ports; /* number of extra dma ports */

unsigned present : 1; /* this interface exists */
unsigned serialized : 1; /* serialized all channel operation */
unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */

struct device gendev;
Expand Down

0 comments on commit 19a4fd5

Please sign in to comment.