31 #include <linux/types.h>
33 #include <linux/kernel.h>
34 #include <linux/export.h>
40 {
"Micropolis 2112A" ,
NULL },
41 {
"CONNER CTMA 4000" ,
NULL },
42 {
"CONNER CTT8000-A" ,
NULL },
43 {
"ST34342A" ,
NULL },
48 {
"WDC AC11000H" ,
NULL },
49 {
"WDC AC22100H" ,
NULL },
50 {
"WDC AC32500H" ,
NULL },
51 {
"WDC AC33100H" ,
NULL },
52 {
"WDC AC31600H" ,
NULL },
53 {
"WDC AC32100H" ,
"24.09P07" },
54 {
"WDC AC23200L" ,
"21.10N21" },
55 {
"Compaq CRD-8241B" ,
NULL },
56 {
"CRD-8400B" ,
NULL },
57 {
"CRD-8480B",
NULL },
58 {
"CRD-8482B",
NULL },
60 {
"SanDisk SDP3B" ,
NULL },
61 {
"SanDisk SDP3B-64" ,
NULL },
62 {
"SANYO CD-ROM CRD" ,
NULL },
63 {
"HITACHI CDR-8" ,
NULL },
64 {
"HITACHI CDR-8335" ,
NULL },
65 {
"HITACHI CDR-8435" ,
NULL },
66 {
"Toshiba CD-ROM XM-6202B" ,
NULL },
67 {
"TOSHIBA CD-ROM XM-1702BC",
NULL },
68 {
"CD-532E-A" ,
NULL },
69 {
"E-IDE CD-ROM CR-840",
NULL },
70 {
"CD-ROM Drive/F5A",
NULL },
71 {
"WPI CDD-820",
NULL },
72 {
"SAMSUNG CD-ROM SC-148C",
NULL },
73 {
"SAMSUNG CD-ROM SC",
NULL },
74 {
"ATAPI CD-ROM DRIVE 40X MAXIMUM",
NULL },
75 {
"_NEC DV5800A",
NULL },
76 {
"SAMSUNG CD-ROM SN-124",
"N001" },
77 {
"Seagate STT20000A",
NULL },
78 {
"CD-ROM CDR_U200",
"1.09" },
98 dma_stat = hwif->
dma_ops->dma_end(drive);
100 stat = hwif->
tp_ops->read_status(hwif);
108 blk_rq_sectors(cmd->
rq) << 9);
112 drive->
name, __func__, dma_stat);
114 return ide_error(drive,
"dma_intr", stat);
185 drive->
hwif->dma_ops->dma_host_set(drive, 0);
216 drive->
hwif->dma_ops->dma_host_set(drive, 1);
233 static const u8 xfer_mode_bases[] = {
239 static unsigned int ide_get_mode_mask(
ide_drive_t *drive,
u8 base,
u8 req_mode)
244 unsigned int mask = 0;
271 mask |= ((2 <<
mode) - 1) << 3;
289 mask = (2 <<
mode) - 1;
325 for (i = 0; i <
ARRAY_SIZE(xfer_mode_bases); i++) {
326 if (req_mode < xfer_mode_bases[i])
328 mask = ide_get_mode_mask(drive, xfer_mode_bases[i], req_mode);
331 mode = xfer_mode_bases[
i] +
x;
345 mode =
min(mode, req_mode);
369 speed = ide_max_dma_mode(drive);
384 if (ide_tune_dma(drive))
391 ide_set_max_pio(drive);
408 rc = ide_dma_check(drive);
464 ret =
ide_error(drive,
"dma timeout error",
465 hwif->
tp_ops->read_status(hwif));
473 hwif->
tp_ops->read_status(hwif));
493 hwif->
rq->errors = 0;
541 if (ide_dma_map_sg(drive, cmd) == 0)