1 diff -uNr -X exclude linux-2.6.0-test11/arch/i386/kernel/mpparse.c linux/arch/i386/kernel/mpparse.c
2 --- linux-2.6.0-test11/arch/i386/kernel/mpparse.c 2003-12-08 00:29:12.000000000 +0100
3 +++ linux/arch/i386/kernel/mpparse.c 2003-12-08 00:33:52.671960352 +0100
6 for (i = 0; i < mp_irq_entries; i++) {
7 if ((mp_irqs[i].mpc_dstapic == intsrc.mpc_dstapic)
8 - && (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) {
9 + && (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)
10 + && (mp_irqs[i].mpc_irqtype == intsrc.mpc_irqtype)) {
14 diff -uNr -X exclude linux-2.6.0-test11/arch/i386/pci/fixup.c linux/arch/i386/pci/fixup.c
15 --- linux-2.6.0-test11/arch/i386/pci/fixup.c 2003-12-08 00:29:12.000000000 +0100
16 +++ linux/arch/i386/pci/fixup.c 2003-12-08 00:33:52.521983152 +0100
22 + * Halt Disconnect and Stop Grant Disconnect (bit 4 at offset 0x6F)
23 + * must be disabled when APIC is used (or lockups will happen).
25 +static void __devinit pci_fixup_nforce2_disconnect(struct pci_dev *d)
29 + pci_read_config_byte(d, 0x6F, &t);
31 + printk(KERN_INFO "PCI: disabling nForce2 Halt Disconnect"
32 + " and Stop Grant Disconnect\n");
33 + pci_write_config_byte(d, 0x6F, (t & 0xef));
37 struct pci_fixup pcibios_fixups[] = {
38 { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx },
39 { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx },
41 { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug },
42 { PCI_FIXUP_HEADER, PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810 },
43 { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_fixup_transparent_bridge },
44 + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2_disconnect },
47 diff -uNr -X exclude linux-2.6.0-test11/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
48 --- linux-2.6.0-test11/drivers/block/ll_rw_blk.c 2003-12-08 00:29:13.000000000 +0100
49 +++ linux/drivers/block/ll_rw_blk.c 2003-12-08 00:33:51.201183944 +0100
57 - "REQ_IDETAPE_WRITE",
58 - "REQ_IDETAPE_READ_BUFFER",
61 void blk_dump_rq_flags(struct request *rq, char *msg)
62 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/ide-io.c linux/drivers/ide/ide-io.c
63 --- linux-2.6.0-test11/drivers/ide/ide-io.c 2003-12-08 00:29:12.000000000 +0100
64 +++ linux/drivers/ide/ide-io.c 2003-12-08 00:33:52.834935576 +0100
67 #include <asm/bitops.h>
69 -#if (DISK_RECOVERY_TIME > 0)
71 -#error So the User Has To Fix the Compilation And Stop Hacking Port 0x43. Does anyone ever use this anyway ??
74 - * For really screwy hardware (hey, at least it *can* be used with Linux)
75 - * we can enforce a minimum delay time between successive operations.
77 -static unsigned long read_timer (ide_hwif_t *hwif)
79 - unsigned long t, flags;
82 - /* FIXME this is completely unsafe! */
83 - local_irq_save(flags);
84 - t = jiffies * 11932;
87 - i |= inb_p(0x40) << 8;
88 - local_irq_restore(flags);
91 -#endif /* DISK_RECOVERY_TIME */
93 -static inline void set_recovery_timer (ide_hwif_t *hwif)
95 -#if (DISK_RECOVERY_TIME > 0)
96 - hwif->last_time = read_timer(hwif);
97 -#endif /* DISK_RECOVERY_TIME */
101 * ide_end_request - complete an IDE I/O
102 * @drive: IDE device for the I/O
104 if (block == 0 && drive->remap_0_to_1 == 1)
105 block = 1; /* redirect MBR access to EZ-Drive partn table */
107 -#if (DISK_RECOVERY_TIME > 0)
108 - while ((read_timer() - HWIF(drive)->last_time) < DISK_RECOVERY_TIME);
111 if (blk_pm_suspend_request(rq) &&
112 rq->pm->pm_step == ide_pm_state_start_suspend)
113 /* Mark drive blocked when starting the suspend sequence. */
114 @@ -1116,7 +1081,6 @@
116 DRIVER(drive)->error(drive, "irq timeout", hwif->INB(IDE_STATUS_REG));
118 - set_recovery_timer(hwif);
119 drive->service_time = jiffies - drive->service_start;
120 spin_lock_irq(&ide_lock);
121 enable_irq(hwif->irq);
122 @@ -1313,7 +1277,6 @@
123 * same irq as is currently being serviced here, and Linux
124 * won't allow another of the same (on any CPU) until we return.
126 - set_recovery_timer(HWIF(drive));
127 drive->service_time = jiffies - drive->service_start;
128 if (startstop == ide_stopped) {
129 if (hwgroup->handler == NULL) { /* paranoia */
130 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/ide-tape.c linux/drivers/ide/ide-tape.c
131 --- linux-2.6.0-test11/drivers/ide/ide-tape.c 2003-12-08 00:29:13.000000000 +0100
132 +++ linux/drivers/ide/ide-tape.c 2003-12-08 00:33:51.207183032 +0100
135 - * linux/drivers/ide/ide-tape.c Version 1.17b Oct, 2002
136 + * linux/drivers/ide/ide-tape.c Version 1.19 Nov, 2003
138 * Copyright (C) 1995 - 1999 Gadi Oxman <gadio@netvision.net.il>
141 * sharing a (fast) ATA-2 disk with any (slow) new ATAPI device.
144 -#define IDETAPE_VERSION "1.17b-ac1"
145 +#define IDETAPE_VERSION "1.19"
147 #include <linux/config.h>
148 #include <linux/module.h>
150 #include <asm/unaligned.h>
151 #include <asm/bitops.h>
154 -#define NO_LONGER_REQUIRED (1)
160 #define IDETAPE_PC_STACK (10 + IDETAPE_MAX_PC_RETRIES)
163 - * Some tape drives require a long irq timeout
164 + * Some drives (for example, Seagate STT3401A Travan) require a very long
165 + * timeout, because they don't return an interrupt or clear their busy bit
166 + * until after the command completes (even retension commands).
168 -#define IDETAPE_WAIT_CMD (60*HZ)
169 +#define IDETAPE_WAIT_CMD (900*HZ)
172 * The following parameter is used to select the point in the internal
173 @@ -1032,6 +1031,10 @@
175 /* the door is currently locked */
177 + /* the tape hardware is write protected */
178 + char drv_write_prot;
179 + /* the tape is write protected (hardware or opened as read-only) */
184 @@ -1164,6 +1167,8 @@
185 #define IDETAPE_DRQ_INTERRUPT 6 /* DRQ interrupt device */
186 #define IDETAPE_READ_ERROR 7
187 #define IDETAPE_PIPELINE_ACTIVE 8 /* pipeline active */
188 +/* 0 = no tape is loaded, so we don't rewind after ejecting */
189 +#define IDETAPE_MEDIUM_PRESENT 9
192 * Supported ATAPI tape drives packet commands
193 @@ -1211,10 +1216,14 @@
194 * requests to the tail of our block device request queue and wait
195 * for their completion.
197 -#define idetape_request(rq) \
198 - ((rq)->flags & (REQ_IDETAPE_PC1 | REQ_IDETAPE_PC2 | \
199 - REQ_IDETAPE_READ | REQ_IDETAPE_WRITE | \
200 - REQ_IDETAPE_READ_BUFFER))
203 + REQ_IDETAPE_PC1 = (1 << 0), /* packet command (first stage) */
204 + REQ_IDETAPE_PC2 = (1 << 1), /* packet command (second stage) */
205 + REQ_IDETAPE_READ = (1 << 2),
206 + REQ_IDETAPE_WRITE = (1 << 3),
207 + REQ_IDETAPE_READ_BUFFER = (1 << 4),
211 * Error codes which are returned in rq->errors to the higher part
212 @@ -1665,6 +1674,20 @@
213 idetape_update_buffers(pc);
217 + * If error was the result of a zero-length read or write command,
218 + * with sense key=5, asc=0x22, ascq=0, let it slide. Some drives
219 + * (i.e. Seagate STT3401A Travan) don't support 0-length read/writes.
221 + if ((pc->c[0] == IDETAPE_READ_CMD || pc->c[0] == IDETAPE_WRITE_CMD)
222 + && pc->c[4] == 0 && pc->c[3] == 0 && pc->c[2] == 0) { /* length==0 */
223 + if (result->sense_key == 5) {
224 + /* don't report an error, everything's ok */
226 + /* don't retry read/write */
227 + set_bit(PC_ABORT, &pc->flags);
230 if (pc->c[0] == IDETAPE_READ_CMD && result->filemark) {
231 pc->error = IDETAPE_ERROR_FILEMARK;
232 set_bit(PC_ABORT, &pc->flags);
233 @@ -1805,10 +1828,15 @@
237 -static void idetape_abort_pipeline (ide_drive_t *drive, idetape_stage_t *last_stage)
239 + * This will free all the pipeline stages starting from new_last_stage->next
240 + * to the end of the list, and point tape->last_stage to new_last_stage.
242 +static void idetape_abort_pipeline(ide_drive_t *drive,
243 + idetape_stage_t *new_last_stage)
245 idetape_tape_t *tape = drive->driver_data;
246 - idetape_stage_t *stage = tape->next_stage;
247 + idetape_stage_t *stage = new_last_stage->next;
248 idetape_stage_t *nstage;
250 #if IDETAPE_DEBUG_LOG
251 @@ -1822,9 +1850,9 @@
252 --tape->nr_pending_stages;
255 - tape->last_stage = last_stage;
257 - last_stage->next = NULL;
258 + if (new_last_stage)
259 + new_last_stage->next = NULL;
260 + tape->last_stage = new_last_stage;
261 tape->next_stage = NULL;
264 @@ -1868,7 +1896,7 @@
265 tape->active_stage = NULL;
266 tape->active_data_request = NULL;
267 tape->nr_pending_stages--;
268 - if (rq->flags & REQ_IDETAPE_WRITE) {
269 + if (rq->cmd[0] & REQ_IDETAPE_WRITE) {
271 if (tape->debug_level >= 2) {
272 if (tape->onstream) {
273 @@ -1914,7 +1942,7 @@
277 - } else if (rq->flags & REQ_IDETAPE_READ) {
278 + } else if (rq->cmd[0] & REQ_IDETAPE_READ) {
279 if (error == IDETAPE_ERROR_EOD) {
280 set_bit(IDETAPE_PIPELINE_ERROR, &tape->flags);
281 idetape_abort_pipeline(drive, active_stage);
282 @@ -1972,6 +2000,13 @@
283 pc->callback = &idetape_request_sense_callback;
286 +static void idetape_init_rq(struct request *rq, u8 cmd)
288 + memset(rq, 0, sizeof(*rq));
289 + rq->flags = REQ_SPECIAL;
294 * idetape_queue_pc_head generates a new packet command request in front
295 * of the request queue, before the current request, so that it will be
296 @@ -1993,8 +2028,7 @@
298 static void idetape_queue_pc_head (ide_drive_t *drive, idetape_pc_t *pc,struct request *rq)
300 - memset(rq, 0, sizeof(*rq));
301 - rq->flags = REQ_IDETAPE_PC1;
302 + idetape_init_rq(rq, REQ_IDETAPE_PC1);
303 rq->buffer = (char *) pc;
304 (void) ide_do_drive_cmd(drive, rq, ide_preempt);
306 @@ -2430,7 +2464,14 @@
307 if (page_code != IDETAPE_BLOCK_DESCRIPTOR)
308 pc->c[1] = 8; /* DBD = 1 - Don't return block descriptors */
309 pc->c[2] = page_code;
310 - pc->c[3] = 255; /* Don't limit the returned information */
312 + * Changed pc->c[3] to 0 (255 will at best return unused info).
314 + * For SCSI this byte is defined as subpage instead of high byte
315 + * of length and some IDE drives seem to interpret it this way
316 + * and return an error when 255 is used.
319 pc->c[4] = 255; /* (We will just discard data in that case) */
320 if (page_code == IDETAPE_BLOCK_DESCRIPTOR)
321 pc->request_transfer = 12;
322 @@ -2544,8 +2585,9 @@
324 if (status.b.check) {
326 - printk(KERN_ERR "ide-tape: %s: I/O error, ",tape->name);
328 + if (pc->c[0] != IDETAPE_TEST_UNIT_READY_CMD)
329 + printk(KERN_ERR "ide-tape: %s: I/O error, ",
331 /* Retry operation */
332 return idetape_retry_pc(drive);
334 @@ -2697,7 +2739,7 @@
335 if (tape->debug_level >= 5)
336 printk(KERN_INFO "ide-tape: rq_status: %d, "
337 "dev: %s, cmd: %ld, errors: %d\n", rq->rq_status,
338 - rq->rq_disk->disk_name, rq->flags, rq->errors);
339 + rq->rq_disk->disk_name, rq->cmd[0], rq->errors);
341 if (tape->debug_level >= 2)
342 printk(KERN_INFO "ide-tape: sector: %ld, "
343 @@ -2705,11 +2747,11 @@
344 rq->sector, rq->nr_sectors, rq->current_nr_sectors);
345 #endif /* IDETAPE_DEBUG_LOG */
347 - if (!idetape_request(rq)) {
348 + if ((rq->flags & REQ_SPECIAL) == 0) {
350 * We do not support buffer cache originated requests.
352 - printk(KERN_NOTICE "ide-tape: %s: Unsupported command in "
353 + printk(KERN_NOTICE "ide-tape: %s: Unsupported request in "
354 "request queue (%ld)\n", drive->name, rq->flags);
355 ide_end_request(drive, 0, 0);
357 @@ -2746,7 +2788,7 @@
361 - if (!drive->dsc_overlap && !(rq->flags & REQ_IDETAPE_PC2))
362 + if (!drive->dsc_overlap && !(rq->cmd[0] & REQ_IDETAPE_PC2))
363 set_bit(IDETAPE_IGNORE_DSC, &tape->flags);
366 @@ -2760,7 +2802,7 @@
367 if (tape->tape_still_time > 100 && tape->tape_still_time < 200)
368 tape->measure_insert_time = 1;
369 if (tape->req_buffer_fill &&
370 - (rq->flags & (REQ_IDETAPE_WRITE | REQ_IDETAPE_READ))) {
371 + (rq->cmd[0] & (REQ_IDETAPE_WRITE | REQ_IDETAPE_READ))) {
372 tape->req_buffer_fill = 0;
373 tape->writes_since_buffer_fill = 0;
374 tape->reads_since_buffer_fill = 0;
375 @@ -2774,12 +2816,12 @@
376 tape->insert_speed = tape->insert_size / 1024 * HZ / (jiffies - tape->insert_time);
377 calculate_speeds(drive);
378 if (tape->onstream && tape->max_frames &&
379 - (((rq->flags & REQ_IDETAPE_WRITE) &&
380 + (((rq->cmd[0] & REQ_IDETAPE_WRITE) &&
381 ( tape->cur_frames == tape->max_frames ||
382 ( tape->speed_control && tape->cur_frames > 5 &&
383 (tape->insert_speed > tape->max_insert_speed ||
384 (0 /* tape->cur_frames > 30 && tape->tape_still_time > 200 */) ) ) ) ) ||
385 - ((rq->flags & REQ_IDETAPE_READ) &&
386 + ((rq->cmd[0] & REQ_IDETAPE_READ) &&
387 ( tape->cur_frames == 0 ||
388 ( tape->speed_control && (tape->cur_frames < tape->max_frames - 5) &&
389 tape->insert_speed > tape->max_insert_speed ) ) && rq->nr_sectors) ) ) {
390 @@ -2787,7 +2829,7 @@
391 if (tape->debug_level >= 4)
392 printk(KERN_INFO "ide-tape: postponing request, "
393 "cmd %ld, cur %d, max %d\n",
394 - rq->flags, tape->cur_frames, tape->max_frames);
395 + rq->cmd[0], tape->cur_frames, tape->max_frames);
397 if (tape->postpone_cnt++ < 500) {
399 @@ -2808,7 +2850,7 @@
400 } else if ((signed long) (jiffies - tape->dsc_timeout) > 0) {
401 printk(KERN_ERR "ide-tape: %s: DSC timeout\n",
403 - if (rq->flags & REQ_IDETAPE_PC2) {
404 + if (rq->cmd[0] & REQ_IDETAPE_PC2) {
405 idetape_media_access_finished(drive);
408 @@ -2819,7 +2861,7 @@
409 idetape_postpone_request(drive);
412 - if (rq->flags & REQ_IDETAPE_READ) {
413 + if (rq->cmd[0] & REQ_IDETAPE_READ) {
416 IO_trace(IO_IDETAPE_FIFO, tape->pipeline_head, tape->buffer_head, tape->tape_head, tape->minor);
417 @@ -2836,7 +2878,7 @@
418 idetape_create_read_cmd(tape, pc, rq->current_nr_sectors, (struct idetape_bh *)rq->special);
421 - if (rq->flags & REQ_IDETAPE_WRITE) {
422 + if (rq->cmd[0] & REQ_IDETAPE_WRITE) {
425 IO_trace(IO_IDETAPE_FIFO, tape->pipeline_head, tape->buffer_head, tape->tape_head, tape->minor);
426 @@ -2854,19 +2896,19 @@
427 idetape_create_write_cmd(tape, pc, rq->current_nr_sectors, (struct idetape_bh *)rq->special);
430 - if (rq->flags & REQ_IDETAPE_READ_BUFFER) {
431 + if (rq->cmd[0] & REQ_IDETAPE_READ_BUFFER) {
432 tape->postpone_cnt = 0;
433 pc = idetape_next_pc_storage(drive);
434 idetape_create_read_buffer_cmd(tape, pc, rq->current_nr_sectors, (struct idetape_bh *)rq->special);
437 - if (rq->flags & REQ_IDETAPE_PC1) {
438 + if (rq->cmd[0] & REQ_IDETAPE_PC1) {
439 pc = (idetape_pc_t *) rq->buffer;
440 - rq->flags &= ~(REQ_IDETAPE_PC1);
441 - rq->flags |= REQ_IDETAPE_PC2;
442 + rq->cmd[0] &= ~(REQ_IDETAPE_PC1);
443 + rq->cmd[0] |= REQ_IDETAPE_PC2;
446 - if (rq->flags & REQ_IDETAPE_PC2) {
447 + if (rq->cmd[0] & REQ_IDETAPE_PC2) {
448 idetape_media_access_finished(drive);
451 @@ -3163,7 +3205,7 @@
452 idetape_tape_t *tape = drive->driver_data;
454 #if IDETAPE_DEBUG_BUGS
455 - if (rq == NULL || !idetape_request(rq)) {
456 + if (rq == NULL || (rq->flags & REQ_SPECIAL) == 0) {
457 printk (KERN_ERR "ide-tape: bug: Trying to sleep on non-valid request\n");
460 @@ -3269,8 +3311,7 @@
464 - memset(&rq, 0, sizeof(rq));
465 - rq.flags = REQ_IDETAPE_PC1;
466 + idetape_init_rq(&rq, REQ_IDETAPE_PC1);
467 rq.buffer = (char *) pc;
468 return ide_do_drive_cmd(drive, &rq, ide_wait);
470 @@ -3295,25 +3336,28 @@
472 idetape_tape_t *tape = drive->driver_data;
474 + int load_attempted = 0;
477 * Wait for the tape to become ready
479 + set_bit(IDETAPE_MEDIUM_PRESENT, &tape->flags);
481 while (time_before(jiffies, timeout)) {
482 idetape_create_test_unit_ready_cmd(&pc);
483 if (!__idetape_queue_pc_tail(drive, &pc))
485 - if (tape->sense_key == 2 && tape->asc == 4 && tape->ascq == 2) {
486 + if ((tape->sense_key == 2 && tape->asc == 4 && tape->ascq == 2)
487 + || (tape->asc == 0x3A)) { /* no media */
488 + if (load_attempted)
490 idetape_create_load_unload_cmd(drive, &pc, IDETAPE_LU_LOAD_MASK);
491 __idetape_queue_pc_tail(drive, &pc);
492 - idetape_create_test_unit_ready_cmd(&pc);
493 - if (!__idetape_queue_pc_tail(drive, &pc))
496 - if (!(tape->sense_key == 2 && tape->asc == 4 &&
497 - (tape->ascq == 1 || tape->ascq == 8)))
499 + load_attempted = 1;
500 + /* not about to be ready */
501 + } else if (!(tape->sense_key == 2 && tape->asc == 4 &&
502 + (tape->ascq == 1 || tape->ascq == 8)))
504 current->state = TASK_INTERRUPTIBLE;
505 schedule_timeout(HZ / 10);
507 @@ -3369,25 +3413,10 @@
508 printk(KERN_INFO "ide-tape: Reached idetape_read_position\n");
509 #endif /* IDETAPE_DEBUG_LOG */
511 -#ifdef NO_LONGER_REQUIRED
512 - idetape_flush_tape_buffers(drive);
514 idetape_create_read_position_cmd(&pc);
515 if (idetape_queue_pc_tail(drive, &pc))
517 position = tape->first_frame_position;
518 -#ifdef NO_LONGER_REQUIRED
519 - if (tape->onstream) {
520 - if ((position != tape->last_frame_position - tape->blocks_in_buffer) &&
521 - (position != tape->last_frame_position + tape->blocks_in_buffer)) {
522 - if (tape->blocks_in_buffer == 0) {
523 - printk("ide-tape: %s: correcting read position %d, %d, %d\n", tape->name, position, tape->last_frame_position, tape->blocks_in_buffer);
524 - position = tape->last_frame_position;
525 - tape->first_frame_position = position;
533 @@ -3436,6 +3465,8 @@
535 if (tape->chrdev_direction != idetape_direction_read)
538 + /* Remove merge stage. */
539 cnt = tape->merge_stage_size / tape->tape_block_size;
540 if (test_and_clear_bit(IDETAPE_FILEMARK, &tape->flags))
541 ++cnt; /* Filemarks count as 1 sector */
542 @@ -3444,9 +3475,12 @@
543 __idetape_kfree_stage(tape->merge_stage);
544 tape->merge_stage = NULL;
547 + /* Clear pipeline flags. */
548 clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags);
549 tape->chrdev_direction = idetape_direction_none;
552 + /* Remove pipeline stages. */
553 if (tape->first_stage == NULL)
556 @@ -3546,8 +3580,7 @@
558 #endif /* IDETAPE_DEBUG_BUGS */
560 - memset(&rq, 0, sizeof(rq));
562 + idetape_init_rq(&rq, cmd);
563 rq.special = (void *)bh;
564 rq.sector = tape->first_frame_position;
565 rq.nr_sectors = rq.current_nr_sectors = blocks;
566 @@ -3596,8 +3629,7 @@
567 printk(KERN_INFO "ide-tape: %s: read back logical block %d, data %x %x %x %x\n", tape->name, logical_blk_num, *p++, *p++, *p++, *p++);
570 - memset(rq, 0, sizeof(*rq));
571 - rq->flags = REQ_IDETAPE_WRITE;
572 + idetape_init_rq(rq, REQ_IDETAPE_WRITE);
573 rq->sector = tape->first_frame_position;
574 rq->nr_sectors = rq->current_nr_sectors = tape->capabilities.ctl;
575 idetape_init_stage(drive, stage, OS_FRAME_TYPE_DATA, logical_blk_num++);
576 @@ -3871,8 +3903,7 @@
580 - memset(rq, 0, sizeof(*rq));
581 - rq->flags = REQ_IDETAPE_WRITE;
582 + idetape_init_rq(rq, REQ_IDETAPE_WRITE);
583 /* Doesn't actually matter - We always assume sequential access */
584 rq->sector = tape->first_frame_position;
585 rq->nr_sectors = rq->current_nr_sectors = blocks;
586 @@ -4059,19 +4090,22 @@
587 * Issue a read 0 command to ensure that DSC handshake
588 * is switched from completion mode to buffer available
590 + * No point in issuing this if DSC overlap isn't supported,
591 + * some drives (Seagate STT3401A) will return an error.
593 - bytes_read = idetape_queue_rw_tail(drive, REQ_IDETAPE_READ, 0, tape->merge_stage->bh);
594 - if (bytes_read < 0) {
595 - __idetape_kfree_stage(tape->merge_stage);
596 - tape->merge_stage = NULL;
597 - tape->chrdev_direction = idetape_direction_none;
599 + if (drive->dsc_overlap) {
600 + bytes_read = idetape_queue_rw_tail(drive, REQ_IDETAPE_READ, 0, tape->merge_stage->bh);
601 + if (bytes_read < 0) {
602 + __idetape_kfree_stage(tape->merge_stage);
603 + tape->merge_stage = NULL;
604 + tape->chrdev_direction = idetape_direction_none;
609 if (tape->restart_speed_control_req)
610 idetape_restart_speed_control(drive);
611 - memset(&rq, 0, sizeof(rq));
612 - rq.flags = REQ_IDETAPE_READ;
613 + idetape_init_rq(&rq, REQ_IDETAPE_READ);
614 rq.sector = tape->first_frame_position;
615 rq.nr_sectors = rq.current_nr_sectors = blocks;
616 if (!test_bit(IDETAPE_PIPELINE_ERROR, &tape->flags) &&
617 @@ -4898,6 +4932,10 @@
621 + /* The drive is write protected. */
622 + if (tape->write_prot)
625 #if IDETAPE_DEBUG_LOG
626 if (tape->debug_level >= 3)
627 printk(KERN_INFO "ide-tape: Reached idetape_chrdev_write, "
628 @@ -4979,13 +5017,17 @@
629 * Issue a write 0 command to ensure that DSC handshake
630 * is switched from completion mode to buffer available
632 + * No point in issuing this if DSC overlap isn't supported,
633 + * some drives (Seagate STT3401A) will return an error.
635 - retval = idetape_queue_rw_tail(drive, REQ_IDETAPE_WRITE, 0, tape->merge_stage->bh);
637 - __idetape_kfree_stage(tape->merge_stage);
638 - tape->merge_stage = NULL;
639 - tape->chrdev_direction = idetape_direction_none;
641 + if (drive->dsc_overlap) {
642 + retval = idetape_queue_rw_tail(drive, REQ_IDETAPE_WRITE, 0, tape->merge_stage->bh);
644 + __idetape_kfree_stage(tape->merge_stage);
645 + tape->merge_stage = NULL;
646 + tape->chrdev_direction = idetape_direction_none;
651 if (tape->debug_level >= 2)
652 @@ -5141,7 +5183,7 @@
655 * MTBSF and MTBSFM are not supported when the tape doesn't
656 - * supports spacing over filemarks in the reverse direction.
657 + * support spacing over filemarks in the reverse direction.
658 * In this case, MTFSFM is also usually not supported (it is
659 * supported in the rare case in which we crossed the filemark
660 * during our read-ahead pipelined operation mode).
661 @@ -5211,6 +5253,8 @@
665 + if (tape->write_prot)
667 idetape_discard_read_pipeline(drive, 1);
668 for (i = 0; i < mt_count; i++) {
669 retval = idetape_write_filemark(drive);
670 @@ -5231,9 +5275,21 @@
671 return (idetape_queue_pc_tail(drive, &pc));
675 + * If door is locked, attempt to unlock before
676 + * attempting to eject.
678 + if (tape->door_locked) {
679 + if (idetape_create_prevent_cmd(drive, &pc, 0))
680 + if (!idetape_queue_pc_tail(drive, &pc))
681 + tape->door_locked = DOOR_UNLOCKED;
683 idetape_discard_read_pipeline(drive, 0);
684 idetape_create_load_unload_cmd(drive, &pc,!IDETAPE_LU_LOAD_MASK);
685 - return (idetape_queue_pc_tail(drive, &pc));
686 + retval = idetape_queue_pc_tail(drive, &pc);
688 + clear_bit(IDETAPE_MEDIUM_PRESENT, &tape->flags);
691 idetape_discard_read_pipeline(drive, 0);
692 return (idetape_flush_tape_buffers(drive));
693 @@ -5409,6 +5465,8 @@
694 mtget.mt_gstat |= GMT_EOD(0xffffffff);
695 if (position <= OS_DATA_STARTFRAME1)
696 mtget.mt_gstat |= GMT_BOT(0xffffffff);
697 + } else if (tape->drv_write_prot) {
698 + mtget.mt_gstat |= GMT_WR_PROT(0xffffffff);
700 if (copy_to_user((char *) arg,(char *) &mtget, sizeof(struct mtget)))
702 @@ -5530,6 +5588,8 @@
706 +static void idetape_get_blocksize_from_block_descriptor(ide_drive_t *drive);
709 * Our character device open function.
711 @@ -5539,7 +5599,8 @@
713 idetape_tape_t *tape;
718 #if IDETAPE_DEBUG_LOG
719 printk(KERN_INFO "ide-tape: Reached idetape_chrdev_open\n");
720 #endif /* IDETAPE_DEBUG_LOG */
721 @@ -5552,11 +5613,7 @@
723 if (test_and_set_bit(IDETAPE_BUSY, &tape->flags))
725 - if (!tape->onstream) {
726 - idetape_read_position(drive);
727 - if (!test_bit(IDETAPE_ADDRESS_VALID, &tape->flags))
728 - (void) idetape_rewind_tape(drive);
730 + if (tape->onstream) {
732 tape->tape_block_size = tape->stage_size = 32768 + 512;
734 @@ -5566,16 +5623,42 @@
736 idetape_onstream_mode_sense_tape_parameter_page(drive, tape->debug_level);
738 - if (idetape_wait_ready(drive, 60 * HZ)) {
739 + retval = idetape_wait_ready(drive, 60 * HZ);
741 clear_bit(IDETAPE_BUSY, &tape->flags);
742 printk(KERN_ERR "ide-tape: %s: drive not ready\n", tape->name);
746 - if (tape->onstream)
747 - idetape_read_position(drive);
749 + idetape_read_position(drive);
750 + if (!test_bit(IDETAPE_ADDRESS_VALID, &tape->flags))
751 + (void)idetape_rewind_tape(drive);
753 if (tape->chrdev_direction != idetape_direction_read)
754 clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags);
756 + /* Read block size and write protect status from drive. */
757 + idetape_get_blocksize_from_block_descriptor(drive);
759 + /* Set write protect flag if device is opened as read-only. */
760 + if ((filp->f_flags & O_ACCMODE) == O_RDONLY)
761 + tape->write_prot = 1;
763 + tape->write_prot = tape->drv_write_prot;
765 + /* Make sure drive isn't write protected if user wants to write. */
766 + if (tape->write_prot) {
767 + if ((filp->f_flags & O_ACCMODE) == O_WRONLY ||
768 + (filp->f_flags & O_ACCMODE) == O_RDWR) {
769 + clear_bit(IDETAPE_BUSY, &tape->flags);
775 + * Lock the tape drive door so user can't eject.
776 + * Analyze headers for OnStream drives.
778 if (tape->chrdev_direction == idetape_direction_none) {
779 if (idetape_create_prevent_cmd(drive, &pc, 1)) {
780 if (!idetape_queue_pc_tail(drive, &pc)) {
781 @@ -5638,7 +5721,7 @@
782 __idetape_kfree_stage(tape->cache_stage);
783 tape->cache_stage = NULL;
786 + if (minor < 128 && test_bit(IDETAPE_MEDIUM_PRESENT, &tape->flags))
787 (void) idetape_rewind_tape(drive);
788 if (tape->chrdev_direction == idetape_direction_none) {
789 if (tape->door_locked == DOOR_LOCKED) {
790 @@ -6059,6 +6142,8 @@
791 header = (idetape_mode_parameter_header_t *) pc.buffer;
792 block_descrp = (idetape_parameter_block_descriptor_t *) (pc.buffer + sizeof(idetape_mode_parameter_header_t));
793 tape->tape_block_size =( block_descrp->length[0]<<16) + (block_descrp->length[1]<<8) + block_descrp->length[2];
794 + tape->drv_write_prot = (header->dsp & 0x80) >> 7;
796 #if IDETAPE_DEBUG_INFO
797 printk(KERN_INFO "ide-tape: Adjusted block size - %d\n", tape->tape_block_size);
798 #endif /* IDETAPE_DEBUG_INFO */
799 @@ -6139,6 +6224,9 @@
802 #endif /* CONFIG_BLK_DEV_IDEPCI */
803 + /* Seagate Travan drives do not support DSC overlap. */
804 + if (strstr(drive->id->model, "Seagate STT3401"))
805 + drive->dsc_overlap = 0;
809 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/pci/cmd640.c linux/drivers/ide/pci/cmd640.c
810 --- linux-2.6.0-test11/drivers/ide/pci/cmd640.c 2003-12-08 00:29:13.000000000 +0100
811 +++ linux/drivers/ide/pci/cmd640.c 2003-12-08 00:33:51.864083168 +0100
812 @@ -213,13 +213,13 @@
814 static void put_cmd640_reg_pci1 (u16 reg, u8 val)
816 - outb_p((reg & 0xfc) | cmd640_key, 0xcf8);
817 + outl_p((reg & 0xfc) | cmd640_key, 0xcf8);
818 outb_p(val, (reg & 3) | 0xcfc);
821 static u8 get_cmd640_reg_pci1 (u16 reg)
823 - outb_p((reg & 0xfc) | cmd640_key, 0xcf8);
824 + outl_p((reg & 0xfc) | cmd640_key, 0xcf8);
825 return inb_p((reg & 3) | 0xcfc);
828 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/pci/pdc202xx_new.c linux/drivers/ide/pci/pdc202xx_new.c
829 --- linux-2.6.0-test11/drivers/ide/pci/pdc202xx_new.c 2003-12-08 00:29:12.000000000 +0100
830 +++ linux/drivers/ide/pci/pdc202xx_new.c 2003-12-08 00:33:52.996910952 +0100
833 #define PDC202_DEBUG_CABLE 0
835 -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS)
836 -#include <linux/stat.h>
837 -#include <linux/proc_fs.h>
839 -static u8 pdcnew_proc = 0;
840 -#define PDC202_MAX_DEVS 5
841 -static struct pci_dev *pdc202_devs[PDC202_MAX_DEVS];
842 -static int n_pdc202_devs;
844 -static char * pdcnew_info(char *buf, struct pci_dev *dev)
848 - p += sprintf(p, "\n ");
849 - switch(dev->device) {
850 - case PCI_DEVICE_ID_PROMISE_20277:
851 - p += sprintf(p, "SBFastTrak 133 Lite"); break;
852 - case PCI_DEVICE_ID_PROMISE_20276:
853 - p += sprintf(p, "MBFastTrak 133 Lite"); break;
854 - case PCI_DEVICE_ID_PROMISE_20275:
855 - p += sprintf(p, "MBUltra133"); break;
856 - case PCI_DEVICE_ID_PROMISE_20271:
857 - p += sprintf(p, "FastTrak TX2000"); break;
858 - case PCI_DEVICE_ID_PROMISE_20270:
859 - p += sprintf(p, "FastTrak LP/TX2/TX4"); break;
860 - case PCI_DEVICE_ID_PROMISE_20269:
861 - p += sprintf(p, "Ultra133 TX2"); break;
862 - case PCI_DEVICE_ID_PROMISE_20268:
863 - p += sprintf(p, "Ultra100 TX2"); break;
865 - p += sprintf(p, "Ultra series"); break;
868 - p += sprintf(p, " Chipset.\n");
872 -static int pdcnew_get_info (char *buffer, char **addr, off_t offset, int count)
877 - for (i = 0; i < n_pdc202_devs; i++) {
878 - struct pci_dev *dev = pdc202_devs[i];
879 - p = pdcnew_info(buffer, dev);
881 - /* p - buffer must be less than 4k! */
882 - len = (p - buffer) - offset;
883 - *addr = buffer + offset;
885 - return len > count ? count : len;
887 -#endif /* defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS) */
888 +struct pdcnew_name {
893 +static struct pdcnew_name __initdata pdcnew_names[] = {
894 + { PCI_DEVICE_ID_PROMISE_20277, "SBFastTrak 133 Lite" },
895 + { PCI_DEVICE_ID_PROMISE_20276, "MBFastTrak 133 Lite" },
896 + { PCI_DEVICE_ID_PROMISE_20275, "MBUltra133", },
897 + { PCI_DEVICE_ID_PROMISE_20271, "FastTrak TX2000", },
898 + { PCI_DEVICE_ID_PROMISE_20270, "FastTrak LP/TX2/TX4", },
899 + { PCI_DEVICE_ID_PROMISE_20269, "Ultra133 TX2" },
900 + { PCI_DEVICE_ID_PROMISE_20268, "Ultra100 TX2" },
903 static u8 pdcnew_ratemask (ide_drive_t *drive)
907 static unsigned int __init init_chipset_pdcnew (struct pci_dev *dev, const char *name)
911 + for (i = 0; i < ARRAY_SIZE(pdcnew_names); i++)
912 + if (pdcnew_names[i].dev_id == dev->device) {
913 + printk(KERN_INFO "%s: %s on pci%s\n", name,
914 + pdcnew_names[i].name, pci_name(dev));
918 if (dev->resource[PCI_ROM_RESOURCE].start) {
919 pci_write_config_dword(dev, PCI_ROM_ADDRESS,
920 dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
922 name, dev->resource[PCI_ROM_RESOURCE].start);
925 -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS)
926 - pdc202_devs[n_pdc202_devs++] = dev;
928 - if (!pdcnew_proc) {
930 - ide_pci_register_host_proc(&pdcnew_procs[0]);
932 -#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */
937 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/pci/pdc202xx_new.h linux/drivers/ide/pci/pdc202xx_new.h
938 --- linux-2.6.0-test11/drivers/ide/pci/pdc202xx_new.h 2003-12-08 00:29:12.000000000 +0100
939 +++ linux/drivers/ide/pci/pdc202xx_new.h 2003-12-08 00:33:52.997910800 +0100
941 #include <linux/pci.h>
942 #include <linux/ide.h>
944 -#define DISPLAY_PDC202XX_TIMINGS
947 #define SPLIT_BYTE(B,H,L) ((H)=(B>>4), (L)=(B-((B>>4)<<4)))
950 set_2regs(0x13,(c)); \
953 -#define DISPLAY_PDC202XX_TIMINGS
955 -#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS)
956 -#include <linux/stat.h>
957 -#include <linux/proc_fs.h>
959 -static u8 pdcnew_proc;
961 -static int pdcnew_get_info(char *, char **, off_t, int);
963 -static ide_pci_host_proc_t pdcnew_procs[] __initdata = {
967 - .get_info = pdcnew_get_info,
971 -#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */
974 static void init_setup_pdcnew(struct pci_dev *, ide_pci_device_t *);
975 static void init_setup_pdc20270(struct pci_dev *, ide_pci_device_t *);
976 static void init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d);
977 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/pci/pdc202xx_old.c linux/drivers/ide/pci/pdc202xx_old.c
978 --- linux-2.6.0-test11/drivers/ide/pci/pdc202xx_old.c 2003-12-08 00:29:12.000000000 +0100
979 +++ linux/drivers/ide/pci/pdc202xx_old.c 2003-12-08 00:33:52.369006408 +0100
980 @@ -361,16 +361,38 @@
981 return ((u8)(CIS & mask));
985 + * Set the control register to use the 66MHz system
986 + * clock for UDMA 3/4/5 mode operation when necessary.
988 + * It may also be possible to leave the 66MHz clock on
989 + * and readjust the timing parameters.
991 +static void pdc_old_enable_66MHz_clock(ide_hwif_t *hwif)
993 + unsigned long clock_reg = hwif->dma_master + 0x11;
994 + u8 clock = hwif->INB(clock_reg);
996 + hwif->OUTB(clock | (hwif->channel ? 0x08 : 0x02), clock_reg);
999 +static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif)
1001 + unsigned long clock_reg = hwif->dma_master + 0x11;
1002 + u8 clock = hwif->INB(clock_reg);
1004 + hwif->OUTB(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg);
1007 static int config_chipset_for_dma (ide_drive_t *drive)
1009 struct hd_driveid *id = drive->id;
1010 ide_hwif_t *hwif = HWIF(drive);
1011 struct pci_dev *dev = hwif->pci_dev;
1013 - u8 mask = hwif->channel ? 0x08 : 0x02;
1014 u8 drive_pci = 0x60 + (drive->dn << 2);
1015 u8 test1 = 0, test2 = 0, speed = -1;
1016 - u8 AP = 0, CLKSPD = 0, cable = 0;
1017 + u8 AP = 0, cable = 0;
1019 u8 ultra_66 = ((id->dma_ultra & 0x0010) ||
1020 (id->dma_ultra & 0x0008)) ? 1 : 0;
1021 @@ -394,21 +416,6 @@
1025 - CLKSPD = hwif->INB(hwif->dma_master + 0x11);
1028 - * Set the control register to use the 66Mhz system
1029 - * clock for UDMA 3/4 mode operation. If one drive on
1030 - * a channel is U66 capable but the other isn't we
1031 - * fall back to U33 mode. The BIOS INT 13 hooks turn
1032 - * the clock on then off for each read/write issued. I don't
1033 - * do that here because it would require modifying the
1034 - * kernel, separating the fop routines from the kernel or
1035 - * somehow hooking the fops calls. It may also be possible to
1036 - * leave the 66Mhz clock on and readjust the timing
1040 if ((ultra_66) && (cable)) {
1042 printk(KERN_DEBUG "ULTRA 66/100/133: %s channel of Ultra 66/100/133 "
1043 @@ -416,29 +423,12 @@
1044 hwif->channel ? "Secondary" : "Primary");
1045 printk(KERN_DEBUG " Switching to Ultra33 mode.\n");
1047 - /* Primary : zero out second bit */
1048 - /* Secondary : zero out fourth bit */
1049 - hwif->OUTB(CLKSPD & ~mask, (hwif->dma_master + 0x11));
1050 printk(KERN_WARNING "Warning: %s channel requires an 80-pin cable for operation.\n", hwif->channel ? "Secondary":"Primary");
1051 printk(KERN_WARNING "%s reduced to Ultra33 mode.\n", drive->name);
1055 - * check to make sure drive on same channel
1058 - if (hwif->drives[!(drive->dn%2)].id) {
1059 - if (hwif->drives[!(drive->dn%2)].id->dma_ultra & 0x0078) {
1060 - hwif->OUTB(CLKSPD | mask, (hwif->dma_master + 0x11));
1062 - hwif->OUTB(CLKSPD & ~mask, (hwif->dma_master + 0x11));
1064 - } else { /* udma4 drive by itself */
1065 - hwif->OUTB(CLKSPD | mask, (hwif->dma_master + 0x11));
1070 + pdc_old_disable_66MHz_clock(drive->hwif);
1072 drive_pci = 0x60 + (drive->dn << 2);
1073 pci_read_config_dword(dev, drive_pci, &drive_conf);
1074 if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
1077 static int pdc202xx_old_ide_dma_begin(ide_drive_t *drive)
1079 + if (drive->current_speed > XFER_UDMA_2)
1080 + pdc_old_enable_66MHz_clock(drive->hwif);
1081 if (drive->addressing == 1) {
1082 struct request *rq = HWGROUP(drive)->rq;
1083 ide_hwif_t *hwif = HWIF(drive);
1085 clock = hwif->INB(high_16 + 0x11);
1086 hwif->OUTB(clock & ~(hwif->channel ? 0x08:0x02), high_16+0x11);
1088 + if (drive->current_speed > XFER_UDMA_2)
1089 + pdc_old_disable_66MHz_clock(drive->hwif);
1090 return __ide_dma_end(drive);
1093 @@ -757,10 +751,7 @@
1095 hwif->speedproc = &pdc202xx_tune_chipset;
1097 - if (!hwif->dma_base) {
1098 - hwif->drives[0].autotune = hwif->drives[1].autotune = 1;
1101 + hwif->drives[0].autotune = hwif->drives[1].autotune = 1;
1103 hwif->ultra_mask = 0x3f;
1104 hwif->mwdma_mask = 0x07;
1105 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/pci/siimage.c linux/drivers/ide/pci/siimage.c
1106 --- linux-2.6.0-test11/drivers/ide/pci/siimage.c 2003-12-08 00:29:13.000000000 +0100
1107 +++ linux/drivers/ide/pci/siimage.c 2003-12-08 00:33:51.712106272 +0100
1110 - * linux/drivers/ide/pci/siimage.c Version 1.06 June 11, 2003
1111 + * linux/drivers/ide/pci/siimage.c Version 1.09 Dec 7, 2003
1113 * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
1114 * Copyright (C) 2003 Red Hat <alan@redhat.com>
1117 case PCI_DEVICE_ID_SII_3112:
1118 case PCI_DEVICE_ID_SII_1210SA:
1119 + case PCI_DEVICE_ID_SII_3114:
1121 case PCI_DEVICE_ID_SII_680:
1124 static void siimage_tuneproc (ide_drive_t *drive, byte mode_wanted)
1126 ide_hwif_t *hwif = HWIF(drive);
1130 unsigned long addr = siimage_seldev(drive, 0x04);
1131 unsigned long tfaddr = siimage_selreg(hwif, 0x02);
1132 @@ -1047,6 +1048,27 @@
1136 +static int is_dev_seagate_sata(ide_drive_t *drive)
1138 + const char *s = &drive->id->model[0];
1141 + if (!drive->present)
1144 + len = strnlen(s, sizeof(drive->id->model));
1146 + if ((len > 4) && (!memcmp(s, "ST", 2))) {
1147 + if ((!memcmp(s + len - 2, "AS", 2)) ||
1148 + (!memcmp(s + len - 3, "ASL", 3))) {
1149 + printk(KERN_INFO "%s: applying pessimistic Seagate "
1150 + "errata fix\n", drive->name);
1158 * init_iops_siimage - set up iops
1159 * @hwif: interface to set up
1160 @@ -1068,7 +1090,7 @@
1161 hwif->hwif_data = 0;
1164 - if (is_sata(hwif))
1165 + if (is_sata(hwif) && is_dev_seagate_sata(&hwif->drives[0]))
1168 if (pci_get_drvdata(dev) == NULL)
1169 @@ -1179,6 +1201,7 @@
1170 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
1171 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
1172 { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
1173 + { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3114, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
1177 diff -uNr -X exclude linux-2.6.0-test11/drivers/ide/pci/siimage.h linux/drivers/ide/pci/siimage.h
1178 --- linux-2.6.0-test11/drivers/ide/pci/siimage.h 2003-12-08 00:29:13.000000000 +0100
1179 +++ linux/drivers/ide/pci/siimage.h 2003-12-08 00:33:51.713106120 +0100
1181 .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
1182 .bootable = ON_BOARD,
1185 + .vendor = PCI_VENDOR_ID_CMD,
1186 + .device = PCI_DEVICE_ID_SII_3114,
1187 + .name = "SiI3114 Serial ATA",
1188 + .init_chipset = init_chipset_siimage,
1189 + .init_iops = init_iops_siimage,
1190 + .init_hwif = init_hwif_siimage,
1192 + .autodma = AUTODMA,
1193 + .bootable = ON_BOARD,
1197 diff -uNr -X exclude linux-2.6.0-test11/include/linux/blkdev.h linux/include/linux/blkdev.h
1198 --- linux-2.6.0-test11/include/linux/blkdev.h 2003-12-08 00:29:13.000000000 +0100
1199 +++ linux/include/linux/blkdev.h 2003-12-08 00:33:51.208182880 +0100
1200 @@ -193,11 +193,6 @@
1201 __REQ_PM_SUSPEND, /* suspend request */
1202 __REQ_PM_RESUME, /* resume request */
1203 __REQ_PM_SHUTDOWN, /* shutdown request */
1204 - __REQ_IDETAPE_PC1, /* packet command (first stage) */
1205 - __REQ_IDETAPE_PC2, /* packet command (second stage) */
1206 - __REQ_IDETAPE_READ,
1207 - __REQ_IDETAPE_WRITE,
1208 - __REQ_IDETAPE_READ_BUFFER,
1209 __REQ_NR_BITS, /* stops here */
1212 @@ -223,11 +218,6 @@
1213 #define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND)
1214 #define REQ_PM_RESUME (1 << __REQ_PM_RESUME)
1215 #define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN)
1216 -#define REQ_IDETAPE_PC1 (1 << __REQ_IDETAPE_PC1)
1217 -#define REQ_IDETAPE_PC2 (1 << __REQ_IDETAPE_PC2)
1218 -#define REQ_IDETAPE_READ (1 << __REQ_IDETAPE_READ)
1219 -#define REQ_IDETAPE_WRITE (1 << __REQ_IDETAPE_WRITE)
1220 -#define REQ_IDETAPE_READ_BUFFER (1 << __REQ_IDETAPE_READ_BUFFER)
1223 * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME
1224 diff -uNr -X exclude linux-2.6.0-test11/include/linux/ide.h linux/include/linux/ide.h
1225 --- linux-2.6.0-test11/include/linux/ide.h 2003-12-08 00:29:12.000000000 +0100
1226 +++ linux/include/linux/ide.h 2003-12-08 00:33:52.836935272 +0100
1228 #ifndef SUPPORT_VLB_SYNC /* 1 to support weird 32-bit chips */
1229 #define SUPPORT_VLB_SYNC 1 /* 0 to reduce kernel size */
1231 -#ifndef DISK_RECOVERY_TIME /* off=0; on=access_delay_time */
1232 -#define DISK_RECOVERY_TIME 0 /* for hardware that needs it */
1234 #ifndef OK_TO_RESET_CONTROLLER /* 1 needed for good error recovery */
1235 #define OK_TO_RESET_CONTROLLER 1 /* 0 for use with AH2372A/B interface */
1237 @@ -999,10 +996,6 @@
1238 unsigned dma_extra; /* extra addr for dma ports */
1239 unsigned long config_data; /* for use by chipset-specific code */
1240 unsigned long select_data; /* for use by chipset-specific code */
1241 -#if (DISK_RECOVERY_TIME > 0)
1242 - unsigned long last_time; /* time when previous rq was done */
1246 unsigned noprobe : 1; /* don't probe for this interface */
1247 unsigned present : 1; /* this interface exists */
1248 diff -uNr -X exclude linux-2.6.0-test11/include/linux/pci_ids.h linux/include/linux/pci_ids.h
1249 --- linux-2.6.0-test11/include/linux/pci_ids.h 2003-12-08 00:29:13.000000000 +0100
1250 +++ linux/include/linux/pci_ids.h 2003-12-08 00:33:51.715105816 +0100
1253 #define PCI_DEVICE_ID_SII_680 0x0680
1254 #define PCI_DEVICE_ID_SII_3112 0x3112
1255 +#define PCI_DEVICE_ID_SII_3114 0x3114
1256 #define PCI_DEVICE_ID_SII_1210SA 0x0240
1258 #define PCI_VENDOR_ID_VISION 0x1098