Commit e752b6dd authored by Linus Torvalds's avatar Linus Torvalds

Merge http://gkernel.bkbits.net/misc-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 2d46fcbe acff0d93
VERSION = 2
PATCHLEVEL = 5
SUBLEVEL = 15
SUBLEVEL = 16
EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
......@@ -266,7 +266,6 @@ CONFIG_BLK_DEV_CY82C693=y
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC_ADMA is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_PDC202XX_FORCE is not set
......
......@@ -275,7 +275,6 @@ CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC_ADMA is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_PDC202XX_FORCE is not set
......
......@@ -247,7 +247,6 @@ CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC_ADMA is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_PDC202XX_FORCE is not set
......
......@@ -310,7 +310,6 @@ CONFIG_BLK_DEV_CMD64X=y
# CONFIG_BLK_DEV_PIIX is not set
CONFIG_BLK_DEV_NS87415=y
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC_ADMA is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_PDC202XX_FORCE is not set
......
......@@ -228,7 +228,6 @@ CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC_ADMA is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_PDC202XX_FORCE is not set
......
......@@ -294,9 +294,6 @@ CONFIG_IDEDMA_IVB
It is normally safe to answer Y; however, the default is N.
CONFIG_BLK_DEV_PDC_ADMA
Please read the comments at the top of <file:drivers/ide/ide-pci.c>.
CONFIG_BLK_DEV_AEC62XX
This driver adds up to 4 more EIDE devices sharing a single
interrupt. This add-on card is a bootable PCI UDMA controller. In
......
......@@ -73,7 +73,6 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
fi
dep_bool ' NS87415 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_NS87415 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' OPTi 82C621 chipset enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621 $CONFIG_PCI $CONFIG_EXPERIMENTAL
dep_mbool ' Pacific Digital A-DMA support (EXPERIMENTAL)' CONFIG_BLK_DEV_PDC_ADMA $CONFIG_EXPERIMENTAL
dep_bool ' PROMISE PDC202{46|62|65|67|68|69|70} support' CONFIG_BLK_DEV_PDC202XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX
dep_bool ' Special FastTrak Feature' CONFIG_PDC202XX_FORCE $CONFIG_BLK_DEV_PDC202XX
......
......@@ -10,7 +10,7 @@
O_TARGET := idedriver.o
export-objs := ide-taskfile.o ide.o ide-features.o ide-probe.o ide-dma.o ataraid.o
export-objs := ide-taskfile.o ide.o ide-features.o ide-probe.o quirks.o pcidma.o ataraid.o
obj-y :=
obj-m :=
......@@ -43,7 +43,8 @@ ide-obj-$(CONFIG_BLK_DEV_HPT34X) += hpt34x.o
ide-obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o
ide-obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
ide-obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
ide-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
ide-obj-$(CONFIG_BLK_DEV_IDEDMA) += quirks.o
ide-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += pcidma.o
ide-obj-$(CONFIG_BLK_DEV_IDE_TCQ) += tcq.o
ide-obj-$(CONFIG_PCI) += ide-pci.o
ide-obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
......@@ -54,7 +55,6 @@ ide-obj-$(CONFIG_BLK_DEV_OPTI621) += opti621.o
ide-obj-$(CONFIG_BLK_DEV_SVWKS) += serverworks.o
ide-obj-$(CONFIG_BLK_DEV_PDC202XX) += pdc202xx.o
ide-obj-$(CONFIG_BLK_DEV_PDC4030) += pdc4030.o
ide-obj-$(CONFIG_BLK_DEV_PDC_ADMA) += pdcadma.o
ide-obj-$(CONFIG_BLK_DEV_PIIX) += piix.o
ide-obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o
ide-obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
......
......@@ -70,7 +70,7 @@ struct ata_timing ata_timing[] = {
* then to be matched agains in esp. other drives no the same channel or even
* the whole particular host chip.
*/
short ata_timing_mode(ide_drive_t *drive, int map)
short ata_timing_mode(struct ata_device *drive, int map)
{
struct hd_driveid *id = drive->id;
short best = 0;
......@@ -192,7 +192,7 @@ struct ata_timing* ata_timing_data(short speed)
return t;
}
int ata_timing_compute(ide_drive_t *drive, short speed, struct ata_timing *t,
int ata_timing_compute(struct ata_device *drive, short speed, struct ata_timing *t,
int T, int UT)
{
struct hd_driveid *id = drive->id;
......
This diff is collapsed.
......@@ -316,7 +316,7 @@ static ide_startstop_t idedisk_do_request(struct ata_device *drive, struct reque
unsigned long flags;
int ret;
spin_lock_irqsave(&ide_lock, flags);
spin_lock_irqsave(drive->channel->lock, flags);
ret = blk_queue_start_tag(&drive->queue, rq);
......@@ -325,7 +325,7 @@ static ide_startstop_t idedisk_do_request(struct ata_device *drive, struct reque
if (ata_pending_commands(drive) > drive->max_last_depth)
drive->max_last_depth = ata_pending_commands(drive);
spin_unlock_irqrestore(&ide_lock, flags);
spin_unlock_irqrestore(drive->channel->lock, flags);
if (ret) {
BUG_ON(!ata_pending_commands(drive));
......@@ -438,13 +438,6 @@ static int set_multcount(struct ata_device *drive, int arg)
if (!drive->id)
return -EIO;
/* FIXME: Hmm... just bailing out my be problematic, since there *is*
* activity during boot. For now the same problem persists in
* set_pio_mode() we will have to do something about it soon.
*/
if (HWGROUP(drive)->handler)
return -EBUSY;
if (arg > drive->id->max_multsect)
arg = drive->id->max_multsect;
......@@ -466,9 +459,6 @@ static int set_multcount(struct ata_device *drive, int arg)
static int set_nowerr(struct ata_device *drive, int arg)
{
if (HWGROUP(drive)->handler)
return -EBUSY;
drive->nowerr = arg;
drive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT;
......@@ -576,8 +566,8 @@ static int idedisk_suspend(struct device *dev, u32 state, u32 level)
return 0;
/* wait until all commands are finished */
printk("ide_disk_suspend()\n");
while (HWGROUP(drive)->handler)
/* FIXME: waiting for spinlocks should be done instead. */
while (drive->channel->handler)
yield();
/* set the drive to standby */
......@@ -1022,7 +1012,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
return -EBUSY;
val = set_lba_addressing(drive, arg);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
return val;
}
......@@ -1048,7 +1038,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
return -EBUSY;
val = set_multcount(drive, arg);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
return val;
}
......@@ -1058,6 +1048,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
if (put_user(val, (unsigned long *) arg))
return -EFAULT;
return 0;
}
......@@ -1071,7 +1062,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
return -EBUSY;
val = set_nowerr(drive, arg);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
return val;
}
......@@ -1081,6 +1072,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
if (put_user(val, (unsigned long *) arg))
return -EFAULT;
return 0;
}
......@@ -1094,13 +1086,13 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
return -EBUSY;
val = write_cache(drive, arg);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
return val;
}
case HDIO_GET_ACOUSTIC: {
u8 val = drive->acoustic;
unsigned long val = drive->acoustic;
if (put_user(val, (u8 *) arg))
return -EFAULT;
......@@ -1117,7 +1109,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
return -EBUSY;
val = set_acoustic(drive, arg);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
return val;
}
......@@ -1128,6 +1120,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
if (put_user(val, (u8 *) arg))
return -EFAULT;
return 0;
}
......@@ -1141,7 +1134,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
return -EBUSY;
val = set_using_tcq(drive, arg);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
return val;
}
......@@ -1153,7 +1146,7 @@ static int idedisk_ioctl(struct ata_device *drive, struct inode *inode, struct f
/*
* IDE subdriver functions, registered with ide.c
* Subdriver functions.
*/
static struct ata_operations idedisk_driver = {
owner: THIS_MODULE,
......@@ -1178,11 +1171,9 @@ static void __exit idedisk_exit (void)
while ((drive = ide_scan_devices(ATA_DISK, "ide-disk", &idedisk_driver, failed)) != NULL) {
if (idedisk_cleanup (drive)) {
printk (KERN_ERR "%s: cleanup_module() called while still busy\n", drive->name);
failed++;
printk(KERN_ERR "%s: cleanup_module() called while still busy\n", drive->name);
++failed;
}
/* We must remove proc entries defined in this module.
Otherwise we oops while accessing these entries */
}
}
......@@ -1203,10 +1194,11 @@ int idedisk_init(void)
idedisk_cleanup(drive);
continue;
}
failed--;
--failed;
}
revalidate_drives();
MOD_DEC_USE_COUNT;
return 0;
}
......
......@@ -78,31 +78,6 @@ char *ide_xfer_verbose (byte xfer_rate)
return "XFER ERROR";
}
byte ide_auto_reduce_xfer (ide_drive_t *drive)
{
if (!drive->crc_count)
return drive->current_speed;
drive->crc_count = 0;
switch(drive->current_speed) {
case XFER_UDMA_7: return XFER_UDMA_6;
case XFER_UDMA_6: return XFER_UDMA_5;
case XFER_UDMA_5: return XFER_UDMA_4;
case XFER_UDMA_4: return XFER_UDMA_3;
case XFER_UDMA_3: return XFER_UDMA_2;
case XFER_UDMA_2: return XFER_UDMA_1;
case XFER_UDMA_1: return XFER_UDMA_0;
/*
* OOPS we do not goto non Ultra DMA modes
* without iCRC's available we force
* the system to PIO and make the user
* invoke the ATA-1 ATA-2 DMA modes.
*/
case XFER_UDMA_0:
default: return XFER_PIO_4;
}
}
/*
* hd_driveid data come as little endian,
* they need to be converted on big endian machines
......@@ -110,7 +85,7 @@ byte ide_auto_reduce_xfer (ide_drive_t *drive)
void ide_fix_driveid(struct hd_driveid *id)
{
#ifndef __LITTLE_ENDIAN
#ifdef __BIG_ENDIAN
# ifdef __BIG_ENDIAN
int i;
unsigned short *stringcast;
......@@ -196,13 +171,13 @@ void ide_fix_driveid(struct hd_driveid *id)
for (i = 0; i < 48; i++)
id->words206_254[i] = __le16_to_cpu(id->words206_254[i]);
id->integrity_word = __le16_to_cpu(id->integrity_word);
#else
#error "Please fix <asm/byteorder.h>"
#endif /* __BIG_ENDIAN */
#endif /* __LITTLE_ENDIAN */
# else
# error "Please fix <asm/byteorder.h>"
# endif
#endif
}
int ide_driveid_update (ide_drive_t *drive)
int ide_driveid_update(struct ata_device *drive)
{
/*
* Re-read drive->id for possible DMA mode
......@@ -255,56 +230,9 @@ int ide_driveid_update (ide_drive_t *drive)
}
/*
* Verify that we are doing an approved SETFEATURES_XFER with respect
* to the hardware being able to support request. Since some hardware
* can improperly report capabilties, we check to see if the host adapter
* in combination with the device (usually a disk) properly detect
* and acknowledge each end of the ribbon.
*/
int ide_ata66_check (ide_drive_t *drive, struct ata_taskfile *args)
{
if ((args->taskfile.command == WIN_SETFEATURES) &&
(args->taskfile.sector_number > XFER_UDMA_2) &&
(args->taskfile.feature == SETFEATURES_XFER)) {
if (!drive->channel->udma_four) {
printk("%s: Speed warnings UDMA 3/4/5 is not functional.\n", drive->channel->name);
return 1;
}
#ifndef CONFIG_IDEDMA_IVB
if ((drive->id->hw_config & 0x6000) == 0) {
#else
if (((drive->id->hw_config & 0x2000) == 0) ||
((drive->id->hw_config & 0x4000) == 0)) {
#endif
printk("%s: Speed warnings UDMA 3/4/5 is not functional.\n", drive->name);
return 1;
}
}
return 0;
}
/*
* Backside of HDIO_DRIVE_CMD call of SETFEATURES_XFER.
* 1 : Safe to update drive->id DMA registers.
* 0 : OOPs not allowed.
*/
int set_transfer (ide_drive_t *drive, struct ata_taskfile *args)
{
if ((args->taskfile.command == WIN_SETFEATURES) &&
(args->taskfile.sector_number >= XFER_SW_DMA_0) &&
(args->taskfile.feature == SETFEATURES_XFER) &&
(drive->id->dma_ultra ||
drive->id->dma_mword ||
drive->id->dma_1word))
return 1;
return 0;
}
/*
* All hosts that use the 80c ribbon mus use!
* All hosts that use the 80c ribbon must use this!
*/
byte eighty_ninty_three (ide_drive_t *drive)
byte eighty_ninty_three(struct ata_device *drive)
{
return ((byte) ((drive->channel->udma_four) &&
#ifndef CONFIG_IDEDMA_IVB
......@@ -324,7 +252,7 @@ byte eighty_ninty_three (ide_drive_t *drive)
*
* const char *msg == consider adding for verbose errors.
*/
int ide_config_drive_speed (ide_drive_t *drive, byte speed)
int ide_config_drive_speed(struct ata_device *drive, byte speed)
{
struct ata_channel *hwif = drive->channel;
int i;
......@@ -407,7 +335,7 @@ int ide_config_drive_speed (ide_drive_t *drive, byte speed)
} else {
outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2);
}
#endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */
#endif
switch(speed) {
case XFER_UDMA_7: drive->id->dma_ultra |= 0x8080; break;
......@@ -429,11 +357,7 @@ int ide_config_drive_speed (ide_drive_t *drive, byte speed)
return error;
}
EXPORT_SYMBOL(ide_auto_reduce_xfer);
EXPORT_SYMBOL(ide_fix_driveid);
EXPORT_SYMBOL(ide_driveid_update);
EXPORT_SYMBOL(ide_ata66_check);
EXPORT_SYMBOL(set_transfer);
EXPORT_SYMBOL(eighty_ninty_three);
EXPORT_SYMBOL(ide_config_drive_speed);
......@@ -879,7 +879,7 @@ static void idefloppy_retry_pc (ide_drive_t *drive)
pc = idefloppy_next_pc_storage (drive);
rq = idefloppy_next_rq_storage (drive);
idefloppy_create_request_sense_cmd (pc);
idefloppy_queue_pc_head (drive, pc, rq);
idefloppy_queue_pc_head(drive, pc, rq);
}
/*
......
/*
* linux/drivers/ide/ide-geometry.c
*
* Sun Feb 24 23:13:03 CET 2002: Patch by Andries Brouwer to remove the
* confused CMOS probe applied. This is solving more problems than it may
* (unexpectedly) introduce.
......@@ -14,17 +12,17 @@
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
extern ide_drive_t * get_info_ptr(kdev_t);
extern struct ata_device * get_info_ptr(kdev_t);
/*
* If heads is nonzero: find a translation with this many heads and S=63.
* Otherwise: find out how OnTrack Disk Manager would translate the disk.
*/
static void
ontrack(ide_drive_t *drive, int heads, unsigned int *c, int *h, int *s)
ontrack(struct ata_device *drive, int heads, unsigned int *c, int *h, int *s)
{
static const byte dm_head_vals[] = {4, 8, 16, 32, 64, 128, 255, 0};
const byte *headp = dm_head_vals;
static const u8 dm_head_vals[] = {4, 8, 16, 32, 64, 128, 255, 0};
const u8 *headp = dm_head_vals;
unsigned long total;
/*
......@@ -76,9 +74,9 @@ ontrack(ide_drive_t *drive, int heads, unsigned int *c, int *h, int *s)
* an IDE disk drive, or if a geometry was "forced" on the commandline.
* Returns 1 if the geometry translation was successful.
*/
int ide_xlate_1024 (kdev_t i_rdev, int xparm, int ptheads, const char *msg)
int ide_xlate_1024(kdev_t i_rdev, int xparm, int ptheads, const char *msg)
{
ide_drive_t *drive;
struct ata_device *drive;
const char *msg1 = "";
int heads = 0;
int c, h, s;
......@@ -144,4 +142,4 @@ int ide_xlate_1024 (kdev_t i_rdev, int xparm, int ptheads, const char *msg)
drive->bios_cyl, drive->bios_head, drive->bios_sect);
return ret;
}
#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
#endif
......@@ -122,7 +122,7 @@ static struct ata_channel __init *lookup_channel(unsigned long io_base, int boot
* Unless there is a bootable card that does not use the standard
* ports 1f0/170 (the ide0/ide1 defaults). The (bootable) flag.
*/
if (bootable) {
if (bootable == ON_BOARD) {
for (h = 0; h < MAX_HWIFS; ++h) {
hwif = &ide_hwifs[h];
if (hwif->chipset == ide_unknown)
......@@ -553,15 +553,14 @@ static void __init pdc20270_device_order_fixup (struct pci_dev *dev, struct ata_
}
}
}
printk("ATA: %s: controller on PCI bus %02x dev %02x\n",
dev->name, dev->bus->number, dev->devfn);
printk(KERN_INFO "ATA: %s: controller on PCI slot %s dev %02x\n",
dev->name, dev->slot_name, dev->devfn);
setup_pci_device(dev, d);
if (!dev2)
return;
d2 = d;
printk("ATA: %s: controller on PCI bus %02x dev %02x\n",
dev2->name, dev2->bus->number, dev2->devfn);
printk(KERN_INFO "ATA: %s: controller on PCI slot %s dev %02x\n",
dev2->name, dev2->slot_name, dev2->devfn);
setup_pci_device(dev2, d2);
}
......@@ -584,8 +583,8 @@ static void __init hpt374_device_order_fixup (struct pci_dev *dev, struct ata_pc
}
}
printk("%s: IDE controller on PCI bus %02x dev %02x\n",
dev->name, dev->bus->number, dev->devfn);
printk(KERN_INFO "ATA: %s: controller on PCI slot %s dev %02x\n",
dev->name, dev->slot_name, dev->devfn);
setup_pci_device(dev, d);
if (!dev2) {
return;
......@@ -601,8 +600,8 @@ static void __init hpt374_device_order_fixup (struct pci_dev *dev, struct ata_pc
}
}
d2 = d;
printk("%s: IDE controller on PCI bus %02x dev %02x\n",
dev2->name, dev2->bus->number, dev2->devfn);
printk(KERN_INFO "ATA: %s: controller on PCI slot %s dev %02x\n",
dev2->name, dev2->slot_name, dev2->devfn);
setup_pci_device(dev2, d2);
}
......@@ -623,7 +622,7 @@ static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pc
switch(class_rev) {
case 5:
case 4:
case 3: printk("%s: IDE controller on PCI slot %s\n", dev->name, dev->slot_name);
case 3: printk(KERN_INFO "ATA: %s: controller on PCI slot %s\n", dev->name, dev->slot_name);
setup_pci_device(dev, d);
return;
default: break;
......@@ -639,17 +638,17 @@ static void __init hpt366_device_order_fixup (struct pci_dev *dev, struct ata_pc
pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin2);
if ((pin1 != pin2) && (dev->irq == dev2->irq)) {
d->bootable = ON_BOARD;
printk("%s: onboard version of chipset, pin1=%d pin2=%d\n", dev->name, pin1, pin2);
printk(KERN_INFO "ATAL: %s: onboard version of chipset, pin1=%d pin2=%d\n", dev->name, pin1, pin2);
}
break;
}
}
printk("%s: IDE controller on PCI slot %s\n", dev->name, dev->slot_name);
printk(KERN_INFO "ATA: %s: controller on PCI slot %s\n", dev->name, dev->slot_name);
setup_pci_device(dev, d);
if (!dev2)
return;
d2 = d;
printk("%s: IDE controller on PCI slot %s\n", dev2->name, dev2->slot_name);
printk(KERN_INFO "ATA: %s: controller on PCI slot %s\n", dev2->name, dev2->slot_name);
setup_pci_device(dev2, d2);
}
......@@ -679,6 +678,10 @@ static void __init scan_pcidev(struct pci_dev *dev)
}
if (!d) {
/* Only check the device calls, if it wasn't listed, since
* there are in esp. some pdc202xx chips which "work around"
* beeing grabbed by generic drivers.
*/
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
printk(KERN_INFO "ATA: unknown interface: %s, on PCI slot %s\n",
dev->name, dev->slot_name);
......@@ -703,7 +706,7 @@ static void __init scan_pcidev(struct pci_dev *dev)
hpt374_device_order_fixup(dev, d);
} else if (d->vendor == PCI_VENDOR_ID_PROMISE && d->device == PCI_DEVICE_ID_PROMISE_20268R)
pdc20270_device_order_fixup(dev, d);
else if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
else {
printk(KERN_INFO "ATA: %s (%04x:%04x) on PCI slot %s\n",
dev->name, vendor, device, dev->slot_name);
setup_pci_device(dev, d);
......
......@@ -20,7 +20,9 @@
*
* - Find a way to duplicate less code with ide-dma and use the
* dma fileds in the hwif structure instead of our own
*
* - Fix check_disk_change() call
*
* - Make module-able (includes setting ppc_md. hooks from within
* this file and not from arch code, and handling module deps with
* mediabay (by having both modules do dynamic lookup of each other
......@@ -53,8 +55,6 @@
#endif
#include "ata-timing.h"
extern spinlock_t ide_lock;
#undef IDE_PMAC_DEBUG
#define DMA_WAIT_TIMEOUT 500
......@@ -280,7 +280,7 @@ struct pmu_sleep_notifier idepmac_sleep_notifier = {
#endif /* CONFIG_PMAC_PBOOK */
static int __pmac
pmac_ide_find(ide_drive_t *drive)
pmac_ide_find(struct ata_device *drive)
{
struct ata_channel *hwif = drive->channel;
ide_ioreg_t base;
......@@ -352,7 +352,7 @@ pmac_ide_init_hwif_ports(hw_regs_t *hw,
* device for yaboot configuration
*/
struct device_node*
pmac_ide_get_devnode(ide_drive_t *drive)
pmac_ide_get_devnode(struct ata_device *drive)
{
int i = pmac_ide_find(drive);
if (i < 0)
......@@ -365,7 +365,7 @@ pmac_ide_get_devnode(ide_drive_t *drive)
* is enough, I beleive selectproc will be called whenever an IDE command is started,
* but... */
static void __pmac
pmac_ide_selectproc(ide_drive_t *drive)
pmac_ide_selectproc(struct ata_device *drive)
{
int i = pmac_ide_find(drive);
if (i < 0)
......@@ -391,7 +391,7 @@ pmac_ide_selectproc(ide_drive_t *drive)
* --BenH
*/
static int __pmac
wait_for_ready(ide_drive_t *drive)
wait_for_ready(struct ata_device *drive)
{
/* Timeout bumped for some powerbooks */
int timeout = 2000;
......@@ -417,7 +417,7 @@ wait_for_ready(ide_drive_t *drive)
}
static int __pmac
pmac_ide_do_setfeature(ide_drive_t *drive, byte command)
pmac_ide_do_setfeature(struct ata_device *drive, byte command)
{
int result = 1;
unsigned long flags;
......@@ -477,7 +477,7 @@ pmac_ide_do_setfeature(ide_drive_t *drive, byte command)
/* Calculate PIO timings */
static void __pmac
pmac_ide_tuneproc(ide_drive_t *drive, byte pio)
pmac_ide_tuneproc(struct ata_device *drive, byte pio)
{
struct ata_timing *t;
int i;
......@@ -667,19 +667,19 @@ set_timings_mdma(int intf_type, u32 *timings, byte speed, int drive_cycle_time)
if (halfTick)
*timings |= TR_33_MDMA_HALFTICK;
}
#ifdef IDE_PMAC_DEBUG
# ifdef IDE_PMAC_DEBUG
printk(KERN_ERR "ide_pmac: Set MDMA timing for mode %d, reg: 0x%08x\n",
speed & 0xf, *timings);
#endif
# endif
return 0;
}
#endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */
#endif
/* You may notice we don't use this function on normal operation,
* our, normal mdma function is supposed to be more precise
*/
static int __pmac
pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
pmac_ide_tune_chipset (struct ata_device *drive, byte speed)
{
int intf = pmac_ide_find(drive);
int unit = (drive->select.b.unit & 0x01);
......@@ -714,7 +714,7 @@ pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
case XFER_SW_DMA_1:
case XFER_SW_DMA_0:
return 1;
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
#endif
case XFER_PIO_4:
case XFER_PIO_3:
case XFER_PIO_2:
......@@ -950,7 +950,7 @@ pmac_ide_probe(void)
&& strcasecmp(np->parent->name, "media-bay") == 0) {
#ifdef CONFIG_PMAC_PBOOK
media_bay_set_ide_infos(np->parent,base,irq,i);
#endif /* CONFIG_PMAC_PBOOK */
#endif
in_bay = 1;
if (!bidp)
pmif->aapl_bus_id = 1;
......@@ -981,14 +981,14 @@ pmac_ide_probe(void)
#ifdef CONFIG_PMAC_PBOOK
if (in_bay && check_media_bay_by_base(base, MB_CD) == 0)
hwif->noprobe = 0;
#endif /* CONFIG_PMAC_PBOOK */
#endif
#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
if (pdev && np->n_addrs >= 2) {
/* has a DBDMA controller channel */
pmac_ide_setup_dma(np, i);
}
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
#endif
++i;
}
......@@ -998,7 +998,7 @@ pmac_ide_probe(void)
#ifdef CONFIG_PMAC_PBOOK
pmu_register_sleep_notifier(&idepmac_sleep_notifier);
#endif /* CONFIG_PMAC_PBOOK */
#endif
}
#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
......@@ -1230,7 +1230,7 @@ udma_bits_to_command(unsigned char bits, int high_speed)
/* Calculate MultiWord DMA timings */
static int __pmac
pmac_ide_mdma_enable(ide_drive_t *drive, int idx)
pmac_ide_mdma_enable(struct ata_device *drive, int idx)
{
byte bits = drive->id->dma_mword & 0x07;
byte feature = dma_bits_to_command(bits);
......@@ -1271,7 +1271,7 @@ pmac_ide_mdma_enable(ide_drive_t *drive, int idx)
/* Calculate Ultra DMA timings */
static int __pmac
pmac_ide_udma_enable(ide_drive_t *drive, int idx, int high_speed)
pmac_ide_udma_enable(struct ata_device *drive, int idx, int high_speed)
{
byte bits = drive->id->dma_ultra & 0x1f;
byte feature = udma_bits_to_command(bits, high_speed);
......@@ -1302,7 +1302,7 @@ pmac_ide_udma_enable(ide_drive_t *drive, int idx, int high_speed)
}
static int __pmac
pmac_ide_check_dma(ide_drive_t *drive)
pmac_ide_check_dma(struct ata_device *drive)
{
int ata4, udma, idx;
struct hd_driveid *id = drive->id;
......@@ -1343,7 +1343,7 @@ pmac_ide_check_dma(ide_drive_t *drive)
return 0;
}
static void ide_toggle_bounce(ide_drive_t *drive, int on)
static void ide_toggle_bounce(struct ata_device *drive, int on)
{
dma64_addr_t addr = BLK_BOUNCE_HIGH;
......@@ -1530,7 +1530,7 @@ static int pmac_ide_dmaproc(struct ata_device *drive)
}
#endif
static void idepmac_sleep_device(ide_drive_t *drive, int i, unsigned base)
static void idepmac_sleep_device(struct ata_device *drive, int i, unsigned base)
{
int j;
......@@ -1568,7 +1568,7 @@ static void idepmac_sleep_device(ide_drive_t *drive, int i, unsigned base)
#ifdef CONFIG_PMAC_PBOOK
static void __pmac
idepmac_wake_device(ide_drive_t *drive, int used_dma)
idepmac_wake_device(struct ata_device *drive, int used_dma)
{
/* We force the IDE subdriver to check for a media change
* This must be done first or we may lost the condition
......@@ -1590,12 +1590,12 @@ idepmac_wake_device(ide_drive_t *drive, int used_dma)
*/
if (used_dma && !ide_spin_wait_hwgroup(drive)) {
/* Lock HW group */
set_bit(IDE_BUSY, &HWGROUP(drive)->flags);
set_bit(IDE_BUSY, &drive->channel->active);
pmac_ide_check_dma(drive);
clear_bit(IDE_BUSY, &HWGROUP(drive)->flags);
spin_unlock_irq(&ide_lock);
clear_bit(IDE_BUSY, &drive->channel->active);
spin_unlock_irq(drive->channel->lock);
}
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
#endif
}
static void __pmac
......@@ -1630,7 +1630,7 @@ idepmac_wake_interface(int i, unsigned long base, int mediabay)
}
static void
idepmac_sleep_drive(ide_drive_t *drive, int idx, unsigned long base)
idepmac_sleep_drive(struct ata_device *drive, int idx, unsigned long base)
{
/* Wait for HW group to complete operations */
if (ide_spin_wait_hwgroup(drive))
......@@ -1639,15 +1639,15 @@ idepmac_sleep_drive(ide_drive_t *drive, int idx, unsigned long base)
return;
else {
/* Lock HW group */
set_bit(IDE_BUSY, &HWGROUP(drive)->flags);
set_bit(IDE_BUSY, &drive->channel->active);
/* Stop the device */
idepmac_sleep_device(drive, idx, base);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
}
}
static void
idepmac_wake_drive(ide_drive_t *drive, unsigned long base)
idepmac_wake_drive(struct ata_device *drive, unsigned long base)
{
int j;
......@@ -1667,12 +1667,12 @@ idepmac_wake_drive(ide_drive_t *drive, unsigned long base)
break;
}
/* We resume processing on the HW group */
spin_lock_irq(&ide_lock);
clear_bit(IDE_BUSY, &HWGROUP(drive)->flags);
/* We resume processing on the lock group */
spin_lock_irq(drive->channel->lock);
clear_bit(IDE_BUSY, &drive->channel->active);
if (!list_empty(&drive->queue.queue_head))
do_ide_request(&drive->queue);
spin_unlock_irq(&ide_lock);
spin_unlock_irq(drive->channel->lock);
}
/* Note: We support only master drives for now. This will have to be
......@@ -1750,7 +1750,7 @@ idepmac_notify_sleep(struct pmu_sleep_notifier *self, int when)
hwif = &ide_hwifs[i];
for (dn=0; dn<MAX_DRIVES; dn++) {
ide_drive_t *drive = &hwif->drives[dn];
struct ata_device *drive = &hwif->drives[dn];
if (!drive->present)
continue;
/* We don't have re-configured DMA yet */
......
......@@ -578,15 +578,15 @@ static int init_irq(struct ata_channel *ch)
{
unsigned long flags;
int i;
ide_hwgroup_t *hwgroup;
ide_hwgroup_t *new_hwgroup;
spinlock_t *lock;
spinlock_t *new_lock;
struct ata_channel *match = NULL;
/* Spare allocation before sleep. */
new_hwgroup = kmalloc(sizeof(*hwgroup), GFP_KERNEL);
new_lock = kmalloc(sizeof(*lock), GFP_KERNEL);
spin_lock_irqsave(&ide_lock, flags);
ch->hwgroup = NULL;
ch->lock = NULL;
#if MAX_HWIFS > 1
/*
......@@ -596,7 +596,7 @@ static int init_irq(struct ata_channel *ch)
struct ata_channel *h = &ide_hwifs[i];
/* scan only initialized channels */
if (!h->hwgroup)
if (!h->lock)
continue;
if (ch->irq != h->irq)
......@@ -606,7 +606,7 @@ static int init_irq(struct ata_channel *ch)
if (ch->chipset != ide_pci || h->chipset != ide_pci ||
ch->serialized || h->serialized) {
if (match && match->hwgroup && match->hwgroup != h->hwgroup)
if (match && match->lock && match->lock != h->lock)
printk("%s: potential irq problem with %s and %s\n", ch->name, h->name, match->name);
/* don't undo a prior perfect match */
if (!match || match->irq != ch->irq)
......@@ -615,19 +615,20 @@ static int init_irq(struct ata_channel *ch)
}
#endif
/*
* If we are still without a hwgroup, then form a new one
* If we are still without a lock group, then form a new one
*/
if (match) {
hwgroup = match->hwgroup;
if(new_hwgroup)
kfree(new_hwgroup);
} else {
hwgroup = new_hwgroup;
if (!hwgroup) {
if (!match) {
lock = new_lock;
if (!lock) {
spin_unlock_irqrestore(&ide_lock, flags);
return 1;
}
memset(hwgroup, 0, sizeof(*hwgroup));
spin_lock_init(lock);
} else {
lock = match->lock;
if(new_lock)
kfree(new_lock);
}
/*
......@@ -645,7 +646,8 @@ static int init_irq(struct ata_channel *ch)
if (request_irq(ch->irq, &ata_irq_request, sa, ch->name, ch)) {
if (!match)
kfree(hwgroup);
kfree(lock);
spin_unlock_irqrestore(&ide_lock, flags);
return 1;
......@@ -653,9 +655,9 @@ static int init_irq(struct ata_channel *ch)
}
/*
* Everything is okay. Tag us as member of this hardware group.
* Everything is okay. Tag us as member of this lock group.
*/
ch->hwgroup = hwgroup;
ch->lock = lock;
init_timer(&ch->timer);
ch->timer.function = &ide_timer_expiry;
......@@ -678,7 +680,7 @@ static int init_irq(struct ata_channel *ch)
q = &drive->queue;
q->queuedata = drive->channel;
blk_init_queue(q, do_ide_request, &ide_lock);
blk_init_queue(q, do_ide_request, drive->channel->lock);
blk_queue_segment_boundary(q, 0xffff);
/* ATA can do up to 128K per request, pdc4030 needs smaller limit */
......
......@@ -1919,7 +1919,7 @@ static int idetape_end_request(struct ata_device *drive, struct request *rq, int
/*
* Insert the next request into the request queue.
*/
(void) ide_do_drive_cmd (drive, tape->active_data_request, ide_end);
ide_do_drive_cmd(drive, tape->active_data_request, ide_end);
} else if (!error) {
if (!tape->onstream)
idetape_increase_max_pipeline_stages (drive);
......@@ -1986,7 +1986,7 @@ static void idetape_queue_pc_head (ide_drive_t *drive,idetape_pc_t *pc,struct re
ide_init_drive_cmd (rq);
rq->buffer = (char *) pc;
rq->flags = IDETAPE_PC_RQ1;
(void) ide_do_drive_cmd (drive, rq, ide_preempt);
ide_do_drive_cmd(drive, rq, ide_preempt);
}
/*
......@@ -3197,7 +3197,7 @@ static int __idetape_queue_pc_tail (ide_drive_t *drive, idetape_pc_t *pc)
ide_init_drive_cmd (&rq);
rq.buffer = (char *) pc;
rq.flags = IDETAPE_PC_RQ1;
return ide_do_drive_cmd (drive, &rq, ide_wait);
return ide_do_drive_cmd(drive, &rq, ide_wait);
}
static void idetape_create_load_unload_cmd (ide_drive_t *drive, idetape_pc_t *pc,int cmd)
......
......@@ -19,6 +19,7 @@
#include <linux/errno.h>
#include <linux/genhd.h>
#include <linux/blkpg.h>
#include <linux/completion.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/delay.h>
......@@ -61,41 +62,6 @@ static inline void ide_unmap_rq(struct request *rq, char *to,
* Data transfer functions for polled IO.
*/
#if SUPPORT_VLB_SYNC
/*
* Some localbus EIDE interfaces require a special access sequence
* when using 32-bit I/O instructions to transfer data. We call this
* the "vlb_sync" sequence, which consists of three successive reads
* of the sector count register location, with interrupts disabled
* to ensure that the reads all happen together.
*/
static void ata_read_vlb(struct ata_device *drive, void *buffer, unsigned int wcount)
{
unsigned long flags;
__save_flags(flags); /* local CPU only */
__cli(); /* local CPU only */
IN_BYTE(IDE_NSECTOR_REG);
IN_BYTE(IDE_NSECTOR_REG);
IN_BYTE(IDE_NSECTOR_REG);
insl(IDE_DATA_REG, buffer, wcount);
__restore_flags(flags); /* local CPU only */
}
static void ata_write_vlb(struct ata_device *drive, void *buffer, unsigned int wcount)
{
unsigned long flags;
__save_flags(flags); /* local CPU only */
__cli(); /* local CPU only */
IN_BYTE(IDE_NSECTOR_REG);
IN_BYTE(IDE_NSECTOR_REG);
IN_BYTE(IDE_NSECTOR_REG);
outsl(IDE_DATA_REG, buffer, wcount);
__restore_flags(flags); /* local CPU only */
}
#endif
static void ata_read_32(struct ata_device *drive, void *buffer, unsigned int wcount)
{
insl(IDE_DATA_REG, buffer, wcount);
......@@ -157,11 +123,6 @@ void ata_read(struct ata_device *drive, void *buffer, unsigned int wcount)
io_32bit = drive->channel->io_32bit;
if (io_32bit) {
#if SUPPORT_VLB_SYNC
if (io_32bit & 2)
ata_read_vlb(drive, buffer, wcount);
else
#endif
ata_read_32(drive, buffer, wcount);
} else {
#if SUPPORT_SLOW_DATA_PORTS
......@@ -188,11 +149,6 @@ void ata_write(struct ata_device *drive, void *buffer, unsigned int wcount)
io_32bit = drive->channel->io_32bit;
if (io_32bit) {
#if SUPPORT_VLB_SYNC
if (io_32bit & 2)
ata_write_vlb(drive, buffer, wcount);
else
#endif
ata_write_32(drive, buffer, wcount);
} else {
#if SUPPORT_SLOW_DATA_PORTS
......@@ -279,6 +235,7 @@ int drive_is_ready(struct ata_device *drive)
if (stat & BUSY_STAT)
return 0; /* drive busy: definitely not interrupting */
return 1; /* drive ready: *might* be interrupting */
}
......@@ -319,7 +276,6 @@ static ide_startstop_t pre_task_mulout_intr(struct ata_device *drive, struct req
static ide_startstop_t task_mulout_intr(struct ata_device *drive, struct request *rq)
{
u8 stat = GET_STAT();
ide_hwgroup_t *hwgroup = HWGROUP(drive);
int mcount = drive->mult_count;
ide_startstop_t startstop;
......@@ -348,7 +304,7 @@ static ide_startstop_t task_mulout_intr(struct ata_device *drive, struct request
}
/* no data yet, so wait for another interrupt */
if (hwgroup->handler == NULL)
if (!drive->channel->handler)
ide_set_handler(drive, task_mulout_intr, WAIT_CMD, NULL);
return ide_started;
......@@ -391,7 +347,7 @@ static ide_startstop_t task_mulout_intr(struct ata_device *drive, struct request
} while (mcount);
rq->errors = 0;
if (hwgroup->handler == NULL)
if (!drive->channel->handler)
ide_set_handler(drive, task_mulout_intr, WAIT_CMD, NULL);
return ide_started;
......@@ -606,7 +562,7 @@ static ide_startstop_t task_out_intr(struct ata_device *drive, struct request *r
if (!ide_end_request(drive, rq, 1))
return ide_stopped;
if ((rq->current_nr_sectors==1) ^ (stat & DRQ_STAT)) {
if ((rq->nr_sectors == 1) != (stat & DRQ_STAT)) {
pBuf = ide_map_rq(rq, &flags);
DTF("write: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);
......@@ -858,6 +814,77 @@ void ide_cmd_type_parser(struct ata_taskfile *args)
}
}
/*
* This function is intended to be used prior to invoking ide_do_drive_cmd().
*/
void ide_init_drive_cmd(struct request *rq)
{
memset(rq, 0, sizeof(*rq));
rq->flags = REQ_DRIVE_CMD;
}
/*
* This function issues a special IDE device request onto the request queue.
*
* If action is ide_wait, then the rq is queued at the end of the request
* queue, and the function sleeps until it has been processed. This is for use
* when invoked from an ioctl handler.
*
* If action is ide_preempt, then the rq is queued at the head of the request
* queue, displacing the currently-being-processed request and this function
* returns immediately without waiting for the new rq to be completed. This is
* VERY DANGEROUS, and is intended for careful use by the ATAPI tape/cdrom
* driver code.
*
* If action is ide_end, then the rq is queued at the end of the request queue,
* and the function returns immediately without waiting for the new rq to be
* completed. This is again intended for careful use by the ATAPI tape/cdrom
* driver code.
*/
int ide_do_drive_cmd(struct ata_device *drive, struct request *rq, ide_action_t action)
{
unsigned long flags;
unsigned int major = drive->channel->major;
request_queue_t *q = &drive->queue;
struct list_head *queue_head = &q->queue_head;
DECLARE_COMPLETION(wait);
#ifdef CONFIG_BLK_DEV_PDC4030
if (drive->channel->chipset == ide_pdc4030 && rq->buffer != NULL)
return -ENOSYS; /* special drive cmds not supported */
#endif
rq->errors = 0;
rq->rq_status = RQ_ACTIVE;
rq->rq_dev = mk_kdev(major,(drive->select.b.unit)<<PARTN_BITS);
if (action == ide_wait)
rq->waiting = &wait;
spin_lock_irqsave(drive->channel->lock, flags);
if (blk_queue_empty(&drive->queue) || action == ide_preempt) {
if (action == ide_preempt)
drive->rq = NULL;
} else {
if (action == ide_wait)
queue_head = queue_head->prev;
else
queue_head = queue_head->next;
}
q->elevator.elevator_add_req_fn(q, rq, queue_head);
do_ide_request(q);
spin_unlock_irqrestore(drive->channel->lock, flags);
if (action == ide_wait) {
wait_for_completion(&wait); /* wait for it to be serviced */
return rq->errors ? -EIO : 0; /* return -EIO if errors */
}
return 0;
}
int ide_raw_taskfile(struct ata_device *drive, struct ata_taskfile *args)
{
struct request rq;
......@@ -884,12 +911,59 @@ int ide_raw_taskfile(struct ata_device *drive, struct ata_taskfile *args)
* interface.
*/
/*
* Backside of HDIO_DRIVE_CMD call of SETFEATURES_XFER.
* 1 : Safe to update drive->id DMA registers.
* 0 : OOPs not allowed.
*/
static int set_transfer(struct ata_device *drive, struct ata_taskfile *args)
{
if ((args->taskfile.command == WIN_SETFEATURES) &&
(args->taskfile.sector_number >= XFER_SW_DMA_0) &&
(args->taskfile.feature == SETFEATURES_XFER) &&
(drive->id->dma_ultra ||
drive->id->dma_mword ||
drive->id->dma_1word))
return 1;
return 0;
}
/*
* Verify that we are doing an approved SETFEATURES_XFER with respect
* to the hardware being able to support request. Since some hardware
* can improperly report capabilties, we check to see if the host adapter
* in combination with the device (usually a disk) properly detect
* and acknowledge each end of the ribbon.
*/
static int ata66_check(struct ata_device *drive, struct ata_taskfile *args)
{
if ((args->taskfile.command == WIN_SETFEATURES) &&
(args->taskfile.sector_number > XFER_UDMA_2) &&
(args->taskfile.feature == SETFEATURES_XFER)) {
if (!drive->channel->udma_four) {
printk("%s: Speed warnings UDMA 3/4/5 is not functional.\n", drive->channel->name);
return 1;
}
#ifndef CONFIG_IDEDMA_IVB
if ((drive->id->hw_config & 0x6000) == 0) {
#else
if (((drive->id->hw_config & 0x2000) == 0) ||
((drive->id->hw_config & 0x4000) == 0)) {
#endif
printk("%s: Speed warnings UDMA 3/4/5 is not functional.\n", drive->name);
return 1;
}
}
return 0;
}
int ide_cmd_ioctl(struct ata_device *drive, unsigned long arg)
{
int err = 0;
u8 vals[4];
u8 *argbuf = vals;
u8 xfer_rate = 0;
u8 pio = 0;
int argsize = 4;
struct ata_taskfile args;
struct request rq;
......@@ -924,10 +998,11 @@ int ide_cmd_ioctl(struct ata_device *drive, unsigned long arg)
}
/* Always make sure the transfer reate has been setup.
* FIXME: what about setting up the drive with ->tuneproc?
*/
if (set_transfer(drive, &args)) {
xfer_rate = vals[1];
if (ide_ata66_check(drive, &args))
pio = vals[1];
if (ata66_check(drive, &args))
goto abort;
}
......@@ -936,10 +1011,11 @@ int ide_cmd_ioctl(struct ata_device *drive, unsigned long arg)
rq.buffer = argbuf;
err = ide_do_drive_cmd(drive, &rq, ide_wait);
if (!err && xfer_rate) {
if (!err && pio) {
/* active-retuning-calls future */
if ((drive->channel->speedproc) != NULL)
drive->channel->speedproc(drive, xfer_rate);
/* FIXME: what about the setup for the drive?! */
if (drive->channel->speedproc)
drive->channel->speedproc(drive, pio);
ide_driveid_update(drive);
}
......@@ -961,6 +1037,8 @@ EXPORT_SYMBOL(atapi_write);
EXPORT_SYMBOL(ata_taskfile);
EXPORT_SYMBOL(recal_intr);
EXPORT_SYMBOL(task_no_data_intr);
EXPORT_SYMBOL(ide_init_drive_cmd);
EXPORT_SYMBOL(ide_do_drive_cmd);
EXPORT_SYMBOL(ide_raw_taskfile);
EXPORT_SYMBOL(ide_cmd_type_parser);
EXPORT_SYMBOL(ide_cmd_ioctl);
This diff is collapsed.
......@@ -10,10 +10,6 @@
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
......@@ -72,9 +68,6 @@ extern int init_cs5530(void);
#ifdef CONFIG_BLK_DEV_AMD74XX
extern int init_amd74xx(void);
#endif
#ifdef CONFIG_BLK_DEV_PDC_ADMA
extern int init_pdcadma(void);
#endif
#ifdef CONFIG_BLK_DEV_SVWKS
extern int init_svwks(void);
#endif
......
This diff is collapsed.
This diff is collapsed.
/*
* linux/drivers/ide/pdcadma.c Version 0.01 June 21, 2001
*
* Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
* May be copied or modified under the terms of the GNU General Public License
*
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
#include <linux/hdreg.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/irq.h>
#include "ata-timing.h"
#include "pcihost.h"
#undef DISPLAY_PDCADMA_TIMINGS
#if defined(DISPLAY_PDCADMA_TIMINGS) && defined(CONFIG_PROC_FS)
#include <linux/stat.h>
#include <linux/proc_fs.h>
static int pdcadma_get_info(char *, char **, off_t, int);
extern int (*pdcadma_display_info)(char *, char **, off_t, int); /* ide-proc.c */
static struct pci_dev *bmide_dev;
static int pdcadma_get_info (char *buffer, char **addr, off_t offset, int count)
{
char *p = buffer;
u32 bibma = pci_resource_start(bmide_dev, 4);
p += sprintf(p, "\n PDC ADMA %04X Chipset.\n", bmide_dev->device);
p += sprintf(p, "UDMA\n");
p += sprintf(p, "PIO\n");
return p-buffer; /* => must be less than 4k! */
}
#endif
byte pdcadma_proc = 0;
extern char *ide_xfer_verbose (byte xfer_rate);
#ifdef CONFIG_BLK_DEV_IDEDMA
/*
* This initiates/aborts (U)DMA read/write operations on a drive.
*/
static int pdcadma_dmaproc(struct ata_device *drive)
{
udma_enable(drive, 0, 0);
return 0;
}
#endif
static unsigned int __init pci_init_pdcadma(struct pci_dev *dev)
{
#if defined(DISPLAY_PDCADMA_TIMINGS) && defined(CONFIG_PROC_FS)
if (!pdcadma_proc) {
pdcadma_proc = 1;
bmide_dev = dev;
pdcadma_display_info = pdcadma_get_info;
}
#endif
return 0;
}
static unsigned int __init ata66_pdcadma(struct ata_channel *channel)
{
return 1;
}
static void __init ide_init_pdcadma(struct ata_channel *hwif)
{
hwif->autodma = 0;
hwif->dma_base = 0;
// hwif->tuneproc = &pdcadma_tune_drive;
// hwif->speedproc = &pdcadma_tune_chipset;
// if (hwif->dma_base) {
// hwif->XXX_dmaproc = &pdcadma_dmaproc;
// hwif->autodma = 1;
// }
}
static void __init ide_dmacapable_pdcadma(struct ata_channel *hwif, unsigned long dmabase)
{
// ide_setup_dma(hwif, dmabase, 8);
}
/* module data table */
static struct ata_pci_device chipset __initdata = {
PCI_VENDOR_ID_PDC, PCI_DEVICE_ID_PDC_1841,
pci_init_pdcadma,
ata66_pdcadma,
ide_init_pdcadma,
ide_dmacapable_pdcadma,
{
{0x00,0x00,0x00},
{0x00,0x00,0x00}
},
OFF_BOARD,
0,
ATA_F_NODMA
};
int __init init_pdcadma(void)
{
ata_register_chipset(&chipset);
return 0;
}
/**** vi:set ts=8 sts=8 sw=8:************************************************
*
* Copyright (C) 2002 Marcin Dalecki <martin@dalecki.de>
*
* Copyright (c) 1999-2000 Andre Hedrick <andre@linux-ide.org>
* Copyright (c) 1995-1998 Mark Lord
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*/
/*
* Just the black and white list handling for BM-DMA operation.
*/
#include <linux/config.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/ide.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <asm/irq.h>
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
struct drive_list_entry {
char * id_model;
char * id_firmware;
};
struct drive_list_entry drive_whitelist[] = {
{ "Micropolis 2112A", NULL },
{ "CONNER CTMA 4000", NULL },
{ "CONNER CTT8000-A", NULL },
{ "ST34342A", NULL },
{ NULL, NULL }
};
struct drive_list_entry drive_blacklist[] = {
{ "WDC AC11000H", NULL },
{ "WDC AC22100H", NULL },
{ "WDC AC32500H", NULL },
{ "WDC AC33100H", NULL },
{ "WDC AC31600H", NULL },
{ "WDC AC32100H", "24.09P07" },
{ "WDC AC23200L", "21.10N21" },
{ "Compaq CRD-8241B", NULL },
{ "CRD-8400B", NULL },
{ "CRD-8480B", NULL },
{ "CRD-8480C", NULL },
{ "CRD-8482B", NULL },
{ "CRD-84", NULL },
{ "SanDisk SDP3B", NULL },
{ "SanDisk SDP3B-64", NULL },
{ "SANYO CD-ROM CRD", NULL },
{ "HITACHI CDR-8", NULL },
{ "HITACHI CDR-8335", NULL },
{ "HITACHI CDR-8435", NULL },
{ "Toshiba CD-ROM XM-6202B", NULL },
{ "CD-532E-A", NULL },
{ "E-IDE CD-ROM CR-840", NULL },
{ "CD-ROM Drive/F5A", NULL },
{ "RICOH CD-R/RW MP7083A", NULL },
{ "WPI CDD-820", NULL },
{ "SAMSUNG CD-ROM SC-148C", NULL },
{ "SAMSUNG CD-ROM SC-148F", NULL },
{ "SAMSUNG CD-ROM SC", NULL },
{ "SanDisk SDP3B-64", NULL },
{ "SAMSUNG CD-ROM SN-124", NULL },
{ "PLEXTOR CD-R PX-W8432T", NULL },
{ "ATAPI CD-ROM DRIVE 40X MAXIMUM", NULL },
{ "_NEC DV5800A", NULL },
{ NULL, NULL }
};
static int in_drive_list(struct hd_driveid *id, struct drive_list_entry * drive_table)
{
for ( ; drive_table->id_model ; drive_table++)
if ((!strcmp(drive_table->id_model, id->model)) &&
((drive_table->id_firmware && !strstr(drive_table->id_firmware, id->fw_rev)) ||
(!drive_table->id_firmware)))
return 1;
return 0;
}
#else
/*
* good_dma_drives() lists the model names (from "hdparm -i")
* of drives which do not support mode2 DMA but which are
* known to work fine with this interface under Linux.
*/
const char *good_dma_drives[] = {"Micropolis 2112A",
"CONNER CTMA 4000",
"CONNER CTT8000-A",
"ST34342A", /* for Sun Ultra */
NULL};
/*
* bad_dma_drives() lists the model names (from "hdparm -i")
* of drives which supposedly support (U)DMA but which are
* known to corrupt data with this interface under Linux.
*
* This is an empirical list. Its generated from bug reports. That means
* while it reflects actual problem distributions it doesn't answer whether
* the drive or the controller, or cabling, or software, or some combination
* thereof is the fault. If you don't happen to agree with the kernel's
* opinion of your drive - use hdparm to turn DMA on.
*/
const char *bad_dma_drives[] = {"WDC AC11000H",
"WDC AC22100H",
"WDC AC32100H",
"WDC AC32500H",
"WDC AC33100H",
"WDC AC31600H",
NULL};
#endif
/*
* For both Blacklisted and Whitelisted drives.
* This is setup to be called as an extern for future support
* to other special driver code.
*/
int check_drive_lists(struct ata_device *drive, int good_bad)
{
struct hd_driveid *id = drive->id;
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
if (good_bad) {
return in_drive_list(id, drive_whitelist);
} else {
int blacklist = in_drive_list(id, drive_blacklist);
if (blacklist)
printk("%s: Disabling (U)DMA for %s\n", drive->name, id->model);
return(blacklist);
}
#else
const char **list;
if (good_bad) {
/* Consult the list of known "good" drives */
list = good_dma_drives;
while (*list) {
if (!strcmp(*list++,id->model))
return 1;
}
} else {
/* Consult the list of known "bad" drives */
list = bad_dma_drives;
while (*list) {
if (!strcmp(*list++,id->model)) {
printk("%s: Disabling (U)DMA for %s\n",
drive->name, id->model);
return 1;
}
}
}
#endif
return 0;
}
void udma_print(struct ata_device *drive)
{
#ifdef CONFIG_ARCH_ACORN
printk(", DMA");
#else
struct hd_driveid *id = drive->id;
char *str = NULL;
if ((id->field_valid & 4) && (eighty_ninty_three(drive)) &&
(id->dma_ultra & (id->dma_ultra >> 14) & 3)) {
if ((id->dma_ultra >> 15) & 1)
str = ", UDMA(mode 7)"; /* UDMA BIOS-enabled! */
else
str = ", UDMA(133)"; /* UDMA BIOS-enabled! */
} else if ((id->field_valid & 4) && (eighty_ninty_three(drive)) &&
(id->dma_ultra & (id->dma_ultra >> 11) & 7)) {
if ((id->dma_ultra >> 13) & 1) {
str = ", UDMA(100)"; /* UDMA BIOS-enabled! */
} else if ((id->dma_ultra >> 12) & 1) {
str = ", UDMA(66)"; /* UDMA BIOS-enabled! */
} else {
str = ", UDMA(44)"; /* UDMA BIOS-enabled! */
}
} else if ((id->field_valid & 4) &&
(id->dma_ultra & (id->dma_ultra >> 8) & 7)) {
if ((id->dma_ultra >> 10) & 1) {
str = ", UDMA(33)"; /* UDMA BIOS-enabled! */
} else if ((id->dma_ultra >> 9) & 1) {
str = ", UDMA(25)"; /* UDMA BIOS-enabled! */
} else {
str = ", UDMA(16)"; /* UDMA BIOS-enabled! */
}
} else if (id->field_valid & 4)
str = ", (U)DMA"; /* Can be BIOS-enabled! */
else
str = ", DMA";
printk(str);
#endif
}
/*
* Drive back/white list handling for UDMA capability:
*/
int udma_black_list(struct ata_device *drive)
{
return check_drive_lists(drive, 0);
}
int udma_white_list(struct ata_device *drive)
{
return check_drive_lists(drive, 1);
}
EXPORT_SYMBOL(udma_print);
EXPORT_SYMBOL(udma_black_list);
EXPORT_SYMBOL(udma_white_list);
......@@ -76,7 +76,7 @@ static void config_for_pio(ide_drive_t *drive, int pio, int report)
if (ide_config_drive_speed(drive, xfer_mode) == 0)
drv_ctrl = get_timing_sl82c105(t);
if (drive->using_dma == 0) {
if (!drive->using_dma) {
/*
* If we are actually using MW DMA, then we can not
* reprogram the interface drive control register.
......
......@@ -83,7 +83,6 @@ static ide_startstop_t tcq_nop_handler(struct ata_device *drive, struct request
static void tcq_invalidate_queue(struct ata_device *drive)
{
struct ata_channel *ch = drive->channel;
ide_hwgroup_t *hwgroup = ch->hwgroup;
request_queue_t *q = &drive->queue;
struct ata_taskfile *args;
struct request *rq;
......@@ -91,20 +90,20 @@ static void tcq_invalidate_queue(struct ata_device *drive)
printk(KERN_INFO "ATA: %s: invalidating pending queue (%d)\n", drive->name, ata_pending_commands(drive));
spin_lock_irqsave(&ide_lock, flags);
spin_lock_irqsave(ch->lock, flags);
del_timer(&ch->timer);
if (test_bit(IDE_DMA, &hwgroup->flags))
if (test_bit(IDE_DMA, &ch->active))
udma_stop(drive);
blk_queue_invalidate_tags(q);
drive->using_tcq = 0;
drive->queue_depth = 1;
clear_bit(IDE_BUSY, &hwgroup->flags);
clear_bit(IDE_DMA, &hwgroup->flags);
hwgroup->handler = NULL;
clear_bit(IDE_BUSY, &ch->active);
clear_bit(IDE_DMA, &ch->active);
ch->handler = NULL;
/*
* Do some internal stuff -- we really need this command to be
......@@ -145,32 +144,32 @@ static void tcq_invalidate_queue(struct ata_device *drive)
* start doing stuff again
*/
q->request_fn(q);
spin_unlock_irqrestore(&ide_lock, flags);
spin_unlock_irqrestore(ch->lock, flags);
printk(KERN_DEBUG "ATA: tcq_invalidate_queue: done\n");
}
static void ata_tcq_irq_timeout(unsigned long data)
{
struct ata_device *drive = (struct ata_device *) data;
ide_hwgroup_t *hwgroup = HWGROUP(drive);
struct ata_channel *ch = drive->channel;
unsigned long flags;
printk(KERN_ERR "ATA: %s: timeout waiting for interrupt...\n", __FUNCTION__);
spin_lock_irqsave(&ide_lock, flags);
spin_lock_irqsave(ch->lock, flags);
if (test_and_set_bit(IDE_BUSY, &hwgroup->flags))
printk(KERN_ERR "ATA: %s: hwgroup not busy\n", __FUNCTION__);
if (hwgroup->handler == NULL)
printk(KERN_ERR "ATA: %s: missing isr!\n", __FUNCTION__);
if (test_and_set_bit(IDE_BUSY, &ch->active))
printk(KERN_ERR "ATA: %s: IRQ handler not busy\n", __FUNCTION__);
if (!ch->handler)
printk(KERN_ERR "ATA: %s: missing ISR!\n", __FUNCTION__);
spin_unlock_irqrestore(&ide_lock, flags);
spin_unlock_irqrestore(ch->lock, flags);
/*
* if pending commands, try service before giving up
*/
if (ata_pending_commands(drive) && (GET_STAT() & SERVICE_STAT))
if (service(drive, hwgroup->rq) == ide_started)
if (service(drive, drive->rq) == ide_started)
return;
if (drive)
......@@ -180,10 +179,9 @@ static void ata_tcq_irq_timeout(unsigned long data)
static void set_irq(struct ata_device *drive, ata_handler_t *handler)
{
struct ata_channel *ch = drive->channel;
ide_hwgroup_t *hwgroup = HWGROUP(drive);
unsigned long flags;
spin_lock_irqsave(&ide_lock, flags);
spin_lock_irqsave(ch->lock, flags);
/*
* always just bump the timer for now, the timeout handling will
......@@ -196,9 +194,9 @@ static void set_irq(struct ata_device *drive, ata_handler_t *handler)
ch->timer.function = ata_tcq_irq_timeout;
ch->timer.data = (unsigned long) ch->drive;
mod_timer(&ch->timer, jiffies + 5 * HZ);
ch->handler = handler;
hwgroup->handler = handler;
spin_unlock_irqrestore(&ide_lock, flags);
spin_unlock_irqrestore(ch->lock, flags);
}
/*
......@@ -241,7 +239,7 @@ static ide_startstop_t service(struct ata_device *drive, struct request *rq)
* Could be called with IDE_DMA in-progress from invalidate
* handler, refuse to do anything.
*/
if (test_bit(IDE_DMA, &HWGROUP(drive)->flags))
if (test_bit(IDE_DMA, &drive->channel->active))
return ide_stopped;
/*
......@@ -283,7 +281,7 @@ static ide_startstop_t service(struct ata_device *drive, struct request *rq)
* should not happen, a buggy device could introduce loop
*/
if ((feat = GET_FEAT()) & NSEC_REL) {
HWGROUP(drive)->rq = NULL;
drive->rq = NULL;
printk("%s: release in service\n", drive->name);
return ide_stopped;
}
......@@ -298,7 +296,7 @@ static ide_startstop_t service(struct ata_device *drive, struct request *rq)
return ide_stopped;
}
HWGROUP(drive)->rq = rq;
drive->rq = rq;
/*
* we'll start a dma read or write, device will trigger
......@@ -529,7 +527,7 @@ static ide_startstop_t udma_tcq_start(struct ata_device *drive, struct request *
struct ata_channel *ch = drive->channel;
TCQ_PRINTK("%s: setting up queued %d\n", __FUNCTION__, rq->tag);
if (!test_bit(IDE_BUSY, &ch->hwgroup->flags))
if (!test_bit(IDE_BUSY, &ch->active))
printk("queued_rw: IDE_BUSY not set\n");
if (tcq_wait_dataphase(drive))
......@@ -584,7 +582,7 @@ ide_startstop_t udma_tcq_taskfile(struct ata_device *drive, struct request *rq)
*/
if ((feat = GET_FEAT()) & NSEC_REL) {
drive->immed_rel++;
HWGROUP(drive)->rq = NULL;
drive->rq = NULL;
set_irq(drive, ide_dmaq_intr);
TCQ_PRINTK("REL in queued_start\n");
......
......@@ -92,13 +92,11 @@ static void umc_set_speeds (byte speeds[])
out_umc (0xd7,(speedtab[0][speeds[2]] | (speedtab[0][speeds[3]]<<4)));
out_umc (0xd6,(speedtab[0][speeds[0]] | (speedtab[0][speeds[1]]<<4)));
tmp = 0;
for (i = 3; i >= 0; i--)
{
for (i = 3; i >= 0; i--) {
tmp = (tmp << 2) | speedtab[1][speeds[i]];
}
out_umc (0xdc,tmp);
for (i = 0;i < 4; i++)
{
for (i = 0;i < 4; i++) {
out_umc (0xd0+i,speedtab[2][speeds[i]]);
out_umc (0xd8+i,speedtab[2][speeds[i]]);
}
......@@ -108,10 +106,9 @@ static void umc_set_speeds (byte speeds[])
speeds[0], speeds[1], speeds[2], speeds[3]);
}
static void tune_umc (ide_drive_t *drive, byte pio)
static void tune_umc(struct ata_device *drive, byte pio)
{
unsigned long flags;
ide_hwgroup_t *hwgroup = ide_hwifs[drive->channel->index ^ 1].hwgroup;
if (pio == 255)
pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO) - XFER_PIO_0;
......@@ -121,16 +118,12 @@ static void tune_umc (ide_drive_t *drive, byte pio)
printk("%s: setting umc8672 to PIO mode%d (speed %d)\n", drive->name, pio, pio_to_umc[pio]);
save_flags(flags); /* all CPUs */
cli(); /* all CPUs */
if (hwgroup && hwgroup->handler != NULL) {
printk("umc8672: other interface is busy: exiting tune_umc()\n");
} else {
current_speeds[drive->name[2] - 'a'] = pio_to_umc[pio];
umc_set_speeds (current_speeds);
}
restore_flags(flags); /* all CPUs */
}
void __init init_umc8672 (void) /* called from ide.c */
void __init init_umc8672(void) /* called from ide.c */
{
unsigned long flags;
......
......@@ -792,18 +792,6 @@ int idescsi_queue (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
*/
int idescsi_device_reset (Scsi_Cmnd *cmd)
{
#if 0
ide_drive_t *drive = idescsi_drives[cmd->target];
struct request req;
ide_init_drive_cmd(&req);
req.flags = REQ_SPECIAL;
/* FIX ME, the next executable line causes on oops in lk 2.5.10-dj1
* [code copied from ide-cd's ide_cdrom_reset(), does it work?]
*/
ide_do_drive_cmd(drive, &req, ide_wait);
#endif
return SUCCESS;
}
......
......@@ -1320,7 +1320,7 @@ static void urb_unlink (struct urb *urb)
list_del_init (&urb->urb_list);
dev = urb->dev;
urb->dev = NULL;
usb_dec_dev_use (dev);
usb_put_dev (dev);
spin_unlock_irqrestore (&hcd_data_lock, flags);
}
......@@ -1516,7 +1516,7 @@ static int hcd_submit_urb (struct urb *urb, int mem_flags)
spin_lock_irqsave (&hcd_data_lock, flags);
if (HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_QUIESCING) {
usb_inc_dev_use (urb->dev);
usb_get_dev (urb->dev);
list_add (&urb->urb_list, &dev->urb_list);
status = 0;
} else {
......@@ -1732,6 +1732,7 @@ static int hcd_free_dev (struct usb_device *udev)
return -EINVAL;
}
if (hcd->driver->free_config)
hcd->driver->free_config (hcd, udev);
spin_lock_irqsave (&hcd_data_lock, flags);
......
......@@ -182,9 +182,6 @@ extern int usb_hcd_pci_resume (struct pci_dev *dev);
/* -------------------------------------------------------------------------- */
/* Enumeration is only for the hub driver, or HCD virtual root hubs */
extern struct usb_device *usb_alloc_dev(struct usb_device *parent,
struct usb_bus *);
extern void usb_free_dev(struct usb_device *);
extern int usb_new_device(struct usb_device *dev);
extern void usb_connect(struct usb_device *dev);
extern void usb_disconnect(struct usb_device **);
......
This diff is collapsed.
......@@ -136,6 +136,34 @@ struct usb_hub_descriptor {
struct usb_device;
/*
* As of USB 2.0, full/low speed devices are segregated into trees.
* One type grows from USB 1.1 host controllers (OHCI, UHCI etc).
* The other type grows from high speed hubs when they connect to
* full/low speed devices using "Transaction Translators" (TTs).
*
* TTs should only be known to the hub driver, and high speed bus
* drivers (only EHCI for now). They affect periodic scheduling and
* sometimes control/bulk error recovery.
*/
struct usb_tt {
struct usb_device *hub; /* upstream highspeed hub */
int multi; /* true means one TT per port */
/* for control/bulk error recovery (CLEAR_TT_BUFFER) */
spinlock_t lock;
struct list_head clear_list; /* of usb_tt_clear */
struct tq_struct kevent;
};
struct usb_tt_clear {
struct list_head clear_list;
unsigned tt;
u16 devinfo;
};
extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe);
struct usb_hub {
struct usb_device *dev; /* the "real" device */
struct urb *urb; /* for interrupt polling pipe */
......
This diff is collapsed.
......@@ -4,7 +4,12 @@
comment 'USB Host Controller Drivers'
dep_tristate ' EHCI HCD (USB 2.0) support (EXPERIMENTAL)' CONFIG_USB_EHCI_HCD $CONFIG_USB $CONFIG_EXPERIMENTAL
dep_tristate ' OHCI HCD support (EXPERIMENTAL)' CONFIG_USB_OHCI_HCD $CONFIG_USB $CONFIG_EXPERIMENTAL
# dep_tristate ' UHCI HCD (most Intel and VIA) support (EXPERIMENTAL)' CONFIG_USB_UHCI_HCD $CONFIG_USB $CONFIG_EXPERIMENTAL
if [ "$CONFIG_USB_UHCI_HCD_ALT" != "y" ]; then
dep_tristate ' UHCI HCD (most Intel and VIA) support (EXPERIMENTAL)' CONFIG_USB_UHCI_HCD $CONFIG_USB $CONFIG_EXPERIMENTAL
fi
if [ "$CONFIG_USB_UHCI_HCD" != "y" ]; then
dep_tristate ' UHCI HCD Alternate (most Intel and VIA) support (EXPERIMENTAL)' CONFIG_USB_UHCI_HCD_ALT $CONFIG_USB $CONFIG_EXPERIMENTAL
fi
if [ "$CONFIG_USB_UHCI_ALT" != "y" ]; then
dep_tristate ' UHCI (Intel PIIX4, VIA, ...) support' CONFIG_USB_UHCI $CONFIG_USB
fi
......@@ -13,4 +18,4 @@ if [ "$CONFIG_USB_UHCI" != "y" ]; then
else
define_bool CONFIG_USB_UHCI_ALT n
fi
dep_tristate ' OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support' CONFIG_USB_OHCI $CONFIG_USB
#dep_tristate ' OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support' CONFIG_USB_OHCI $CONFIG_USB
......@@ -7,7 +7,8 @@ O_TARGET := host.o
obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o
# obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o
obj-$(CONFIG_USB_UHCI_HCD) += usb-uhci-hcd.o
obj-$(CONFIG_USB_UHCI_HCD_ALT) += uhci-hcd.o
obj-$(CONFIG_USB_UHCI) += usb-uhci.o
obj-$(CONFIG_USB_UHCI_ALT) += uhci.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -40,3 +40,7 @@ CONFIG_USB_STORAGE_SDDR09
Say Y here to include additional code to support the Sandisk SDDR-09
SmartMedia reader in the USB Mass Storage driver.
Also works for the Microtech Zio! SmartMedia reader.
CONFIG_USB_STORAGE_SDDR55
Say Y here to include additional code to support the Sandisk SDDR-55
SmartMedia reader in the USB Mass Storage driver.
......@@ -12,4 +12,5 @@ dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG
dep_mbool ' Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
dep_mbool ' HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' SanDisk SDDR-55 SmartMedia support' CONFIG_USB_STORAGE_SDDR55 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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