Commit 5e9a9303 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://cifs.bkbits.net/linux-2.5cifs

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents c68f5990 4d9a9521
...@@ -34,7 +34,7 @@ are as follows: ...@@ -34,7 +34,7 @@ are as follows:
(struct cdrom_multisession) (struct cdrom_multisession)
CDROM_GET_MCN Obtain the "Universal Product Code" CDROM_GET_MCN Obtain the "Universal Product Code"
if available (struct cdrom_mcn) if available (struct cdrom_mcn)
CDROM_GET_UPC CDROM_GET_MCN (deprecated) CDROM_GET_UPC Deprecated, use CDROM_GET_MCN instead.
CDROMRESET hard-reset the drive CDROMRESET hard-reset the drive
CDROMVOLREAD Get the drive's volume setting CDROMVOLREAD Get the drive's volume setting
(struct cdrom_volctrl) (struct cdrom_volctrl)
...@@ -44,8 +44,8 @@ are as follows: ...@@ -44,8 +44,8 @@ are as follows:
CDROMSEEK seek msf address CDROMSEEK seek msf address
CDROMPLAYBLK scsi-cd only, (struct cdrom_blk) CDROMPLAYBLK scsi-cd only, (struct cdrom_blk)
CDROMREADALL read all 2646 bytes CDROMREADALL read all 2646 bytes
CDROMGETSPINDOWN CDROMGETSPINDOWN return 4-bit spindown value
CDROMSETSPINDOWN CDROMSETSPINDOWN set 4-bit spindown value
CDROMCLOSETRAY pendant of CDROMEJECT CDROMCLOSETRAY pendant of CDROMEJECT
CDROM_SET_OPTIONS Set behavior options CDROM_SET_OPTIONS Set behavior options
CDROM_CLEAR_OPTIONS Clear behavior options CDROM_CLEAR_OPTIONS Clear behavior options
...@@ -79,10 +79,12 @@ code. It is likely that some corrections will be made over time. ...@@ -79,10 +79,12 @@ code. It is likely that some corrections will be made over time.
General: General:
Unless otherwise specified, all ioctl calls return 0 on success Unless otherwise specified, all ioctl calls return 0 on success
and -1 with errno set to an appropriate value on error. and -1 with errno set to an appropriate value on error. (Some
ioctls return non-negative data values.)
Unless otherwise specified, all ioctl calls return EFAULT on a Unless otherwise specified, all ioctl calls return -1 and set
failed attempt to copy data to or from user address space. errno to EFAULT on a failed attempt to copy data to or from user
address space.
Individual drivers may return error codes not listed here. Individual drivers may return error codes not listed here.
...@@ -136,6 +138,9 @@ CDROMPLAYMSF Play Audio MSF (struct cdrom_msf) ...@@ -136,6 +138,9 @@ CDROMPLAYMSF Play Audio MSF (struct cdrom_msf)
ENOSYS cd drive not audio-capable. ENOSYS cd drive not audio-capable.
notes: notes:
MSF stands for minutes-seconds-frames
LBA stands for logical block address
Segment is described as start and end times, where each time Segment is described as start and end times, where each time
is described as minutes:seconds:frames. A frame is 1/75 of is described as minutes:seconds:frames. A frame is 1/75 of
a second. a second.
...@@ -196,8 +201,11 @@ CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry) ...@@ -196,8 +201,11 @@ CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry)
error return: error return:
ENOSYS cd drive not audio-capable. ENOSYS cd drive not audio-capable.
EINVAL entry.cdte_format not CDROM_MSF or CDROM_LBA EINVAL entry.cdte_format not CDROM_MSF or CDROM_LBA
EINVAL requested track out of bounds
EIO I/O error reading TOC
notes: notes:
TOC stands for Table Of Contents
MSF stands for minutes-seconds-frames MSF stands for minutes-seconds-frames
LBA stands for logical block address LBA stands for logical block address
...@@ -216,6 +224,10 @@ CDROMSTOP Stop the cdrom drive ...@@ -216,6 +224,10 @@ CDROMSTOP Stop the cdrom drive
error return: error return:
ENOSYS cd drive not audio-capable. ENOSYS cd drive not audio-capable.
notes:
Exact interpretation of this ioctl depends on the device,
but most seem to spin the drive down.
CDROMSTART Start the cdrom drive CDROMSTART Start the cdrom drive
...@@ -230,6 +242,11 @@ CDROMSTART Start the cdrom drive ...@@ -230,6 +242,11 @@ CDROMSTART Start the cdrom drive
error return: error return:
ENOSYS cd drive not audio-capable. ENOSYS cd drive not audio-capable.
notes:
Exact interpretation of this ioctl depends on the device,
but most seem to spin the drive up and/or close the tray.
Other devices ignore the ioctl completely.
CDROMEJECT Ejects the cdrom media CDROMEJECT Ejects the cdrom media
...@@ -241,9 +258,12 @@ CDROMEJECT Ejects the cdrom media ...@@ -241,9 +258,12 @@ CDROMEJECT Ejects the cdrom media
outputs: none outputs: none
error return: error returns:
ENOSYS cd drive not capable of ejecting ENOSYS cd drive not capable of ejecting
EBUSY other processes have drive open or door is locked EBUSY other processes are accessing drive, or door is locked
notes:
See CDROM_LOCKDOOR, below.
...@@ -257,9 +277,12 @@ CDROMCLOSETRAY pendant of CDROMEJECT ...@@ -257,9 +277,12 @@ CDROMCLOSETRAY pendant of CDROMEJECT
outputs: none outputs: none
error return: error returns:
ENOSYS cd drive not capable of ejecting ENOSYS cd drive not capable of ejecting
EBUSY other processes have drive open or door is locked EBUSY other processes are accessing drive, or door is locked
notes:
See CDROM_LOCKDOOR, below.
...@@ -577,7 +600,7 @@ CDROM_SET_OPTIONS Set behavior options ...@@ -577,7 +600,7 @@ CDROM_SET_OPTIONS Set behavior options
inputs: inputs:
New values for drive options. The logical 'or' of: New values for drive options. The logical 'or' of:
CDO_AUTO_CLOSE close tray on first open CDO_AUTO_CLOSE close tray on first open(2)
CDO_AUTO_EJECT open tray on last release CDO_AUTO_EJECT open tray on last release
CDO_USE_FFLAGS use O_NONBLOCK information on open CDO_USE_FFLAGS use O_NONBLOCK information on open
CDO_LOCK lock tray on open files CDO_LOCK lock tray on open files
...@@ -918,6 +941,10 @@ CDROM_NEXT_WRITABLE get next writable block ...@@ -918,6 +941,10 @@ CDROM_NEXT_WRITABLE get next writable block
outputs: outputs:
The next writable block. The next writable block.
notes:
If the device does not support this ioctl directly, the
ioctl will return CDROM_LAST_WRITTEN + 7.
CDROM_LAST_WRITTEN get last block written on disc CDROM_LAST_WRITTEN get last block written on disc
...@@ -925,11 +952,15 @@ CDROM_LAST_WRITTEN get last block written on disc ...@@ -925,11 +952,15 @@ CDROM_LAST_WRITTEN get last block written on disc
usage: usage:
long last; long last;
ioctl(fd, CDROM_NEXT_WRITABLE, &last); ioctl(fd, CDROM_LAST_WRITTEN, &last);
inputs: none inputs: none
outputs: outputs:
The last block written on disc The last block written on disc
notes:
If the device does not support this ioctl directly, the
result is derived from the disc's table of contents. If the
table of contents can't be read, this ioctl returns an
error.
...@@ -28,7 +28,7 @@ are as follows: ...@@ -28,7 +28,7 @@ are as follows:
HDIO_GET_IDENTITY get IDE identification info HDIO_GET_IDENTITY get IDE identification info
HDIO_GET_WCACHE get write cache mode on|off HDIO_GET_WCACHE get write cache mode on|off
HDIO_GET_ACOUSTIC get acoustic value HDIO_GET_ACOUSTIC get acoustic value
HDIO_GET_ADDRESS HDIO_GET_ADDRESS get sector addressing mode
HDIO_GET_BUSSTATE get the bus state of the hwif HDIO_GET_BUSSTATE get the bus state of the hwif
HDIO_TRISTATE_HWIF execute a channel tristate HDIO_TRISTATE_HWIF execute a channel tristate
HDIO_DRIVE_RESET execute a device reset HDIO_DRIVE_RESET execute a device reset
...@@ -55,8 +55,8 @@ are as follows: ...@@ -55,8 +55,8 @@ are as follows:
HDIO_SET_QDMA change use-qdma flag HDIO_SET_QDMA change use-qdma flag
HDIO_SET_ADDRESS change lba addressing modes HDIO_SET_ADDRESS change lba addressing modes
HDIO_SET_IDE_SCSI HDIO_SET_IDE_SCSI Set scsi emulation mode on/off
HDIO_SET_SCSI_IDE HDIO_SET_SCSI_IDE not implemented yet
The information that follows was determined from reading kernel source The information that follows was determined from reading kernel source
...@@ -73,8 +73,9 @@ General: ...@@ -73,8 +73,9 @@ General:
Unless otherwise specified, all ioctl calls return 0 on success Unless otherwise specified, all ioctl calls return 0 on success
and -1 with errno set to an appropriate value on error. and -1 with errno set to an appropriate value on error.
Unless otherwise specified, all ioctl calls return EFAULT on a Unless otherwise specified, all ioctl calls return -1 and set
failed attempt to copy data to or from user address space. errno to EFAULT on a failed attempt to copy data to or from user
address space.
Unless otherwise specified, all data structures and constants Unless otherwise specified, all data structures and constants
are defined in <linux/hdreg.h> are defined in <linux/hdreg.h>
...@@ -145,7 +146,7 @@ HDIO_SET_UNMASKINTR permit other irqs during I/O ...@@ -145,7 +146,7 @@ HDIO_SET_UNMASKINTR permit other irqs during I/O
usage: usage:
long val; unsigned long val;
ioctl(fd, HDIO_SET_UNMASKINTR, val); ioctl(fd, HDIO_SET_UNMASKINTR, val);
inputs: inputs:
...@@ -204,7 +205,7 @@ HDIO_SET_MULTCOUNT change IDE blockmode ...@@ -204,7 +205,7 @@ HDIO_SET_MULTCOUNT change IDE blockmode
This is tightly woven into the driver->do_special can not This is tightly woven into the driver->do_special can not
touch. DON'T do it again until a total personality rewrite touch. DON'T do it again until a total personality rewrite
is committed." is committed.
If blockmode has already been set, this ioctl will fail with If blockmode has already been set, this ioctl will fail with
EBUSY EBUSY
...@@ -371,14 +372,12 @@ HDIO_SET_NICE set nice flags ...@@ -371,14 +372,12 @@ HDIO_SET_NICE set nice flags
usage: usage:
int nice; unsigned long nice;
... ...
ioctl(fd, HDIO_SET_NICE, nice); ioctl(fd, HDIO_SET_NICE, nice);
inputs: inputs:
args[0] io address to probe bitmask of nice flags.
args[1] control address to probe
args[2] irq number
outputs: none outputs: none
...@@ -392,6 +391,9 @@ HDIO_SET_NICE set nice flags ...@@ -392,6 +391,9 @@ HDIO_SET_NICE set nice flags
This ioctl sets the DSC_OVERLAP and NICE_1 flags from values This ioctl sets the DSC_OVERLAP and NICE_1 flags from values
provided by the user. provided by the user.
Nice flags are listed in <linux/hdreg.h>, starting with
IDE_NICE_DSC_OVERLAP. These values represent shifts.
...@@ -509,7 +511,7 @@ HDIO_DRIVE_RESET execute a device reset ...@@ -509,7 +511,7 @@ HDIO_DRIVE_RESET execute a device reset
notes: notes:
Aborts any current command, prevent anything else from being Abort any current command, prevent anything else from being
queued, execute a reset on the device, and issue BLKRRPART queued, execute a reset on the device, and issue BLKRRPART
ioctl on the block device. ioctl on the block device.
...@@ -523,6 +525,10 @@ HDIO_DRIVE_TASKFILE execute raw taskfile ...@@ -523,6 +525,10 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
Note: If you don't have a copy of the ANSI ATA specification Note: If you don't have a copy of the ANSI ATA specification
handy, you should probably ignore this ioctl. handy, you should probably ignore this ioctl.
Execute an ATA disk command directly by writing the "taskfile"
registers of the drive. Requires ADMIN and RAWIO access
privileges.
usage: usage:
struct { struct {
...@@ -541,27 +547,27 @@ HDIO_DRIVE_TASKFILE execute raw taskfile ...@@ -541,27 +547,27 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
(See below for details on memory area passed to ioctl.) (See below for details on memory area passed to ioctl.)
io_ports[] values to be written to taskfile registers io_ports[8] values to be written to taskfile registers
hob_ports[] values to be written to taskfile registers hob_ports[8] high-order bytes, for extended commands.
out_flags flags indicating which registers are valid out_flags flags indicating which registers are valid
in_flags flags indicating which registers should be returned in_flags flags indicating which registers should be returned
data_phase see below data_phase see below
req_cmd command type to be executed req_cmd command type to be executed
out_size size of output buffer out_size size of output buffer
outbuf buffer of data to be transmitted to disk outbuf buffer of data to be transmitted to disk
inbuf buffer of data to be received from disk inbuf buffer of data to be received from disk (see [1])
outputs: outputs:
io_ports[] values returned in the taskfile registers io_ports[] values returned in the taskfile registers
hob_ports[] values returned in the taskfile registers hob_ports[] high-order bytes, for extended commands.
out_flags flags indicating which registers are valid out_flags flags indicating which registers are valid (see [2])
in_flags flags indicating which registers should be returned in_flags flags indicating which registers should be returned
outbuf buffer of data to be transmitted to disk outbuf buffer of data to be transmitted to disk (see [1])
inbuf buffer of data to be received from disk inbuf buffer of data to be received from disk
error returns: error returns:
EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privelege not set. EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set.
ENOMSG Device is not a disk drive. ENOMSG Device is not a disk drive.
ENOMEM Unable to allocate memory for task ENOMEM Unable to allocate memory for task
EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8) EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8)
...@@ -571,9 +577,14 @@ HDIO_DRIVE_TASKFILE execute raw taskfile ...@@ -571,9 +577,14 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
notes: notes:
Execute an ATA disk command directly by writing the "taskfile" [1] Currently (2.6.8), both the input and output buffers are
registers of the drive. Requires ADMIN and RAWIO access copied from the user and written back to the user, even when
privileges. not used. This may be a bug.
[2] The out_flags and in_flags are returned to the user after
the ioctl completes. Currently (2.6.8) these are the same
as the input values, unchanged. In the future, they may have
more significance.
Extreme caution should be used with using this ioctl. A Extreme caution should be used with using this ioctl. A
mistake can easily corrupt data or hang the system. mistake can easily corrupt data or hang the system.
...@@ -590,7 +601,7 @@ HDIO_DRIVE_TASKFILE execute raw taskfile ...@@ -590,7 +601,7 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
hob_ports[8] high-order bytes, for extended commands hob_ports[8] high-order bytes, for extended commands
out_flags flags indicating which entries in the out_flags flags indicating which entries in the
io_ports[] and hob_ports[] arrays io_ports[] and hob_ports[] arrays
contain valid values. contain valid values. Type ide_reg_valid_t.
in_flags flags indicating which entries in the in_flags flags indicating which entries in the
io_ports[] and hob_ports[] arrays io_ports[] and hob_ports[] arrays
are expected to contain valid values are expected to contain valid values
...@@ -600,8 +611,11 @@ HDIO_DRIVE_TASKFILE execute raw taskfile ...@@ -600,8 +611,11 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
out_size output (user->drive) buffer size, bytes out_size output (user->drive) buffer size, bytes
in_size input (drive->user) buffer size, bytes in_size input (drive->user) buffer size, bytes
Unused fields of io_ports[] and hob_ports[] should be set to This ioctl does not necessarily respect all flags in the
zero. out_flags and in_flags values -- some taskfile registers
may be written or read even if not requested in the flags.
Unused fields of io_ports[] and hob_ports[] should be set
to zero.
The data_phase field describes the data transfer to be The data_phase field describes the data transfer to be
performed. Value is one of: performed. Value is one of:
...@@ -631,10 +645,6 @@ HDIO_DRIVE_TASKFILE execute raw taskfile ...@@ -631,10 +645,6 @@ HDIO_DRIVE_TASKFILE execute raw taskfile
IDE_DRIVE_TASK_OUT IDE_DRIVE_TASK_OUT
IDE_DRIVE_TASK_RAW_WRITE IDE_DRIVE_TASK_RAW_WRITE
Currently (2.6.8), both the input and output buffers are
copied from the user and written back to the user, even when
not used.
...@@ -666,11 +676,17 @@ HDIO_DRIVE_CMD execute a special drive command ...@@ -666,11 +676,17 @@ HDIO_DRIVE_CMD execute a special drive command
args[0] status args[0] status
args[1] error args[1] error
args[2] NSECTOR args[2] NSECTOR
args[3] undefined
args[4+] NSECTOR * 512 bytes of data returned by the command.
error returns: error returns:
EACCES Access denied: requires CAP_SYS_RAWIO EACCES Access denied: requires CAP_SYS_RAWIO
ENOMEM Unable to allocate memory for task ENOMEM Unable to allocate memory for task
notes:
Taskfile registers IDE_LCYL, IDE_HCYL, and IDE_SELECT are
set to zero before executing the command.
......
...@@ -890,8 +890,14 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive, ...@@ -890,8 +890,14 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
ide_execute_command(drive, WIN_PACKETCMD, handler, ATAPI_WAIT_PC, cdrom_timer_expiry); ide_execute_command(drive, WIN_PACKETCMD, handler, ATAPI_WAIT_PC, cdrom_timer_expiry);
return ide_started; return ide_started;
} else { } else {
unsigned long flags;
/* packet command */ /* packet command */
HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); spin_lock_irqsave(&ide_lock, flags);
hwif->OUTBSYNC(drive, WIN_PACKETCMD, IDE_COMMAND_REG);
ndelay(400);
spin_unlock_irqrestore(&ide_lock, flags);
return (*handler) (drive); return (*handler) (drive);
} }
} }
......
...@@ -131,11 +131,9 @@ static const struct drive_list_entry drive_blacklist [] = { ...@@ -131,11 +131,9 @@ static const struct drive_list_entry drive_blacklist [] = {
{ "CD-ROM Drive/F5A", "ALL" }, { "CD-ROM Drive/F5A", "ALL" },
{ "WPI CDD-820", "ALL" }, { "WPI CDD-820", "ALL" },
{ "SAMSUNG CD-ROM SC-148C", "ALL" }, { "SAMSUNG CD-ROM SC-148C", "ALL" },
{ "SAMSUNG CD-ROM SC-148F", "ALL" },
{ "SAMSUNG CD-ROM SC", "ALL" }, { "SAMSUNG CD-ROM SC", "ALL" },
{ "SanDisk SDP3B-64" , "ALL" }, { "SanDisk SDP3B-64" , "ALL" },
{ "SAMSUNG CD-ROM SN-124", "ALL" }, { "SAMSUNG CD-ROM SN-124", "ALL" },
{ "PLEXTOR CD-R PX-W8432T", "ALL" },
{ "ATAPI CD-ROM DRIVE 40X MAXIMUM", "ALL" }, { "ATAPI CD-ROM DRIVE 40X MAXIMUM", "ALL" },
{ "_NEC DV5800A", "ALL" }, { "_NEC DV5800A", "ALL" },
{ NULL , NULL } { NULL , NULL }
......
...@@ -1327,9 +1327,6 @@ int ideprobe_init (void) ...@@ -1327,9 +1327,6 @@ int ideprobe_init (void)
for (index = 0; index < MAX_HWIFS; ++index) for (index = 0; index < MAX_HWIFS; ++index)
probe[index] = !ide_hwifs[index].present; probe[index] = !ide_hwifs[index].present;
/*
* Probe for drives in the usual way.. CMOS/BIOS, then poke at ports
*/
for (index = 0; index < MAX_HWIFS; ++index) for (index = 0; index < MAX_HWIFS; ++index)
if (probe[index]) if (probe[index])
probe_hwif(&ide_hwifs[index]); probe_hwif(&ide_hwifs[index]);
......
...@@ -226,6 +226,8 @@ static int __init ali14xx_probe(void) ...@@ -226,6 +226,8 @@ static int __init ali14xx_probe(void)
probe_hwif_init(hwif); probe_hwif_init(hwif);
probe_hwif_init(mate); probe_hwif_init(mate);
create_proc_ide_interfaces();
return 0; return 0;
} }
......
...@@ -141,6 +141,8 @@ static int __init probe_dtc2278(void) ...@@ -141,6 +141,8 @@ static int __init probe_dtc2278(void)
probe_hwif_init(hwif); probe_hwif_init(hwif);
probe_hwif_init(mate); probe_hwif_init(mate);
create_proc_ide_interfaces();
return 0; return 0;
} }
......
...@@ -352,6 +352,8 @@ int __init ht6560b_init(void) ...@@ -352,6 +352,8 @@ int __init ht6560b_init(void)
probe_hwif_init(hwif); probe_hwif_init(hwif);
probe_hwif_init(mate); probe_hwif_init(mate);
create_proc_ide_interfaces();
return 0; return 0;
release_region: release_region:
......
...@@ -429,6 +429,9 @@ static int __init qd_probe(int base) ...@@ -429,6 +429,9 @@ static int __init qd_probe(int base)
qd_setup(hwif, base, config, QD6500_DEF_DATA, QD6500_DEF_DATA, qd_setup(hwif, base, config, QD6500_DEF_DATA, QD6500_DEF_DATA,
&qd6500_tune_drive); &qd6500_tune_drive);
create_proc_ide_interfaces();
return 1; return 1;
} }
...@@ -459,6 +462,8 @@ static int __init qd_probe(int base) ...@@ -459,6 +462,8 @@ static int __init qd_probe(int base)
&qd6580_tune_drive); &qd6580_tune_drive);
qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT);
create_proc_ide_interfaces();
return 1; return 1;
} else { } else {
ide_hwif_t *mate; ide_hwif_t *mate;
...@@ -477,6 +482,8 @@ static int __init qd_probe(int base) ...@@ -477,6 +482,8 @@ static int __init qd_probe(int base)
&qd6580_tune_drive); &qd6580_tune_drive);
qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT);
create_proc_ide_interfaces();
return 0; /* no other qd65xx possible */ return 0; /* no other qd65xx possible */
} }
} }
......
...@@ -161,6 +161,8 @@ static int __init umc8672_probe(void) ...@@ -161,6 +161,8 @@ static int __init umc8672_probe(void)
probe_hwif_init(hwif); probe_hwif_init(hwif);
probe_hwif_init(mate); probe_hwif_init(mate);
create_proc_ide_interfaces();
return 0; return 0;
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* Copyright (C) 1998-2000 Andre Hedrick (andre@linux-ide.org) * Copyright (C) 1998-2000 Andre Hedrick (andre@linux-ide.org)
* May be copied or modified under the terms of the GNU General Public License * May be copied or modified under the terms of the GNU General Public License
* Copyright (C) 2002 Alan Cox <alan@redhat.com> * Copyright (C) 2002 Alan Cox <alan@redhat.com>
* ALi (now ULi M5228) support by Clear Zhang <Clear.Zhang@ali.com.tw>
* *
* (U)DMA capable version of ali 1533/1543(C), 1535(D) * (U)DMA capable version of ali 1533/1543(C), 1535(D)
* *
...@@ -799,8 +800,9 @@ static void __init init_hwif_ali15x3 (ide_hwif_t *hwif) ...@@ -799,8 +800,9 @@ static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6,
1, 11, 0, 12, 0, 14, 0, 15 }; 1, 11, 0, 12, 0, 14, 0, 15 };
int irq = -1; int irq = -1;
hwif->irq = hwif->channel ? 15 : 14; if (hwif->pci_dev->device == PCI_DEVICE_ID_AL_M5229)
hwif->irq = hwif->channel ? 15 : 14;
if (isa_dev) { if (isa_dev) {
/* /*
...@@ -889,6 +891,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev ...@@ -889,6 +891,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
static struct pci_device_id alim15x3_pci_tbl[] = { static struct pci_device_id alim15x3_pci_tbl[] = {
{ PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5228, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0, }, { 0, },
}; };
MODULE_DEVICE_TABLE(pci, alim15x3_pci_tbl); MODULE_DEVICE_TABLE(pci, alim15x3_pci_tbl);
......
...@@ -347,6 +347,7 @@ static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_devic ...@@ -347,6 +347,7 @@ static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_devic
static struct pci_device_id atiixp_pci_tbl[] = { static struct pci_device_id atiixp_pci_tbl[] = {
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP2_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, }, { 0, },
}; };
MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
......
...@@ -230,7 +230,7 @@ static u8 pdc202xx_old_cable_detect (ide_hwif_t *hwif) ...@@ -230,7 +230,7 @@ static u8 pdc202xx_old_cable_detect (ide_hwif_t *hwif)
{ {
u16 CIS = 0, mask = (hwif->channel) ? (1<<11) : (1<<10); u16 CIS = 0, mask = (hwif->channel) ? (1<<11) : (1<<10);
pci_read_config_word(hwif->pci_dev, 0x50, &CIS); pci_read_config_word(hwif->pci_dev, 0x50, &CIS);
return ((u8)(CIS & mask)); return (CIS & mask) ? 1 : 0;
} }
/* /*
......
...@@ -344,6 +344,7 @@ ...@@ -344,6 +344,7 @@
#define PCI_DEVICE_ID_ATI_RS300_200 0x5833 #define PCI_DEVICE_ID_ATI_RS300_200 0x5833
/* ATI IXP Chipset */ /* ATI IXP Chipset */
#define PCI_DEVICE_ID_ATI_IXP_IDE 0x4349 #define PCI_DEVICE_ID_ATI_IXP_IDE 0x4349
#define PCI_DEVICE_ID_ATI_IXP2_IDE 0x4369 /* True name not yet sure */
#define PCI_VENDOR_ID_VLSI 0x1004 #define PCI_VENDOR_ID_VLSI 0x1004
#define PCI_DEVICE_ID_VLSI_82C592 0x0005 #define PCI_DEVICE_ID_VLSI_82C592 0x0005
...@@ -1029,6 +1030,7 @@ ...@@ -1029,6 +1030,7 @@
#define PCI_DEVICE_ID_AL_M3307 0x3307 #define PCI_DEVICE_ID_AL_M3307 0x3307
#define PCI_DEVICE_ID_AL_M4803 0x5215 #define PCI_DEVICE_ID_AL_M4803 0x5215
#define PCI_DEVICE_ID_AL_M5219 0x5219 #define PCI_DEVICE_ID_AL_M5219 0x5219
#define PCI_DEVICE_ID_AL_M5228 0x5228
#define PCI_DEVICE_ID_AL_M5229 0x5229 #define PCI_DEVICE_ID_AL_M5229 0x5229
#define PCI_DEVICE_ID_AL_M5237 0x5237 #define PCI_DEVICE_ID_AL_M5237 0x5237
#define PCI_DEVICE_ID_AL_M5243 0x5243 #define PCI_DEVICE_ID_AL_M5243 0x5243
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment