diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-02 20:58:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-02 20:58:52 -0500 |
commit | bb648a0d22908116b4ef168935a160d7f17c4e6d (patch) | |
tree | 5ccb780a679433283ac7931d2bcbeb92828e443d /drivers/ata/pata_qdi.c | |
parent | 8b453397da923eae4aeb3b41e49793295e09eedf (diff) | |
parent | 6ffa01d88c9dd45e2ed917b5eeeb494d07efb1ab (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: add CONFIG_PM to libata core layer
libata: add missing CONFIG_PM in LLDs
libata: add missing PM callbacks
pata_qdi: Fix initialisation
[libata] pata_cmd64x: fix driver description in comments
[libata] pata_{legacy,sc1200,sl82c105}: add missing hooks
[libata] change master/slave IDENTIFY order
libata-core: Fix simplex handling
Diffstat (limited to 'drivers/ata/pata_qdi.c')
-rw-r--r-- | drivers/ata/pata_qdi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index c2f87da60336..c3810012f3f4 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -363,7 +363,8 @@ static __init int qdi_init(void) | |||
363 | release_region(port, 2); | 363 | release_region(port, 2); |
364 | continue; | 364 | continue; |
365 | } | 365 | } |
366 | ct += qdi_init_one(port, 6500, ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04); | 366 | if (qdi_init_one(port, 6500, ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04) == 0) |
367 | ct++; | ||
367 | } | 368 | } |
368 | if (((r & 0xF0) == 0xA0) || (r & 0xF0) == 0x50) { | 369 | if (((r & 0xF0) == 0xA0) || (r & 0xF0) == 0x50) { |
369 | /* QD6580: dual channel */ | 370 | /* QD6580: dual channel */ |
@@ -375,11 +376,14 @@ static __init int qdi_init(void) | |||
375 | res = inb(port + 3); | 376 | res = inb(port + 3); |
376 | if (res & 1) { | 377 | if (res & 1) { |
377 | /* Single channel mode */ | 378 | /* Single channel mode */ |
378 | ct += qdi_init_one(port, 6580, ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04); | 379 | if (qdi_init_one(port, 6580, ide_port[r & 0x01], ide_irq[r & 0x01], r & 0x04)) |
380 | ct++; | ||
379 | } else { | 381 | } else { |
380 | /* Dual channel mode */ | 382 | /* Dual channel mode */ |
381 | ct += qdi_init_one(port, 6580, 0x1F0, 14, r & 0x04); | 383 | if (qdi_init_one(port, 6580, 0x1F0, 14, r & 0x04) == 0) |
382 | ct += qdi_init_one(port + 2, 6580, 0x170, 15, r & 0x04); | 384 | ct++; |
385 | if (qdi_init_one(port + 2, 6580, 0x170, 15, r & 0x04) == 0) | ||
386 | ct++; | ||
383 | } | 387 | } |
384 | } | 388 | } |
385 | } | 389 | } |