From b8fca1c7682105c843319728d8e37b42b19092bb Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 21 Mar 2006 15:24:37 +0100 Subject: [PATCH] ide-cd: quiet down GPCMD_READ_CDVD_CAPACITY failure Some drives like to throw a: ATAPI device hdc: Error: Not ready -- (Sense key=0x02) Incompatible medium installed -- (asc=0x30, ascq=0x00) The failed "Read Cd/Dvd Capacity" packet command was: "25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " warning on incompatible media, so quiet down this error. Signed-off-by: Jens Axboe --- drivers/ide/ide-cd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/ide') diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index c7671e188017..b4a41d6d0714 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2143,6 +2143,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, req.cmd[0] = GPCMD_READ_CDVD_CAPACITY; req.data = (char *)&capbuf; req.data_len = sizeof(capbuf); + req.flags |= REQ_QUIET; stat = cdrom_queue_packet_command(drive, &req); if (stat == 0) { -- cgit v1.2.2 From 9edc91df07a227dbde9f98ee1097f554130993dc Mon Sep 17 00:00:00 2001 From: Rene Herman Date: Tue, 28 Mar 2006 01:56:30 -0800 Subject: [PATCH] ide: AMD756 no host side cable detection >From http://marc.theaimsgroup.com/?l=linux-kernel&m=110304128900342&w=2 AMD756 doesn't support host side cable detection. Do disk side only and don't advice obsolete options. Acked-by: Bartlomiej Zolnierkiewicz Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ide/pci/amd74xx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/ide') diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 21965e5ef25e..b22ee5462318 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c @@ -347,10 +347,8 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const ch break; case AMD_UDMA_66: - pci_read_config_dword(dev, AMD_UDMA_TIMING, &u); - for (i = 24; i >= 0; i -= 8) - if ((u >> i) & 4) - amd_80w |= (1 << (1 - (i >> 4))); + /* no host side cable detection */ + amd_80w = 0x03; break; } @@ -386,8 +384,6 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const ch if (amd_clock < 20000 || amd_clock > 50000) { printk(KERN_WARNING "%s: User given PCI clock speed impossible (%d), using 33 MHz instead.\n", amd_chipset->name, amd_clock); - printk(KERN_WARNING "%s: Use ide0=ata66 if you want to assume 80-wire cable\n", - amd_chipset->name); amd_clock = 33333; } -- cgit v1.2.2 From d266ab88938e49aa95f1965ee020df1b1d4c5761 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 28 Mar 2006 01:56:31 -0800 Subject: [PATCH] Small fixes backported to old IDE SiS driver Some quick backport bits from the libata PATA work to fix things found in the sis driver. The piix driver needs some fixes too but those are way to large and need someone working on old IDE with time to do them. This patch fixes the case where random bits get loaded into SIS timing registers according to the description of the correct behaviour from Vojtech Pavlik. It also adds the SiS5517 ATA16 chipset which is not currently supported by the driver. Thanks to Conrad Harriss for loaning me the machine with the 5517 chipset. Signed-off-by: Alan Cox Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ide/pci/sis5513.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/ide') diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 75a2253a3e68..8e9d87701ce2 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c @@ -112,6 +112,7 @@ static const struct { { "SiS5596", PCI_DEVICE_ID_SI_5596, ATA_16 }, { "SiS5571", PCI_DEVICE_ID_SI_5571, ATA_16 }, + { "SiS5517", PCI_DEVICE_ID_SI_5517, ATA_16 }, { "SiS551x", PCI_DEVICE_ID_SI_5511, ATA_16 }, }; @@ -524,6 +525,7 @@ static void config_art_rwp_pio (ide_drive_t *drive, u8 pio) case 3: test1 = 0x30|0x03; break; case 2: test1 = 0x40|0x04; break; case 1: test1 = 0x60|0x07; break; + case 0: test1 = 0x00; break; default: break; } pci_write_config_byte(dev, drive_pci, test1); -- cgit v1.2.2 From b02389e98a7b64ad5cd4823740defa8821f30bbd Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 28 Mar 2006 01:56:32 -0800 Subject: [PATCH] ide_generic_all_on() warning fix drivers/ide/pci/generic.c:45: warning: `ide_generic_all_on' defined but not used Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ide/pci/generic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/ide') diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 6e3ab0c38c4d..f82e82109728 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c @@ -41,14 +41,15 @@ static int ide_generic_all; /* Set to claim all devices */ +#ifndef MODULE static int __init ide_generic_all_on(char *unused) { ide_generic_all = 1; printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n"); return 1; } - __setup("all-generic-ide", ide_generic_all_on); +#endif static void __devinit init_hwif_generic (ide_hwif_t *hwif) { -- cgit v1.2.2 From 9bae1ff3e7926fe5e92db2f3c6d8832f18f777bc Mon Sep 17 00:00:00 2001 From: Marcelo Feitoza Parisi Date: Tue, 28 Mar 2006 01:56:46 -0800 Subject: [PATCH] ide-tape: use time_after(), time_after_eq() They deal with wrapping correctly and are nicer to read. Signed-off-by: Marcelo Feitoza Parisi Signed-off-by: Alexey Dobriyan Cc: Bartlomiej Zolnierkiewicz Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ide/ide-tape.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/ide') diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index ebc59064b475..f04791a58df0 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -433,6 +433,7 @@ #include #include #include +#include #include #include #include @@ -2336,7 +2337,7 @@ static ide_startstop_t idetape_rw_callback (ide_drive_t *drive) } if (time_after(jiffies, tape->insert_time)) tape->insert_speed = tape->insert_size / 1024 * HZ / (jiffies - tape->insert_time); - if (jiffies - tape->avg_time >= HZ) { + if (time_after_eq(jiffies, tape->avg_time + HZ)) { tape->avg_speed = tape->avg_size * HZ / (jiffies - tape->avg_time) / 1024; tape->avg_size = 0; tape->avg_time = jiffies; @@ -2497,7 +2498,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, } else { return ide_do_reset(drive); } - } else if (jiffies - tape->dsc_polling_start > IDETAPE_DSC_MA_THRESHOLD) + } else if (time_after(jiffies, tape->dsc_polling_start + IDETAPE_DSC_MA_THRESHOLD)) tape->dsc_polling_frequency = IDETAPE_DSC_MA_SLOW; idetape_postpone_request(drive); return ide_stopped; -- cgit v1.2.2