Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* 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
This commit is contained in:
Коммит
35ad1c8803
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
* 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>
|
||||
|
@ -18,7 +17,6 @@
|
|||
#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>
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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---
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -66,11 +66,11 @@ 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;
|
||||
|
@ -78,9 +78,11 @@ static struct cdrom_info *ide_cd_get(struct gendisk *disk)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,11 +65,10 @@ 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;
|
||||
|
@ -77,9 +76,11 @@ static struct ide_disk_obj *ide_disk_get(struct gendisk *disk)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -167,11 +167,10 @@ 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;
|
||||
|
@ -179,9 +178,11 @@ static struct ide_floppy_obj *ide_floppy_get(struct gendisk *disk)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -331,11 +331,10 @@ 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;
|
||||
|
@ -343,9 +342,11 @@ static struct ide_tape_obj *ide_tape_get(struct gendisk *disk)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ static void pdcnew_set_pio_mode(ide_drive_t *drive, const u8 pio)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 __devinit pdcnew_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 pdcnew_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
if (get_indexed_reg(hwif, 0x0b) & 0x04)
|
||||
return ATA_CBL_PATA40;
|
||||
|
|
|
@ -117,7 +117,7 @@ static void pdc202xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
|
|||
pdc202xx_set_mode(drive, XFER_PIO_0 + pio);
|
||||
}
|
||||
|
||||
static u8 __devinit pdc2026x_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 pdc2026x_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
||||
u16 CIS, mask = hwif->channel ? (1 << 11) : (1 << 10);
|
||||
|
|
|
@ -256,7 +256,7 @@ static const struct ich_laptop ich_laptop[] = {
|
|||
{ 0, }
|
||||
};
|
||||
|
||||
static u8 __devinit piix_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 piix_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(hwif->dev);
|
||||
const struct ich_laptop *lap = &ich_laptop[0];
|
||||
|
|
|
@ -827,7 +827,7 @@ static void __devinit init_iops_scc(ide_hwif_t *hwif)
|
|||
init_mmio_iops_scc(hwif);
|
||||
}
|
||||
|
||||
static u8 __devinit scc_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 scc_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
return ATA_CBL_PATA80;
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ static unsigned int __devinit init_chipset_svwks(struct pci_dev *dev)
|
|||
return dev->irq;
|
||||
}
|
||||
|
||||
static u8 __devinit ata66_svwks_svwks(ide_hwif_t *hwif)
|
||||
static u8 ata66_svwks_svwks(ide_hwif_t *hwif)
|
||||
{
|
||||
return ATA_CBL_PATA80;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ static u8 __devinit ata66_svwks_svwks(ide_hwif_t *hwif)
|
|||
* Bit 14 clear = primary IDE channel does not have 80-pin cable.
|
||||
* Bit 14 set = primary IDE channel has 80-pin cable.
|
||||
*/
|
||||
static u8 __devinit ata66_svwks_dell(ide_hwif_t *hwif)
|
||||
static u8 ata66_svwks_dell(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
||||
|
||||
|
@ -303,7 +303,7 @@ static u8 __devinit ata66_svwks_dell(ide_hwif_t *hwif)
|
|||
*
|
||||
* WARNING: this only works on Alpine hardware!
|
||||
*/
|
||||
static u8 __devinit ata66_svwks_cobalt(ide_hwif_t *hwif)
|
||||
static u8 ata66_svwks_cobalt(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
||||
|
||||
|
@ -315,7 +315,7 @@ static u8 __devinit ata66_svwks_cobalt(ide_hwif_t *hwif)
|
|||
return ATA_CBL_PATA40;
|
||||
}
|
||||
|
||||
static u8 __devinit svwks_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 svwks_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
||||
|
||||
|
|
|
@ -639,7 +639,7 @@ static int is_dev_seagate_sata(ide_drive_t *drive)
|
|||
* that can occur before we know what drives are present.
|
||||
*/
|
||||
|
||||
static void __devinit sil_quirkproc(ide_drive_t *drive)
|
||||
static void sil_quirkproc(ide_drive_t *drive)
|
||||
{
|
||||
ide_hwif_t *hwif = drive->hwif;
|
||||
|
||||
|
@ -679,7 +679,7 @@ static void __devinit init_iops_siimage(ide_hwif_t *hwif)
|
|||
* Check for the presence of an ATA66 capable cable on the interface.
|
||||
*/
|
||||
|
||||
static u8 __devinit sil_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 sil_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
||||
unsigned long addr = siimage_selreg(hwif, 0);
|
||||
|
|
|
@ -518,7 +518,7 @@ static const struct sis_laptop sis_laptop[] = {
|
|||
{ 0, }
|
||||
};
|
||||
|
||||
static u8 __devinit sis_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 sis_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(hwif->dev);
|
||||
const struct sis_laptop *lap = &sis_laptop[0];
|
||||
|
|
|
@ -116,7 +116,7 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed)
|
|||
}
|
||||
}
|
||||
|
||||
static u8 __devinit slc90e66_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 slc90e66_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
||||
u8 reg47 = 0, mask = hwif->channel ? 0x01 : 0x02;
|
||||
|
|
|
@ -131,7 +131,7 @@ static void tc86c001_dma_start(ide_drive_t *drive)
|
|||
ide_dma_start(drive);
|
||||
}
|
||||
|
||||
static u8 __devinit tc86c001_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 tc86c001_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *dev = to_pci_dev(hwif->dev);
|
||||
unsigned long sc_base = pci_resource_start(dev, 5);
|
||||
|
|
|
@ -352,7 +352,7 @@ static int via_cable_override(struct pci_dev *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif)
|
||||
static u8 via82cxxx_cable_detect(ide_hwif_t *hwif)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(hwif->dev);
|
||||
struct ide_host *host = pci_get_drvdata(pdev);
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/ide.h>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/div64.h>
|
||||
|
|
|
@ -102,11 +102,10 @@ static struct ide_scsi_obj *ide_scsi_get(struct gendisk *disk)
|
|||
mutex_lock(&idescsi_ref_mutex);
|
||||
scsi = ide_scsi_g(disk);
|
||||
if (scsi) {
|
||||
scsi_host_get(scsi->host);
|
||||
if (ide_device_get(scsi->drive)) {
|
||||
scsi_host_put(scsi->host);
|
||||
if (ide_device_get(scsi->drive))
|
||||
scsi = NULL;
|
||||
}
|
||||
else
|
||||
scsi_host_get(scsi->host);
|
||||
}
|
||||
mutex_unlock(&idescsi_ref_mutex);
|
||||
return scsi;
|
||||
|
@ -114,9 +113,11 @@ static struct ide_scsi_obj *ide_scsi_get(struct gendisk *disk)
|
|||
|
||||
static void ide_scsi_put(struct ide_scsi_obj *scsi)
|
||||
{
|
||||
ide_drive_t *drive = scsi->drive;
|
||||
|
||||
mutex_lock(&idescsi_ref_mutex);
|
||||
ide_device_put(scsi->drive);
|
||||
scsi_host_put(scsi->host);
|
||||
ide_device_put(drive);
|
||||
mutex_unlock(&idescsi_ref_mutex);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
* (http://www.freecom.de/)
|
||||
*/
|
||||
|
||||
#include <linux/hdreg.h>
|
||||
|
||||
#include <scsi/scsi.h>
|
||||
#include <scsi/scsi_cmnd.h>
|
||||
|
||||
|
|
|
@ -219,18 +219,7 @@ static inline int __ide_default_irq(unsigned long base)
|
|||
#include <asm-generic/ide_iops.h>
|
||||
#endif
|
||||
|
||||
#ifndef MAX_HWIFS
|
||||
#if defined(CONFIG_BLACKFIN) || defined(CONFIG_H8300) || defined(CONFIG_XTENSA)
|
||||
# define MAX_HWIFS 1
|
||||
#else
|
||||
# define MAX_HWIFS 10
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(MAX_HWIFS) || defined(CONFIG_EMBEDDED)
|
||||
#undef MAX_HWIFS
|
||||
#define MAX_HWIFS CONFIG_IDE_MAX_HWIFS
|
||||
#endif
|
||||
#define MAX_HWIFS 10
|
||||
|
||||
/* Currently only m68k, apus and m8xx need it */
|
||||
#ifndef IDE_ARCH_ACK_INTR
|
||||
|
@ -509,24 +498,33 @@ struct ide_tp_ops {
|
|||
|
||||
extern const struct ide_tp_ops default_tp_ops;
|
||||
|
||||
/**
|
||||
* struct ide_port_ops - IDE port operations
|
||||
*
|
||||
* @init_dev: host specific initialization of a device
|
||||
* @set_pio_mode: routine to program host for PIO mode
|
||||
* @set_dma_mode: routine to program host for DMA mode
|
||||
* @selectproc: tweaks hardware to select drive
|
||||
* @reset_poll: chipset polling based on hba specifics
|
||||
* @pre_reset: chipset specific changes to default for device-hba resets
|
||||
* @resetproc: routine to reset controller after a disk reset
|
||||
* @maskproc: special host masking for drive selection
|
||||
* @quirkproc: check host's drive quirk list
|
||||
*
|
||||
* @mdma_filter: filter MDMA modes
|
||||
* @udma_filter: filter UDMA modes
|
||||
*
|
||||
* @cable_detect: detect cable type
|
||||
*/
|
||||
struct ide_port_ops {
|
||||
/* host specific initialization of a device */
|
||||
void (*init_dev)(ide_drive_t *);
|
||||
/* routine to program host for PIO mode */
|
||||
void (*set_pio_mode)(ide_drive_t *, const u8);
|
||||
/* routine to program host for DMA mode */
|
||||
void (*set_dma_mode)(ide_drive_t *, const u8);
|
||||
/* tweaks hardware to select drive */
|
||||
void (*selectproc)(ide_drive_t *);
|
||||
/* chipset polling based on hba specifics */
|
||||
int (*reset_poll)(ide_drive_t *);
|
||||
/* chipset specific changes to default for device-hba resets */
|
||||
void (*pre_reset)(ide_drive_t *);
|
||||
/* routine to reset controller after a disk reset */
|
||||
void (*resetproc)(ide_drive_t *);
|
||||
/* special host masking for drive selection */
|
||||
void (*maskproc)(ide_drive_t *, int);
|
||||
/* check host's drive quirk list */
|
||||
void (*quirkproc)(ide_drive_t *);
|
||||
|
||||
u8 (*mdma_filter)(ide_drive_t *);
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/initrd.h>
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/gfp.h>
|
||||
|
|
Загрузка…
Ссылка в новой задаче