Changeset 37

Show
Ignore:
Timestamp:
12/05/98 05:23:52 (15 years ago)
Author:
phil
Message:

(Phil) Fixed a couple 2.1.x issues:

- The schedule() and timeout issue (since 2.1.127 I think)

- A syntax error in piix4 (pci func 3 sensing code Frodo wrote)

Location:
lm-sensors/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/busses/i2c-piix4.c

    r35 r37  
    111111    PIIX4_dev = pci_find_device(PCI_VENDOR_ID_INTEL,  
    112112                                PCI_DEVICE_ID_INTEL_82371AB_3, PIIX4_dev); 
    113   while(PIIX4_dev && (PCI_FUNC(PIIX4_dev->devfn) != 3); 
     113  while(PIIX4_dev && (PCI_FUNC(PIIX4_dev->devfn) != 3)); 
    114114  if(PIIX4_dev == NULL) { 
    115115#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */ 
     
    195195{ 
    196196      current->state = TASK_INTERRUPTIBLE; 
    197       current->timeout = jiffies + amount; 
    198       schedule(); 
     197      current->state = TASK_INTERRUPTIBLE; 
     198      schedule_timeout(amount); 
    199199} 
    200200 
  • lm-sensors/trunk/kernel/compat.h

    r34 r37  
    5050#endif 
    5151 
     52/* Add a scheduling fix for the new code in kernel 2.1.127 */ 
     53#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,127)) 
     54#define schedule_timeout(x) ( current->timeout = jiffies + (x), schedule() ) 
     55#endif 
     56 
    5257/* If the new PCI interface is not present, fall back on the old PCI BIOS 
    5358   interface. We also define some things to unite both interfaces. Not 
  • lm-sensors/trunk/kernel/include/compat.h

    r34 r37  
    5050#endif 
    5151 
     52/* Add a scheduling fix for the new code in kernel 2.1.127 */ 
     53#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,127)) 
     54#define schedule_timeout(x) ( current->timeout = jiffies + (x), schedule() ) 
     55#endif 
     56 
    5257/* If the new PCI interface is not present, fall back on the old PCI BIOS 
    5358   interface. We also define some things to unite both interfaces. Not 
  • lm-sensors/trunk/src/compat.h

    r34 r37  
    5050#endif 
    5151 
     52/* Add a scheduling fix for the new code in kernel 2.1.127 */ 
     53#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,127)) 
     54#define schedule_timeout(x) ( current->timeout = jiffies + (x), schedule() ) 
     55#endif 
     56 
    5257/* If the new PCI interface is not present, fall back on the old PCI BIOS 
    5358   interface. We also define some things to unite both interfaces. Not 
  • lm-sensors/trunk/src/piix4.c

    r35 r37  
    111111    PIIX4_dev = pci_find_device(PCI_VENDOR_ID_INTEL,  
    112112                                PCI_DEVICE_ID_INTEL_82371AB_3, PIIX4_dev); 
    113   while(PIIX4_dev && (PCI_FUNC(PIIX4_dev->devfn) != 3); 
     113  while(PIIX4_dev && (PCI_FUNC(PIIX4_dev->devfn) != 3)); 
    114114  if(PIIX4_dev == NULL) { 
    115115#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,54) */ 
     
    195195{ 
    196196      current->state = TASK_INTERRUPTIBLE; 
    197       current->timeout = jiffies + amount; 
    198       schedule(); 
     197      current->state = TASK_INTERRUPTIBLE; 
     198      schedule_timeout(amount); 
    199199} 
    200200