History

Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6

Linus Torvalds committed 20 years ago

Commit 44779142 parents 8ee3f40 17514e811 files · +36 −78Browse files

Unified · Split

11 files
  1. drivers/ide/ide-cd.c +2 −2
  2. drivers/ide/ide-disk.c +1 −1
  3. drivers/ide/ide-floppy.c +1 −4
  4. drivers/ide/ide-io.c +0 −6
  5. drivers/ide/ide-tape.c +1 −4
  6. drivers/ide/ide-taskfile.c +3 −24
  7. drivers/ide/pci/sis5513.c +1 −0
  8. drivers/ide/pci/via82cxxx.c +21 −9
  9. include/linux/hdreg.h +4 −2
  10. include/linux/ide.h +0 −26
  11. include/linux/pci_ids.h +2 −0
drivers/ide/ide-cd.c+2−2
@@ -3510,8 +3510,8 @@ static void __exit ide_cdrom_exit(void) · 3509 unmodified lines
35103510 {
35113511 driver_unregister(&ide_cdrom_driver.gen_driver);
35123512 }
3513−
3514−static int ide_cdrom_init(void)
3513+
3514+static int __init ide_cdrom_init(void)
35153515 {
35163516 return driver_register(&ide_cdrom_driver.gen_driver);
35173517 }
drivers/ide/ide-disk.c+1−1
@@ -1266,7 +1266,7 @@ static void __exit idedisk_exit (void) · 1265 unmodified lines
12661266 driver_unregister(&idedisk_driver.gen_driver);
12671267 }
12681268
1269−static int idedisk_init (void)
1269+static int __init idedisk_init(void)
12701270 {
12711271 return driver_register(&idedisk_driver.gen_driver);
12721272 }
drivers/ide/ide-floppy.c+1−4
@@ -2191,10 +2191,7 @@ static void __exit idefloppy_exit (void) · 2190 unmodified lines
21912191 driver_unregister(&idefloppy_driver.gen_driver);
21922192 }
21932193
2194−/*
2195− * idefloppy_init will register the driver for each floppy.
2196− */
2197−static int idefloppy_init (void)
2194+static int __init idefloppy_init(void)
21982195 {
21992196 printk("ide-floppy driver " IDEFLOPPY_VERSION "\n");
22002197 return driver_register(&idefloppy_driver.gen_driver);
drivers/ide/ide-io.c+0−6
@@ -1629,12 +1629,6 @@ EXPORT_SYMBOL(ide_init_drive_cmd); · 1628 unmodified lines
16291629 * for the new rq to be completed. This is VERY DANGEROUS, and is
16301630 * intended for careful use by the ATAPI tape/cdrom driver code.
16311631 *
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− *
16381632 * If action is ide_end, then the rq is queued at the end of the
16391633 * request queue, and the function returns immediately without waiting
16401634 * for the new rq to be completed. This is again intended for careful
drivers/ide/ide-tape.c+1−4
@@ -4916,10 +4916,7 @@ static void __exit idetape_exit (void) · 4915 unmodified lines
49164916 unregister_chrdev(IDETAPE_MAJOR, "ht");
49174917 }
49184918
4919−/*
4920− * idetape_init will register the driver for each tape.
4921− */
4922−static int idetape_init (void)
4919+static int __init idetape_init(void)
49234920 {
49244921 int error = 1;
49254922 idetape_sysfs_class = class_create(THIS_MODULE, "ide_tape");
drivers/ide/ide-taskfile.c+3−24
@@ -51,8 +51,6 @@ · 50 unmodified lines
5151 #include <asm/uaccess.h>
5252 #include <asm/io.h>
5353
54−#define DEBUG_TASKFILE 0 /* unset when fixed */
55−
5654 static void ata_bswap_data (void *buffer, int wcount)
5755 {
5856 u16 *p = buffer;
@@ -765,9 +763,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) · 706 unmodified lines
765763 ide_hwif_t *hwif = HWIF(drive);
766764 task_struct_t *taskfile = (task_struct_t *) task->tfRegister;
767765 hob_struct_t *hobfile = (hob_struct_t *) task->hobRegister;
768−#if DEBUG_TASKFILE
769− u8 status;
770−#endif
771766
772767 if (task->data_phase == TASKFILE_MULTI_IN ||
773768 task->data_phase == TASKFILE_MULTI_OUT) {
@@ -778,19 +773,13 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) · 4 unmodified lines
778773 }
779774
780775 /*
781− * (ks) Check taskfile in/out flags.
776+ * (ks) Check taskfile in flags.
782777 * If set, then execute as it is defined.
783778 * If not set, then define default settings.
784779 * The default values are:
785− * write and read all taskfile registers (except data)
786− * write and read the hob registers (sector,nsector,lcyl,hcyl)
780+ * read all taskfile registers (except data)
781+ * read the hob registers (sector, nsector, lcyl, hcyl)
787782 */
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−
794783 if (task->tf_in_flags.all == 0) {
795784 task->tf_in_flags.all = IDE_TASKFILE_STD_IN_FLAGS;
796785 if (drive->addressing == 1)
@@ -803,16 +792,6 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) · 6 unmodified lines
803792 hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
804793 SELECT_MASK(drive, 0);
805794
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−
816795 if (task->tf_out_flags.b.data) {
817796 u16 data = taskfile->data + (hobfile->data << 8);
818797 hwif->OUTW(data, IDE_DATA_REG);
drivers/ide/pci/sis5513.c+1−0
@@ -87,6 +87,7 @@ static const struct { · 86 unmodified lines
8787 u8 chipset_family;
8888 u8 flags;
8989 } SiSHostChipInfo[] = {
90+ { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 },
9091 { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 },
9192 { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 },
9293 { "SiS733", PCI_DEVICE_ID_SI_733, ATA_100 },
drivers/ide/pci/via82cxxx.c+21−9
@@ -79,6 +79,7 @@ static struct via_isa_bridge { · 78 unmodified lines
7979 u8 rev_max;
8080 u16 flags;
8181 } via_isa_bridges[] = {
82+ { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
8283 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
8384 { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
8485 { "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) · 382 unmodified lines
467468 hwif->drives[1].autodma = hwif->autodma;
468469 }
469470
470−static ide_pci_device_t via82cxxx_chipset __devinitdata = {
471− .name = "VP_IDE",
472− .init_chipset = init_chipset_via82cxxx,
473− .init_hwif = init_hwif_via82cxxx,
474− .channels = 2,
475− .autodma = NOAUTODMA,
476− .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
477− .bootable = ON_BOARD,
471+static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = {
472+ { /* 0 */
473+ .name = "VP_IDE",
474+ .init_chipset = init_chipset_via82cxxx,
475+ .init_hwif = init_hwif_via82cxxx,
476+ .channels = 2,
477+ .autodma = NOAUTODMA,
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+ }
478489 };
479490
480491 static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
481492 {
482− return ide_setup_pci_device(dev, &via82cxxx_chipset);
493+ return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]);
483494 }
484495
485496 static struct pci_device_id via_pci_tbl[] = {
486497 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
487498 { 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},
488500 { 0, },
489501 };
490502 MODULE_DEVICE_TABLE(pci, via_pci_tbl);
include/linux/hdreg.h+4−2
@@ -80,10 +80,12 @@ · 79 unmodified lines
8080 /*
8181 * Define standard taskfile in/out register
8282 */
83−#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
8483 #define IDE_TASKFILE_STD_IN_FLAGS 0xFE
85−#define IDE_HOB_STD_OUT_FLAGS 0x3C
8684 #define IDE_HOB_STD_IN_FLAGS 0x3C
85+#ifndef __KERNEL__
86+#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
87+#define IDE_HOB_STD_OUT_FLAGS 0x3C
88+#endif
8789
8890 typedef unsigned char task_ioreg_t;
8991 typedef unsigned long sata_ioreg_t;
include/linux/ide.h+0−26
@@ -1201,37 +1201,11 @@ extern u64 ide_get_error_location(ide_drive_t *, char *); · 1200 unmodified lines
12011201 */
12021202 typedef enum {
12031203 ide_wait, /* insert rq at end of list, and wait for it */
1204− ide_next, /* insert rq immediately after current request */
12051204 ide_preempt, /* insert rq in front of current request */
12061205 ide_head_wait, /* insert rq in front of current request and wait for it */
12071206 ide_end /* insert rq at end of list, but don't wait for it */
12081207 } ide_action_t;
12091208
1210−/*
1211− * This function issues a special IDE device request
1212− * onto the request queue.
1213− *
1214− * If action is ide_wait, then the rq is queued at the end of the
1215− * request queue, and the function sleeps until it has been processed.
1216− * This is for use when invoked from an ioctl handler.
1217− *
1218− * If action is ide_preempt, then the rq is queued at the head of
1219− * the request queue, displacing the currently-being-processed
1220− * request and this function returns immediately without waiting
1221− * for the new rq to be completed. This is VERY DANGEROUS, and is
1222− * intended for careful use by the ATAPI tape/cdrom driver code.
1223− *
1224− * If action is ide_next, then the rq is queued immediately after
1225− * the currently-being-processed-request (if any), and the function
1226− * returns without waiting for the new rq to be completed. As above,
1227− * This is VERY DANGEROUS, and is intended for careful use by the
1228− * ATAPI tape/cdrom driver code.
1229− *
1230− * If action is ide_end, then the rq is queued at the end of the
1231− * request queue, and the function returns immediately without waiting
1232− * for the new rq to be completed. This is again intended for careful
1233− * use by the ATAPI tape/cdrom driver code.
1234− */
12351209 extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t);
12361210
12371211 /*
include/linux/pci_ids.h+2−0
@@ -620,6 +620,7 @@ · 619 unmodified lines
620620 #define PCI_DEVICE_ID_SI_961 0x0961
621621 #define PCI_DEVICE_ID_SI_962 0x0962
622622 #define PCI_DEVICE_ID_SI_963 0x0963
623+#define PCI_DEVICE_ID_SI_965 0x0965
623624 #define PCI_DEVICE_ID_SI_5511 0x5511
624625 #define PCI_DEVICE_ID_SI_5513 0x5513
625626 #define PCI_DEVICE_ID_SI_5518 0x5518
@@ -1234,6 +1235,7 @@ · 608 unmodified lines
12341235 #define PCI_DEVICE_ID_VIA_8703_51_0 0x3148
12351236 #define PCI_DEVICE_ID_VIA_8237_SATA 0x3149
12361237 #define PCI_DEVICE_ID_VIA_XN266 0x3156
1238+#define PCI_DEVICE_ID_VIA_6410 0x3164
12371239 #define PCI_DEVICE_ID_VIA_8754C_0 0x3168
12381240 #define PCI_DEVICE_ID_VIA_8235 0x3177
12391241 #define PCI_DEVICE_ID_VIA_8385_0 0x3188