diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-29 14:27:36 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-29 14:27:36 -0500 |
commit | 702c026be87ef8374ae58122969a4b0b081ce6f2 (patch) | |
tree | d8ea68e4c85dd648d7b4ede14831dac1deac6300 /drivers/ide/hpt366.c | |
parent | b7876a6fb6e9bf6cbcf7b40cf034aa4138d7978f (diff) |
ide: rework handling of serialized ports (v2)
* hpt366: set IDE_HFLAG_SERIALIZE in ->host_flags if needed
in init_hwif_hpt366(). Remove HPT_SERIALIZE_IO while at it.
* Set IDE_HFLAG_SERIALIZE in ->host_flags if needed in
ide_init_port().
* Convert init_irq() to use IDE_HFLAG_SERIALIZE together with
hwif->host to find out ports which need to be serialized.
* Remove no longer needed save_match() and ide_hwif_t.serialized.
v2:
* Set host's ->host_flags field instead of port's copy.
This patch should fix the incorrect grouping of port(s) from
host(s) that need serialization with port(s) that happen to use
the same IRQ(s) but are from the host(s) that don't need it.
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/hpt366.c')
-rw-r--r-- | drivers/ide/hpt366.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index f5afd46ed51c..b18e10d99d2e 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c | |||
@@ -135,7 +135,6 @@ | |||
135 | /* various tuning parameters */ | 135 | /* various tuning parameters */ |
136 | #define HPT_RESET_STATE_ENGINE | 136 | #define HPT_RESET_STATE_ENGINE |
137 | #undef HPT_DELAY_INTERRUPT | 137 | #undef HPT_DELAY_INTERRUPT |
138 | #define HPT_SERIALIZE_IO 0 | ||
139 | 138 | ||
140 | static const char *quirk_drives[] = { | 139 | static const char *quirk_drives[] = { |
141 | "QUANTUM FIREBALLlct08 08", | 140 | "QUANTUM FIREBALLlct08 08", |
@@ -1288,7 +1287,6 @@ static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) | |||
1288 | static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | 1287 | static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) |
1289 | { | 1288 | { |
1290 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); | 1289 | struct hpt_info *info = hpt3xx_get_info(hwif->dev); |
1291 | int serialize = HPT_SERIALIZE_IO; | ||
1292 | u8 chip_type = info->chip_type; | 1290 | u8 chip_type = info->chip_type; |
1293 | 1291 | ||
1294 | /* Cache the channel's MISC. control registers' offset */ | 1292 | /* Cache the channel's MISC. control registers' offset */ |
@@ -1305,13 +1303,9 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | |||
1305 | * Clock is shared between the channels, | 1303 | * Clock is shared between the channels, |
1306 | * so we'll have to serialize them... :-( | 1304 | * so we'll have to serialize them... :-( |
1307 | */ | 1305 | */ |
1308 | serialize = 1; | 1306 | hwif->host->host_flags |= IDE_HFLAG_SERIALIZE; |
1309 | hwif->rw_disk = &hpt3xxn_rw_disk; | 1307 | hwif->rw_disk = &hpt3xxn_rw_disk; |
1310 | } | 1308 | } |
1311 | |||
1312 | /* Serialize access to this device if needed */ | ||
1313 | if (serialize && hwif->mate) | ||
1314 | hwif->serialized = hwif->mate->serialized = 1; | ||
1315 | } | 1309 | } |
1316 | 1310 | ||
1317 | static int __devinit init_dma_hpt366(ide_hwif_t *hwif, | 1311 | static int __devinit init_dma_hpt366(ide_hwif_t *hwif, |