Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 29 Feb 2008 16:27:32 +0000 (08:27 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 29 Feb 2008 16:27:32 +0000 (08:27 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: remove stale comments from ide-dma.c (take 2)
  ide: remove ide-tape documentation from Documentation/ide.txt
  qd65xx: remove commented out code
  ide-tape: schedule driver for removal after 6 months
  ide-disk: add missing printk() KERN_* levels
  ide: fix sparse warning about shadowing 'flags' symbol
  ide-cd: fix CD/DVD burning
  ide-cd: fix 'ireason' handling for REQ_TYPE_ATA_PC requests
  qd65xx: fix setup of QD6580 Control register
  ide: skip probing port if "hdx=noprobe" was used for both devices on it
  ide: remove redundant comment from ide_unregister()
  hpt366: fix section mismatch warnings
  ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive

Documentation/feature-removal-schedule.txt
Documentation/ide.txt
drivers/ide/ide-cd.c
drivers/ide/ide-disk.c
drivers/ide/ide-dma.c
drivers/ide/ide-probe.c
drivers/ide/ide-tape.c
drivers/ide/ide.c
drivers/ide/legacy/qd65xx.c
drivers/ide/pci/cmd640.c
drivers/ide/pci/hpt366.c

index 4d3aa519eadfc5cebea01e5244f0435702264319..ba899ff2a8f9b825b13808df694c6fe6c56642e0 100644 (file)
@@ -172,6 +172,16 @@ Who:       Len Brown <len.brown@intel.com>
 
 ---------------------------
 
+What:  ide-tape driver
+When:  July 2008
+Files: drivers/ide/ide-tape.c
+Why:   This driver might not have any users anymore and maintaining it for no
+       reason is an effort no one wants to make.
+Who:   Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, Borislav Petkov
+       <petkovbb@googlemail.com>
+
+---------------------------
+
 What: libata spindown skipping and warning
 When: Dec 2008
 Why:  Some halt(8) implementations synchronize caches for and spin
index 94e2e3b9e77f03ebcb0a3d0b146e53397a6fcfc0..bcd7cd1278efd285d456fe058d1774b5181d5a7b 100644 (file)
@@ -258,8 +258,6 @@ Summary of ide driver parameters for kernel command line
                          As for VLB, it is safest to not specify it.
                          Bigger values are safer than smaller ones.
 
- "idex=noprobe"                : do not attempt to access/use this interface
  "idex=base"           : probe for an interface at the addr specified,
                          where "base" is usually 0x1f0 or 0x170
                          and "ctl" is assumed to be "base"+0x206
@@ -307,53 +305,6 @@ Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb"
 kernel paremeter to enable probing for VLB version of the chipset (PCI ones
 are detected automatically).
 
-================================================================================
-
-IDE ATAPI streaming tape driver
--------------------------------
-
-This driver is a part of the Linux ide driver and works in co-operation
-with linux/drivers/block/ide.c.
-
-The driver, in co-operation with ide.c, basically traverses the
-request-list for the block device interface. The character device
-interface, on the other hand, creates new requests, adds them
-to the request-list of the block device, and waits for their completion.
-
-Pipelined operation mode is now supported on both reads and writes.
-
-The block device major and minor numbers are determined from the
-tape's relative position in the ide interfaces, as explained in ide.c.
-
-The character device interface consists of the following devices:
-
- ht0           major 37, minor 0       first  IDE tape, rewind on close.
- ht1           major 37, minor 1       second IDE tape, rewind on close.
- ...
- nht0          major 37, minor 128     first  IDE tape, no rewind on close.
- nht1          major 37, minor 129     second IDE tape, no rewind on close.
- ...
-
-Run /dev/MAKEDEV to create the above entries.
-
-The general magnetic tape commands compatible interface, as defined by
-include/linux/mtio.h, is accessible through the character device.
-
-General ide driver configuration options, such as the interrupt-unmask
-flag, can be configured by issuing an ioctl to the block device interface,
-as any other ide device.
-
-Our own ide-tape ioctl's can be issued to either the block device or
-the character device interface.
-
-Maximal throughput with minimal bus load will usually be achieved in the
-following scenario:
-
-       1.      ide-tape is operating in the pipelined operation mode.
-       2.      No buffering is performed by the user backup program.
-
-
-
 ================================================================================
 
 Some Terminology
index 310e497b58380d5d348c29d9d890204e1cf47edf..c8d0e8715997475abe51e683ee5b5aff2f44109c 100644 (file)
@@ -670,8 +670,8 @@ static void cdrom_buffer_sectors (ide_drive_t *drive, unsigned long sector,
  * and attempt to recover if there are problems.  Returns  0 if everything's
  * ok; nonzero if the request has been terminated.
  */
-static
-int ide_cd_check_ireason(ide_drive_t *drive, int len, int ireason, int rw)
+static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq,
+                               int len, int ireason, int rw)
 {
        /*
         * ireason == 0: the drive wants to receive data from us
@@ -701,6 +701,9 @@ int ide_cd_check_ireason(ide_drive_t *drive, int len, int ireason, int rw)
                                drive->name, __FUNCTION__, ireason);
        }
 
+       if (rq->cmd_type == REQ_TYPE_ATA_PC)
+               rq->cmd_flags |= REQ_FAILED;
+
        cdrom_end_request(drive, 0);
        return -1;
 }
@@ -1071,11 +1074,11 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
        /*
         * check which way to transfer data
         */
-       if (blk_fs_request(rq) || blk_pc_request(rq)) {
-               if (ide_cd_check_ireason(drive, len, ireason, write))
-                       return ide_stopped;
+       if (ide_cd_check_ireason(drive, rq, len, ireason, write))
+               return ide_stopped;
 
-               if (blk_fs_request(rq) && write == 0) {
+       if (blk_fs_request(rq)) {
+               if (write == 0) {
                        int nskip;
 
                        if (ide_cd_check_transfer_size(drive, len)) {
@@ -1101,16 +1104,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
        if (ireason == 0) {
                write = 1;
                xferfunc = HWIF(drive)->atapi_output_bytes;
-       } else if (ireason == 2 || (ireason == 1 &&
-                  (blk_fs_request(rq) || blk_pc_request(rq)))) {
+       } else {
                write = 0;
                xferfunc = HWIF(drive)->atapi_input_bytes;
-       } else {
-               printk(KERN_ERR "%s: %s: The drive "
-                               "appears confused (ireason = 0x%02x). "
-                               "Trying to recover by ending request.\n",
-                               drive->name, __FUNCTION__, ireason);
-               goto end_request;
        }
 
        /*
@@ -1182,11 +1178,10 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
                        else
                                rq->data += blen;
                }
+               if (!write && blk_sense_request(rq))
+                       rq->sense_len += blen;
        }
 
-       if (write && blk_sense_request(rq))
-               rq->sense_len += thislen;
-
        /*
         * pad, if necessary
         */
@@ -1931,6 +1926,7 @@ static const struct cd_list_entry ide_cd_quirks_list[] = {
        { "MATSHITADVD-ROM SR-8186", NULL,   IDE_CD_FLAG_PLAY_AUDIO_OK      },
        { "MATSHITADVD-ROM SR-8176", NULL,   IDE_CD_FLAG_PLAY_AUDIO_OK      },
        { "MATSHITADVD-ROM SR-8174", NULL,   IDE_CD_FLAG_PLAY_AUDIO_OK      },
+       { "Optiarc DVD RW AD-5200A", NULL,   IDE_CD_FLAG_PLAY_AUDIO_OK      },
        { NULL, NULL, 0 }
 };
 
index 8f5bed471050d955713f5d5230aa7327ad993dec..39501d130256109ad50d06a6b904249e9163f08a 100644 (file)
@@ -867,7 +867,7 @@ static void idedisk_setup (ide_drive_t *drive)
 
        /* Only print cache size when it was specified */
        if (id->buf_size)
-               printk (" w/%dKiB Cache", id->buf_size/2);
+               printk(KERN_CONT " w/%dKiB Cache", id->buf_size / 2);
 
        printk(KERN_CONT ", CHS=%d/%d/%d\n",
                         drive->bios_cyl, drive->bios_head, drive->bios_sect);
@@ -949,7 +949,8 @@ static void ide_device_shutdown(ide_drive_t *drive)
                return;
        }
 
-       printk("Shutdown: %s\n", drive->name);
+       printk(KERN_INFO "Shutdown: %s\n", drive->name);
+
        drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND);
 }
 
index d0e7b537353e38ea1bb23ff6f0604f0d93777752..2de99e4be5c9b963ebfbf263884d6f55f1d82d56 100644 (file)
@@ -1,9 +1,13 @@
 /*
+ *  IDE DMA support (including IDE PCI BM-DMA).
+ *
  *  Copyright (C) 1995-1998   Mark Lord
  *  Copyright (C) 1999-2000   Andre Hedrick <andre@linux-ide.org>
  *  Copyright (C) 2004, 2007  Bartlomiej Zolnierkiewicz
  *
  *  May be copied or modified under the terms of the GNU General Public License
+ *
+ *  DMA is supported for all IDE devices (disk drives, cdroms, tapes, floppies).
  */
 
 /*
  */
 
 /*
- * This module provides support for the bus-master IDE DMA functions
- * of various PCI chipsets, including the Intel PIIX (i82371FB for
- * the 430 FX chipset), the PIIX3 (i82371SB for the 430 HX/VX and 
- * 440 chipsets), and the PIIX4 (i82371AB for the 430 TX chipset)
- * ("PIIX" stands for "PCI ISA IDE Xcellerator").
- *
- * Pretty much the same code works for other IDE PCI bus-mastering chipsets.
- *
- * DMA is supported for all IDE devices (disk drives, cdroms, tapes, floppies).
- *
- * By default, DMA support is prepared for use, but is currently enabled only
- * for drives which already have DMA enabled (UltraDMA or mode 2 multi/single),
- * or which are recognized as "good" (see table below).  Drives with only mode0
- * or mode1 (multi/single) DMA should also work with this chipset/driver
- * (eg. MC2112A) but are not enabled by default.
- *
- * Use "hdparm -i" to view modes supported by a given drive.
- *
- * The hdparm-3.5 (or later) utility can be used for manually enabling/disabling
- * DMA support, but must be (re-)compiled against this kernel version or later.
- *
- * To enable DMA, use "hdparm -d1 /dev/hd?" on a per-drive basis after booting.
- * If problems arise, ide.c will disable DMA operation after a few retries.
- * This error recovery mechanism works and has been extremely well exercised.
- *
- * IDE drives, depending on their vintage, may support several different modes
- * of DMA operation.  The boot-time modes are indicated with a "*" in
- * the "hdparm -i" listing, and can be changed with *knowledgeable* use of
- * the "hdparm -X" feature.  There is seldom a need to do this, as drives
- * normally power-up with their "best" PIO/DMA modes enabled.
- *
- * Testing has been done with a rather extensive number of drives,
- * with Quantum & Western Digital models generally outperforming the pack,
- * and Fujitsu & Conner (and some Seagate which are really Conner) drives
- * showing more lackluster throughput.
- *
- * Keep an eye on /var/adm/messages for "DMA disabled" messages.
- *
- * Some people have reported trouble with Intel Zappa motherboards.
- * This can be fixed by upgrading the AMI BIOS to version 1.00.04.BS0,
- * available from ftp://ftp.intel.com/pub/bios/10004bs0.exe
- * (thanks to Glen Morrell <glen@spin.Stanford.edu> for researching this).
- *
  * Thanks to "Christopher J. Reimer" <reimer@doe.carleton.ca> for
  * fixing the problem with the BIOS on some Acer motherboards.
  *
  *
  * Most importantly, thanks to Robert Bringman <rob@mars.trion.com>
  * for supplying a Promise UDMA board & WD UDMA drive for this work!
- *
- * And, yes, Intel Zappa boards really *do* use both PIIX IDE ports.
- *
- * ATA-66/100 and recovery functions, I forgot the rest......
- *
  */
 
 #include <linux/module.h>
index 4a2cb28682263d6a3c3a861490dfbe770d96c2d6..194ecb0049eb1ed37c3dde4c00d3a83273c1dc88 100644 (file)
@@ -756,7 +756,8 @@ static int ide_probe_port(ide_hwif_t *hwif)
 
        BUG_ON(hwif->present);
 
-       if (hwif->noprobe)
+       if (hwif->noprobe ||
+           (hwif->drives[0].noprobe && hwif->drives[1].noprobe))
                return -EACCES;
 
        /*
index 0598ecfd5f3706b0402182875f324474361bbf5b..43e0e05577763b4bcd166dc4d14128dd94dac9d2 100644 (file)
@@ -3765,6 +3765,11 @@ static int ide_tape_probe(ide_drive_t *drive)
        g->fops = &idetape_block_ops;
        ide_register_region(g);
 
+       printk(KERN_WARNING "It is possible that this driver does not have any"
+               " users anymore and, as a result, it will be REMOVED soon."
+               " Please notify Bart <bzolnier@gmail.com> or Boris"
+               " <petkovbb@gmail.com> in case you still need it.\n");
+
        return 0;
 
 out_free_tape:
index 477833f0daf501cbb1a67150e6523818a1fc38f6..fa16bc30bbc985efe4efc4ad9c91d93b3d7b0ed7 100644 (file)
@@ -590,11 +590,6 @@ void ide_unregister(unsigned int index, int init_default, int restore)
                hwif->extra_ports = 0;
        }
 
-       /*
-        * Note that we only release the standard ports,
-        * and do not even try to handle any extra ports
-        * allocated for weird IDE interface chipsets.
-        */
        ide_hwif_release_regions(hwif);
 
        /* copy original settings */
@@ -1036,10 +1031,9 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
                        drive->nice1 = (arg >> IDE_NICE_1) & 1;
                        return 0;
                case HDIO_DRIVE_RESET:
-               {
-                       unsigned long flags;
-                       if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-                       
+                       if (!capable(CAP_SYS_ADMIN))
+                               return -EACCES;
+
                        /*
                         *      Abort the current command on the
                         *      group if there is one, taking
@@ -1058,17 +1052,15 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
                        ide_abort(drive, "drive reset");
 
                        BUG_ON(HWGROUP(drive)->handler);
-                               
+
                        /* Ensure nothing gets queued after we
                           drop the lock. Reset will clear the busy */
-                  
+
                        HWGROUP(drive)->busy = 1;
                        spin_unlock_irqrestore(&ide_lock, flags);
                        (void) ide_do_reset(drive);
 
                        return 0;
-               }
-
                case HDIO_GET_BUSSTATE:
                        if (!capable(CAP_SYS_ADMIN))
                                return -EACCES;
@@ -1449,7 +1441,7 @@ static int __init ide_setup(char *s)
 
                        case -1: /* "noprobe" */
                                hwif->noprobe = 1;
-                               goto done;
+                               goto obsolete_option;
 
                        case 1: /* base */
                                vals[1] = vals[0] + 0x206; /* default ctl */
index bba29df5f21d6094660c777724c38ef9d2de454b..2f4f47ad602f61ca8ec3614d484dcc5939a46c05 100644 (file)
@@ -334,43 +334,6 @@ static void __init qd6580_port_init_devs(ide_hwif_t *hwif)
        hwif->drives[1].drive_data = t2;
 }
 
-/*
- * qd_unsetup:
- *
- * called to unsetup an ata channel : back to default values, unlinks tuning
- */
-/*
-static void __exit qd_unsetup(ide_hwif_t *hwif)
-{
-       u8 config = hwif->config_data;
-       int base = hwif->select_data;
-       void *set_pio_mode = (void *)hwif->set_pio_mode;
-
-       if (hwif->chipset != ide_qd65xx)
-               return;
-
-       printk(KERN_NOTICE "%s: back to defaults\n", hwif->name);
-
-       hwif->selectproc = NULL;
-       hwif->set_pio_mode = NULL;
-
-       if (set_pio_mode == (void *)qd6500_set_pio_mode) {
-               // will do it for both
-               outb(QD6500_DEF_DATA, QD_TIMREG(&hwif->drives[0]));
-       } else if (set_pio_mode == (void *)qd6580_set_pio_mode) {
-               if (QD_CONTROL(hwif) & QD_CONTR_SEC_DISABLED) {
-                       outb(QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0]));
-                       outb(QD6580_DEF_DATA2, QD_TIMREG(&hwif->drives[1]));
-               } else {
-                       outb(hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0]));
-               }
-       } else {
-               printk(KERN_WARNING "Unknown qd65xx tuning fonction !\n");
-               printk(KERN_WARNING "keeping settings !\n");
-       }
-}
-*/
-
 static const struct ide_port_info qd65xx_port_info __initdata = {
        .chipset                = ide_qd65xx,
        .host_flags             = IDE_HFLAG_IO_32BIT |
@@ -444,6 +407,8 @@ static int __init qd_probe(int base)
                printk(KERN_DEBUG "qd6580: config=%#x, control=%#x, ID3=%u\n",
                        config, control, QD_ID3);
 
+               outb(QD_DEF_CONTR, QD_CONTROL_PORT);
+
                if (control & QD_CONTR_SEC_DISABLED) {
                        /* secondary disabled */
 
@@ -460,8 +425,6 @@ static int __init qd_probe(int base)
 
                        ide_device_add(idx, &qd65xx_port_info);
 
-                       outb(QD_DEF_CONTR, QD_CONTROL_PORT);
-
                        return 1;
                } else {
                        ide_hwif_t *mate;
@@ -487,8 +450,6 @@ static int __init qd_probe(int base)
 
                        ide_device_add(idx, &qd65xx_port_info);
 
-                       outb(QD_DEF_CONTR, QD_CONTROL_PORT);
-
                        return 0; /* no other qd65xx possible */
                }
        }
index bd24dad3cfc6b2a82c990120ff7e10ac567599ab..ec667982809c18ae8ddf59bc5023190134cb33c1 100644 (file)
@@ -787,7 +787,8 @@ static int __init cmd640x_init(void)
        /*
         * Try to enable the secondary interface, if not already enabled
         */
-       if (cmd_hwif1->noprobe) {
+       if (cmd_hwif1->noprobe ||
+           (cmd_hwif1->drives[0].noprobe && cmd_hwif1->drives[1].noprobe)) {
                port2 = "not probed";
        } else {
                b = get_cmd640_reg(CNTRL);
index d0f7bb8b8adf1d881fe4d2f7c5f86106dc4b63d1..6357bb6269ab42bfc14623006e0fef089484ae08 100644 (file)
@@ -1570,10 +1570,12 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
                if (rev < 3)
                        info = &hpt36x;
                else {
-                       static const struct hpt_info *hpt37x_info[] =
-                               { &hpt370, &hpt370a, &hpt372, &hpt372n };
-
-                       info = hpt37x_info[min_t(u8, rev, 6) - 3];
+                       switch (min_t(u8, rev, 6)) {
+                       case 3: info = &hpt370;  break;
+                       case 4: info = &hpt370a; break;
+                       case 5: info = &hpt372;  break;
+                       case 6: info = &hpt372n; break;
+                       }
                        idx++;
                }
                break;
@@ -1626,7 +1628,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
        return ide_setup_pci_device(dev, &d);
 }
 
-static const struct pci_device_id hpt366_pci_tbl[] = {
+static const struct pci_device_id hpt366_pci_tbl[] __devinitconst = {
        { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366),  0 },
        { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372),  1 },
        { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT302),  2 },
This page took 0.156267 seconds and 5 git commands to generate.