Commit c9c13c7b authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/home/hch/BK/xfs/linux-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents f67dd842 13c7e0d4
...@@ -177,14 +177,9 @@ int elevator_linus_merge(request_queue_t *q, struct request **req, ...@@ -177,14 +177,9 @@ int elevator_linus_merge(request_queue_t *q, struct request **req,
if (__rq->flags & (REQ_BARRIER | REQ_STARTED)) if (__rq->flags & (REQ_BARRIER | REQ_STARTED))
break; break;
/*
* simply "aging" of requests in queue
*/
if (elv_linus_sequence(__rq)-- <= 0)
break;
if (!(__rq->flags & REQ_CMD)) if (!(__rq->flags & REQ_CMD))
continue; continue;
if (elv_linus_sequence(__rq) < bio_sectors(bio)) if (elv_linus_sequence(__rq) < bio_sectors(bio))
break; break;
...@@ -200,24 +195,20 @@ int elevator_linus_merge(request_queue_t *q, struct request **req, ...@@ -200,24 +195,20 @@ int elevator_linus_merge(request_queue_t *q, struct request **req,
} }
} }
return ret;
}
void elevator_linus_merge_cleanup(request_queue_t *q, struct request *req, int count)
{
struct list_head *entry;
BUG_ON(req->q != q);
/* /*
* second pass scan of requests that got passed over, if any * if *req, it's either a seek or merge in the middle of the queue
*/ */
entry = &req->queuelist; if (*req) {
struct list_head *entry = &(*req)->queuelist;
int cost = ret ? 1 : ELV_LINUS_SEEK_COST;
while ((entry = entry->next) != &q->queue_head) { while ((entry = entry->next) != &q->queue_head) {
struct request *tmp; __rq = list_entry_rq(entry);
tmp = list_entry_rq(entry); elv_linus_sequence(__rq) -= cost;
elv_linus_sequence(tmp) -= count;
} }
}
return ret;
} }
void elevator_linus_merge_req(request_queue_t *q, struct request *req, void elevator_linus_merge_req(request_queue_t *q, struct request *req,
...@@ -260,8 +251,8 @@ int elevator_linus_init(request_queue_t *q, elevator_t *e) ...@@ -260,8 +251,8 @@ int elevator_linus_init(request_queue_t *q, elevator_t *e)
if (!latency) if (!latency)
return -ENOMEM; return -ENOMEM;
latency[READ] = 8192; latency[READ] = 1024;
latency[WRITE] = 16384; latency[WRITE] = 2048;
e->elevator_data = latency; e->elevator_data = latency;
return 0; return 0;
...@@ -355,15 +346,6 @@ int elevator_global_init(void) ...@@ -355,15 +346,6 @@ int elevator_global_init(void)
return 0; return 0;
} }
void elv_merge_cleanup(request_queue_t *q, struct request *rq,
int nr_sectors)
{
elevator_t *e = &q->elevator;
if (e->elevator_merge_cleanup_fn)
e->elevator_merge_cleanup_fn(q, rq, nr_sectors);
}
int elv_merge(request_queue_t *q, struct request **rq, struct bio *bio) int elv_merge(request_queue_t *q, struct request **rq, struct bio *bio)
{ {
elevator_t *e = &q->elevator; elevator_t *e = &q->elevator;
...@@ -460,7 +442,6 @@ inline struct list_head *elv_get_sort_head(request_queue_t *q, ...@@ -460,7 +442,6 @@ inline struct list_head *elv_get_sort_head(request_queue_t *q,
elevator_t elevator_linus = { elevator_t elevator_linus = {
elevator_merge_fn: elevator_linus_merge, elevator_merge_fn: elevator_linus_merge,
elevator_merge_cleanup_fn: elevator_linus_merge_cleanup,
elevator_merge_req_fn: elevator_linus_merge_req, elevator_merge_req_fn: elevator_linus_merge_req,
elevator_next_req_fn: elevator_noop_next_request, elevator_next_req_fn: elevator_noop_next_request,
elevator_add_req_fn: elevator_linus_add_request, elevator_add_req_fn: elevator_linus_add_request,
......
...@@ -1508,7 +1508,6 @@ static int __make_request(request_queue_t *q, struct bio *bio) ...@@ -1508,7 +1508,6 @@ static int __make_request(request_queue_t *q, struct bio *bio)
req->biotail->bi_next = bio; req->biotail->bi_next = bio;
req->biotail = bio; req->biotail = bio;
req->nr_sectors = req->hard_nr_sectors += nr_sectors; req->nr_sectors = req->hard_nr_sectors += nr_sectors;
elv_merge_cleanup(q, req, nr_sectors);
drive_stat_acct(req, nr_sectors, 0); drive_stat_acct(req, nr_sectors, 0);
attempt_back_merge(q, req); attempt_back_merge(q, req);
goto out; goto out;
...@@ -1532,7 +1531,6 @@ static int __make_request(request_queue_t *q, struct bio *bio) ...@@ -1532,7 +1531,6 @@ static int __make_request(request_queue_t *q, struct bio *bio)
req->hard_cur_sectors = cur_nr_sectors; req->hard_cur_sectors = cur_nr_sectors;
req->sector = req->hard_sector = sector; req->sector = req->hard_sector = sector;
req->nr_sectors = req->hard_nr_sectors += nr_sectors; req->nr_sectors = req->hard_nr_sectors += nr_sectors;
elv_merge_cleanup(q, req, nr_sectors);
drive_stat_acct(req, nr_sectors, 0); drive_stat_acct(req, nr_sectors, 0);
attempt_front_merge(q, req); attempt_front_merge(q, req);
goto out; goto out;
......
...@@ -16,20 +16,8 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -16,20 +16,8 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
dep_mbool ' Use multi-mode by default' CONFIG_IDEDISK_MULTI_MODE $CONFIG_BLK_DEV_IDEDISK dep_mbool ' Use multi-mode by default' CONFIG_IDEDISK_MULTI_MODE $CONFIG_BLK_DEV_IDEDISK
dep_mbool ' Auto-Geometry Resizing support' CONFIG_IDEDISK_STROKE $CONFIG_BLK_DEV_IDEDISK dep_mbool ' Auto-Geometry Resizing support' CONFIG_IDEDISK_STROKE $CONFIG_BLK_DEV_IDEDISK
define_bool CONFIG_BLK_DEV_IDEDISK_VENDOR n
dep_mbool ' Fujitsu Vendor Specific' CONFIG_BLK_DEV_IDEDISK_FUJITSU $CONFIG_BLK_DEV_IDEDISK_VENDOR
dep_mbool ' IBM Vendor Specific' CONFIG_BLK_DEV_IDEDISK_IBM $CONFIG_BLK_DEV_IDEDISK_VENDOR
dep_mbool ' Maxtor Vendor Specific' CONFIG_BLK_DEV_IDEDISK_MAXTOR $CONFIG_BLK_DEV_IDEDISK_VENDOR
dep_mbool ' Quantum Vendor Specific' CONFIG_BLK_DEV_IDEDISK_QUANTUM $CONFIG_BLK_DEV_IDEDISK_VENDOR
dep_mbool ' Seagate Vendor Specific' CONFIG_BLK_DEV_IDEDISK_SEAGATE $CONFIG_BLK_DEV_IDEDISK_VENDOR
dep_mbool ' Western Digital Vendor Specific' CONFIG_BLK_DEV_IDEDISK_WD $CONFIG_BLK_DEV_IDEDISK_VENDOR
define_bool CONFIG_BLK_DEV_COMMERIAL n
dep_mbool ' TiVo Commerial Application Specific' CONFIG_BLK_DEV_TIVO $CONFIG_BLK_DEV_COMMERIAL
dep_tristate ' PCMCIA IDE support' CONFIG_BLK_DEV_IDECS $CONFIG_BLK_DEV_IDE $CONFIG_PCMCIA dep_tristate ' PCMCIA IDE support' CONFIG_BLK_DEV_IDECS $CONFIG_BLK_DEV_IDE $CONFIG_PCMCIA
dep_tristate ' Include IDE/ATAPI CDROM support' CONFIG_BLK_DEV_IDECD $CONFIG_BLK_DEV_IDE dep_tristate ' Include IDE/ATAPI CDROM support' CONFIG_BLK_DEV_IDECD $CONFIG_BLK_DEV_IDE
dep_mbool ' Reduce media failure retries support' CONFIG_BLK_DEV_IDECD_BAILOUT $CONFIG_BLK_DEV_IDECD
#dep_tristate ' Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE #dep_tristate ' Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE
dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE dep_tristate ' Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE
dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI dep_tristate ' SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI
...@@ -45,7 +33,7 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -45,7 +33,7 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
if [ "$CONFIG_PCI" = "y" ]; then if [ "$CONFIG_PCI" = "y" ]; then
bool ' Generic PCI IDE chipset support' CONFIG_BLK_DEV_IDEPCI bool ' Generic PCI IDE chipset support' CONFIG_BLK_DEV_IDEPCI
if [ "$CONFIG_BLK_DEV_IDEPCI" = "y" ]; then if [ "$CONFIG_BLK_DEV_IDEPCI" = "y" ]; then
dep_bool ' Orphan Chipset Support' CONFIG_BLK_DEV_GENERIC $CONFIG_BLK_DEV_IDEPCI dep_bool ' Generic PCI IDE Chipset Support' CONFIG_BLK_DEV_GENERIC $CONFIG_BLK_DEV_IDEPCI
bool ' Sharing PCI IDE interrupts support' CONFIG_IDEPCI_SHARE_IRQ bool ' Sharing PCI IDE interrupts support' CONFIG_IDEPCI_SHARE_IRQ
bool ' Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA_PCI bool ' Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA_PCI
bool ' Boot off-board chipsets first support' CONFIG_BLK_DEV_OFFBOARD bool ' Boot off-board chipsets first support' CONFIG_BLK_DEV_OFFBOARD
...@@ -55,44 +43,40 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then ...@@ -55,44 +43,40 @@ if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' ATA Work(s) In Progress (EXPERIMENTAL)' CONFIG_IDEDMA_PCI_WIP $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL dep_bool ' ATA Work(s) In Progress (EXPERIMENTAL)' CONFIG_IDEDMA_PCI_WIP $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL
dep_bool ' Good-Bad DMA Model-Firmware (WIP)' CONFIG_IDEDMA_NEW_DRIVE_LISTINGS $CONFIG_IDEDMA_PCI_WIP dep_bool ' Good-Bad DMA Model-Firmware (WIP)' CONFIG_IDEDMA_NEW_DRIVE_LISTINGS $CONFIG_IDEDMA_PCI_WIP
# dep_bool ' Asynchronous DMA support (WIP) (EXPERIMENTAL)' CONFIG_BLK_DEV_ADMA $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_IDEDMA_PCI_WIP $CONFIG_EXPERIMENTAL
define_bool CONFIG_BLK_DEV_ADMA $CONFIG_BLK_DEV_IDEDMA_PCI define_bool CONFIG_BLK_DEV_ADMA $CONFIG_BLK_DEV_IDEDMA_PCI
# dep_bool ' Tag Command Queue DMA support (WIP) (EXPERIMENTAL)' CONFIG_BLK_DEV_IDEDMA_TCQ $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_IDEDMA_PCI_WIP $CONFIG_EXPERIMENTAL
dep_bool ' AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' ALI M15x3 chipset support' CONFIG_BLK_DEV_ALI15X3 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' ALI M15x3 chipset support' CONFIG_BLK_DEV_ALI15X3 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3 dep_mbool ' ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3
dep_bool ' AMD Viper support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' AMD Viper support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' AMD Viper ATA-66 Override' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX dep_mbool ' AMD Viper ATA-66 Override' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX
dep_bool ' CMD64{3|6|8|9} chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' CMD64{3|6|8|9} chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Cyrix CS5530 MediaGX chipset support' CONFIG_BLK_DEV_CS5530 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' Cyrix CS5530 MediaGX chipset support' CONFIG_BLK_DEV_CS5530 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' HPT34X chipset support' CONFIG_BLK_DEV_HPT34X $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' HPT34X chipset support' CONFIG_BLK_DEV_HPT34X $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' HPT34X AUTODMA support (WIP)' CONFIG_HPT34X_AUTODMA $CONFIG_BLK_DEV_HPT34X $CONFIG_IDEDMA_PCI_WIP dep_mbool ' HPT34X AUTODMA support (WIP)' CONFIG_HPT34X_AUTODMA $CONFIG_BLK_DEV_HPT34X $CONFIG_IDEDMA_PCI_WIP
dep_bool ' HPT366/368/370 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' HPT366/368/370 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI
if [ "$CONFIG_X86" = "y" -o "$CONFIG_IA64" = "y" ]; then dep_tristate ' Intel PIIXn chipsets support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI
dep_mbool ' Intel PIIXn chipsets support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI
fi
if [ "$CONFIG_MIPS_ITE8172" = "y" -o "$CONFIG_MIPS_IVR" = "y" ]; then if [ "$CONFIG_MIPS_ITE8172" = "y" -o "$CONFIG_MIPS_IVR" = "y" ]; then
dep_mbool ' IT8172 IDE support' CONFIG_BLK_DEV_IT8172 $CONFIG_BLK_DEV_IDEDMA_PCI dep_mbool ' IT8172 IDE support' CONFIG_BLK_DEV_IT8172 $CONFIG_BLK_DEV_IDEDMA_PCI
fi fi
dep_bool ' nVidia NFORCE support' CONFIG_BLK_DEV_NFORCE $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' nVidia NFORCE support' CONFIG_BLK_DEV_NFORCE $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' NS87415 chipset support' CONFIG_BLK_DEV_NS87415 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' NS87415 chipset support' CONFIG_BLK_DEV_NS87415 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' OPTi 82C621 chipset enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621 $CONFIG_EXPERIMENTAL dep_tristate ' OPTi 82C621 chipset enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621 $CONFIG_EXPERIMENTAL
# dep_bool ' Pacific Digital ADMA100 basic support' CONFIG_BLK_DEV_ADMA100 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' PROMISE PDC202{46|62|65|67} support' CONFIG_BLK_DEV_PDC202XX_OLD $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' PROMISE PDC202{46|62|65|67} support' CONFIG_BLK_DEV_PDC202XX_OLD $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX_OLD $CONFI_BLK_DEV_IDEDMA_PCI dep_bool ' Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX_OLD $CONFI_BLK_DEV_IDEDMA_PCI
dep_bool ' PROMISE PDC202{68|69|70|71|75|76|77} support' CONFIG_BLK_DEV_PDC202XX_NEW $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' PROMISE PDC202{68|69|70|71|75|76|77} support' CONFIG_BLK_DEV_PDC202XX_NEW $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' Special FastTrak Feature' CONFIG_PDC202XX_FORCE $CONFIG_BLK_DEV_PDC202XX # FIXME - probably wants to be one for old and for new
dep_bool ' RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_X86 dep_bool ' Special FastTrak Feature' CONFIG_PDC202XX_FORCE $CONFIG_BLK_DEV_PDC202XX_NEW
dep_bool ' ServerWorks OSB4/CSB5/CSB6 chipsets support' CONFIG_BLK_DEV_SVWKS $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_X86
dep_bool ' Silicon Image chipset support' CONFIG_BLK_DEV_SIIMAGE $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' ServerWorks OSB4/CSB5/CSB6 chipsets support' CONFIG_BLK_DEV_SVWKS $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86 dep_tristate ' Silicon Image chipset support' CONFIG_BLK_DEV_SIIMAGE $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' SLC90E66 chipset support' CONFIG_BLK_DEV_SLC90E66 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
dep_bool ' Tekram TRM290 chipset support' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' SLC90E66 chipset support' CONFIG_BLK_DEV_SLC90E66 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_bool ' VIA82CXXX chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI dep_tristate ' Tekram TRM290 chipset support' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI
dep_tristate ' VIA82CXXX chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI
if [ "$CONFIG_PPC" = "y" -o "$CONFIG_ARM" = "y" ]; then if [ "$CONFIG_PPC" = "y" -o "$CONFIG_ARM" = "y" ]; then
dep_bool ' Winbond SL82c105 support' CONFIG_BLK_DEV_SL82C105 $CONFIG_BLK_DEV_IDEPCI dep_tristate ' Winbond SL82c105 support' CONFIG_BLK_DEV_SL82C105 $CONFIG_BLK_DEV_IDEPCI
fi fi
fi fi
fi fi
...@@ -230,8 +214,4 @@ else ...@@ -230,8 +214,4 @@ else
define_bool CONFIG_BLK_DEV_IDE_MODES n define_bool CONFIG_BLK_DEV_IDE_MODES n
fi fi
#dep_tristate 'Support for IDE Raid controllers (EXPERIMENTAL)' CONFIG_BLK_DEV_ATARAID $CONFIG_BLK_DEV_IDE $CONFIG_EXPERIMENTAL
#dep_tristate ' Support Promise software RAID (Fasttrak(tm)) (EXPERIMENTAL)' CONFIG_BLK_DEV_ATARAID_PDC $CONFIG_BLK_DEV_IDE $CONFIG_EXPERIMENTAL $CONFIG_BLK_DEV_ATARAID
#dep_tristate ' Highpoint 370 software RAID (EXPERIMENTAL)' CONFIG_BLK_DEV_ATARAID_HPT $CONFIG_BLK_DEV_IDE $CONFIG_EXPERIMENTAL $CONFIG_BLK_DEV_ATARAID
endmenu endmenu
...@@ -19,21 +19,26 @@ ide-obj-y := ...@@ -19,21 +19,26 @@ ide-obj-y :=
subdir-$(CONFIG_BLK_DEV_IDEPCI) += pci subdir-$(CONFIG_BLK_DEV_IDEPCI) += pci
subdir-$(CONFIG_BLK_DEV_IDE) += legacy ppc arm pci subdir-$(CONFIG_BLK_DEV_IDE) += legacy ppc arm pci
# First come modules that register themselves with the core
obj-y += pci/idedriver-pci.o
# Core IDE code - must come before legacy
obj-$(CONFIG_BLK_DEV_IDE) += ide-probe.o ide-geometry.o ide-iops.o ide-taskfile.o ide.o ide-lib.o obj-$(CONFIG_BLK_DEV_IDE) += ide-probe.o ide-geometry.o ide-iops.o ide-taskfile.o ide.o ide-lib.o
obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
ifeq ($(CONFIG_BLK_DEV_IDE),y)
obj-$(CONFIG_PROC_FS) += ide-proc.o obj-$(CONFIG_PROC_FS) += ide-proc.o
endif
obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
ifeq ($(CONFIG_BLK_DEV_IDE),y) ifeq ($(CONFIG_BLK_DEV_IDE),y)
obj-y += pci/idedriver-pci.o
obj-y += legacy/idedriver-legacy.o obj-y += legacy/idedriver-legacy.o
obj-y += ppc/idedriver-ppc.o obj-y += ppc/idedriver-ppc.o
obj-y += arm/idedriver-arm.o obj-y += arm/idedriver-arm.o
......
...@@ -211,6 +211,8 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive) ...@@ -211,6 +211,8 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)
return DRIVER(drive)->error(drive, "dma_intr", stat); return DRIVER(drive)->error(drive, "dma_intr", stat);
} }
EXPORT_SYMBOL_GPL(ide_dma_intr);
static int ide_build_sglist (ide_drive_t *drive, struct request *rq) static int ide_build_sglist (ide_drive_t *drive, struct request *rq)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
...@@ -365,6 +367,8 @@ int ide_build_dmatable (ide_drive_t *drive, struct request *rq) ...@@ -365,6 +367,8 @@ int ide_build_dmatable (ide_drive_t *drive, struct request *rq)
return 0; /* revert to PIO for this request */ return 0; /* revert to PIO for this request */
} }
EXPORT_SYMBOL_GPL(ide_build_dmatable);
/* Teardown mappings after DMA has completed. */ /* Teardown mappings after DMA has completed. */
void ide_destroy_dmatable (ide_drive_t *drive) void ide_destroy_dmatable (ide_drive_t *drive)
{ {
...@@ -376,6 +380,8 @@ void ide_destroy_dmatable (ide_drive_t *drive) ...@@ -376,6 +380,8 @@ void ide_destroy_dmatable (ide_drive_t *drive)
HWIF(drive)->sg_dma_active = 0; HWIF(drive)->sg_dma_active = 0;
} }
EXPORT_SYMBOL_GPL(ide_destroy_dmatable);
static int config_drive_for_dma (ide_drive_t *drive) static int config_drive_for_dma (ide_drive_t *drive)
{ {
struct hd_driveid *id = drive->id; struct hd_driveid *id = drive->id;
...@@ -1019,4 +1025,4 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p ...@@ -1019,4 +1025,4 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
BUG(); BUG();
} }
EXPORT_SYMBOL_GPL(ide_setup_dma);
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/bitops.h> #include <asm/bitops.h>
#include "ide_modes.h"
/* /*
* IDE library routines. These are plug in code that most * IDE library routines. These are plug in code that most
* drivers can use but occasionally may be weird enough * drivers can use but occasionally may be weird enough
...@@ -186,3 +188,201 @@ int ide_dma_enable (ide_drive_t *drive) ...@@ -186,3 +188,201 @@ int ide_dma_enable (ide_drive_t *drive)
} }
EXPORT_SYMBOL(ide_dma_enable); EXPORT_SYMBOL(ide_dma_enable);
const ide_pio_timings_t ide_pio_timings[6] = {
{ 70, 165, 600 }, /* PIO Mode 0 */
{ 50, 125, 383 }, /* PIO Mode 1 */
{ 30, 100, 240 }, /* PIO Mode 2 */
{ 30, 80, 180 }, /* PIO Mode 3 with IORDY */
{ 25, 70, 120 }, /* PIO Mode 4 with IORDY */
{ 20, 50, 100 } /* PIO Mode 5 with IORDY (nonstandard) */
};
EXPORT_SYMBOL_GPL(ide_pio_timings);
/*
* Black list. Some drives incorrectly report their maximal PIO mode,
* at least in respect to CMD640. Here we keep info on some known drives.
*/
static struct ide_pio_info {
const char *name;
int pio;
} ide_pio_blacklist [] = {
/* { "Conner Peripherals 1275MB - CFS1275A", 4 }, */
{ "Conner Peripherals 540MB - CFS540A", 3 },
{ "WDC AC2700", 3 },
{ "WDC AC2540", 3 },
{ "WDC AC2420", 3 },
{ "WDC AC2340", 3 },
{ "WDC AC2250", 0 },
{ "WDC AC2200", 0 },
{ "WDC AC21200", 4 },
{ "WDC AC2120", 0 },
{ "WDC AC2850", 3 },
{ "WDC AC1270", 3 },
{ "WDC AC1170", 1 },
{ "WDC AC1210", 1 },
{ "WDC AC280", 0 },
/* { "WDC AC21000", 4 }, */
{ "WDC AC31000", 3 },
{ "WDC AC31200", 3 },
/* { "WDC AC31600", 4 }, */
{ "Maxtor 7131 AT", 1 },
{ "Maxtor 7171 AT", 1 },
{ "Maxtor 7213 AT", 1 },
{ "Maxtor 7245 AT", 1 },
{ "Maxtor 7345 AT", 1 },
{ "Maxtor 7546 AT", 3 },
{ "Maxtor 7540 AV", 3 },
{ "SAMSUNG SHD-3121A", 1 },
{ "SAMSUNG SHD-3122A", 1 },
{ "SAMSUNG SHD-3172A", 1 },
/* { "ST51080A", 4 },
* { "ST51270A", 4 },
* { "ST31220A", 4 },
* { "ST31640A", 4 },
* { "ST32140A", 4 },
* { "ST3780A", 4 },
*/
{ "ST5660A", 3 },
{ "ST3660A", 3 },
{ "ST3630A", 3 },
{ "ST3655A", 3 },
{ "ST3391A", 3 },
{ "ST3390A", 1 },
{ "ST3600A", 1 },
{ "ST3290A", 0 },
{ "ST3144A", 0 },
{ "ST3491A", 1 }, /* reports 3, should be 1 or 2 (depending on */
/* drive) according to Seagates FIND-ATA program */
{ "QUANTUM ELS127A", 0 },
{ "QUANTUM ELS170A", 0 },
{ "QUANTUM LPS240A", 0 },
{ "QUANTUM LPS210A", 3 },
{ "QUANTUM LPS270A", 3 },
{ "QUANTUM LPS365A", 3 },
{ "QUANTUM LPS540A", 3 },
{ "QUANTUM LIGHTNING 540A", 3 },
{ "QUANTUM LIGHTNING 730A", 3 },
{ "QUANTUM FIREBALL_540", 3 }, /* Older Quantum Fireballs don't work */
{ "QUANTUM FIREBALL_640", 3 },
{ "QUANTUM FIREBALL_1080", 3 },
{ "QUANTUM FIREBALL_1280", 3 },
{ NULL, 0 }
};
/**
* ide_scan_pio_blacklist - check for a blacklisted drive
* @model: Drive model string
*
* This routine searches the ide_pio_blacklist for an entry
* matching the start/whole of the supplied model name.
*
* Returns -1 if no match found.
* Otherwise returns the recommended PIO mode from ide_pio_blacklist[].
*/
static int ide_scan_pio_blacklist (char *model)
{
struct ide_pio_info *p;
for (p = ide_pio_blacklist; p->name != NULL; p++) {
if (strncmp(p->name, model, strlen(p->name)) == 0)
return p->pio;
}
return -1;
}
/**
* ide_get_best_pio_mode - get PIO mode fro drive
* @driver: drive to consider
* @mode_wanted: preferred mode
* @max_mode: highest allowed
* @d: pio data
*
* This routine returns the recommended PIO settings for a given drive,
* based on the drive->id information and the ide_pio_blacklist[].
* This is used by most chipset support modules when "auto-tuning".
*
* Drive PIO mode auto selection
*/
u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d)
{
int pio_mode;
int cycle_time = 0;
int use_iordy = 0;
struct hd_driveid* id = drive->id;
int overridden = 0;
int blacklisted = 0;
if (mode_wanted != 255) {
pio_mode = mode_wanted;
} else if (!drive->id) {
pio_mode = 0;
} else if ((pio_mode = ide_scan_pio_blacklist(id->model)) != -1) {
overridden = 1;
blacklisted = 1;
use_iordy = (pio_mode > 2);
} else {
pio_mode = id->tPIO;
if (pio_mode > 2) { /* 2 is maximum allowed tPIO value */
pio_mode = 2;
overridden = 1;
}
if (id->field_valid & 2) { /* drive implements ATA2? */
if (id->capability & 8) { /* drive supports use_iordy? */
use_iordy = 1;
cycle_time = id->eide_pio_iordy;
if (id->eide_pio_modes & 7) {
overridden = 0;
if (id->eide_pio_modes & 4)
pio_mode = 5;
else if (id->eide_pio_modes & 2)
pio_mode = 4;
else
pio_mode = 3;
}
} else {
cycle_time = id->eide_pio;
}
}
#if 0
if (drive->id->major_rev_num & 0x0004) printk("ATA-2 ");
#endif
/*
* Conservative "downgrade" for all pre-ATA2 drives
*/
if (pio_mode && pio_mode < 4) {
pio_mode--;
overridden = 1;
#if 0
use_iordy = (pio_mode > 2);
#endif
if (cycle_time && cycle_time < ide_pio_timings[pio_mode].cycle_time)
cycle_time = 0; /* use standard timing */
}
}
if (pio_mode > max_mode) {
pio_mode = max_mode;
cycle_time = 0;
}
if (d) {
d->pio_mode = pio_mode;
d->cycle_time = cycle_time ? cycle_time : ide_pio_timings[pio_mode].cycle_time;
d->use_iordy = use_iordy;
d->overridden = overridden;
d->blacklisted = blacklisted;
}
return pio_mode;
}
EXPORT_SYMBOL_GPL(ide_get_best_pio_mode);
...@@ -592,6 +592,7 @@ void probe_hwif (ide_hwif_t *hwif) ...@@ -592,6 +592,7 @@ void probe_hwif (ide_hwif_t *hwif)
{ {
unsigned int unit; unsigned int unit;
unsigned long flags; unsigned long flags;
unsigned int irqd;
if (hwif->noprobe) if (hwif->noprobe)
return; return;
...@@ -623,7 +624,12 @@ void probe_hwif (ide_hwif_t *hwif) ...@@ -623,7 +624,12 @@ void probe_hwif (ide_hwif_t *hwif)
return; return;
} }
if (hwif->hw.ack_intr && hwif->irq) /*
* We must always disable IRQ, as probe_for_drive will assert IRQ, but
* we'll install our IRQ driver much later...
*/
irqd = hwif->irq;
if (irqd)
disable_irq(hwif->irq); disable_irq(hwif->irq);
local_irq_set(flags); local_irq_set(flags);
...@@ -659,8 +665,12 @@ void probe_hwif (ide_hwif_t *hwif) ...@@ -659,8 +665,12 @@ void probe_hwif (ide_hwif_t *hwif)
} }
local_irq_restore(flags); local_irq_restore(flags);
if (hwif->hw.ack_intr && hwif->irq) /*
enable_irq(hwif->irq); * Use cached IRQ number. It might be (and is...) changed by probe
* code above
*/
if (irqd)
enable_irq(irqd);
for (unit = 0; unit < MAX_DRIVES; ++unit) { for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit]; ide_drive_t *drive = &hwif->drives[unit];
......
...@@ -194,6 +194,8 @@ int noautodma = 0; ...@@ -194,6 +194,8 @@ int noautodma = 0;
int noautodma = 1; int noautodma = 1;
#endif #endif
EXPORT_SYMBOL(noautodma);
/* /*
* ide_modules keeps track of the available IDE chipset/probe/driver modules. * ide_modules keeps track of the available IDE chipset/probe/driver modules.
*/ */
...@@ -1376,7 +1378,6 @@ void ide_intr (int irq, void *dev_id, struct pt_regs *regs) ...@@ -1376,7 +1378,6 @@ void ide_intr (int irq, void *dev_id, struct pt_regs *regs)
if ((handler = hwgroup->handler) == NULL || if ((handler = hwgroup->handler) == NULL ||
hwgroup->poll_timeout != 0) { hwgroup->poll_timeout != 0) {
printk("ide_intr: unexpected interrupt!\n");
/* /*
* Not expecting an interrupt from this drive. * Not expecting an interrupt from this drive.
* That means this could be: * That means this could be:
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
* breaking the fragile cmd640.c support. * breaking the fragile cmd640.c support.
*/ */
#ifdef CONFIG_BLK_DEV_IDE_MODES
/* /*
* Standard (generic) timings for PIO modes, from ATA2 specification. * Standard (generic) timings for PIO modes, from ATA2 specification.
* These timings are for access to the IDE data port register *only*. * These timings are for access to the IDE data port register *only*.
...@@ -38,199 +36,6 @@ typedef struct ide_pio_data_s { ...@@ -38,199 +36,6 @@ typedef struct ide_pio_data_s {
unsigned int cycle_time; unsigned int cycle_time;
} ide_pio_data_t; } ide_pio_data_t;
#ifndef _IDE_C
int ide_scan_pio_blacklist (char *model);
u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d); u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
extern const ide_pio_timings_t ide_pio_timings[6]; extern const ide_pio_timings_t ide_pio_timings[6];
#else /* _IDE_C */
const ide_pio_timings_t ide_pio_timings[6] = {
{ 70, 165, 600 }, /* PIO Mode 0 */
{ 50, 125, 383 }, /* PIO Mode 1 */
{ 30, 100, 240 }, /* PIO Mode 2 */
{ 30, 80, 180 }, /* PIO Mode 3 with IORDY */
{ 25, 70, 120 }, /* PIO Mode 4 with IORDY */
{ 20, 50, 100 } /* PIO Mode 5 with IORDY (nonstandard) */
};
/*
* Black list. Some drives incorrectly report their maximal PIO mode,
* at least in respect to CMD640. Here we keep info on some known drives.
*/
static struct ide_pio_info {
const char *name;
int pio;
} ide_pio_blacklist [] = {
/* { "Conner Peripherals 1275MB - CFS1275A", 4 }, */
{ "Conner Peripherals 540MB - CFS540A", 3 },
{ "WDC AC2700", 3 },
{ "WDC AC2540", 3 },
{ "WDC AC2420", 3 },
{ "WDC AC2340", 3 },
{ "WDC AC2250", 0 },
{ "WDC AC2200", 0 },
{ "WDC AC21200", 4 },
{ "WDC AC2120", 0 },
{ "WDC AC2850", 3 },
{ "WDC AC1270", 3 },
{ "WDC AC1170", 1 },
{ "WDC AC1210", 1 },
{ "WDC AC280", 0 },
/* { "WDC AC21000", 4 }, */
{ "WDC AC31000", 3 },
{ "WDC AC31200", 3 },
/* { "WDC AC31600", 4 }, */
{ "Maxtor 7131 AT", 1 },
{ "Maxtor 7171 AT", 1 },
{ "Maxtor 7213 AT", 1 },
{ "Maxtor 7245 AT", 1 },
{ "Maxtor 7345 AT", 1 },
{ "Maxtor 7546 AT", 3 },
{ "Maxtor 7540 AV", 3 },
{ "SAMSUNG SHD-3121A", 1 },
{ "SAMSUNG SHD-3122A", 1 },
{ "SAMSUNG SHD-3172A", 1 },
/* { "ST51080A", 4 },
* { "ST51270A", 4 },
* { "ST31220A", 4 },
* { "ST31640A", 4 },
* { "ST32140A", 4 },
* { "ST3780A", 4 },
*/
{ "ST5660A", 3 },
{ "ST3660A", 3 },
{ "ST3630A", 3 },
{ "ST3655A", 3 },
{ "ST3391A", 3 },
{ "ST3390A", 1 },
{ "ST3600A", 1 },
{ "ST3290A", 0 },
{ "ST3144A", 0 },
{ "ST3491A", 1 }, /* reports 3, should be 1 or 2 (depending on */
/* drive) according to Seagates FIND-ATA program */
{ "QUANTUM ELS127A", 0 },
{ "QUANTUM ELS170A", 0 },
{ "QUANTUM LPS240A", 0 },
{ "QUANTUM LPS210A", 3 },
{ "QUANTUM LPS270A", 3 },
{ "QUANTUM LPS365A", 3 },
{ "QUANTUM LPS540A", 3 },
{ "QUANTUM LIGHTNING 540A", 3 },
{ "QUANTUM LIGHTNING 730A", 3 },
{ "QUANTUM FIREBALL_540", 3 }, /* Older Quantum Fireballs don't work */
{ "QUANTUM FIREBALL_640", 3 },
{ "QUANTUM FIREBALL_1080", 3 },
{ "QUANTUM FIREBALL_1280", 3 },
{ NULL, 0 }
};
/*
* This routine searches the ide_pio_blacklist for an entry
* matching the start/whole of the supplied model name.
*
* Returns -1 if no match found.
* Otherwise returns the recommended PIO mode from ide_pio_blacklist[].
*/
int ide_scan_pio_blacklist (char *model)
{
struct ide_pio_info *p;
for (p = ide_pio_blacklist; p->name != NULL; p++) {
if (strncmp(p->name, model, strlen(p->name)) == 0)
return p->pio;
}
return -1;
}
/*
* This routine returns the recommended PIO settings for a given drive,
* based on the drive->id information and the ide_pio_blacklist[].
* This is used by most chipset support modules when "auto-tuning".
*/
/*
* Drive PIO mode auto selection
*/
u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d)
{
int pio_mode;
int cycle_time = 0;
int use_iordy = 0;
struct hd_driveid* id = drive->id;
int overridden = 0;
int blacklisted = 0;
if (mode_wanted != 255) {
pio_mode = mode_wanted;
} else if (!drive->id) {
pio_mode = 0;
} else if ((pio_mode = ide_scan_pio_blacklist(id->model)) != -1) {
overridden = 1;
blacklisted = 1;
use_iordy = (pio_mode > 2);
} else {
pio_mode = id->tPIO;
if (pio_mode > 2) { /* 2 is maximum allowed tPIO value */
pio_mode = 2;
overridden = 1;
}
if (id->field_valid & 2) { /* drive implements ATA2? */
if (id->capability & 8) { /* drive supports use_iordy? */
use_iordy = 1;
cycle_time = id->eide_pio_iordy;
if (id->eide_pio_modes & 7) {
overridden = 0;
if (id->eide_pio_modes & 4)
pio_mode = 5;
else if (id->eide_pio_modes & 2)
pio_mode = 4;
else
pio_mode = 3;
}
} else {
cycle_time = id->eide_pio;
}
}
#if 0
if (drive->id->major_rev_num & 0x0004) printk("ATA-2 ");
#endif
/*
* Conservative "downgrade" for all pre-ATA2 drives
*/
if (pio_mode && pio_mode < 4) {
pio_mode--;
overridden = 1;
#if 0
use_iordy = (pio_mode > 2);
#endif
if (cycle_time && cycle_time < ide_pio_timings[pio_mode].cycle_time)
cycle_time = 0; /* use standard timing */
}
}
if (pio_mode > max_mode) {
pio_mode = max_mode;
cycle_time = 0;
}
if (d) {
d->pio_mode = pio_mode;
d->cycle_time = cycle_time ? cycle_time : ide_pio_timings[pio_mode].cycle_time;
d->use_iordy = use_iordy;
d->overridden = overridden;
d->blacklisted = blacklisted;
}
return pio_mode;
}
#endif /* _IDE_C */
#endif /* CONFIG_BLK_DEV_IDE_MODES */
#endif /* _IDE_MODES_H */ #endif /* _IDE_MODES_H */
...@@ -19,6 +19,7 @@ obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o ...@@ -19,6 +19,7 @@ obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o
obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o
# Last of all
obj-$(CONFIG_BLK_DEV_HD) += hd.o obj-$(CONFIG_BLK_DEV_HD) += hd.o
EXTRA_CFLAGS := -I../ EXTRA_CFLAGS := -I../
......
...@@ -870,3 +870,4 @@ static int parse_hd_setup (char *line) { ...@@ -870,3 +870,4 @@ static int parse_hd_setup (char *line) {
} }
__setup("hd=", parse_hd_setup); __setup("hd=", parse_hd_setup);
module_init(hd_init);
...@@ -12,7 +12,6 @@ obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o ...@@ -12,7 +12,6 @@ obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o
obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o
obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o
obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o
obj-$(CONFIG_BLK_DEV_GENERIC) += generic.o
obj-$(CONFIG_BLK_DEV_HPT34X) += hpt34x.o obj-$(CONFIG_BLK_DEV_HPT34X) += hpt34x.o
obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o
#obj-$(CONFIG_BLK_DEV_HPT37X) += hpt37x.o #obj-$(CONFIG_BLK_DEV_HPT37X) += hpt37x.o
...@@ -34,6 +33,9 @@ obj-$(CONFIG_BLK_DEV_SLC90E66) += slc90e66.o ...@@ -34,6 +33,9 @@ obj-$(CONFIG_BLK_DEV_SLC90E66) += slc90e66.o
obj-$(CONFIG_BLK_DEV_TRM290) += trm290.o obj-$(CONFIG_BLK_DEV_TRM290) += trm290.o
obj-$(CONFIG_BLK_DEV_VIA82CXXX) += via82cxxx.o obj-$(CONFIG_BLK_DEV_VIA82CXXX) += via82cxxx.o
# Must appear at the end of the block
obj-$(CONFIG_BLK_DEV_GENERIC) += generic.o
EXTRA_CFLAGS := -I../ EXTRA_CFLAGS := -I../
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -38,8 +38,6 @@ static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count) ...@@ -38,8 +38,6 @@ static int aec62xx_get_info (char *buffer, char **addr, off_t offset, int count)
char *chipset_nums[] = {"error", "error", "error", "error", char *chipset_nums[] = {"error", "error", "error", "error",
"error", "error", "850UF", "860", "error", "error", "850UF", "860",
"860R", "865", "865R", "error" }; "860R", "865", "865R", "error" };
// char *modes_33[] = {};
// char *modes_34[] = {};
int i; int i;
for (i = 0; i < n_aec_devs; i++) { for (i = 0; i < n_aec_devs; i++) {
...@@ -516,22 +514,69 @@ static void __init init_setup_aec6x80 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -516,22 +514,69 @@ static void __init init_setup_aec6x80 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
} }
int __init aec62xx_scan_pcidev (struct pci_dev *dev) /**
{ * aec62xx_init_one - called when a AEC is found
ide_pci_device_t *d; * @dev: the aec62xx device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
if (dev->vendor != PCI_VENDOR_ID_ARTOP) static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
return 0; {
ide_pci_device_t *d = &aec62xx_chipsets[id->driver_data];
for (d = aec62xx_chipsets; if (dev->device != d->device)
d && d->vendor && d->device; ++d) { BUG();
if (((d->vendor == dev->vendor) &&
(d->device == dev->device)) &&
(d->init_setup)) {
d->init_setup(dev, d); d->init_setup(dev, d);
return 1;
}
}
return 0; return 0;
} }
/**
* aec62xx_remove_one - called when an AEC is unplugged
* @dev: the device that was removed
*
* Disconnect an AEC device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void aec62xx_remove_one(struct pci_dev *dev)
{
panic("AEC62xx removal not yet supported");
}
static struct pci_device_id aec62xx_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
{ PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
{ 0, },
};
static struct pci_driver driver = {
name: "AEC62xx IDE",
id_table: aec62xx_pci_tbl,
probe: aec62xx_init_one,
remove: __devexit_p(aec62xx_remove_one),
};
static int aec62xx_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void aec62xx_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(aec62xx_ide_init);
module_exit(aec62xx_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for ARTOP AEC62xx IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -99,7 +99,7 @@ static void init_hwif_aec62xx(ide_hwif_t *); ...@@ -99,7 +99,7 @@ static void init_hwif_aec62xx(ide_hwif_t *);
static void init_dma_aec62xx(ide_hwif_t *, unsigned long); static void init_dma_aec62xx(ide_hwif_t *, unsigned long);
static ide_pci_device_t aec62xx_chipsets[] __initdata = { static ide_pci_device_t aec62xx_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_ARTOP, vendor: PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP850UF, device: PCI_DEVICE_ID_ARTOP_ATP850UF,
name: "AEC6210", name: "AEC6210",
...@@ -113,7 +113,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = { ...@@ -113,7 +113,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits: {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, enablebits: {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_ARTOP, vendor: PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP860, device: PCI_DEVICE_ID_ARTOP_ATP860,
name: "AEC6260", name: "AEC6260",
...@@ -127,7 +127,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = { ...@@ -127,7 +127,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_ARTOP, vendor: PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP860R, device: PCI_DEVICE_ID_ARTOP_ATP860R,
name: "AEC6260R", name: "AEC6260R",
...@@ -141,7 +141,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = { ...@@ -141,7 +141,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits: {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, enablebits: {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
bootable: NEVER_BOARD, bootable: NEVER_BOARD,
extra: 0, extra: 0,
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_ARTOP, vendor: PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP865, device: PCI_DEVICE_ID_ARTOP_ATP865,
name: "AEC6X80", name: "AEC6X80",
...@@ -155,7 +155,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = { ...@@ -155,7 +155,7 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 4 */
vendor: PCI_VENDOR_ID_ARTOP, vendor: PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP865R, device: PCI_DEVICE_ID_ARTOP_ATP865R,
name: "AEC6X80R", name: "AEC6X80R",
...@@ -169,11 +169,6 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = { ...@@ -169,11 +169,6 @@ static ide_pci_device_t aec62xx_chipsets[] __initdata = {
enablebits: {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, enablebits: {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{
vendor: 0,
device: 0,
channels: 0,
bootable: EOL,
} }
}; };
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -623,9 +624,11 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char ...@@ -623,9 +624,11 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char
/* /*
* We should only tune the 1533 enable if we are using an ALi * We should only tune the 1533 enable if we are using an ALi
* North bridge * North bridge. We might have no north found on some zany
* box without a device at 0:0.0. The ALi bridge will be at
* 0:0.0 so if we didn't find one we know what is cooking.
*/ */
if (north->vendor != PCI_VENDOR_ID_AL) { if (north && north->vendor != PCI_VENDOR_ID_AL) {
local_irq_restore(flags); local_irq_restore(flags);
return 0; return 0;
} }
...@@ -841,45 +844,64 @@ extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); ...@@ -841,45 +844,64 @@ extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
/** /**
* init_setup_ali15x3 - set up an ALi15x3 IDE controller * alim15x3_init_one - set up an ALi15x3 IDE controller
* @dev: PCI device to set up * @dev: PCI device to set up
* @d: IDE PCI structures
* *
* Perform the actual set up for the ALi15x3. * Perform the actual set up for an ALi15x3 that has been found by the
* hot plug layer.
*/ */
static void __init init_setup_ali15x3 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &ali15x3_chipsets[id->driver_data];
#if defined(CONFIG_SPARC64) #if defined(CONFIG_SPARC64)
d->init_hwif = init_hwif_common_ali15x3; d->init_hwif = init_hwif_common_ali15x3;
#endif /* CONFIG_SPARC64 */ #endif /* CONFIG_SPARC64 */
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
/** /**
* ali15x3_scan_pcidev - check for ali pci ide * ali15x3_remove_one - called with an ALi is unplugged
* @dev: device found by IDE ordered scan * @dev: the device that was removed
* *
* If the device is a known ALi IDE controller we set it up and * Disconnect an ALi device that has been unplugged either by hotplug
* then return 1. If we do not know it, or set up fails we return 0 * or by a more civilized notification scheme. Not yet supported.
* and it will be offered to other drivers or taken generic
*/ */
int __init ali15x3_scan_pcidev (struct pci_dev *dev) static void ali15x3_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("ALi removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_AL) static struct pci_device_id alim15x3_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0, },
};
for (d = ali15x3_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "ALI15x3 IDE",
(d->device == dev->device)) && id_table: alim15x3_pci_tbl,
(d->init_setup)) { probe: alim15x3_init_one,
d->init_setup(dev, d); remove: __devexit_p(ali15x3_remove_one),
return 1; };
}
} static int ali15x3_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void ali15x3_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(ali15x3_ide_init);
module_exit(ali15x3_ide_exit);
MODULE_AUTHOR("Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox");
MODULE_DESCRIPTION("PCI driver module for ALi 15x3 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -25,18 +25,16 @@ static ide_pci_host_proc_t ali_procs[] __initdata = { ...@@ -25,18 +25,16 @@ static ide_pci_host_proc_t ali_procs[] __initdata = {
}; };
#endif /* DISPLAY_ALI_TIMINGS && CONFIG_PROC_FS */ #endif /* DISPLAY_ALI_TIMINGS && CONFIG_PROC_FS */
static void init_setup_ali15x3(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_ali15x3(struct pci_dev *, const char *); static unsigned int init_chipset_ali15x3(struct pci_dev *, const char *);
static void init_hwif_common_ali15x3(ide_hwif_t *); static void init_hwif_common_ali15x3(ide_hwif_t *);
static void init_hwif_ali15x3(ide_hwif_t *); static void init_hwif_ali15x3(ide_hwif_t *);
static void init_dma_ali15x3(ide_hwif_t *, unsigned long); static void init_dma_ali15x3(ide_hwif_t *, unsigned long);
static ide_pci_device_t ali15x3_chipsets[] __initdata = { static ide_pci_device_t ali15x3_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_AL, vendor: PCI_VENDOR_ID_AL,
device: PCI_DEVICE_ID_AL_M5229, device: PCI_DEVICE_ID_AL_M5229,
name: "ALI15X3", name: "ALI15X3",
init_setup: init_setup_ali15x3,
init_chipset: init_chipset_ali15x3, init_chipset: init_chipset_ali15x3,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_ali15x3, init_hwif: init_hwif_ali15x3,
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -392,26 +393,60 @@ static void __init init_dma_amd74xx (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -392,26 +393,60 @@ static void __init init_dma_amd74xx (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_amd74xx (struct pci_dev *dev, ide_pci_device_t *d)
static int __devinit amd74xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &amd74xx_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init amd74xx_scan_pcidev (struct pci_dev *dev) /**
* amd74xx_remove_one - called with an AMD IDE is unplugged
* @dev: the device that was removed
*
* Disconnect an AMD IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void amd74xx_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("AMD IDE removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_AMD) static struct pci_device_id amd74xx_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_COBRA_7401, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7409, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7411, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_OPUS_7441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ 0, },
};
static struct pci_driver driver = {
name: "AMD IDE",
id_table: amd74xx_pci_tbl,
probe: amd74xx_init_one,
remove: __devexit_p(amd74xx_remove_one),
};
static int amd74xx_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
for (d = amd74xx_chipsets; d && d->vendor && d->device; ++d) { static void amd74xx_ide_exit(void)
if (((d->vendor == dev->vendor) && {
(d->device == dev->device)) && ide_pci_unregister_driver(&driver);
(d->init_setup)) {
d->init_setup(dev, d);
return 1;
}
}
return 0;
} }
module_init(amd74xx_ide_init);
module_exit(amd74xx_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for AMD IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t amd74xx_procs[] __initdata = { ...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t amd74xx_procs[] __initdata = {
}; };
#endif /* defined(DISPLAY_VIPER_TIMINGS) && defined(CONFIG_PROC_FS) */ #endif /* defined(DISPLAY_VIPER_TIMINGS) && defined(CONFIG_PROC_FS) */
static void init_setup_amd74xx(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_amd74xx(struct pci_dev *, const char *); static unsigned int init_chipset_amd74xx(struct pci_dev *, const char *);
static void init_hwif_amd74xx(ide_hwif_t *); static void init_hwif_amd74xx(ide_hwif_t *);
static void init_dma_amd74xx(ide_hwif_t *, unsigned long); static void init_dma_amd74xx(ide_hwif_t *, unsigned long);
static ide_pci_device_t amd74xx_chipsets[] __initdata = { static ide_pci_device_t amd74xx_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_AMD, vendor: PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_COBRA_7401, device: PCI_DEVICE_ID_AMD_COBRA_7401,
name: "AMD7401", name: "AMD7401",
init_setup: init_setup_amd74xx,
init_chipset: init_chipset_amd74xx, init_chipset: init_chipset_amd74xx,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_amd74xx, init_hwif: init_hwif_amd74xx,
...@@ -45,11 +43,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = { ...@@ -45,11 +43,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0 extra: 0
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_AMD, vendor: PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_VIPER_7409, device: PCI_DEVICE_ID_AMD_VIPER_7409,
name: "AMD7409", name: "AMD7409",
init_setup: init_setup_amd74xx,
init_chipset: init_chipset_amd74xx, init_chipset: init_chipset_amd74xx,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_amd74xx, init_hwif: init_hwif_amd74xx,
...@@ -59,11 +56,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = { ...@@ -59,11 +56,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0 extra: 0
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_AMD, vendor: PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_VIPER_7411, device: PCI_DEVICE_ID_AMD_VIPER_7411,
name: "AMD7411", name: "AMD7411",
init_setup: init_setup_amd74xx,
init_chipset: init_chipset_amd74xx, init_chipset: init_chipset_amd74xx,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_amd74xx, init_hwif: init_hwif_amd74xx,
...@@ -73,11 +69,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = { ...@@ -73,11 +69,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0 extra: 0
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_AMD, vendor: PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_OPUS_7441, device: PCI_DEVICE_ID_AMD_OPUS_7441,
name: "AMD7441", name: "AMD7441",
init_setup: init_setup_amd74xx,
init_chipset: init_chipset_amd74xx, init_chipset: init_chipset_amd74xx,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_amd74xx, init_hwif: init_hwif_amd74xx,
...@@ -87,11 +82,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = { ...@@ -87,11 +82,10 @@ static ide_pci_device_t amd74xx_chipsets[] __initdata = {
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0 extra: 0
},{ },{ /* 4 */
vendor: PCI_VENDOR_ID_AMD, vendor: PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_8111_IDE, device: PCI_DEVICE_ID_AMD_8111_IDE,
name: "AMD8111", name: "AMD8111",
init_setup: init_setup_amd74xx,
init_chipset: init_chipset_amd74xx, init_chipset: init_chipset_amd74xx,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_amd74xx, init_hwif: init_hwif_amd74xx,
......
/* $Id: cmd64x.c,v 1.21 2000/01/30 23:23:16 /* $Id: cmd64x.c,v 1.21 2000/01/30 23:23:16
* *
* linux/drivers/ide/cmd64x.c Version 1.22 June 9, 2000 * linux/drivers/ide/cmd64x.c Version 1.30 Sept 10, 2002
* *
* cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines. * cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines.
* Note, this driver is not used at all on other systems because * Note, this driver is not used at all on other systems because
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -727,10 +728,12 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif) ...@@ -727,10 +728,12 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
if (dev->device == PCI_DEVICE_ID_CMD_643) if (dev->device == PCI_DEVICE_ID_CMD_643)
hwif->ultra_mask = 0x80; hwif->ultra_mask = 0x80;
if (dev->device == PCI_DEVICE_ID_CMD_646) if (dev->device == PCI_DEVICE_ID_CMD_646)
{
if (class_rev > 0x04) if (class_rev > 0x04)
hwif->ultra_mask = 0x07; hwif->ultra_mask = 0x07;
else else
hwif->ultra_mask = 0x80; hwif->ultra_mask = 0x80;
}
#ifdef CONFIG_BLK_DEV_IDEDMA #ifdef CONFIG_BLK_DEV_IDEDMA
hwif->ide_dma_check = &cmd64x_config_drive_for_dma; hwif->ide_dma_check = &cmd64x_config_drive_for_dma;
...@@ -758,10 +761,6 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif) ...@@ -758,10 +761,6 @@ static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
#endif /* CONFIG_BLK_DEV_IDEDMA */ #endif /* CONFIG_BLK_DEV_IDEDMA */
} }
/**
* FIXME: not required ?
*/
static void __init init_dma_cmd64x (ide_hwif_t *hwif, unsigned long dmabase) static void __init init_dma_cmd64x (ide_hwif_t *hwif, unsigned long dmabase)
{ {
ide_setup_dma(hwif, dmabase, 8); ide_setup_dma(hwif, dmabase, 8);
...@@ -769,30 +768,59 @@ static void __init init_dma_cmd64x (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -769,30 +768,59 @@ static void __init init_dma_cmd64x (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &cmd64x_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
return 0;
}
/** /**
* FIXME: not required either ? * cmd64x_remove_one - called with an CMD64x is unplugged
* @dev: the device that was removed
*
* Disconnect a CMD64x device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/ */
static void __init init_setup_cmd64x (struct pci_dev *dev, ide_pci_device_t *d) static void cmd64x_remove_one(struct pci_dev *dev)
{ {
ide_setup_pci_device(dev, d); panic("CMD64x removal not yet supported");
} }
int __init cmd64x_scan_pcidev (struct pci_dev *dev) static struct pci_device_id cmd64x_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_643, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_646, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ 0, },
};
static struct pci_driver driver = {
name: "CMD64x IDE",
id_table: cmd64x_pci_tbl,
probe: cmd64x_init_one,
remove: __devexit_p(cmd64x_remove_one),
};
static int cmd64x_ide_init(void)
{ {
ide_pci_device_t *d; return ide_pci_register_driver(&driver);
}
if (dev->vendor != PCI_VENDOR_ID_CMD)
return 0;
for (d = cmd64x_chipsets; d && d->vendor && d->device; ++d) { static void cmd64x_ide_exit(void)
if (((d->vendor == dev->vendor) && {
(d->device == dev->device)) && ide_pci_unregister_driver(&driver);
(d->init_setup)) {
d->init_setup(dev, d);
return 1;
}
}
return 0;
} }
module_init(cmd64x_ide_init);
module_exit(cmd64x_ide_exit);
MODULE_AUTHOR("Eddie Dost, David Miller, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for CMD64x IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -79,17 +79,15 @@ static ide_pci_host_proc_t cmd64x_procs[] __initdata = { ...@@ -79,17 +79,15 @@ static ide_pci_host_proc_t cmd64x_procs[] __initdata = {
}; };
#endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */ #endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */
static void init_setup_cmd64x(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_cmd64x(struct pci_dev *, const char *); static unsigned int init_chipset_cmd64x(struct pci_dev *, const char *);
static void init_hwif_cmd64x(ide_hwif_t *); static void init_hwif_cmd64x(ide_hwif_t *);
static void init_dma_cmd64x(ide_hwif_t *, unsigned long); static void init_dma_cmd64x(ide_hwif_t *, unsigned long);
static ide_pci_device_t cmd64x_chipsets[] __initdata = { static ide_pci_device_t cmd64x_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_CMD, vendor: PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_643, device: PCI_DEVICE_ID_CMD_643,
name: "CMD643", name: "CMD643",
init_setup: init_setup_cmd64x,
init_chipset: init_chipset_cmd64x, init_chipset: init_chipset_cmd64x,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_cmd64x, init_hwif: init_hwif_cmd64x,
...@@ -99,11 +97,10 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = { ...@@ -99,11 +97,10 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_CMD, vendor: PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_646, device: PCI_DEVICE_ID_CMD_646,
name: "CMD646", name: "CMD646",
init_setup: init_setup_cmd64x,
init_chipset: init_chipset_cmd64x, init_chipset: init_chipset_cmd64x,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_cmd64x, init_hwif: init_hwif_cmd64x,
...@@ -113,11 +110,10 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = { ...@@ -113,11 +110,10 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x51,0x80,0x80}}, enablebits: {{0x00,0x00,0x00}, {0x51,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_CMD, vendor: PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_648, device: PCI_DEVICE_ID_CMD_648,
name: "CMD648", name: "CMD648",
init_setup: init_setup_cmd64x,
init_chipset: init_chipset_cmd64x, init_chipset: init_chipset_cmd64x,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_cmd64x, init_hwif: init_hwif_cmd64x,
...@@ -131,7 +127,6 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = { ...@@ -131,7 +127,6 @@ static ide_pci_device_t cmd64x_chipsets[] __initdata = {
vendor: PCI_VENDOR_ID_CMD, vendor: PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_649, device: PCI_DEVICE_ID_CMD_649,
name: "CMD649", name: "CMD649",
init_setup: init_setup_cmd64x,
init_chipset: init_chipset_cmd64x, init_chipset: init_chipset_cmd64x,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_cmd64x, init_hwif: init_hwif_cmd64x,
......
/* /*
* linux/drivers/ide/cs5530.c Version 0.6 Mar. 18, 2000 * linux/drivers/ide/cs5530.c Version 0.7 Sept 10, 2002
* *
* Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>
* Ditto of GNU General Public License. * Ditto of GNU General Public License.
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -419,44 +420,56 @@ static void __init init_dma_cs5530 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -419,44 +420,56 @@ static void __init init_dma_cs5530 (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
/**
* init_setup_cs5530 - set up a CS5530 IDE
* @dev: PCI device
* @d: PCI ide device info
*
* FIXME: this function can go away too
*/
static void __init init_setup_cs5530 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &cs5530_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
/** /**
* cs5530_scan_pcidev - set up any CS5530 device * cs5530_remove_one - called when a CS5530 is unplugged
* @dev: pci device to check * @dev: the device that was removed
* *
* Check if the device is a 5530 IDE controller. If it is then * Disconnect an Cyrix device that has been unplugged either by hotplug
* claim and set up the interface. Return 1 if we claimed the * or by a more civilized notification scheme. Not yet supported.
* interface or zero if it is not ours
*/ */
int __init cs5530_scan_pcidev (struct pci_dev *dev) static void cs5530_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("Cyrix removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_CYRIX) static struct pci_device_id cs5530_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = cs5530_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "CS5530 IDE",
(d->device == dev->device)) && id_table: cs5530_pci_tbl,
(d->init_setup)) { probe: cs5530_init_one,
d->init_setup(dev, d); remove: __devexit_p(cs5530_remove_one),
return 1; };
}
} static int cs5530_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
} }
static void cs5530_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(cs5530_ide_init);
module_exit(cs5530_ide_exit);
MODULE_AUTHOR("Mark Lord");
MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t cs5530_procs[] __initdata = { ...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t cs5530_procs[] __initdata = {
}; };
#endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */ #endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */
static void init_setup_cs5530(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_cs5530(struct pci_dev *, const char *); static unsigned int init_chipset_cs5530(struct pci_dev *, const char *);
static void init_hwif_cs5530(ide_hwif_t *); static void init_hwif_cs5530(ide_hwif_t *);
static void init_dma_cs5530(ide_hwif_t *, unsigned long); static void init_dma_cs5530(ide_hwif_t *, unsigned long);
static ide_pci_device_t cs5530_chipsets[] __initdata = { static ide_pci_device_t cs5530_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_CYRIX, vendor: PCI_VENDOR_ID_CYRIX,
device: PCI_DEVICE_ID_CYRIX_5530_IDE, device: PCI_DEVICE_ID_CYRIX_5530_IDE,
name: "CS5530", name: "CS5530",
init_setup: init_setup_cs5530,
init_chipset: init_chipset_cs5530, init_chipset: init_chipset_cs5530,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_cs5530, init_hwif: init_hwif_cs5530,
......
/* /*
* linux/drivers/ide/cy82c693.c Version 0.34 Dec. 13, 1999 * linux/drivers/ide/cy82c693.c Version 0.40 Sep. 10, 2002
* *
* Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer * Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer
* Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrater * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrater
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
* - first tests with DMA look okay, they seem to work, but there is a * - first tests with DMA look okay, they seem to work, but there is a
* problem with sound - the BusMaster IDE TimeOut should fixed this * problem with sound - the BusMaster IDE TimeOut should fixed this
* *
* * Ancient History:
* History:
* AMH@1999-08-24: v0.34 init_cy82c693_chip moved to pci_init_cy82c693 * AMH@1999-08-24: v0.34 init_cy82c693_chip moved to pci_init_cy82c693
* ASK@1999-01-23: v0.33 made a few minor code clean ups * ASK@1999-01-23: v0.33 made a few minor code clean ups
* removed DMA clock speed setting by default * removed DMA clock speed setting by default
...@@ -46,6 +45,7 @@ ...@@ -46,6 +45,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -418,29 +418,56 @@ void __init init_dma_cy82c693 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -418,29 +418,56 @@ void __init init_dma_cy82c693 (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
void __init init_setup_cy82c693 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &cy82c693_chipsets[id->driver_data];
if ((!(PCI_FUNC(dev->devfn) & 1) || if ((!(PCI_FUNC(dev->devfn) & 1) ||
(!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE)))) (!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
return; /* CY82C693 is more than only a IDE controller */ return 0; /* CY82C693 is more than only a IDE controller */
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init cy82c693_scan_pcidev (struct pci_dev *dev) /**
* cy82c693_remove_one - called with an Cypress is unplugged
* @dev: the device that was removed
*
* Disconnect an Cypress device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void cy82c693_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("Cypress removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_CONTAQ) static struct pci_device_id cy82c693_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = cy82c693_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "Cypress IDE",
(d->device == dev->device)) && id_table: cy82c693_pci_tbl,
(d->init_setup)) { probe: cy82c693_init_one,
d->init_setup(dev, d); remove: __devexit_p(cy82c693_remove_one),
return 1; };
}
} static int cy82c693_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void cy82c693_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(cy82c693_ide_init);
module_exit(cy82c693_ide_exit);
MODULE_AUTHOR("Andreas Krebs, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for the Cypress CY82C693 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -64,17 +64,15 @@ typedef struct pio_clocks_s { ...@@ -64,17 +64,15 @@ typedef struct pio_clocks_s {
u8 time_8; /* clocks for 8bit (0xF0=Active/data, 0x0F=Recovery) */ u8 time_8; /* clocks for 8bit (0xF0=Active/data, 0x0F=Recovery) */
} pio_clocks_t; } pio_clocks_t;
extern void init_setup_cy82c693(struct pci_dev *, ide_pci_device_t *);
extern unsigned int init_chipset_cy82c693(struct pci_dev *, const char *); extern unsigned int init_chipset_cy82c693(struct pci_dev *, const char *);
extern void init_hwif_cy82c693(ide_hwif_t *); extern void init_hwif_cy82c693(ide_hwif_t *);
extern void init_dma_cy82c693(ide_hwif_t *, unsigned long); extern void init_dma_cy82c693(ide_hwif_t *, unsigned long);
static ide_pci_device_t cy82c693_chipsets[] __initdata = { static ide_pci_device_t cy82c693_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_CONTAQ, vendor: PCI_VENDOR_ID_CONTAQ,
device: PCI_DEVICE_ID_CONTAQ_82C693, device: PCI_DEVICE_ID_CONTAQ_82C693,
name: "CY82C693", name: "CY82C693",
init_setup: init_setup_cy82c693,
init_chipset: init_chipset_cy82c693, init_chipset: init_chipset_cy82c693,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_cy82c693, init_hwif: init_hwif_cy82c693,
......
/* /*
* linux/drivers/ide/pci-orphan.c Version 0.01 December 8, 1997 * linux/drivers/ide/generic.c Version 0.10 Sept 11, 2002
* *
* Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
*/ */
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */ #include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
...@@ -84,18 +85,9 @@ static void __init init_setup_unknown (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -84,18 +85,9 @@ static void __init init_setup_unknown (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
} }
int __init generic_scan_pcidev (struct pci_dev *dev) #if 0
{
ide_pci_device_t *d;
for (d = generic_chipsets; d && d->vendor && d->device; ++d) { /* Logic to add back later on */
if (((d->vendor == dev->vendor) &&
(d->device == dev->device)) &&
(d->init_setup)) {
d->init_setup(dev, d);
return 1;
}
}
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
ide_pci_device_t *unknown = unknown_chipset; ide_pci_device_t *unknown = unknown_chipset;
...@@ -105,5 +97,75 @@ int __init generic_scan_pcidev (struct pci_dev *dev) ...@@ -105,5 +97,75 @@ int __init generic_scan_pcidev (struct pci_dev *dev)
return 1; return 1;
} }
return 0; return 0;
#endif
/**
* generic_init_one - called when a PIIX is found
* @dev: the generic device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &generic_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
d->init_setup(dev, d);
return 0;
} }
/**
* generic_remove_one - called when PCI IDE is unplugged
* @dev: the device that was removed
*
* Disconnect an IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void generic_remove_one(struct pci_dev *dev)
{
panic("PCI IDE removal not yet supported");
}
static struct pci_device_id generic_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_6565, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8673F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
{ PCI_VENDOR_ID_HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7},
{ PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C558, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8},
{ 0, },
};
static struct pci_driver driver = {
name: "PCI IDE",
id_table: generic_pci_tbl,
probe: generic_init_one,
remove: __devexit_p(generic_remove_one),
};
static int generic_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void generic_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(generic_ide_init);
module_exit(generic_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for generic PCI IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -11,7 +11,7 @@ static void init_hwif_generic(ide_hwif_t *); ...@@ -11,7 +11,7 @@ static void init_hwif_generic(ide_hwif_t *);
static void init_dma_generic(ide_hwif_t *, unsigned long); static void init_dma_generic(ide_hwif_t *, unsigned long);
static ide_pci_device_t generic_chipsets[] __initdata = { static ide_pci_device_t generic_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_NS, vendor: PCI_VENDOR_ID_NS,
device: PCI_DEVICE_ID_NS_87410, device: PCI_DEVICE_ID_NS_87410,
name: "NS87410", name: "NS87410",
...@@ -25,7 +25,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -25,7 +25,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, enablebits: {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_PCTECH, vendor: PCI_VENDOR_ID_PCTECH,
device: PCI_DEVICE_ID_PCTECH_SAMURAI_IDE, device: PCI_DEVICE_ID_PCTECH_SAMURAI_IDE,
name: "SAMURAI", name: "SAMURAI",
...@@ -39,7 +39,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -39,7 +39,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_HOLTEK, vendor: PCI_VENDOR_ID_HOLTEK,
device: PCI_DEVICE_ID_HOLTEK_6565, device: PCI_DEVICE_ID_HOLTEK_6565,
name: "HT6565", name: "HT6565",
...@@ -53,7 +53,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -53,7 +53,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_UMC, vendor: PCI_VENDOR_ID_UMC,
device: PCI_DEVICE_ID_UMC_UM8673F, device: PCI_DEVICE_ID_UMC_UM8673F,
name: "UM8673F", name: "UM8673F",
...@@ -67,7 +67,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -67,7 +67,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 4 */
vendor: PCI_VENDOR_ID_UMC, vendor: PCI_VENDOR_ID_UMC,
device: PCI_DEVICE_ID_UMC_UM8886A, device: PCI_DEVICE_ID_UMC_UM8886A,
name: "UM8886A", name: "UM8886A",
...@@ -81,7 +81,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -81,7 +81,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 5 */
vendor: PCI_VENDOR_ID_UMC, vendor: PCI_VENDOR_ID_UMC,
device: PCI_DEVICE_ID_UMC_UM8886BF, device: PCI_DEVICE_ID_UMC_UM8886BF,
name: "UM8886BF", name: "UM8886BF",
...@@ -95,7 +95,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -95,7 +95,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 6 */
vendor: PCI_VENDOR_ID_HINT, vendor: PCI_VENDOR_ID_HINT,
device: PCI_DEVICE_ID_HINT_VXPROII_IDE, device: PCI_DEVICE_ID_HINT_VXPROII_IDE,
name: "HINT_IDE", name: "HINT_IDE",
...@@ -109,7 +109,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -109,7 +109,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 7 */
vendor: PCI_VENDOR_ID_VIA, vendor: PCI_VENDOR_ID_VIA,
device: PCI_DEVICE_ID_VIA_82C561, device: PCI_DEVICE_ID_VIA_82C561,
name: "VIA_IDE", name: "VIA_IDE",
...@@ -123,7 +123,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -123,7 +123,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 8 */
vendor: PCI_VENDOR_ID_OPTI, vendor: PCI_VENDOR_ID_OPTI,
device: PCI_DEVICE_ID_OPTI_82C558, device: PCI_DEVICE_ID_OPTI_82C558,
name: "OPTI621V", name: "OPTI621V",
...@@ -146,7 +146,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = { ...@@ -146,7 +146,7 @@ static ide_pci_device_t generic_chipsets[] __initdata = {
}; };
static ide_pci_device_t unknown_chipset[] __initdata = { static ide_pci_device_t unknown_chipset[] __initdata = {
{ { /* 0 */
vendor: 0, vendor: 0,
device: 0, device: 0,
name: "PCI_IDE", name: "PCI_IDE",
......
/* /*
* linux/drivers/ide/hpt34x.c Version 0.31 June. 9, 2000 * linux/drivers/ide/hpt34x.c Version 0.40 Sept 10, 2002
* *
* 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
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -321,34 +322,61 @@ static void __init init_dma_hpt34x (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -321,34 +322,61 @@ static void __init init_dma_hpt34x (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_hpt34x (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
char *chipset_names[] = {"HPT343", "HPT345"}; ide_pci_device_t *d = &hpt34x_chipsets[id->driver_data];
static char *chipset_names[] = {"HPT343", "HPT345"};
u16 pcicmd = 0; u16 pcicmd = 0;
pci_read_config_word(dev, PCI_COMMAND, &pcicmd); pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
strcpy(d->name, chipset_names[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0]); d->name = chipset_names[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];
d->bootable = (pcicmd & PCI_COMMAND_MEMORY) ? OFF_BOARD : NEVER_BOARD; d->bootable = (pcicmd & PCI_COMMAND_MEMORY) ? OFF_BOARD : NEVER_BOARD;
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init hpt34x_scan_pcidev (struct pci_dev *dev) /**
* hpt34x_remove_one - called with an hpt34x is unplugged
* @dev: the device that was removed
*
* Disconnect an hpt34x device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void hpt34x_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("hpt34x removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_TTI) static struct pci_device_id hpt34x_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT343, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = hpt34x_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "HPT34x IDE",
(d->device == dev->device)) && id_table: hpt34x_pci_tbl,
(d->init_setup)) { probe: hpt34x_init_one,
d->init_setup(dev, d); remove: __devexit_p(hpt34x_remove_one),
return 1; };
}
} static int hpt34x_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void hpt34x_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(hpt34x_ide_init);
module_exit(hpt34x_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for Highpoint 34x IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -31,17 +31,15 @@ static ide_pci_host_proc_t hpt34x_procs[] __initdata = { ...@@ -31,17 +31,15 @@ static ide_pci_host_proc_t hpt34x_procs[] __initdata = {
}; };
#endif /* defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS) */ #endif /* defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS) */
static void init_setup_hpt34x(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_hpt34x(struct pci_dev *, const char *); static unsigned int init_chipset_hpt34x(struct pci_dev *, const char *);
static void init_hwif_hpt34x(ide_hwif_t *); static void init_hwif_hpt34x(ide_hwif_t *);
static void init_dma_hpt34x(ide_hwif_t *, unsigned long); static void init_dma_hpt34x(ide_hwif_t *, unsigned long);
static ide_pci_device_t hpt34x_chipsets[] __initdata = { static ide_pci_device_t hpt34x_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_TTI, vendor: PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT343, device: PCI_DEVICE_ID_TTI_HPT343,
name: "HPT34X", name: "HPT34X",
init_setup: init_setup_hpt34x,
init_chipset: init_chipset_hpt34x, init_chipset: init_chipset_hpt34x,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_hpt34x, init_hwif: init_hwif_hpt34x,
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
...@@ -1167,23 +1168,70 @@ static void __init init_setup_hpt366 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -1167,23 +1168,70 @@ static void __init init_setup_hpt366 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
} }
int __init hpt366_scan_pcidev (struct pci_dev *dev)
{
ide_pci_device_t *d;
if (dev->vendor != PCI_VENDOR_ID_TTI) /**
return 0; * hpt366_init_one - called when an HPT366 is found
if (dev->device == PCI_DEVICE_ID_TTI_HPT343) * @dev: the hpt366 device
return 0; * @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &hpt366_chipsets[id->driver_data];
for (d = hpt366_chipsets; d && d->vendor && d->device; ++d) { if (dev->device != d->device)
if (((d->vendor == dev->vendor) && BUG();
(d->device == dev->device)) &&
(d->init_setup)) {
d->init_setup(dev, d); d->init_setup(dev, d);
return 1;
}
}
return 0; return 0;
} }
/**
* hpt366_remove_one - called when an HPT366 is unplugged
* @dev: the device that was removed
*
* Disconnect a HPT366 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void hpt366_remove_one(struct pci_dev *dev)
{
panic("HPT366 removal not yet supported");
}
static struct pci_device_id hpt366_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT372, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT302, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT371, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT374, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15},
{ 0, },
};
static struct pci_driver driver = {
name: "HPT366 IDE",
id_table: hpt366_pci_tbl,
probe: hpt366_init_one,
remove: __devexit_p(hpt366_remove_one),
};
static int hpt366_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void hpt366_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(hpt366_ide_init);
module_exit(hpt366_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for Highpoint HPT366 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -442,7 +442,7 @@ static void init_hwif_hpt366(ide_hwif_t *); ...@@ -442,7 +442,7 @@ static void init_hwif_hpt366(ide_hwif_t *);
static void init_dma_hpt366(ide_hwif_t *, unsigned long); static void init_dma_hpt366(ide_hwif_t *, unsigned long);
static ide_pci_device_t hpt366_chipsets[] __initdata = { static ide_pci_device_t hpt366_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_TTI, vendor: PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT366, device: PCI_DEVICE_ID_TTI_HPT366,
name: "HPT366", name: "HPT366",
...@@ -456,7 +456,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = { ...@@ -456,7 +456,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 240 extra: 240
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_TTI, vendor: PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT372, device: PCI_DEVICE_ID_TTI_HPT372,
name: "HPT372A", name: "HPT372A",
...@@ -470,7 +470,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = { ...@@ -470,7 +470,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0 extra: 0
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_TTI, vendor: PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT302, device: PCI_DEVICE_ID_TTI_HPT302,
name: "HPT302", name: "HPT302",
...@@ -484,7 +484,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = { ...@@ -484,7 +484,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0 extra: 0
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_TTI, vendor: PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT371, device: PCI_DEVICE_ID_TTI_HPT371,
name: "HPT371", name: "HPT371",
...@@ -498,7 +498,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = { ...@@ -498,7 +498,7 @@ static ide_pci_device_t hpt366_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0 extra: 0
},{ },{ /* 4 */
vendor: PCI_VENDOR_ID_TTI, vendor: PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT374, device: PCI_DEVICE_ID_TTI_HPT374,
name: "HPT374", name: "HPT374",
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
...@@ -297,29 +298,56 @@ static void __init init_dma_it8172 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -297,29 +298,56 @@ static void __init init_dma_it8172 (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_it8172 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit it8172_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &it8172_chipsets[id->driver_data];
if ((!(PCI_FUNC(dev->devfn) & 1) || if ((!(PCI_FUNC(dev->devfn) & 1) ||
(!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE)))) (!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
return; /* IT8172 is more than only a IDE controller */ return 0; /* IT8172 is more than only a IDE controller */
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
static int __init it8172_scan_pcidev (struct pci_dev *dev) /**
* it8172_remove_one - called with an IT8172 is unplugged
* @dev: the device that was removed
*
* Disconnect an IT8172 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void it8172_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("IT8172 removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_ITE) static struct pci_device_id it8172_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_IT8172G, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = it8172_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "IT8172IDE",
(d->device == dev->device)) && id_table: it8172_pci_tbl,
(d->init_setup)) { probe: it8172_init_one,
d->init_setup(dev, d); remove: __devexit_p(it8172_remove_one),
return 1; };
}
} static int it8172_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void it8172_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(it8172_ide_init);
module_exit(it8172_ide_exit);
MODULE_AUTHOR("SteveL@mvista.com");
MODULE_DESCRIPTION("PCI driver module for ITE 8172 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -20,7 +20,7 @@ static void init_hwif_it8172(ide_hwif_t *); ...@@ -20,7 +20,7 @@ static void init_hwif_it8172(ide_hwif_t *);
static void init_dma_it8172(ide_hwif_t *, unsigned long); static void init_dma_it8172(ide_hwif_t *, unsigned long);
static ide_pci_device_t it8172_chipsets[] __initdata = { static ide_pci_device_t it8172_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_ITE, vendor: PCI_VENDOR_ID_ITE,
device: PCI_DEVICE_ID_ITE_IT8172G, device: PCI_DEVICE_ID_ITE_IT8172G,
name: "IT8172G", name: "IT8172G",
......
/* /*
* linux/drivers/ide/ns87415.c Version 1.01 Mar. 18, 2000 * linux/drivers/ide/ns87415.c Version 2.00 Sep. 10, 2002
* *
* Copyright (C) 1997-1998 Mark Lord <mlord@pobox.com> * Copyright (C) 1997-1998 Mark Lord <mlord@pobox.com>
* Copyright (C) 1998 Eddie C. Dost <ecd@skynet.be> * Copyright (C) 1998 Eddie C. Dost <ecd@skynet.be>
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/timer.h> #include <linux/timer.h>
...@@ -229,26 +230,55 @@ static void __init init_dma_ns87415 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -229,26 +230,55 @@ static void __init init_dma_ns87415 (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_ns87415 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &ns87415_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init ns87415_scan_pcidev (struct pci_dev *dev) /**
* ns87415_remove_one - called with an NS87415 is unplugged
* @dev: the device that was removed
*
* Disconnect an NS87415 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void ns87415_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("NS87415 removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_NS) static struct pci_device_id ns87415_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = ns87415_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "NS87415IDE",
(d->device == dev->device)) && id_table: ns87415_pci_tbl,
(d->init_setup)) { probe: ns87415_init_one,
d->init_setup(dev, d); remove: __devexit_p(ns87415_remove_one),
return 1; };
}
} static int ns87415_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void ns87415_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(ns87415_ide_init);
module_exit(ns87415_ide_exit);
MODULE_AUTHOR("Mark Lord, Eddie Dost, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for NS87415 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -5,16 +5,14 @@ ...@@ -5,16 +5,14 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/ide.h> #include <linux/ide.h>
static void init_setup_ns87415(struct pci_dev *, ide_pci_device_t *);
static void init_hwif_ns87415(ide_hwif_t *); static void init_hwif_ns87415(ide_hwif_t *);
static void init_dma_ns87415(ide_hwif_t *, unsigned long); static void init_dma_ns87415(ide_hwif_t *, unsigned long);
static ide_pci_device_t ns87415_chipsets[] __initdata = { static ide_pci_device_t ns87415_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_NS, vendor: PCI_VENDOR_ID_NS,
device: PCI_DEVICE_ID_NS_87415, device: PCI_DEVICE_ID_NS_87415,
name: "NS87415", name: "NS87415",
init_setup: init_setup_ns87415,
init_chipset: NULL, init_chipset: NULL,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_ns87415, init_hwif: init_hwif_ns87415,
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -91,8 +92,8 @@ static u8 nforce_ratemask (ide_drive_t *drive) ...@@ -91,8 +92,8 @@ static u8 nforce_ratemask (ide_drive_t *drive)
*/ */
static int nforce_tune_chipset (ide_drive_t *drive, u8 xferspeed) static int nforce_tune_chipset (ide_drive_t *drive, u8 xferspeed)
{ {
u8 drive_pci[] = { 0x63, 0x62, 0x61, 0x60 }; static const u8 drive_pci[] = { 0x63, 0x62, 0x61, 0x60 };
u8 drive_pci2[] = { 0x5b, 0x5a, 0x59, 0x58 }; static const u8 drive_pci2[] = { 0x5b, 0x5a, 0x59, 0x58 };
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
struct pci_dev *dev = hwif->pci_dev; struct pci_dev *dev = hwif->pci_dev;
...@@ -336,27 +337,55 @@ static void __init init_dma_nforce (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -336,27 +337,55 @@ static void __init init_dma_nforce (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
/* FIXME - not needed */ static int __devinit nforce_init_one(struct pci_dev *dev, const struct pci_device_id *id)
static void __init init_setup_nforce (struct pci_dev *dev, ide_pci_device_t *d)
{ {
ide_pci_device_t *d = &nvidia_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init nforce_scan_pcidev (struct pci_dev *dev) /**
* nforce_remove_one - called with an nForce is unplugged
* @dev: the device that was removed
*
* Disconnect an nForce device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void nforce_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("nForce removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_NVIDIA) static struct pci_device_id nforce_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = nvidia_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "nForce IDE",
(d->device == dev->device)) && id_table: nforce_pci_tbl,
(d->init_setup)) { probe: nforce_init_one,
d->init_setup(dev, d); remove: __devexit_p(nforce_remove_one),
return 1; };
}
} static int nforce_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void nforce_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(nforce_ide_init);
module_exit(nforce_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for nVidia nForce IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -25,7 +25,6 @@ static ide_pci_host_proc_t nforce_procs[] __initdata = { ...@@ -25,7 +25,6 @@ static ide_pci_host_proc_t nforce_procs[] __initdata = {
}; };
#endif /* defined(DISPLAY_NFORCE_TIMINGS) && defined(CONFIG_PROC_FS) */ #endif /* defined(DISPLAY_NFORCE_TIMINGS) && defined(CONFIG_PROC_FS) */
static void init_setup_nforce(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_nforce(struct pci_dev *, const char *); static unsigned int init_chipset_nforce(struct pci_dev *, const char *);
static void init_hwif_nforce(ide_hwif_t *); static void init_hwif_nforce(ide_hwif_t *);
static void init_dma_nforce(ide_hwif_t *, unsigned long); static void init_dma_nforce(ide_hwif_t *, unsigned long);
...@@ -35,7 +34,6 @@ static ide_pci_device_t nvidia_chipsets[] __initdata = { ...@@ -35,7 +34,6 @@ static ide_pci_device_t nvidia_chipsets[] __initdata = {
vendor: PCI_VENDOR_ID_NVIDIA, vendor: PCI_VENDOR_ID_NVIDIA,
device: PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, device: PCI_DEVICE_ID_NVIDIA_NFORCE_IDE,
name: "NFORCE", name: "NFORCE",
init_setup: init_setup_nforce,
init_chipset: init_chipset_nforce, init_chipset: init_chipset_nforce,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_nforce, init_hwif: init_hwif_nforce,
...@@ -45,12 +43,8 @@ static ide_pci_device_t nvidia_chipsets[] __initdata = { ...@@ -45,12 +43,8 @@ static ide_pci_device_t nvidia_chipsets[] __initdata = {
enablebits: {{0x50,0x01,0x01}, {0x50,0x02,0x02}}, enablebits: {{0x50,0x01,0x01}, {0x50,0x02,0x02}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{
vendor: 0,
device: 0,
channels: 0,
bootable: EOL,
} }
}; };
#endif /* NFORCE_H */ #endif /* NFORCE_H */
/* /*
* linux/drivers/ide/opti621.c Version 0.6 Jan 02, 1999 * linux/drivers/ide/opti621.c Version 0.7 Sept 10, 2002
* *
* Copyright (C) 1996-1998 Linus Torvalds & authors (see below) * Copyright (C) 1996-1998 Linus Torvalds & authors (see below)
*/ */
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
#define OPTI621_DEBUG /* define for debug messages */ #define OPTI621_DEBUG /* define for debug messages */
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
...@@ -363,21 +364,56 @@ static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -363,21 +364,56 @@ static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
} }
int __init opti621_scan_pcidev (struct pci_dev *dev) static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d; ide_pci_device_t *d = &opti621_chipsets[id->driver_data];
if (dev->device != d->device)
if (dev->vendor != PCI_VENDOR_ID_OPTI) BUG();
ide_setup_pci_device(dev, d);
return 0; return 0;
}
for (d = opti621_chipsets; d && d->vendor && d->device; ++d) { /**
if (((d->vendor == dev->vendor) && * opti621_remove_one - called with an Opti621 is unplugged
(d->device == dev->device)) && * @dev: the device that was removed
(d->init_setup)) { *
d->init_setup(dev, d); * Disconnect an Opti621 device that has been unplugged either by hotplug
return 1; * or by a more civilized notification scheme. Not yet supported.
} */
}
return 0; static void opti621_remove_one(struct pci_dev *dev)
{
panic("Opti621 removal not yet supported");
} }
static struct pci_device_id opti621_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C621, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ 0, },
};
static struct pci_driver driver = {
name: "Opti621 IDE",
id_table: opti621_pci_tbl,
probe: opti621_init_one,
remove: __devexit_p(opti621_remove_one),
};
static int opti621_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void opti621_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(opti621_ide_init);
module_exit(opti621_ide_exit);
MODULE_AUTHOR("Jaromir Koutek, Jan Harkes, Mark Lord");
MODULE_DESCRIPTION("PCI driver module for Opti621 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -10,7 +10,7 @@ static void init_hwif_opti621(ide_hwif_t *); ...@@ -10,7 +10,7 @@ static void init_hwif_opti621(ide_hwif_t *);
static void init_dma_opti621(ide_hwif_t *, unsigned long); static void init_dma_opti621(ide_hwif_t *, unsigned long);
static ide_pci_device_t opti621_chipsets[] __initdata = { static ide_pci_device_t opti621_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_OPTI, vendor: PCI_VENDOR_ID_OPTI,
device: PCI_DEVICE_ID_OPTI_82C621, device: PCI_DEVICE_ID_OPTI_82C621,
name: "OPTI621", name: "OPTI621",
...@@ -24,7 +24,7 @@ static ide_pci_device_t opti621_chipsets[] __initdata = { ...@@ -24,7 +24,7 @@ static ide_pci_device_t opti621_chipsets[] __initdata = {
enablebits: {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, enablebits: {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_OPTI, vendor: PCI_VENDOR_ID_OPTI,
device: PCI_DEVICE_ID_OPTI_82C825, device: PCI_DEVICE_ID_OPTI_82C825,
name: "OPTI621X", name: "OPTI621X",
......
This diff is collapsed.
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -646,21 +647,71 @@ static void __init init_setup_pdc20276 (struct pci_dev *dev, ide_pci_device_t *d ...@@ -646,21 +647,71 @@ static void __init init_setup_pdc20276 (struct pci_dev *dev, ide_pci_device_t *d
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
} }
int __init pdcnew_scan_pcidev (struct pci_dev *dev) /**
{ * pdc202new_init_one - called when a pdc202xx is found
ide_pci_device_t *d; * @dev: the pdc202new device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
if (dev->vendor != PCI_VENDOR_ID_PROMISE) static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id)
return 0; {
ide_pci_device_t *d = &pdcnew_chipsets[id->driver_data];
for (d = pdcnew_chipsets; d && d->vendor && d->device; ++d) { if (dev->device != d->device)
if (((d->vendor == dev->vendor) && BUG();
(d->device == dev->device)) &&
(d->init_setup)) {
d->init_setup(dev, d); d->init_setup(dev, d);
return 1;
}
}
return 0; return 0;
} }
/**
* pdc202new_remove_one - called when a pdc202xx is unplugged
* @dev: the device that was removed
*
* Disconnect an IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void pdc202new_remove_one(struct pci_dev *dev)
{
panic("Promise IDE removal not yet supported");
}
static struct pci_device_id pdc202new_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20268, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20269, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20270, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20271, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20275, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20276, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20277, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
{ 0, },
};
static struct pci_driver driver = {
name: "Promise IDE",
id_table: pdc202new_pci_tbl,
probe: pdc202new_init_one,
remove: __devexit_p(pdc202new_remove_one),
};
static int pdc202new_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void pdc202new_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(pdc202new_ide_init);
module_exit(pdc202new_ide_exit);
MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
MODULE_DESCRIPTION("PCI driver module for Promise PDC20268 and higher");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -226,7 +226,7 @@ static void init_hwif_pdc202new(ide_hwif_t *); ...@@ -226,7 +226,7 @@ static void init_hwif_pdc202new(ide_hwif_t *);
static void init_dma_pdc202new(ide_hwif_t *, unsigned long); static void init_dma_pdc202new(ide_hwif_t *, unsigned long);
static ide_pci_device_t pdcnew_chipsets[] __initdata = { static ide_pci_device_t pdcnew_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20268, device: PCI_DEVICE_ID_PROMISE_20268,
name: "PDC20268", name: "PDC20268",
...@@ -240,7 +240,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = { ...@@ -240,7 +240,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20269, device: PCI_DEVICE_ID_PROMISE_20269,
name: "PDC20269", name: "PDC20269",
...@@ -254,7 +254,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = { ...@@ -254,7 +254,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20270, device: PCI_DEVICE_ID_PROMISE_20270,
name: "PDC20270", name: "PDC20270",
...@@ -272,7 +272,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = { ...@@ -272,7 +272,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
#endif #endif
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20271, device: PCI_DEVICE_ID_PROMISE_20271,
name: "PDC20271", name: "PDC20271",
...@@ -286,7 +286,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = { ...@@ -286,7 +286,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 4 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20275, device: PCI_DEVICE_ID_PROMISE_20275,
name: "PDC20275", name: "PDC20275",
...@@ -300,7 +300,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = { ...@@ -300,7 +300,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 5 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20276, device: PCI_DEVICE_ID_PROMISE_20276,
name: "PDC20276", name: "PDC20276",
...@@ -318,7 +318,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = { ...@@ -318,7 +318,7 @@ static ide_pci_device_t pdcnew_chipsets[] __initdata = {
#endif #endif
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 0, extra: 0,
},{ },{ /* 6 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20277, device: PCI_DEVICE_ID_PROMISE_20277,
name: "PDC20277", name: "PDC20277",
......
/* /*
* linux/drivers/ide/pdc202xx.c Version 0.35 Mar. 30, 2002 * linux/drivers/ide/pdc202xx.c Version 0.36 Sept 11, 2002
* *
* Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>
* *
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
...@@ -918,21 +919,69 @@ static void __init init_setup_pdc202xx (struct pci_dev *dev, ide_pci_device_t *d ...@@ -918,21 +919,69 @@ static void __init init_setup_pdc202xx (struct pci_dev *dev, ide_pci_device_t *d
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
} }
int __init pdc202xx_scan_pcidev (struct pci_dev *dev) /**
{ * pdc202xx_init_one - called when a PDC202xx is found
ide_pci_device_t *d; * @dev: the pdc202xx device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
if (dev->vendor != PCI_VENDOR_ID_PROMISE) static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
return 0; {
ide_pci_device_t *d = &pdc202xx_chipsets[id->driver_data];
for (d = pdc202xx_chipsets; d && d->vendor && d->device; ++d) { if (dev->device != d->device)
if (((d->vendor == dev->vendor) && BUG();
(d->device == dev->device)) &&
(d->init_setup)) {
d->init_setup(dev, d); d->init_setup(dev, d);
return 1;
}
}
return 0; return 0;
} }
/**
* pdc202xx_remove_one - called with the IDE to be unplugged
* @dev: the device that was removed
*
* Disconnect an IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void pdc202xx_remove_one(struct pci_dev *dev)
{
panic("Promise IDE removal not yet supported");
}
static struct pci_device_id pdc202xx_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20265, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20267, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ 0, },
};
static struct pci_driver driver = {
name: "Promise Old IDE",
id_table: pdc202xx_pci_tbl,
probe: pdc202xx_init_one,
remove: __devexit_p(pdc202xx_remove_one),
};
static int pdc202xx_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void pdc202xx_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(pdc202xx_ide_init);
module_exit(pdc202xx_ide_exit);
MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
MODULE_DESCRIPTION("PCI driver module for older Promise IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -226,7 +226,7 @@ static void init_hwif_pdc202xx(ide_hwif_t *); ...@@ -226,7 +226,7 @@ static void init_hwif_pdc202xx(ide_hwif_t *);
static void init_dma_pdc202xx(ide_hwif_t *, unsigned long); static void init_dma_pdc202xx(ide_hwif_t *, unsigned long);
static ide_pci_device_t pdc202xx_chipsets[] __initdata = { static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20246, device: PCI_DEVICE_ID_PROMISE_20246,
name: "PDC20246", name: "PDC20246",
...@@ -244,7 +244,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = { ...@@ -244,7 +244,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif #endif
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 16, extra: 16,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20262, device: PCI_DEVICE_ID_PROMISE_20262,
name: "PDC20262", name: "PDC20262",
...@@ -262,7 +262,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = { ...@@ -262,7 +262,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif #endif
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 48, extra: 48,
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20263, device: PCI_DEVICE_ID_PROMISE_20263,
name: "PDC20263", name: "PDC20263",
...@@ -280,7 +280,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = { ...@@ -280,7 +280,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif #endif
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 48, extra: 48,
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20265, device: PCI_DEVICE_ID_PROMISE_20265,
name: "PDC20265", name: "PDC20265",
...@@ -297,7 +297,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = { ...@@ -297,7 +297,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __initdata = {
#endif #endif
bootable: OFF_BOARD, bootable: OFF_BOARD,
extra: 48, extra: 48,
},{ },{ /* 4 */
vendor: PCI_VENDOR_ID_PROMISE, vendor: PCI_VENDOR_ID_PROMISE,
device: PCI_DEVICE_ID_PROMISE_20267, device: PCI_DEVICE_ID_PROMISE_20267,
name: "PDC20267", name: "PDC20267",
......
/* /*
* linux/drivers/ide/pdcadma.c Version 0.01 June 21, 2001 * linux/drivers/ide/pdcadma.c Version 0.05 Sept 10, 2002
* *
* Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 1999-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
...@@ -127,26 +127,55 @@ static void __init init_dma_pdcadma (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -127,26 +127,55 @@ static void __init init_dma_pdcadma (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_pdcadma (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit pdcadma_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &pdcadma_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 1;
} }
int __init pdcadma_scan_pcidev (struct pci_dev *dev) /**
* pdcadma_remove_one - called when a PDCADMA is unplugged
* @dev: the device that was removed
*
* Disconnect a PDCADMA device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void pdcadma_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("PDCADMA removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_PDC) static struct pci_device_id pdcadma_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_PDC, PCI_DEVICE_ID_PDC_1841, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = pdcadma_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "PDCADMA-IDE",
(d->device == dev->device)) && id_table: pdcadma_pci_tbl,
(d->init_setup)) { probe: pdcadma_init_one,
d->init_setup(dev, d); remove: __devexit_p(pdcadma_remove_one),
return 1; };
}
} static int pdcadma_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void pdcadma_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(pdcadma_ide_init);
module_exit(pdcadma_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for PDCADMA IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -31,7 +31,7 @@ static void init_hwif_pdcadma(ide_hwif_t *); ...@@ -31,7 +31,7 @@ static void init_hwif_pdcadma(ide_hwif_t *);
static void init_dma_pdcadma(ide_hwif_t *, unsigned long); static void init_dma_pdcadma(ide_hwif_t *, unsigned long);
static ide_pci_device_t pdcadma_chipsets[] __initdata = { static ide_pci_device_t pdcadma_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_PDC, vendor: PCI_VENDOR_ID_PDC,
device: PCI_DEVICE_ID_PDC_1841, device: PCI_DEVICE_ID_PDC_1841,
name: "PDCADMA", name: "PDCADMA",
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -664,29 +665,79 @@ static void __init init_setup_piix (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -664,29 +665,79 @@ static void __init init_setup_piix (struct pci_dev *dev, ide_pci_device_t *d)
} }
/** /**
* piix_scan_pcidev - Check for and initialize PIIX IDE * piix_init_one - called when a PIIX is found
* @dev: PCI device to check * @dev: the piix device
* @id: the matching pci id
* *
* Checks if the passed device is an Intel PIIX device. If so the * Called when the PCI registration layer (or the IDE initialization)
* hardware is initialized and we return 1 to claim the device. If not * finds a device matching our IDE device tables.
* we return 0.
*/ */
int __init piix_scan_pcidev (struct pci_dev *dev) static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d; ide_pci_device_t *d = &piix_pci_info[id->driver_data];
if (dev->vendor != PCI_VENDOR_ID_INTEL) if (dev->device != d->device)
return 0; BUG();
for (d = piix_chipsets; d && d->vendor && d->device; ++d) {
if (((d->vendor == dev->vendor) &&
(d->device == dev->device)) &&
(d->init_setup)) {
d->init_setup(dev, d); d->init_setup(dev, d);
return 1;
}
}
return 0; return 0;
} }
/**
* piix_remove_one - called with a PIIX is unplugged
* @dev: the device that was removed
*
* Disconnect a PIIX device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void piix_remove_one(struct pci_dev *dev)
{
panic("PIIX removal not yet supported");
}
static struct pci_device_id piix_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371FB_0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371FB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371MX, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82372FB_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10,PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_11,PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_11,PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14},
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_11, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15},
{ 0, },
};
static struct pci_driver driver = {
name: "PIIX IDE",
id_table: piix_pci_tbl,
probe: piix_init_one,
remove: __devexit_p(piix_remove_one),
};
static int piix_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void piix_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(piix_ide_init);
module_exit(piix_ide_exit);
MODULE_AUTHOR("Andre Hedrick, Andrzej Krzysztofowicz");
MODULE_DESCRIPTION("PCI driver module for Intel PIIX IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -28,12 +28,18 @@ static ide_pci_host_proc_t piix_procs[] __initdata = { ...@@ -28,12 +28,18 @@ static ide_pci_host_proc_t piix_procs[] __initdata = {
#endif /* defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) */ #endif /* defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) */
static void init_setup_piix(struct pci_dev *, ide_pci_device_t *); static void init_setup_piix(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_piix(struct pci_dev *, const char *); static unsigned int __init init_chipset_piix(struct pci_dev *, const char *);
static void init_hwif_piix(ide_hwif_t *); static void init_hwif_piix(ide_hwif_t *);
static void init_dma_piix(ide_hwif_t *, unsigned long); static void init_dma_piix(ide_hwif_t *, unsigned long);
static ide_pci_device_t piix_chipsets[] __initdata = {
{ /*
* Table of the various PIIX capability blocks
*
*/
static ide_pci_device_t piix_pci_info[] __initdata = {
{ /* 0 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371FB_0, device: PCI_DEVICE_ID_INTEL_82371FB_0,
name: "PIIXa", name: "PIIXa",
...@@ -47,7 +53,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -47,7 +53,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371FB_1, device: PCI_DEVICE_ID_INTEL_82371FB_1,
name: "PIIXb", name: "PIIXb",
...@@ -61,7 +67,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -61,7 +67,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371MX, device: PCI_DEVICE_ID_INTEL_82371MX,
name: "MPIIX", name: "MPIIX",
...@@ -75,7 +81,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -75,7 +81,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x6D,0x80,0x80}, {0x6F,0x80,0x80}}, enablebits: {{0x6D,0x80,0x80}, {0x6F,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371SB_1, device: PCI_DEVICE_ID_INTEL_82371SB_1,
name: "PIIX3", name: "PIIX3",
...@@ -89,7 +95,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -89,7 +95,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 4 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371AB, device: PCI_DEVICE_ID_INTEL_82371AB,
name: "PIIX4", name: "PIIX4",
...@@ -103,7 +109,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -103,7 +109,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 5 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801AB_1, device: PCI_DEVICE_ID_INTEL_82801AB_1,
name: "ICH0", name: "ICH0",
...@@ -117,7 +123,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -117,7 +123,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 6 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82443MX_1, device: PCI_DEVICE_ID_INTEL_82443MX_1,
name: "PIIX4", name: "PIIX4",
...@@ -131,7 +137,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -131,7 +137,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 7 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801AA_1, device: PCI_DEVICE_ID_INTEL_82801AA_1,
name: "ICH", name: "ICH",
...@@ -145,7 +151,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -145,7 +151,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 8 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82372FB_1, device: PCI_DEVICE_ID_INTEL_82372FB_1,
name: "PIIX4", name: "PIIX4",
...@@ -159,7 +165,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -159,7 +165,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 9 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82451NX, device: PCI_DEVICE_ID_INTEL_82451NX,
name: "PIIX4", name: "PIIX4",
...@@ -173,7 +179,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -173,7 +179,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 10 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801BA_9, device: PCI_DEVICE_ID_INTEL_82801BA_9,
name: "ICH2", name: "ICH2",
...@@ -187,7 +193,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -187,7 +193,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 11 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801BA_8, device: PCI_DEVICE_ID_INTEL_82801BA_8,
name: "ICH2M", name: "ICH2M",
...@@ -201,7 +207,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -201,7 +207,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 12 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801CA_10, device: PCI_DEVICE_ID_INTEL_82801CA_10,
name: "ICH3M", name: "ICH3M",
...@@ -215,7 +221,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -215,7 +221,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 13 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801CA_11, device: PCI_DEVICE_ID_INTEL_82801CA_11,
name: "ICH3", name: "ICH3",
...@@ -229,7 +235,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -229,7 +235,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 14 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801DB_11, device: PCI_DEVICE_ID_INTEL_82801DB_11,
name: "ICH4", name: "ICH4",
...@@ -243,7 +249,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = { ...@@ -243,7 +249,7 @@ static ide_pci_device_t piix_chipsets[] __initdata = {
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 15 */
vendor: PCI_VENDOR_ID_INTEL, vendor: PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801E_11, device: PCI_DEVICE_ID_INTEL_82801E_11,
name: "C-ICH", name: "C-ICH",
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */ #include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
...@@ -55,26 +56,57 @@ static void __init init_hwif_rz1000 (ide_hwif_t *hwif) ...@@ -55,26 +56,57 @@ static void __init init_hwif_rz1000 (ide_hwif_t *hwif)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_rz1000 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &rz1000_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init rz1000_scan_pcidev (struct pci_dev *dev) /**
* rz1000_remove_one - called with an RZ1000 is unplugged
* @dev: the device that was removed
*
* Disconnect an RZ1000 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void rz1000_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("RZ1000 removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_PCTECH) static struct pci_device_id rz1000_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_RZ1001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ 0, },
};
for (d = rz1000_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "RZ1000 IDE",
(d->device == dev->device)) && id_table: rz1000_pci_tbl,
(d->init_setup)) { probe: rz1000_init_one,
d->init_setup(dev, d); remove: __devexit_p(rz1000_remove_one),
return 1; };
}
} static int rz1000_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void rz1000_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(rz1000_ide_init);
module_exit(rz1000_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/ide.h> #include <linux/ide.h>
static void init_setup_rz1000(struct pci_dev *, ide_pci_device_t *);
static void init_hwif_rz1000(ide_hwif_t *); static void init_hwif_rz1000(ide_hwif_t *);
static ide_pci_device_t rz1000_chipsets[] __initdata = { static ide_pci_device_t rz1000_chipsets[] __initdata = {
...@@ -13,7 +12,6 @@ static ide_pci_device_t rz1000_chipsets[] __initdata = { ...@@ -13,7 +12,6 @@ static ide_pci_device_t rz1000_chipsets[] __initdata = {
vendor: PCI_VENDOR_ID_PCTECH, vendor: PCI_VENDOR_ID_PCTECH,
device: PCI_DEVICE_ID_PCTECH_RZ1000, device: PCI_DEVICE_ID_PCTECH_RZ1000,
name: "RZ1000", name: "RZ1000",
init_setup: init_setup_rz1000,
init_chipset: NULL, init_chipset: NULL,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_rz1000, init_hwif: init_hwif_rz1000,
...@@ -27,7 +25,6 @@ static ide_pci_device_t rz1000_chipsets[] __initdata = { ...@@ -27,7 +25,6 @@ static ide_pci_device_t rz1000_chipsets[] __initdata = {
vendor: PCI_VENDOR_ID_PCTECH, vendor: PCI_VENDOR_ID_PCTECH,
device: PCI_DEVICE_ID_PCTECH_RZ1001, device: PCI_DEVICE_ID_PCTECH_RZ1001,
name: "RZ1001", name: "RZ1001",
init_setup: init_setup_rz1000,
init_chipset: NULL, init_chipset: NULL,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_rz1000, init_hwif: init_hwif_rz1000,
......
/* /*
* linux/drivers/ide/serverworks.c Version 0.6 05 April 2002 * linux/drivers/ide/serverworks.c Version 0.7 10 Sept 2002
* *
* Copyright (C) 1998-2000 Michel Aubry * Copyright (C) 1998-2000 Michel Aubry
* Copyright (C) 1998-2000 Andrzej Krzysztofowicz * Copyright (C) 1998-2000 Andrzej Krzysztofowicz
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -766,21 +767,73 @@ static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -766,21 +767,73 @@ static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
} }
int __init serverworks_scan_pcidev (struct pci_dev *dev)
{
ide_pci_device_t *d;
if (dev->vendor != PCI_VENDOR_ID_SERVERWORKS) /**
return 0; * svwks_init_one - called when a OSB/CSB is found
* @dev: the svwks device
* @id: the matching pci id
*
* Called when the PCI registration layer (or the IDE initialization)
* finds a device matching our IDE device tables.
*/
for (d = serverworks_chipsets; d && d->vendor && d->device; ++d) { static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id)
if (((d->vendor == dev->vendor) && {
(d->device == dev->device)) && ide_pci_device_t *d = &serverworks_chipsets[id->driver_data];
(d->init_setup)) {
if (dev->device != d->device)
BUG();
d->init_setup(dev, d); d->init_setup(dev, d);
return 1;
}
}
return 0; return 0;
} }
/**
* svwks_remove_one - called when an OSB/CSB is unplugged
* @dev: the device that was removed
*
* Disconnect a SVWKS device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void svwks_remove_one(struct pci_dev *dev)
{
panic("SVWKS removal not yet supported");
}
static struct pci_device_id svwks_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
{ PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ 0, },
};
static struct pci_driver driver = {
name: "Serverworks IDE",
id_table: svwks_pci_tbl,
probe: svwks_init_one,
remove: __devexit_p(svwks_remove_one),
#if 0 /* FIXME: implement */
suspend: ,
resume: ,
#endif
};
static int svwks_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
static void svwks_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(svwks_ide_init);
module_exit(svwks_ide_exit);
MODULE_AUTHOR("Michael Aubry. Andrzej Krzysztofowicz, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for Serverworks OSB4/CSB5/CSB6 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -38,7 +38,7 @@ static void init_hwif_svwks(ide_hwif_t *); ...@@ -38,7 +38,7 @@ static void init_hwif_svwks(ide_hwif_t *);
static void init_dma_svwks(ide_hwif_t *, unsigned long); static void init_dma_svwks(ide_hwif_t *, unsigned long);
static ide_pci_device_t serverworks_chipsets[] __initdata = { static ide_pci_device_t serverworks_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_SERVERWORKS, vendor: PCI_VENDOR_ID_SERVERWORKS,
device: PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, device: PCI_DEVICE_ID_SERVERWORKS_OSB4IDE,
name: "SvrWks OSB4", name: "SvrWks OSB4",
...@@ -52,7 +52,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = { ...@@ -52,7 +52,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_SERVERWORKS, vendor: PCI_VENDOR_ID_SERVERWORKS,
device: PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, device: PCI_DEVICE_ID_SERVERWORKS_CSB5IDE,
name: "SvrWks CSB5", name: "SvrWks CSB5",
...@@ -66,7 +66,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = { ...@@ -66,7 +66,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 2 */
vendor: PCI_VENDOR_ID_SERVERWORKS, vendor: PCI_VENDOR_ID_SERVERWORKS,
device: PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, device: PCI_DEVICE_ID_SERVERWORKS_CSB6IDE,
name: "SvrWks CSB6", name: "SvrWks CSB6",
...@@ -80,7 +80,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = { ...@@ -80,7 +80,7 @@ static ide_pci_device_t serverworks_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 3 */
vendor: PCI_VENDOR_ID_SERVERWORKS, vendor: PCI_VENDOR_ID_SERVERWORKS,
device: PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, device: PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2,
name: "SvrWks CSB6", name: "SvrWks CSB6",
......
/* /*
* linux/drivers/ide/siimage.c Version 1.00 May 9, 2002 * linux/drivers/ide/siimage.c Version 1.01 Sept 11, 2002
* *
* Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/hdreg.h> #include <linux/hdreg.h>
...@@ -836,26 +837,57 @@ static void __init init_dma_siimage (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -836,26 +837,57 @@ static void __init init_dma_siimage (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_siimage (struct pci_dev *dev, ide_pci_device_t *d)
static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &siimage_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init siimage_scan_pcidev (struct pci_dev *dev) /**
* siimage_remove_one - called when an SI IDE is unplugged
* @dev: the device that was removed
*
* Disconnect an IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void siimage_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("SiImage IDE removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_CMD) static struct pci_device_id siimage_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ 0, },
};
for (d = siimage_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "SiI IDE",
(d->device == dev->device)) && id_table: siimage_pci_tbl,
(d->init_setup)) { probe: siimage_init_one,
d->init_setup(dev, d); remove: __devexit_p(siimage_remove_one),
return 1; };
}
} static int siimage_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
} }
static void siimage_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(siimage_ide_init);
module_exit(siimage_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for SiI IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -107,18 +107,16 @@ static ide_pci_host_proc_t siimage_procs[] __initdata = { ...@@ -107,18 +107,16 @@ static ide_pci_host_proc_t siimage_procs[] __initdata = {
}; };
#endif /* DISPLAY_SIIMAGE_TIMINGS && CONFIG_PROC_FS */ #endif /* DISPLAY_SIIMAGE_TIMINGS && CONFIG_PROC_FS */
static void init_setup_siimage(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_siimage(struct pci_dev *, const char *); static unsigned int init_chipset_siimage(struct pci_dev *, const char *);
static void init_iops_siimage(ide_hwif_t *); static void init_iops_siimage(ide_hwif_t *);
static void init_hwif_siimage(ide_hwif_t *); static void init_hwif_siimage(ide_hwif_t *);
static void init_dma_siimage(ide_hwif_t *, unsigned long); static void init_dma_siimage(ide_hwif_t *, unsigned long);
static ide_pci_device_t siimage_chipsets[] __initdata = { static ide_pci_device_t siimage_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_CMD, vendor: PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_SII_680, device: PCI_DEVICE_ID_SII_680,
name: "SiI680", name: "SiI680",
init_setup: init_setup_siimage,
init_chipset: init_chipset_siimage, init_chipset: init_chipset_siimage,
init_iops: init_iops_siimage, init_iops: init_iops_siimage,
init_hwif: init_hwif_siimage, init_hwif: init_hwif_siimage,
...@@ -128,11 +126,10 @@ static ide_pci_device_t siimage_chipsets[] __initdata = { ...@@ -128,11 +126,10 @@ static ide_pci_device_t siimage_chipsets[] __initdata = {
enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, enablebits: {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_CMD, vendor: PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_SII_3112, device: PCI_DEVICE_ID_SII_3112,
name: "SiI3112 Serial ATA", name: "SiI3112 Serial ATA",
init_setup: init_setup_siimage,
init_chipset: init_chipset_siimage, init_chipset: init_chipset_siimage,
init_iops: init_iops_siimage, init_iops: init_iops_siimage,
init_hwif: init_hwif_siimage, init_hwif: init_hwif_siimage,
......
/* /*
* linux/drivers/ide/sis5513.c Version 0.14 July 24, 2002 * linux/drivers/ide/sis5513.c Version 0.14ac Sept 11, 2002
* *
* Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org>
* Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer * Copyright (C) 2002 Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
...@@ -1022,26 +1023,56 @@ static void __init init_dma_sis5513 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -1022,26 +1023,56 @@ static void __init init_dma_sis5513 (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_sis5513 (struct pci_dev *dev, ide_pci_device_t *d)
static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &sis5513_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init sis5513_scan_pcidev (struct pci_dev *dev) /**
* sis5513_remove_one - called when SIS IDE is unplugged
* @dev: the device that was removed
*
* Disconnect a SIS IDE device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void sis5513_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("SIS IDE removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_SI) static struct pci_device_id sis5513_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = sis5513_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "SIS IDE",
(d->device == dev->device)) && id_table: sis5513_pci_tbl,
(d->init_setup)) { probe: sis5513_init_one,
d->init_setup(dev, d); remove: __devexit_p(sis5513_remove_one),
return 1; };
}
} static int sis5513_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
} }
static void sis5513_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(sis5513_ide_init);
module_exit(sis5513_ide_exit);
MODULE_AUTHOR("Lionel Bouton, L C Chang, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for SIS IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t sis_procs[] __initdata = { ...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t sis_procs[] __initdata = {
}; };
#endif /* defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) */ #endif /* defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) */
static void init_setup_sis5513(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_sis5513(struct pci_dev *, const char *); static unsigned int init_chipset_sis5513(struct pci_dev *, const char *);
static void init_hwif_sis5513(ide_hwif_t *); static void init_hwif_sis5513(ide_hwif_t *);
static void init_dma_sis5513(ide_hwif_t *, unsigned long); static void init_dma_sis5513(ide_hwif_t *, unsigned long);
static ide_pci_device_t sis5513_chipsets[] __initdata = { static ide_pci_device_t sis5513_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_SI, vendor: PCI_VENDOR_ID_SI,
device: PCI_DEVICE_ID_SI_5513, device: PCI_DEVICE_ID_SI_5513,
name: "SIS5513", name: "SIS5513",
init_setup: init_setup_sis5513,
init_chipset: init_chipset_sis5513, init_chipset: init_chipset_sis5513,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_sis5513, init_hwif: init_hwif_sis5513,
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linuyx/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -281,26 +282,54 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif) ...@@ -281,26 +282,54 @@ static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_sl82c105 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &slc82c105_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init sl82c105_scan_pcidev (struct pci_dev *dev) /**
* sl82c105_remove_one - called with an SLC82c105 is unplugged
* @dev: the device that was removed
*
* Disconnect an W82C105 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void sl82c105_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("W82C105 removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_WINBOND) static struct pci_device_id sl82c105_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = sl82c105_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "W82C105 IDE",
(d->device == dev->device)) && id_table: sl82c105_pci_tbl,
(d->init_setup)) { probe: sl82c105_init_one,
d->init_setup(dev, d); remove: __devexit_p(sl82c105_remove_one),
return 1; };
}
} static int sl82c105_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void sl82c105_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(sl82c105_ide_init);
module_exit(sl82c105_ide_exit);
MODULE_DESCRIPTION("PCI driver module for W82C105 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -5,17 +5,15 @@ ...@@ -5,17 +5,15 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/ide.h> #include <linux/ide.h>
static void init_setup_sl82c105(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_sl82c105(struct pci_dev *, const char *); static unsigned int init_chipset_sl82c105(struct pci_dev *, const char *);
static void init_hwif_sl82c105(ide_hwif_t *); static void init_hwif_sl82c105(ide_hwif_t *);
static void init_dma_sl82c105(ide_hwif_t *, unsigned long); static void init_dma_sl82c105(ide_hwif_t *, unsigned long);
static ide_pci_device_t sl82c105_chipsets[] __initdata = { static ide_pci_device_t sl82c105_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_WINBOND, vendor: PCI_VENDOR_ID_WINBOND,
device: PCI_DEVICE_ID_WINBOND_82C105, device: PCI_DEVICE_ID_WINBOND_82C105,
name: "W82C105", name: "W82C105",
init_setup: init_setup_sl82c105,
init_chipset: init_chipset_sl82c105, init_chipset: init_chipset_sl82c105,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_sl82c105, init_hwif: init_hwif_sl82c105,
......
/* /*
* linux/drivers/ide/slc90e66.c Version 0.10 October 4, 2000 * linux/drivers/ide/slc90e66.c Version 0.11 September 11, 2002
* *
* Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org>
* *
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -364,26 +365,56 @@ static void __init init_dma_slc90e66 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -364,26 +365,56 @@ static void __init init_dma_slc90e66 (ide_hwif_t *hwif, unsigned long dmabase)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
static void __init init_setup_slc90e66 (struct pci_dev *dev, ide_pci_device_t *d)
static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &slc90e66_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init slc90e66_scan_pcidev (struct pci_dev *dev) /**
* slc90e66_remove_one - called with an slc90e66 is unplugged
* @dev: the device that was removed
*
* Disconnect an slc90e66 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void slc90e66_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("slc90e66 removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_EFAR) static struct pci_device_id slc90e66_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = slc90e66_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "SLC90e66 IDE",
(d->device == dev->device)) && id_table: slc90e66_pci_tbl,
(d->init_setup)) { probe: slc90e66_init_one,
d->init_setup(dev, d); remove: __devexit_p(slc90e66_remove_one),
return 1; };
}
} static int slc90e66_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
}
static void slc90e66_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
} }
module_init(slc90e66_ide_init);
module_exit(slc90e66_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for SLC90E66 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -27,17 +27,15 @@ static ide_pci_host_proc_t slc90e66_procs[] __initdata = { ...@@ -27,17 +27,15 @@ static ide_pci_host_proc_t slc90e66_procs[] __initdata = {
}; };
#endif /* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */ #endif /* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */
static void init_setup_slc90e66(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_slc90e66(struct pci_dev *, const char *); static unsigned int init_chipset_slc90e66(struct pci_dev *, const char *);
static void init_hwif_slc90e66(ide_hwif_t *); static void init_hwif_slc90e66(ide_hwif_t *);
static void init_dma_slc90e66(ide_hwif_t *, unsigned long); static void init_dma_slc90e66(ide_hwif_t *, unsigned long);
static ide_pci_device_t slc90e66_chipsets[] __initdata = { static ide_pci_device_t slc90e66_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_EFAR, vendor: PCI_VENDOR_ID_EFAR,
device: PCI_DEVICE_ID_EFAR_SLC90E66_1, device: PCI_DEVICE_ID_EFAR_SLC90E66_1,
name: "SLC90E66", name: "SLC90E66",
init_setup: init_setup_slc90e66,
init_chipset: init_chipset_slc90e66, init_chipset: init_chipset_slc90e66,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_slc90e66, init_hwif: init_hwif_slc90e66,
......
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/ioport.h> #include <linux/ioport.h>
...@@ -191,7 +192,7 @@ static int trm290_ide_dma_write (ide_drive_t *drive /*, struct request *rq */) ...@@ -191,7 +192,7 @@ static int trm290_ide_dma_write (ide_drive_t *drive /*, struct request *rq */)
trm290_prepare_drive(drive, 0); /* select PIO xfer */ trm290_prepare_drive(drive, 0); /* select PIO xfer */
return 1; return 1;
#endif #endif
if (!(count = ide_build_dmatable(drive, rq))) { if (!(count = ide_build_dmatable(drive, rq, PCI_DMA_TODEVICE))) {
/* try PIO instead of DMA */ /* try PIO instead of DMA */
trm290_prepare_drive(drive, 0); /* select PIO xfer */ trm290_prepare_drive(drive, 0); /* select PIO xfer */
return 1; return 1;
...@@ -235,7 +236,7 @@ static int trm290_ide_dma_read (ide_drive_t *drive /*, struct request *rq */) ...@@ -235,7 +236,7 @@ static int trm290_ide_dma_read (ide_drive_t *drive /*, struct request *rq */)
task_ioreg_t command = WIN_NOP; task_ioreg_t command = WIN_NOP;
unsigned int count, reading = 2, writing = 0; unsigned int count, reading = 2, writing = 0;
if (!(count = ide_build_dmatable(drive, rq))) { if (!(count = ide_build_dmatable(drive, rq, PCI_DMA_FROMDEVICE))) {
/* try PIO instead of DMA */ /* try PIO instead of DMA */
trm290_prepare_drive(drive, 0); /* select PIO xfer */ trm290_prepare_drive(drive, 0); /* select PIO xfer */
return 1; return 1;
...@@ -396,26 +397,55 @@ void __init init_hwif_trm290 (ide_hwif_t *hwif) ...@@ -396,26 +397,55 @@ void __init init_hwif_trm290 (ide_hwif_t *hwif)
extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
void __init init_setup_trm290 (struct pci_dev *dev, ide_pci_device_t *d) static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &trm290_chipsets[id->driver_data];
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d); ide_setup_pci_device(dev, d);
return 0;
} }
int __init trm290_scan_pcidev (struct pci_dev *dev) /**
* trm290_remove_one - called when an trm290 is unplugged
* @dev: the device that was removed
*
* Disconnect a trm290 device that has been unplugged either by hotplug
* or by a more civilized notification scheme. Not yet supported.
*/
static void trm290_remove_one(struct pci_dev *dev)
{ {
ide_pci_device_t *d; panic("trm290 removal not yet supported");
}
if (dev->vendor != PCI_VENDOR_ID_TEKRAM) static struct pci_device_id trm290_pci_tbl[] __devinitdata = {
return 0; { PCI_VENDOR_ID_TEKRAM, PCI_DEVICE_ID_TEKRAM_DC290, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
for (d = trm290_chipsets; d && d->vendor && d->device; ++d) { static struct pci_driver driver = {
if (((d->vendor == dev->vendor) && name: "TRM290 IDE",
(d->device == dev->device)) && id_table: trm290_pci_tbl,
(d->init_setup)) { probe: trm290_init_one,
d->init_setup(dev, d); remove: __devexit_p(trm290_remove_one),
return 1; };
}
} static int trm290_ide_init(void)
return 0; {
return ide_pci_register_driver(&driver);
} }
static void trm290_ide_exit(void)
{
ide_pci_unregister_driver(&driver);
}
module_init(trm290_ide_init);
module_exit(trm290_ide_exit);
MODULE_AUTHOR("Mark Lord");
MODULE_DESCRIPTION("PCI driver module for Tekram TRM290 IDE");
MODULE_LICENSE("GPL");
EXPORT_NO_SYMBOLS;
...@@ -5,15 +5,13 @@ ...@@ -5,15 +5,13 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/ide.h> #include <linux/ide.h>
extern void init_setup_trm290(struct pci_dev *, ide_pci_device_t *);
extern void init_hwif_trm290(ide_hwif_t *); extern void init_hwif_trm290(ide_hwif_t *);
static ide_pci_device_t trm290_chipsets[] __initdata = { static ide_pci_device_t trm290_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_TEKRAM, vendor: PCI_VENDOR_ID_TEKRAM,
device: PCI_DEVICE_ID_TEKRAM_DC290, device: PCI_DEVICE_ID_TEKRAM_DC290,
name: "TRM290", name: "TRM290",
init_setup: init_setup_trm290,
init_chipset: NULL, init_chipset: NULL,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_trm290, init_hwif: init_hwif_trm290,
......
This diff is collapsed.
...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t via_procs[] __initdata = { ...@@ -25,17 +25,15 @@ static ide_pci_host_proc_t via_procs[] __initdata = {
}; };
#endif /* DISPLAY_VIA_TIMINGS && CONFIG_PROC_FS */ #endif /* DISPLAY_VIA_TIMINGS && CONFIG_PROC_FS */
static void init_setup_via82cxxx(struct pci_dev *, ide_pci_device_t *);
static unsigned int init_chipset_via82cxxx(struct pci_dev *, const char *); static unsigned int init_chipset_via82cxxx(struct pci_dev *, const char *);
static void init_hwif_via82cxxx(ide_hwif_t *); static void init_hwif_via82cxxx(ide_hwif_t *);
static void init_dma_via82cxxx(ide_hwif_t *, unsigned long); static void init_dma_via82cxxx(ide_hwif_t *, unsigned long);
static ide_pci_device_t via82cxxx_chipsets[] __initdata = { static ide_pci_device_t via82cxxx_chipsets[] __initdata = {
{ { /* 0 */
vendor: PCI_VENDOR_ID_VIA, vendor: PCI_VENDOR_ID_VIA,
device: PCI_DEVICE_ID_VIA_82C576_1, device: PCI_DEVICE_ID_VIA_82C576_1,
name: "VP_IDE", name: "VP_IDE",
init_setup: init_setup_via82cxxx,
init_chipset: init_chipset_via82cxxx, init_chipset: init_chipset_via82cxxx,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_via82cxxx, init_hwif: init_hwif_via82cxxx,
...@@ -45,11 +43,10 @@ static ide_pci_device_t via82cxxx_chipsets[] __initdata = { ...@@ -45,11 +43,10 @@ static ide_pci_device_t via82cxxx_chipsets[] __initdata = {
enablebits: {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, enablebits: {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
bootable: ON_BOARD, bootable: ON_BOARD,
extra: 0, extra: 0,
},{ },{ /* 1 */
vendor: PCI_VENDOR_ID_VIA, vendor: PCI_VENDOR_ID_VIA,
device: PCI_DEVICE_ID_VIA_82C586_1, device: PCI_DEVICE_ID_VIA_82C586_1,
name: "VP_IDE", name: "VP_IDE",
init_setup: init_setup_via82cxxx,
init_chipset: init_chipset_via82cxxx, init_chipset: init_chipset_via82cxxx,
init_iops: NULL, init_iops: NULL,
init_hwif: init_hwif_via82cxxx, init_hwif: init_hwif_via82cxxx,
......
This diff is collapsed.
This diff is collapsed.
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
typedef int (elevator_merge_fn) (request_queue_t *, struct request **, typedef int (elevator_merge_fn) (request_queue_t *, struct request **,
struct bio *); struct bio *);
typedef void (elevator_merge_cleanup_fn) (request_queue_t *, struct request *, int);
typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *); typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *);
typedef struct request *(elevator_next_req_fn) (request_queue_t *); typedef struct request *(elevator_next_req_fn) (request_queue_t *);
...@@ -21,7 +19,6 @@ typedef void (elevator_exit_fn) (request_queue_t *, elevator_t *); ...@@ -21,7 +19,6 @@ typedef void (elevator_exit_fn) (request_queue_t *, elevator_t *);
struct elevator_s struct elevator_s
{ {
elevator_merge_fn *elevator_merge_fn; elevator_merge_fn *elevator_merge_fn;
elevator_merge_cleanup_fn *elevator_merge_cleanup_fn;
elevator_merge_req_fn *elevator_merge_req_fn; elevator_merge_req_fn *elevator_merge_req_fn;
elevator_next_req_fn *elevator_next_req_fn; elevator_next_req_fn *elevator_next_req_fn;
...@@ -42,7 +39,6 @@ struct elevator_s ...@@ -42,7 +39,6 @@ struct elevator_s
*/ */
extern void __elv_add_request(request_queue_t *, struct request *, extern void __elv_add_request(request_queue_t *, struct request *,
struct list_head *); struct list_head *);
extern void elv_merge_cleanup(request_queue_t *, struct request *, int);
extern int elv_merge(request_queue_t *, struct request **, struct bio *); extern int elv_merge(request_queue_t *, struct request **, struct bio *);
extern void elv_merge_requests(request_queue_t *, struct request *, extern void elv_merge_requests(request_queue_t *, struct request *,
struct request *); struct request *);
...@@ -61,6 +57,7 @@ extern elevator_t elevator_noop; ...@@ -61,6 +57,7 @@ extern elevator_t elevator_noop;
*/ */
extern elevator_t elevator_linus; extern elevator_t elevator_linus;
#define elv_linus_sequence(rq) ((long)(rq)->elevator_private) #define elv_linus_sequence(rq) ((long)(rq)->elevator_private)
#define ELV_LINUS_SEEK_COST 16
/* /*
* use the /proc/iosched interface, all the below is history -> * use the /proc/iosched interface, all the below is history ->
......
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