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:
  ide: ->cable_detect method cannot be marked __devinit
  ide: ->quirkproc method cannot be marked __devinit
  cs5520: add enablebits checking
  cdrom: don't check CDC_PLAY_AUDIO in cdrom_count_tracks()
  ide-cd: fix endianity for the error message in cdrom_read_capacity
  ide: remove CONFIG_IDE_MAX_HWIFS
  remove unneeded #include <linux/ide.h>'s
  ide: fix regression caused by ide_device_{get,put}() addition (take 2)
  remove unnecessary <linux/hdreg.h> includes
  ide: sanitize struct ide_port_ops documentation (take 2)
  ide: fix ide_fix_driveid()
  ide: fix pre-EIDE SWDMA support on big-endian
  • Loading branch information
torvalds committed Aug 5, 2008
2 parents 580da34 + f454cbe commit 35ad1c8
Show file tree
Hide file tree
Showing 43 changed files with 92 additions and 116 deletions.
1 change: 0 additions & 1 deletion arch/m68k/mac/baboon.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/ide.h>

#include <asm/traps.h>
#include <asm/bootinfo.h>
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/mac/via.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/ide.h>
#include <linux/module.h>

#include <asm/bootinfo.h>
Expand Down
1 change: 0 additions & 1 deletion arch/mips/emma2rh/markeins/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/types.h>
#include <linux/initrd.h>
#include <linux/irq.h>
#include <linux/ide.h>
#include <linux/ioport.h>
#include <linux/param.h> /* for HZ */
#include <linux/root_dev.h>
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/jazz/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
* Copyright (C) 2007 by Thomas Bogendoerfer
*/
#include <linux/eisa.h>
#include <linux/hdreg.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/console.h>
#include <linux/fb.h>
#include <linux/ide.h>
#include <linux/pm.h>
#include <linux/screen_info.h>
#include <linux/platform_device.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define __ide_mm_outsl(p, a, c) writesl((void __iomem *)(p), (a), (c))

#ifndef __powerpc64__
#include <linux/hdreg.h>
#include <linux/ioport.h>

/* FIXME: use ide_platform host driver */
Expand Down
3 changes: 1 addition & 2 deletions arch/sh/boards/mach-systemh/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@

#include <linux/init.h>
#include <linux/irq.h>
#include <linux/interrupt.h>

#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/systemh7751.h>
#include <asm/smc37c93x.h>
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/kernel/xtensa_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/interrupt.h>
#include <asm/irq.h>
#include <linux/in6.h>
#include <linux/ide.h>

#include <asm/uaccess.h>
#include <asm/checksum.h>
Expand Down
4 changes: 0 additions & 4 deletions drivers/cdrom/cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,10 +1436,6 @@ static void cdrom_count_tracks(struct cdrom_device_info *cdi, tracktype* tracks)
tracks->xa=0;
tracks->error=0;
cdinfo(CD_COUNT_TRACKS, "entering cdrom_count_tracks\n");
if (!CDROM_CAN(CDC_PLAY_AUDIO)) {
tracks->error=CDS_NO_INFO;
return;
}
/* Grab the TOC header so we can see how many tracks there are */
if ((ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCHDR, &header))) {
if (ret == -ENOMEDIUM)
Expand Down
10 changes: 0 additions & 10 deletions drivers/ide/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ menuconfig IDE

if IDE

config IDE_MAX_HWIFS
int "Max IDE interfaces"
depends on ALPHA || SUPERH || IA64 || EMBEDDED
range 1 10
default 4
help
This is the maximum number of IDE hardware interfaces that will
be supported by the driver. Make sure it is at least as high as
the number of IDE interfaces in your system.

config BLK_DEV_IDE
tristate "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support"
---help---
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/arm/palm_bk3710.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static void __devinit palm_bk3710_chipinit(void __iomem *base)
palm_bk3710_setpiomode(base, NULL, 1, 600, 0);
}

static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
static u8 palm_bk3710_cable_detect(ide_hwif_t *hwif)
{
return ATA_CBL_PATA80;
}
Expand Down
30 changes: 17 additions & 13 deletions drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,23 @@ static struct cdrom_info *ide_cd_get(struct gendisk *disk)
mutex_lock(&idecd_ref_mutex);
cd = ide_cd_g(disk);
if (cd) {
kref_get(&cd->kref);
if (ide_device_get(cd->drive)) {
kref_put(&cd->kref, ide_cd_release);
if (ide_device_get(cd->drive))
cd = NULL;
}
else
kref_get(&cd->kref);

}
mutex_unlock(&idecd_ref_mutex);
return cd;
}

static void ide_cd_put(struct cdrom_info *cd)
{
ide_drive_t *drive = cd->drive;

mutex_lock(&idecd_ref_mutex);
ide_device_put(cd->drive);
kref_put(&cd->kref, ide_cd_release);
ide_device_put(drive);
mutex_unlock(&idecd_ref_mutex);
}

Expand Down Expand Up @@ -1305,6 +1307,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
int stat;
unsigned char cmd[BLK_MAX_CDB];
unsigned len = sizeof(capbuf);
u32 blocklen;

memset(cmd, 0, BLK_MAX_CDB);
cmd[0] = GPCMD_READ_CDVD_CAPACITY;
Expand All @@ -1317,23 +1320,24 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
/*
* Sanity check the given block size
*/
switch (capbuf.blocklen) {
case __constant_cpu_to_be32(512):
case __constant_cpu_to_be32(1024):
case __constant_cpu_to_be32(2048):
case __constant_cpu_to_be32(4096):
blocklen = be32_to_cpu(capbuf.blocklen);
switch (blocklen) {
case 512:
case 1024:
case 2048:
case 4096:
break;
default:
printk(KERN_ERR "%s: weird block size %u\n",
drive->name, capbuf.blocklen);
drive->name, blocklen);
printk(KERN_ERR "%s: default to 2kb block size\n",
drive->name);
capbuf.blocklen = __constant_cpu_to_be32(2048);
blocklen = 2048;
break;
}

*capacity = 1 + be32_to_cpu(capbuf.lba);
*sectors_per_frame = be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS;
*sectors_per_frame = blocklen >> SECTOR_BITS;
return 0;
}

Expand Down
11 changes: 6 additions & 5 deletions drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,22 @@ static struct ide_disk_obj *ide_disk_get(struct gendisk *disk)
mutex_lock(&idedisk_ref_mutex);
idkp = ide_disk_g(disk);
if (idkp) {
kref_get(&idkp->kref);
if (ide_device_get(idkp->drive)) {
kref_put(&idkp->kref, ide_disk_release);
if (ide_device_get(idkp->drive))
idkp = NULL;
}
else
kref_get(&idkp->kref);
}
mutex_unlock(&idedisk_ref_mutex);
return idkp;
}

static void ide_disk_put(struct ide_disk_obj *idkp)
{
ide_drive_t *drive = idkp->drive;

mutex_lock(&idedisk_ref_mutex);
ide_device_put(idkp->drive);
kref_put(&idkp->kref, ide_disk_release);
ide_device_put(drive);
mutex_unlock(&idedisk_ref_mutex);
}

Expand Down
6 changes: 1 addition & 5 deletions drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,7 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base, u8 req_mode)
if (id->field_valid & 2) {
mask = id->dma_1word & hwif->swdma_mask;
} else if (id->tDMA) {
/*
* ide_fix_driveid() doesn't convert ->tDMA to the
* CPU endianness so we need to do it here
*/
u8 mode = le16_to_cpu(id->tDMA);
u8 mode = id->tDMA;

/*
* if the mode is valid convert it to the mask
Expand Down
11 changes: 6 additions & 5 deletions drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,22 @@ static struct ide_floppy_obj *ide_floppy_get(struct gendisk *disk)
mutex_lock(&idefloppy_ref_mutex);
floppy = ide_floppy_g(disk);
if (floppy) {
kref_get(&floppy->kref);
if (ide_device_get(floppy->drive)) {
kref_put(&floppy->kref, idefloppy_cleanup_obj);
if (ide_device_get(floppy->drive))
floppy = NULL;
}
else
kref_get(&floppy->kref);
}
mutex_unlock(&idefloppy_ref_mutex);
return floppy;
}

static void ide_floppy_put(struct ide_floppy_obj *floppy)
{
ide_drive_t *drive = floppy->drive;

mutex_lock(&idefloppy_ref_mutex);
ide_device_put(floppy->drive);
kref_put(&floppy->kref, idefloppy_cleanup_obj);
ide_device_put(drive);
mutex_unlock(&idefloppy_ref_mutex);
}

Expand Down
6 changes: 3 additions & 3 deletions drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,11 @@ void ide_fix_driveid (struct hd_driveid *id)
for (i = 0; i < 3; i++)
id->words157_159[i] = __le16_to_cpu(id->words157_159[i]);
id->cfa_power = __le16_to_cpu(id->cfa_power);
for (i = 0; i < 14; i++)
for (i = 0; i < 15; i++)
id->words161_175[i] = __le16_to_cpu(id->words161_175[i]);
for (i = 0; i < 31; i++)
for (i = 0; i < 30; i++)
id->words176_205[i] = __le16_to_cpu(id->words176_205[i]);
for (i = 0; i < 48; i++)
for (i = 0; i < 49; i++)
id->words206_254[i] = __le16_to_cpu(id->words206_254[i]);
id->integrity_word = __le16_to_cpu(id->integrity_word);
# else
Expand Down
11 changes: 6 additions & 5 deletions drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,22 @@ static struct ide_tape_obj *ide_tape_get(struct gendisk *disk)
mutex_lock(&idetape_ref_mutex);
tape = ide_tape_g(disk);
if (tape) {
kref_get(&tape->kref);
if (ide_device_get(tape->drive)) {
kref_put(&tape->kref, ide_tape_release);
if (ide_device_get(tape->drive))
tape = NULL;
}
else
kref_get(&tape->kref);
}
mutex_unlock(&idetape_ref_mutex);
return tape;
}

static void ide_tape_put(struct ide_tape_obj *tape)
{
ide_drive_t *drive = tape->drive;

mutex_lock(&idetape_ref_mutex);
ide_device_put(tape->drive);
kref_put(&tape->kref, ide_tape_release);
ide_device_put(drive);
mutex_unlock(&idetape_ref_mutex);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/aec62xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev)
return dev->irq;
}

static u8 __devinit atp86x_cable_detect(ide_hwif_t *hwif)
static u8 atp86x_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
u8 ata66 = 0, mask = hwif->channel ? 0x02 : 0x01;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static int ali_cable_override(struct pci_dev *pdev)
* FIXME: frobs bits that are not defined on newer ALi devicea
*/

static u8 __devinit ali_cable_detect(ide_hwif_t *hwif)
static u8 ali_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
unsigned long flags;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/amd74xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev)
return dev->irq;
}

static u8 __devinit amd_cable_detect(ide_hwif_t *hwif)
static u8 amd_cable_detect(ide_hwif_t *hwif)
{
if ((amd_80w >> hwif->channel) & 1)
return ATA_CBL_PATA80;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed)
spin_unlock_irqrestore(&atiixp_lock, flags);
}

static u8 __devinit atiixp_cable_detect(ide_hwif_t *hwif)
static u8 atiixp_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *pdev = to_pci_dev(hwif->dev);
u8 udma_mode = 0, ch = hwif->channel;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev)
return 0;
}

static u8 __devinit cmd64x_cable_detect(ide_hwif_t *hwif)
static u8 cmd64x_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
u8 bmidecsr = 0, mask = hwif->channel ? 0x02 : 0x01;
Expand Down
1 change: 1 addition & 0 deletions drivers/ide/pci/cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ static const struct ide_port_ops cs5520_port_ops = {

static const struct ide_port_info cyrix_chipset __devinitdata = {
.name = DRV_NAME,
.enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } },
.port_ops = &cs5520_port_ops,
.host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_CS5520,
.pio_mask = ATA_PIO4,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/cs5535.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio)
cs5535_set_speed(drive, XFER_PIO_0 + pio);
}

static u8 __devinit cs5535_cable_detect(ide_hwif_t *hwif)
static u8 cs5535_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
u8 bit;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev)
return dev->irq;
}

static u8 __devinit hpt3xx_cable_detect(ide_hwif_t *hwif)
static u8 hpt3xx_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
struct ide_host *host = pci_get_drvdata(dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/it8213.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static void it8213_set_dma_mode(ide_drive_t *drive, const u8 speed)
}
}

static u8 __devinit it8213_cable_detect(ide_hwif_t *hwif)
static u8 it8213_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *dev = to_pci_dev(hwif->dev);
u8 reg42h = 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/it821x.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ static void it821x_set_dma_mode(ide_drive_t *drive, const u8 speed)
* the needed logic onboard.
*/

static u8 __devinit it821x_cable_detect(ide_hwif_t *hwif)
static u8 it821x_cable_detect(ide_hwif_t *hwif)
{
/* The reference driver also only does disk side */
return ATA_CBL_PATA80;
Expand All @@ -443,7 +443,7 @@ static u8 __devinit it821x_cable_detect(ide_hwif_t *hwif)
* final tuning that is needed, or fixups to work around bugs.
*/

static void __devinit it821x_quirkproc(ide_drive_t *drive)
static void it821x_quirkproc(ide_drive_t *drive)
{
struct it821x_dev *itdev = ide_get_hwifdata(drive->hwif);
struct hd_driveid *id = drive->id;
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/jmicron.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typedef enum {
* Returns the cable type.
*/

static u8 __devinit jmicron_cable_detect(ide_hwif_t *hwif)
static u8 jmicron_cable_detect(ide_hwif_t *hwif)
{
struct pci_dev *pdev = to_pci_dev(hwif->dev);

Expand Down
Loading

0 comments on commit 35ad1c8

Please sign in to comment.