diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-05 16:50:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-05 16:50:49 -0500 |
commit | 3131e530ac3faf09fb0878a9dc4cd6df0e35b6a3 (patch) | |
tree | 9748b27196cbec3950cbec566f06680125ddb21b /drivers | |
parent | 41557e7c56dc96ddd0b068fe76d5118d516d4f04 (diff) | |
parent | bcbf6ee3eb5212ff774161cae15ce4f92f7edafb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide: fix IDE_HFLAG_NO_ATAPI_DMA handling in config_drive_for_dma()
ide: move ide_fixstring() documentation to ide-iops.c from ide.h
ide: add missing #ifdef/#endif CONFIG_IDE_TASK_IOCTL
ide: fix ide_find_dma_mode() to print human-readable info
ide: add missing rq.ref_count initialization to ide_diag_taskfile()
ide: clear HOB bit for REQ_TYPE_ATA_TASK requests in ide_end_drive_cmd()
ide: check rq->cmd_type in drive_cmd_intr()
ide/Kconfig: fix BLK_DEV_OFFBOARD dependencies
ide: unexport ide_fix_driveid
ide/Kconfig: add IDEDISK_MULTI_MODE text adapted from hdparm manual page
ide: do_identify() string termination fix
piix: add support for ICH7 on Acer 5602aWLMi
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/Kconfig | 22 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 3 | ||||
-rw-r--r-- | drivers/ide/pci/piix.c | 1 |
7 files changed, 38 insertions, 11 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 6eaece96524e..d1e8df187222 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -152,9 +152,22 @@ config BLK_DEV_IDEDISK | |||
152 | If unsure, say Y. | 152 | If unsure, say Y. |
153 | 153 | ||
154 | config IDEDISK_MULTI_MODE | 154 | config IDEDISK_MULTI_MODE |
155 | bool "Use multi-mode by default" | 155 | bool "Use multiple sector mode for Programmed Input/Output by default" |
156 | help | 156 | help |
157 | If you get this error, try to say Y here: | 157 | This setting is irrelevant for most IDE disks, with direct memory |
158 | access, to which multiple sector mode does not apply. Multiple sector | ||
159 | mode is a feature of most modern IDE hard drives, permitting the | ||
160 | transfer of multiple sectors per Programmed Input/Output interrupt, | ||
161 | rather than the usual one sector per interrupt. When this feature is | ||
162 | enabled, it can reduce operating system overhead for disk Programmed | ||
163 | Input/Output. On some systems, it also can increase the data | ||
164 | throughput of Programmed Input/Output. Some drives, however, seemed | ||
165 | to run slower with multiple sector mode enabled. Some drives claimed | ||
166 | to support multiple sector mode, but lost data at some settings. | ||
167 | Under rare circumstances, such failures could result in massive | ||
168 | filesystem corruption. | ||
169 | |||
170 | If you get the following error, try to say Y here: | ||
158 | 171 | ||
159 | hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } | 172 | hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } |
160 | hda: set_multmode: error=0x04 { DriveStatusError } | 173 | hda: set_multmode: error=0x04 { DriveStatusError } |
@@ -380,9 +393,10 @@ config IDEPCI_SHARE_IRQ | |||
380 | config IDEPCI_PCIBUS_ORDER | 393 | config IDEPCI_PCIBUS_ORDER |
381 | def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI | 394 | def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI |
382 | 395 | ||
396 | # TODO: split it on per host driver config options (or module parameters) | ||
383 | config BLK_DEV_OFFBOARD | 397 | config BLK_DEV_OFFBOARD |
384 | bool "Boot off-board chipsets first support" | 398 | bool "Boot off-board chipsets first support" |
385 | depends on BLK_DEV_IDEPCI | 399 | depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) |
386 | help | 400 | help |
387 | Normally, IDE controllers built into the motherboard (on-board | 401 | Normally, IDE controllers built into the motherboard (on-board |
388 | controllers) are assigned to ide0 and ide1 while those on add-in PCI | 402 | controllers) are assigned to ide0 and ide1 while those on add-in PCI |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 428f7a8a00b6..e3add70b9cd8 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -340,7 +340,7 @@ static int config_drive_for_dma (ide_drive_t *drive) | |||
340 | 340 | ||
341 | if (drive->media != ide_disk) { | 341 | if (drive->media != ide_disk) { |
342 | if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) | 342 | if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) |
343 | return -1; | 343 | return 0; |
344 | } | 344 | } |
345 | 345 | ||
346 | /* | 346 | /* |
@@ -752,7 +752,8 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode) | |||
752 | mode = XFER_MW_DMA_1; | 752 | mode = XFER_MW_DMA_1; |
753 | } | 753 | } |
754 | 754 | ||
755 | printk(KERN_DEBUG "%s: selected mode 0x%x\n", drive->name, mode); | 755 | printk(KERN_DEBUG "%s: %s mode selected\n", drive->name, |
756 | mode ? ide_xfer_verbose(mode) : "no DMA"); | ||
756 | 757 | ||
757 | return min(mode, req_mode); | 758 | return min(mode, req_mode); |
758 | } | 759 | } |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index c89f0d3058e9..755011827afa 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -340,6 +340,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
340 | if (args) { | 340 | if (args) { |
341 | args[0] = stat; | 341 | args[0] = stat; |
342 | args[1] = err; | 342 | args[1] = err; |
343 | /* be sure we're looking at the low order bits */ | ||
344 | hwif->OUTB(drive->ctl & ~0x80, IDE_CONTROL_REG); | ||
343 | args[2] = hwif->INB(IDE_NSECTOR_REG); | 345 | args[2] = hwif->INB(IDE_NSECTOR_REG); |
344 | args[3] = hwif->INB(IDE_SECTOR_REG); | 346 | args[3] = hwif->INB(IDE_SECTOR_REG); |
345 | args[4] = hwif->INB(IDE_LCYL_REG); | 347 | args[4] = hwif->INB(IDE_LCYL_REG); |
@@ -654,7 +656,8 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) | |||
654 | int retries = 10; | 656 | int retries = 10; |
655 | 657 | ||
656 | local_irq_enable_in_hardirq(); | 658 | local_irq_enable_in_hardirq(); |
657 | if ((stat & DRQ_STAT) && args && args[3]) { | 659 | if (rq->cmd_type == REQ_TYPE_ATA_CMD && |
660 | (stat & DRQ_STAT) && args && args[3]) { | ||
658 | u8 io_32bit = drive->io_32bit; | 661 | u8 io_32bit = drive->io_32bit; |
659 | drive->io_32bit = 0; | 662 | drive->io_32bit = 0; |
660 | hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS); | 663 | hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS); |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index dcda0f109df5..e17a9ee120ea 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -403,8 +403,12 @@ void ide_fix_driveid (struct hd_driveid *id) | |||
403 | #endif | 403 | #endif |
404 | } | 404 | } |
405 | 405 | ||
406 | /* FIXME: exported for use by the USB storage (isd200.c) code only */ | 406 | /* |
407 | EXPORT_SYMBOL(ide_fix_driveid); | 407 | * ide_fixstring() cleans up and (optionally) byte-swaps a text string, |
408 | * removing leading/trailing blanks and compressing internal blanks. | ||
409 | * It is primarily used to tidy up the model name/number fields as | ||
410 | * returned by the WIN_[P]IDENTIFY commands. | ||
411 | */ | ||
408 | 412 | ||
409 | void ide_fixstring (u8 *s, const int bytecount, const int byteswap) | 413 | void ide_fixstring (u8 *s, const int bytecount, const int byteswap) |
410 | { | 414 | { |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 6a6f2e066b46..56fb0b843429 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -172,11 +172,12 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) | |||
172 | ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap); | 172 | ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap); |
173 | ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap); | 173 | ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap); |
174 | 174 | ||
175 | /* we depend on this a lot! */ | ||
176 | id->model[sizeof(id->model)-1] = '\0'; | ||
177 | |||
175 | if (strstr(id->model, "E X A B Y T E N E S T")) | 178 | if (strstr(id->model, "E X A B Y T E N E S T")) |
176 | goto err_misc; | 179 | goto err_misc; |
177 | 180 | ||
178 | /* we depend on this a lot! */ | ||
179 | id->model[sizeof(id->model)-1] = '\0'; | ||
180 | printk("%s: %s, ", drive->name, id->model); | 181 | printk("%s: %s, ", drive->name, id->model); |
181 | drive->present = 1; | 182 | drive->present = 1; |
182 | drive->dead = 0; | 183 | drive->dead = 0; |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index d066546f2831..2b60f1b0437e 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -471,6 +471,7 @@ static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long | |||
471 | struct request rq; | 471 | struct request rq; |
472 | 472 | ||
473 | memset(&rq, 0, sizeof(rq)); | 473 | memset(&rq, 0, sizeof(rq)); |
474 | rq.ref_count = 1; | ||
474 | rq.cmd_type = REQ_TYPE_ATA_TASKFILE; | 475 | rq.cmd_type = REQ_TYPE_ATA_TASKFILE; |
475 | rq.buffer = buf; | 476 | rq.buffer = buf; |
476 | 477 | ||
@@ -511,6 +512,7 @@ int ide_raw_taskfile (ide_drive_t *drive, ide_task_t *args, u8 *buf) | |||
511 | 512 | ||
512 | EXPORT_SYMBOL(ide_raw_taskfile); | 513 | EXPORT_SYMBOL(ide_raw_taskfile); |
513 | 514 | ||
515 | #ifdef CONFIG_IDE_TASK_IOCTL | ||
514 | int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | 516 | int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) |
515 | { | 517 | { |
516 | ide_task_request_t *req_task; | 518 | ide_task_request_t *req_task; |
@@ -660,6 +662,7 @@ abort: | |||
660 | 662 | ||
661 | return err; | 663 | return err; |
662 | } | 664 | } |
665 | #endif | ||
663 | 666 | ||
664 | int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) | 667 | int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) |
665 | { | 668 | { |
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 9329d4a810e5..63625a0be712 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -302,6 +302,7 @@ struct ich_laptop { | |||
302 | 302 | ||
303 | static const struct ich_laptop ich_laptop[] = { | 303 | static const struct ich_laptop ich_laptop[] = { |
304 | /* devid, subvendor, subdev */ | 304 | /* devid, subvendor, subdev */ |
305 | { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ | ||
305 | { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ | 306 | { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ |
306 | { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ | 307 | { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ |
307 | { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ | 308 | { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ |