[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/FC-4 kernel-2.6.spec, 1.1391, 1.1392 linux-2.6.12rc-ac-ide-fixes.patch, 1.6, 1.7



Author: davej

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv27589

Modified Files:
	kernel-2.6.spec linux-2.6.12rc-ac-ide-fixes.patch 
Log Message:
Fix up several reports of CD's causing crashes.




Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1391
retrieving revision 1.1392
diff -u -r1.1391 -r1.1392
--- kernel-2.6.spec	11 Jul 2005 22:09:53 -0000	1.1391
+++ kernel-2.6.spec	12 Jul 2005 20:38:37 -0000	1.1392
@@ -1258,6 +1258,9 @@
 %endif
 
 %changelog
+* Tue Jul 12 2005 Dave Jones <davej redhat com>
+- Fix up several reports of CD's causing crashes.
+
 * Mon Jul 11 2005 Dave Jones <davej redhat com>
 - Fix up locking in piix IDE driver whilst tuning chipset.
 

linux-2.6.12rc-ac-ide-fixes.patch:
 2/drivers/ide/ide-cd.c                     |    6 
 2/drivers/ide/ide-io.c                     |   57 ++
 linux-2.6.12/drivers/cdrom/cdrom.c         |    3 
 linux-2.6.12/drivers/ide/Kconfig           |    6 
 linux-2.6.12/drivers/ide/ide-cd.c          |  114 +++-
 linux-2.6.12/drivers/ide/ide-disk.c        |   12 
 linux-2.6.12/drivers/ide/ide-dma.c         |    1 
 linux-2.6.12/drivers/ide/ide-io.c          |    8 
 linux-2.6.12/drivers/ide/ide-iops.c        |   97 +--
 linux-2.6.12/drivers/ide/pci/Makefile      |    1 
 linux-2.6.12/drivers/ide/pci/cs5520.c      |    2 
 linux-2.6.12/drivers/ide/pci/generic.c     |   73 +-
 linux-2.6.12/drivers/ide/pci/hpt366.c      |  472 ++++++++--------
 linux-2.6.12/drivers/ide/pci/it821x.c      |  812 +++++++++++++++++++++++++++++
 linux-2.6.12/drivers/ide/pci/serverworks.c |   10 
 linux-2.6.12/drivers/ide/pci/siimage.c     |    8 
 linux-2.6.12/drivers/ide/pci/trm290.c      |    1 
 linux-2.6.12/drivers/scsi/libata-core.c    |    1 
 linux-2.6.12/include/asm-i386/ide.h        |   14 
 linux-2.6.12/include/linux/ide.h           |    4 
 linux-2.6.12/include/linux/pci_ids.h       |    2 
 21 files changed, 1337 insertions(+), 367 deletions(-)

Index: linux-2.6.12rc-ac-ide-fixes.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/linux-2.6.12rc-ac-ide-fixes.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- linux-2.6.12rc-ac-ide-fixes.patch	23 Jun 2005 01:26:04 -0000	1.6
+++ linux-2.6.12rc-ac-ide-fixes.patch	12 Jul 2005 20:38:37 -0000	1.7
@@ -2544,3 +2544,90 @@
  #define PCI_DEVICE_ID_ITE_8872		0x8872
  #define PCI_DEVICE_ID_ITE_IT8330G_0	0xe886
  
+--- 1/drivers/ide/ide-io.c~	2005-07-12 12:52:08.390768080 +0100
++++ 2/drivers/ide/ide-io.c	2005-07-12 12:52:08.390768080 +0100
+@@ -223,6 +223,63 @@
+ }
+ 
+ /**
++ *	ide_end_dequeued_request	-	complete an IDE I/O
++ *	@drive: IDE device for the I/O
++ *	@uptodate:
++ *	@nr_sectors: number of sectors completed
++ *
++ *	Complete an I/O that is no longer on the request queue. This 
++ *	typically occurs when we pull the request and issue a REQUEST_SENSE.
++ *	We must still finish the old request but we must not tamper with the
++ *	queue in the meantime.
++ *
++ *	NOTE: This path does not handle barrier, but barrier is not supported
++ *	on ide-cd anyway.
++ */
++
++int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq,
++			     int uptodate, int nr_sectors)
++{
++	unsigned long flags;
++	int ret = 1;
++
++	spin_lock_irqsave(&ide_lock, flags);
++
++	BUG_ON(!(rq->flags & REQ_STARTED));
++
++	/*
++	 * if failfast is set on a request, override number of sectors and
++	 * complete the whole request right now
++	 */
++	if (blk_noretry_request(rq) && end_io_error(uptodate))
++		nr_sectors = rq->hard_nr_sectors;
++
++	if (!blk_fs_request(rq) && end_io_error(uptodate) && !rq->errors)
++		rq->errors = -EIO;
++
++	/*
++	 * decide whether to reenable DMA -- 3 is a random magic for now,
++	 * if we DMA timeout more than 3 times, just stay in PIO
++	 */
++	if (drive->state == DMA_PIO_RETRY && drive->retry_pio <= 3) {
++		drive->state = 0;
++		HWGROUP(drive)->hwif->ide_dma_on(drive);
++	}
++
++	if (!end_that_request_first(rq, uptodate, nr_sectors)) {
++		add_disk_randomness(rq->rq_disk);
++		if (blk_rq_tagged(rq))
++			blk_queue_end_tag(drive->queue, rq);
++		end_that_request_last(rq);
++		ret = 0;
++	}
++	spin_unlock_irqrestore(&ide_lock, flags);
++	return ret;
++}
++EXPORT_SYMBOL_GPL(ide_end_dequeued_request);
++
++
++/**
+  *	ide_complete_pm_request - end the current Power Management request
+  *	@drive: target drive
+  *	@rq: request
+--- 1/drivers/ide/ide-cd.c~	2005-07-12 12:52:28.287743280 +0100
++++ 2/drivers/ide/ide-cd.c	2005-07-12 12:53:45.991930448 +0100
+@@ -650,15 +650,15 @@
+ 			/*
+ 			 * now end failed request
+ 			 */
+-			spin_lock_irqsave(&ide_lock, flags);
+ 			if(blk_fs_request(failed)) {
+-				if(__ide_end_request(drive, failed, 0, failed->hard_nr_sectors))
++				if(ide_end_dequeued_request(drive, failed, 0, failed->hard_nr_sectors))
+ 					BUG();
+ 			} else {
++				spin_lock_irqsave(&ide_lock, flags);
+ 				end_that_request_chunk(failed, 0, failed->data_len);
+ 				end_that_request_last(failed);
++				spin_unlock_irqrestore(&ide_lock, flags);
+ 			}
+-			spin_unlock_irqrestore(&ide_lock, flags);
+ 		}
+ 		else
+ 			cdrom_analyze_sense_data(drive, NULL , sense);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]