aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-19 19:31:03 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-19 19:31:03 -0500
commit44779149e91ec8e684be23e06dc05197e367a45f (patch)
treeef1f38740133466f08d12c0a497333d47ab8f7a4 /drivers
parent8ee3f402676bf59caa454b7171ae09c8ac136627 (diff)
parent17514e8a6f1836a5c95b1f18d2bc0493ad732cf0 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-cd.c4
-rw-r--r--drivers/ide/ide-disk.c2
-rw-r--r--drivers/ide/ide-floppy.c5
-rw-r--r--drivers/ide/ide-io.c6
-rw-r--r--drivers/ide/ide-tape.c5
-rw-r--r--drivers/ide/ide-taskfile.c27
-rw-r--r--drivers/ide/pci/sis5513.c1
-rw-r--r--drivers/ide/pci/via82cxxx.c30
8 files changed, 30 insertions, 50 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 421b62d900af..9455e42abb23 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -3510,8 +3510,8 @@ static void __exit ide_cdrom_exit(void)
3510{ 3510{
3511 driver_unregister(&ide_cdrom_driver.gen_driver); 3511 driver_unregister(&ide_cdrom_driver.gen_driver);
3512} 3512}
3513 3513
3514static int ide_cdrom_init(void) 3514static int __init ide_cdrom_init(void)
3515{ 3515{
3516 return driver_register(&ide_cdrom_driver.gen_driver); 3516 return driver_register(&ide_cdrom_driver.gen_driver);
3517} 3517}
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 1a45f75dc9b2..f4e3d3527b0e 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -1266,7 +1266,7 @@ static void __exit idedisk_exit (void)
1266 driver_unregister(&idedisk_driver.gen_driver); 1266 driver_unregister(&idedisk_driver.gen_driver);
1267} 1267}
1268 1268
1269static int idedisk_init (void) 1269static int __init idedisk_init(void)
1270{ 1270{
1271 return driver_register(&idedisk_driver.gen_driver); 1271 return driver_register(&idedisk_driver.gen_driver);
1272} 1272}
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 94c147b79a49..9e293c8063dc 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -2191,10 +2191,7 @@ static void __exit idefloppy_exit (void)
2191 driver_unregister(&idefloppy_driver.gen_driver); 2191 driver_unregister(&idefloppy_driver.gen_driver);
2192} 2192}
2193 2193
2194/* 2194static int __init idefloppy_init(void)
2195 * idefloppy_init will register the driver for each floppy.
2196 */
2197static int idefloppy_init (void)
2198{ 2195{
2199 printk("ide-floppy driver " IDEFLOPPY_VERSION "\n"); 2196 printk("ide-floppy driver " IDEFLOPPY_VERSION "\n");
2200 return driver_register(&idefloppy_driver.gen_driver); 2197 return driver_register(&idefloppy_driver.gen_driver);
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 5275cbb1afe9..ecfafcdafea4 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1629,12 +1629,6 @@ EXPORT_SYMBOL(ide_init_drive_cmd);
1629 * for the new rq to be completed. This is VERY DANGEROUS, and is 1629 * for the new rq to be completed. This is VERY DANGEROUS, and is
1630 * intended for careful use by the ATAPI tape/cdrom driver code. 1630 * intended for careful use by the ATAPI tape/cdrom driver code.
1631 * 1631 *
1632 * If action is ide_next, then the rq is queued immediately after
1633 * the currently-being-processed-request (if any), and the function
1634 * returns without waiting for the new rq to be completed. As above,
1635 * This is VERY DANGEROUS, and is intended for careful use by the
1636 * ATAPI tape/cdrom driver code.
1637 *
1638 * If action is ide_end, then the rq is queued at the end of the 1632 * If action is ide_end, then the rq is queued at the end of the
1639 * request queue, and the function returns immediately without waiting 1633 * request queue, and the function returns immediately without waiting
1640 * for the new rq to be completed. This is again intended for careful 1634 * for the new rq to be completed. This is again intended for careful
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 2069dd693c9f..7d7944ed4158 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -4916,10 +4916,7 @@ static void __exit idetape_exit (void)
4916 unregister_chrdev(IDETAPE_MAJOR, "ht"); 4916 unregister_chrdev(IDETAPE_MAJOR, "ht");
4917} 4917}
4918 4918
4919/* 4919static int __init idetape_init(void)
4920 * idetape_init will register the driver for each tape.
4921 */
4922static int idetape_init (void)
4923{ 4920{
4924 int error = 1; 4921 int error = 1;
4925 idetape_sysfs_class = class_create(THIS_MODULE, "ide_tape"); 4922 idetape_sysfs_class = class_create(THIS_MODULE, "ide_tape");
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 54f9639c2a8c..62ebefd6394a 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -51,8 +51,6 @@
51#include <asm/uaccess.h> 51#include <asm/uaccess.h>
52#include <asm/io.h> 52#include <asm/io.h>
53 53
54#define DEBUG_TASKFILE 0 /* unset when fixed */
55
56static void ata_bswap_data (void *buffer, int wcount) 54static void ata_bswap_data (void *buffer, int wcount)
57{ 55{
58 u16 *p = buffer; 56 u16 *p = buffer;
@@ -765,9 +763,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
765 ide_hwif_t *hwif = HWIF(drive); 763 ide_hwif_t *hwif = HWIF(drive);
766 task_struct_t *taskfile = (task_struct_t *) task->tfRegister; 764 task_struct_t *taskfile = (task_struct_t *) task->tfRegister;
767 hob_struct_t *hobfile = (hob_struct_t *) task->hobRegister; 765 hob_struct_t *hobfile = (hob_struct_t *) task->hobRegister;
768#if DEBUG_TASKFILE
769 u8 status;
770#endif
771 766
772 if (task->data_phase == TASKFILE_MULTI_IN || 767 if (task->data_phase == TASKFILE_MULTI_IN ||
773 task->data_phase == TASKFILE_MULTI_OUT) { 768 task->data_phase == TASKFILE_MULTI_OUT) {
@@ -778,19 +773,13 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
778 } 773 }
779 774
780 /* 775 /*
781 * (ks) Check taskfile in/out flags. 776 * (ks) Check taskfile in flags.
782 * If set, then execute as it is defined. 777 * If set, then execute as it is defined.
783 * If not set, then define default settings. 778 * If not set, then define default settings.
784 * The default values are: 779 * The default values are:
785 * write and read all taskfile registers (except data) 780 * read all taskfile registers (except data)
786 * write and read the hob registers (sector,nsector,lcyl,hcyl) 781 * read the hob registers (sector, nsector, lcyl, hcyl)
787 */ 782 */
788 if (task->tf_out_flags.all == 0) {
789 task->tf_out_flags.all = IDE_TASKFILE_STD_OUT_FLAGS;
790 if (drive->addressing == 1)
791 task->tf_out_flags.all |= (IDE_HOB_STD_OUT_FLAGS << 8);
792 }
793
794 if (task->tf_in_flags.all == 0) { 783 if (task->tf_in_flags.all == 0) {
795 task->tf_in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; 784 task->tf_in_flags.all = IDE_TASKFILE_STD_IN_FLAGS;
796 if (drive->addressing == 1) 785 if (drive->addressing == 1)
@@ -803,16 +792,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
803 hwif->OUTB(drive->ctl, IDE_CONTROL_REG); 792 hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
804 SELECT_MASK(drive, 0); 793 SELECT_MASK(drive, 0);
805 794
806#if DEBUG_TASKFILE
807 status = hwif->INB(IDE_STATUS_REG);
808 if (status & 0x80) {
809 printk("flagged_taskfile -> Bad status. Status = %02x. wait 100 usec ...\n", status);
810 udelay(100);
811 status = hwif->INB(IDE_STATUS_REG);
812 printk("flagged_taskfile -> Status = %02x\n", status);
813 }
814#endif
815
816 if (task->tf_out_flags.b.data) { 795 if (task->tf_out_flags.b.data) {
817 u16 data = taskfile->data + (hobfile->data << 8); 796 u16 data = taskfile->data + (hobfile->data << 8);
818 hwif->OUTW(data, IDE_DATA_REG); 797 hwif->OUTW(data, IDE_DATA_REG);
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 16b3e2d8bfb1..75a2253a3e68 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -87,6 +87,7 @@ static const struct {
87 u8 chipset_family; 87 u8 chipset_family;
88 u8 flags; 88 u8 flags;
89} SiSHostChipInfo[] = { 89} SiSHostChipInfo[] = {
90 { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 },
90 { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 }, 91 { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 },
91 { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 }, 92 { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 },
92 { "SiS733", PCI_DEVICE_ID_SI_733, ATA_100 }, 93 { "SiS733", PCI_DEVICE_ID_SI_733, ATA_100 },
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index cee2c374cd2f..7161ce0ef5aa 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -79,6 +79,7 @@ static struct via_isa_bridge {
79 u8 rev_max; 79 u8 rev_max;
80 u16 flags; 80 u16 flags;
81} via_isa_bridges[] = { 81} via_isa_bridges[] = {
82 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
82 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 83 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
83 { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 84 { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
84 { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 85 { "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
@@ -467,24 +468,35 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
467 hwif->drives[1].autodma = hwif->autodma; 468 hwif->drives[1].autodma = hwif->autodma;
468} 469}
469 470
470static ide_pci_device_t via82cxxx_chipset __devinitdata = { 471static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
471 .name = "VP_IDE", 472 { /* 0 */
472 .init_chipset = init_chipset_via82cxxx, 473 .name = "VP_IDE",
473 .init_hwif = init_hwif_via82cxxx, 474 .init_chipset = init_chipset_via82cxxx,
474 .channels = 2, 475 .init_hwif = init_hwif_via82cxxx,
475 .autodma = NOAUTODMA, 476 .channels = 2,
476 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, 477 .autodma = NOAUTODMA,
477 .bootable = ON_BOARD, 478 .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
479 .bootable = ON_BOARD
480 },{ /* 1 */
481 .name = "VP_IDE",
482 .init_chipset = init_chipset_via82cxxx,
483 .init_hwif = init_hwif_via82cxxx,
484 .channels = 2,
485 .autodma = AUTODMA,
486 .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
487 .bootable = ON_BOARD,
488 }
478}; 489};
479 490
480static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) 491static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
481{ 492{
482 return ide_setup_pci_device(dev, &via82cxxx_chipset); 493 return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]);
483} 494}
484 495
485static struct pci_device_id via_pci_tbl[] = { 496static struct pci_device_id via_pci_tbl[] = {
486 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 497 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
487 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 498 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
499 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
488 { 0, }, 500 { 0, },
489}; 501};
490MODULE_DEVICE_TABLE(pci, via_pci_tbl); 502MODULE_DEVICE_TABLE(pci, via_pci_tbl);