Re: ide_timer_expiry() - shouldn't 'wait' be int?

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

 



On Monday 02 March 2009, Roel Kluin wrote:
> vi drivers/ide/ide-io.c +906 and note:
> 
> void ide_timer_expiry (unsigned long data)
> {
> 	ide_expiry_t *expiry = hwif->expiry;
> 	...
> 	unsigned long   wait = -1;
> 		...
> 		if (expiry) {
> 			...
> 			wait = expiry(drive);
> 			if (wait > 0) { /* continue */
> 
> also note that in include/linux/ide.h:883:
> 
> typedef int (ide_expiry_t)(ide_drive_t *);
> 
> doesn't this mean that expiry returns int, and wait therefore should
> be int as well?

It does... and it seems like it could cause insanely long timeouts for:

* ATA_DMA_ERR error in dma_timer_expiry()

* commands without ->expiry in tc86c001_timer_expiry()
  (TC86C001 IDE controller only)

This is 2.6.29 material, care to make a patch?

Thanks,
Bart
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux