diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-28 19:23:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-28 19:23:40 -0700 |
commit | 16585e76a71b64d75a090148c2a94bd4d50a5544 (patch) | |
tree | 3f21850be8fe914ffc6ca581e98aea0871300b7c | |
parent | facf014792093d95e308b5d6ce9bc86d3c90e5b1 (diff) | |
parent | a75ad3c27a6ad78c4306cac939938050dcde54f3 (diff) | |
download | kernel_samsung_smdk4412-16585e76a71b64d75a090148c2a94bd4d50a5544.zip kernel_samsung_smdk4412-16585e76a71b64d75a090148c2a94bd4d50a5544.tar.gz kernel_samsung_smdk4412-16585e76a71b64d75a090148c2a94bd4d50a5544.tar.bz2 |
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
[PATCH] scsi: kill overeager "not-ready" messages
[PATCH] it821x: fix ide dma setup bug
[PATCH] ide: if the id fields looks screwy, disable DMA
[PATCH] ide: option to disable cache flushes for buggy drives
-rw-r--r-- | drivers/ide/ide-disk.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide.c | 5 | ||||
-rw-r--r-- | drivers/ide/pci/it821x.c | 11 | ||||
-rw-r--r-- | drivers/scsi/scsi_ioctl.c | 5 | ||||
-rw-r--r-- | include/linux/ide.h | 1 |
6 files changed, 16 insertions, 10 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index f712e4c..7cf3eb0 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -776,7 +776,7 @@ static void update_ordered(ide_drive_t *drive) * not available so we don't need to recheck that. */ capacity = idedisk_capacity(drive); - barrier = ide_id_has_flush_cache(id) && + barrier = ide_id_has_flush_cache(id) && !drive->noflush && (drive->addressing == 0 || capacity <= (1ULL << 28) || ide_id_has_flush_cache_ext(id)); diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 98918fb..7c3a13e 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -750,7 +750,7 @@ void ide_dma_verbose(ide_drive_t *drive) goto bug_dma_off; printk(", DMA"); } else if (id->field_valid & 1) { - printk(", BUG"); + goto bug_dma_off; } return; bug_dma_off: diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 05fbd92..defd4b4 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1539,7 +1539,7 @@ static int __init ide_setup(char *s) const char *hd_words[] = { "none", "noprobe", "nowerr", "cdrom", "serialize", "autotune", "noautotune", "minus8", "swapdata", "bswap", - "minus11", "remap", "remap63", "scsi", NULL }; + "noflush", "remap", "remap63", "scsi", NULL }; unit = s[2] - 'a'; hw = unit / MAX_DRIVES; unit = unit % MAX_DRIVES; @@ -1578,6 +1578,9 @@ static int __init ide_setup(char *s) case -10: /* "bswap" */ drive->bswap = 1; goto done; + case -11: /* noflush */ + drive->noflush = 1; + goto done; case -12: /* "remap" */ drive->remap_0_to_1 = 1; goto done; diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 3cb0442..e9bad18 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c @@ -498,9 +498,14 @@ static int config_chipset_for_dma (ide_drive_t *drive) { u8 speed = ide_dma_speed(drive, it821x_ratemask(drive)); - config_it821x_chipset_for_pio(drive, !speed); - it821x_tune_chipset(drive, speed); - return ide_dma_enable(drive); + if (speed) { + config_it821x_chipset_for_pio(drive, 0); + it821x_tune_chipset(drive, speed); + + return ide_dma_enable(drive); + } + + return 0; } /** diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index a89c411..32293f4 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -110,11 +110,8 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd, sshdr.asc, sshdr.ascq); break; case NOT_READY: /* This happens if there is no disc in drive */ - if (sdev->removable && (cmd[0] != TEST_UNIT_READY)) { - printk(KERN_INFO "Device not ready. Make sure" - " there is a disc in the drive.\n"); + if (sdev->removable) break; - } case UNIT_ATTENTION: if (sdev->removable) { sdev->changed = 1; diff --git a/include/linux/ide.h b/include/linux/ide.h index dc7abef..9962045 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -571,6 +571,7 @@ typedef struct ide_drive_s { u8 waiting_for_dma; /* dma currently in progress */ u8 unmask; /* okay to unmask other irqs */ u8 bswap; /* byte swap data */ + u8 noflush; /* don't attempt flushes */ u8 dsc_overlap; /* DSC overlap */ u8 nice1; /* give potential excess bandwidth */ |