Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (71 commits)
  ide: Remove ide_spin_wait_hwgroup() and use special requests instead
  ide: move IDE{FLOPPY,TAPE}_WAIT_CMD defines to <linux/ide.h>
  ide: add ide_do_test_unit_ready() helper
  ide: add ide_do_start_stop() helper
  ide: add ide_set_media_lock() helper
  ide-floppy: move floppy ioctls handling to ide-floppy_ioctl.c
  ide-floppy: ->{srfp,wp} -> IDE_AFLAG_{SRFP,WP}
  ide: add ide_queue_pc_tail() helper
  ide: add ide_queue_pc_head() helper
  ide: add ide_init_pc() helper
  ide-tape: add ide_tape_set_media_lock() helper
  ide-floppy: add ide_floppy_set_media_lock() helper
  ide: add ide_io_buffers() helper
  ide-scsi: cleanup ide_scsi_io_buffers()
  ide-floppy: remove MODE_SENSE_* defines
  ide-{floppy,tape}: remove packet command stack
  ide-{floppy,tape}: remove request stack
  ide-generic: handle probing of legacy io-ports v5
  ide-floppy: use scatterlists for pio transfers
  ide-tape: remove idetape_init_rq()
  ...
  • Loading branch information
Linus Torvalds committed Oct 11, 2008
2 parents ead9d23 + 92f1f8f commit 5c3c4d9
Show file tree
Hide file tree
Showing 75 changed files with 2,388 additions and 2,566 deletions.
2 changes: 1 addition & 1 deletion drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
scsi_cmd[0] = ATA_16;

scsi_cmd[4] = args[2];
if (args[0] == WIN_SMART) { /* hack -- ide driver does this too... */
if (args[0] == ATA_CMD_SMART) { /* hack -- ide driver does this too */
scsi_cmd[6] = args[3];
scsi_cmd[8] = args[1];
scsi_cmd[10] = 0x4f;
Expand Down
9 changes: 5 additions & 4 deletions drivers/block/hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/blkpg.h>
#include <linux/ata.h>
#include <linux/hdreg.h>

#define REALLY_SLOW_IO
Expand Down Expand Up @@ -370,7 +371,7 @@ static void reset_hd(void)
struct hd_i_struct *disk = &hd_info[i];
disk->special_op = disk->recalibrate = 1;
hd_out(disk, disk->sect, disk->sect, disk->head-1,
disk->cyl, WIN_SPECIFY, &reset_hd);
disk->cyl, ATA_CMD_INIT_DEV_PARAMS, &reset_hd);
if (reset)
goto repeat;
} else
Expand Down Expand Up @@ -558,7 +559,7 @@ static int do_special_op(struct hd_i_struct *disk, struct request *req)
{
if (disk->recalibrate) {
disk->recalibrate = 0;
hd_out(disk, disk->sect, 0, 0, 0, WIN_RESTORE, &recal_intr);
hd_out(disk, disk->sect, 0, 0, 0, ATA_CMD_RESTORE, &recal_intr);
return reset;
}
if (disk->head > 16) {
Expand Down Expand Up @@ -631,13 +632,13 @@ static void hd_request(void)
if (blk_fs_request(req)) {
switch (rq_data_dir(req)) {
case READ:
hd_out(disk, nsect, sec, head, cyl, WIN_READ,
hd_out(disk, nsect, sec, head, cyl, ATA_CMD_PIO_READ,
&read_intr);
if (reset)
goto repeat;
break;
case WRITE:
hd_out(disk, nsect, sec, head, cyl, WIN_WRITE,
hd_out(disk, nsect, sec, head, cyl, ATA_CMD_PIO_WRITE,
&write_intr);
if (reset)
goto repeat;
Expand Down
23 changes: 0 additions & 23 deletions drivers/ide/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -131,29 +131,6 @@ config BLK_DEV_IDEDISK

If unsure, say Y.

config IDEDISK_MULTI_MODE
bool "Use multiple sector mode for Programmed Input/Output by default"
help
This setting is irrelevant for most IDE disks, with direct memory
access, to which multiple sector mode does not apply. Multiple sector
mode is a feature of most modern IDE hard drives, permitting the
transfer of multiple sectors per Programmed Input/Output interrupt,
rather than the usual one sector per interrupt. When this feature is
enabled, it can reduce operating system overhead for disk Programmed
Input/Output. On some systems, it also can increase the data
throughput of Programmed Input/Output. Some drives, however, seemed
to run slower with multiple sector mode enabled. Some drives claimed
to support multiple sector mode, but lost data at some settings.
Under rare circumstances, such failures could result in massive
filesystem corruption.

If you get the following error, try to say Y here:

hda: set_multmode: status=0x51 { DriveReady SeekComplete Error }
hda: set_multmode: error=0x04 { DriveStatusError }

If in doubt, say N.

config BLK_DEV_IDECS
tristate "PCMCIA IDE support"
depends on PCMCIA
Expand Down
7 changes: 4 additions & 3 deletions drivers/ide/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

EXTRA_CFLAGS += -Idrivers/ide

ide-core-y += ide.o ide-io.o ide-iops.o ide-lib.o ide-probe.o ide-taskfile.o \
ide-pio-blacklist.o
ide-core-y += ide.o ide-ioctls.o ide-io.o ide-iops.o ide-lib.o ide-probe.o \
ide-taskfile.o ide-pio-blacklist.o

# core IDE code
ide-core-$(CONFIG_IDE_TIMINGS) += ide-timings.o
Expand Down Expand Up @@ -37,11 +37,12 @@ obj-$(CONFIG_IDE_GENERIC) += ide-generic.o
obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o

ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o
ide-floppy_mod-y += ide-floppy.o ide-floppy_ioctl.o

obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd_mod.o
obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy_mod.o
obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o

ifeq ($(CONFIG_BLK_DEV_IDECS), y)
ide-cs-core-y += legacy/ide-cs.o
Expand Down
5 changes: 2 additions & 3 deletions drivers/ide/arm/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/errno.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
#include <linux/dma-mapping.h>
#include <linux/device.h>
Expand Down Expand Up @@ -265,8 +264,8 @@ static void icside_set_dma_mode(ide_drive_t *drive, const u8 xfer_mode)
* If we're going to be doing MW_DMA_1 or MW_DMA_2, we should
* take care to note the values in the ID...
*/
if (use_dma_info && drive->id->eide_dma_time > cycle_time)
cycle_time = drive->id->eide_dma_time;
if (use_dma_info && drive->id[ATA_ID_EIDE_DMA_TIME] > cycle_time)
cycle_time = drive->id[ATA_ID_EIDE_DMA_TIME];

drive->drive_data = cycle_time;

Expand Down
8 changes: 4 additions & 4 deletions drivers/ide/arm/palm_bk3710.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
#include <linux/delay.h>
#include <linux/init.h>
Expand Down Expand Up @@ -180,7 +179,7 @@ static void palm_bk3710_setpiomode(void __iomem *base, ide_drive_t *mate,
val32 |= (t2i << (dev ? 8 : 0));
writel(val32, base + BK3710_DATRCVR);

if (mate && mate->present) {
if (mate) {
u8 mode2 = ide_get_best_pio_mode(mate, 255, 4);

if (mode2 < mode)
Expand Down Expand Up @@ -213,7 +212,8 @@ static void palm_bk3710_set_dma_mode(ide_drive_t *drive, u8 xferspeed)
palm_bk3710_setudmamode(base, is_slave,
xferspeed - XFER_UDMA_0);
} else {
palm_bk3710_setdmamode(base, is_slave, drive->id->eide_dma_min,
palm_bk3710_setdmamode(base, is_slave,
drive->id[ATA_ID_EIDE_DMA_MIN],
xferspeed);
}
}
Expand All @@ -229,7 +229,7 @@ static void palm_bk3710_set_pio_mode(ide_drive_t *drive, u8 pio)
* Obtain the drive PIO data for tuning the Palm Chip registers
*/
cycle_time = ide_pio_cycle_time(drive, pio);
mate = ide_get_paired_drive(drive);
mate = ide_get_pair_dev(drive);
palm_bk3710_setpiomode(base, mate, is_slave, cycle_time, pio);
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/ide/ide-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ void ide_acpi_get_timing(ide_hwif_t *hwif)
* This function executes the _STM ACPI method for the target channel.
*
* _STM requires Identify Drive data, which has to passed as an argument.
* Unfortunately hd_driveid is a mangled version which we can't readily
* Unfortunately drive->id is a mangled version which we can't readily
* use; hence we'll get the information afresh.
*/
void ide_acpi_push_timing(ide_hwif_t *hwif)
Expand Down Expand Up @@ -614,10 +614,10 @@ void ide_acpi_push_timing(ide_hwif_t *hwif)
in_params[0].buffer.length = sizeof(struct GTM_buffer);
in_params[0].buffer.pointer = (u8 *)&hwif->acpidata->gtm;
in_params[1].type = ACPI_TYPE_BUFFER;
in_params[1].buffer.length = sizeof(struct hd_driveid);
in_params[1].buffer.length = sizeof(ATA_ID_WORDS * 2);
in_params[1].buffer.pointer = (u8 *)&master->idbuff;
in_params[2].type = ACPI_TYPE_BUFFER;
in_params[2].buffer.length = sizeof(struct hd_driveid);
in_params[2].buffer.length = sizeof(ATA_ID_WORDS * 2);
in_params[2].buffer.pointer = (u8 *)&slave->idbuff;
/* Output buffer: _STM has no output */

Expand Down
Loading

0 comments on commit 5c3c4d9

Please sign in to comment.