]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.2.17pre20 2.2.17pre20
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:03 +0000 (15:22 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:03 +0000 (15:22 -0500)
o Fix EIP/ESP printk thinko (Willy Tarreau)
o Final small DAC960 adjustments for 2.2.17 (Leonard Zubkoff)
o Improve AARP handling (Alistair Riddell)
o Fix bug in the appletalk code (Marcelo Tosatti)
o Last minute fix to the CS4281 (Tom Woller)
o Mention CS4280 and use __initdata for data (Alan Cox)
o Turn on the EAPD bit on the AD1885 (Alan Cox)
o Don't honour the status bit for audio on a (Marcus Sundberg)
440MX - it appears it doesnt work
o Fix high cpu usage on i810 audio (Marcus Sundberg)
o Apply the same fix to the cs46xx (Bill Nottingham)
o Change the power/CD algorithm on the 46xx (Alan Cox)

12 files changed:
Documentation/README.DAC960
Makefile
arch/i386/kernel/traps.c
drivers/block/DAC960.c
drivers/block/DAC960.h
drivers/sound/Config.in
drivers/sound/ac97_codec.c
drivers/sound/cs4281.c
drivers/sound/cs46xx.c
drivers/sound/i810_audio.c
net/appletalk/aarp.c
net/appletalk/ddp.c

index 8166455b0f0a5cfcf12c3c79a21ba82fd58b8d1c..88f52364b647b01caafade73db3b7b475cae48e2 100644 (file)
@@ -1,11 +1,11 @@
    Linux Driver for Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers
 
-                       Version 2.2.7 for Linux 2.2.16
-                       Version 2.4.7 for Linux 2.4.0
+                       Version 2.2.8 for Linux 2.2.16
+                       Version 2.4.8 for Linux 2.4.0
 
                              PRODUCTION RELEASE
 
-                                1 August 2000
+                               19 August 2000
 
                               Leonard N. Zubkoff
                               Dandelion Digital
@@ -28,9 +28,9 @@ The latest information on Linux support for DAC960 PCI RAID Controllers, as
 well as the most recent release of this driver, will always be available from
 my Linux Home Page at URL "http://www.dandelion.com/Linux/".  The Linux DAC960
 driver supports all current Mylex PCI RAID controllers including the new
-eXtremeRAID 2000/3000 and AcceleRAID 352/170 models which have an entirely new
-firmware interface from the older eXtremeRAID 1100, AcceleRAID 150/200/250, and
-DAC960PJ/PG/PU/PD/PL.  See below for a complete controller list as well as
+eXtremeRAID 2000/3000 and AcceleRAID 352/170/160 models which have an entirely
+new firmware interface from the older eXtremeRAID 1100, AcceleRAID 150/200/250,
+and DAC960PJ/PG/PU/PD/PL.  See below for a complete controller list as well as
 minimum firmware version requirements.  For simplicity, in most places this
 documentation refers to DAC960 generically rather than explicitly listing all
 the supported models.
@@ -120,6 +120,12 @@ AcceleRAID 170
            100MHz Intel i960RM RISC Processor
            16MB/32MB/64MB ECC SDRAM Memory
 
+AcceleRAID 160
+           1 Wide Ultra-160 LVD SCSI channel
+           100MHz Intel i960RS RISC Processor
+           Built in 16M ECC SDRAM Memory
+           PCI Low Profile Form Factor - fit for 2U height
+
 eXtremeRAID 1100 (DAC1164P)
            3 Wide Ultra-2/LVD SCSI channels
            233MHz StrongARM SA 110 Processor
@@ -164,8 +170,8 @@ DAC960PL    1/2/3 Wide Fast SCSI-2 Channels
            Intel i960 RISC Processor
            2MB/4MB/8MB/16MB/32MB DRAM Memory
 
-For the eXtremeRAID 2000/3000 and AcceleRAID 352/170, firmware version 6.00-01
-or above is required.
+For the eXtremeRAID 2000/3000 and AcceleRAID 352/170/160, firmware version
+6.00-01 or above is required.
 
 For the eXtremeRAID 1100, firmware version 5.06-0-52 or above is required.
 
@@ -203,10 +209,10 @@ To install the DAC960 RAID driver, you may use the following commands,
 replacing "/usr/src" with wherever you keep your Linux kernel source tree:
 
   cd /usr/src
-  tar -xvzf DAC960-2.2.7.tar.gz (or DAC960-2.4.7.tar.gz)
+  tar -xvzf DAC960-2.2.8.tar.gz (or DAC960-2.4.8.tar.gz)
   mv README.DAC960 linux/Documentation
   mv DAC960.[ch] linux/drivers/block
-  patch -p0 < DAC960.patch
+  patch -p0 < DAC960.patch (if DAC960.patch is included)
   cd linux
   make config
   make depend
index 9ab1daa96535207ccb115f6f422b8af070c463f0..6bfec5462e9526d9f152f8b83ae325a27405a4fd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 17
-EXTRAVERSION = pre19
+EXTRAVERSION = pre20
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
index 0bddf4184e45e9a0e55a925dc41694405eaec103..8332102a929df0a2f934489213e05cbfd99a4ae5 100644 (file)
@@ -164,7 +164,7 @@ static void show_registers(struct pt_regs *regs)
                }
                printk("\nCall Trace: ");
                if (!esp || (esp & 3))
-                       printk("Bad EIP value.");
+                       printk("Bad ESP value.");
                else {
                        stack = (unsigned long *) esp;
                        i = 1;
index 67a09c41593573833ccef7ed95fd1812151e7fa8..8af7c024cdeb2df49f8e66531102d8c70170b14c 100644 (file)
@@ -19,8 +19,8 @@
 */
 
 
-#define DAC960_DriverVersion                   "2.2.7"
-#define DAC960_DriverDate                      "1 August 2000"
+#define DAC960_DriverVersion                   "2.2.8"
+#define DAC960_DriverDate                      "19 August 2000"
 
 
 #include <linux/version.h>
@@ -2146,7 +2146,6 @@ static void DAC960_DetectControllers(DAC960_HardwareType_T HardwareType)
       Controller->Bus = Bus;
       Controller->Device = Device;
       Controller->Function = Function;
-      sprintf(Controller->ControllerName, "c%d", Controller->ControllerNumber);
       /*
        Map the Controller Register Window.
       */
@@ -3847,15 +3846,15 @@ static void DAC960_V2_ReportEvent(DAC960_Controller_T *Controller,
       { 0x008D, "M Rebuild Failed for Unknown Reasons" },
       { 0x008E, "M Rebuild Failed due to New Physical Device" },
       { 0x008F, "M Rebuild Failed due to Logical Drive Failure" },
-      { 0x0090, "L Initialization Started" },
-      { 0x0091, "L Initialization Completed" },
-      { 0x0092, "L Initialization Cancelled" },
-      { 0x0093, "L Initialization Failed" },
+      { 0x0090, "M Initialization Started" },
+      { 0x0091, "M Initialization Completed" },
+      { 0x0092, "M Initialization Cancelled" },
+      { 0x0093, "M Initialization Failed" },
       { 0x0094, "L Found" },
       { 0x0095, "L Gone" },
-      { 0x0096, "L Expand Capacity Started" },
-      { 0x0097, "L Expand Capacity Completed" },
-      { 0x0098, "L Expand Capacity Failed" },
+      { 0x0096, "M Expand Capacity Started" },
+      { 0x0097, "M Expand Capacity Completed" },
+      { 0x0098, "M Expand Capacity Failed" },
       { 0x0099, "L Bad Block Found" },
       { 0x009A, "L Size Changed" },
       { 0x009B, "L Type Changed" },
@@ -3890,6 +3889,12 @@ static void DAC960_V2_ReportEvent(DAC960_Controller_T *Controller,
       { 0, "" } };
   int EventListIndex = 0, EventCode;
   unsigned char EventType, *EventMessage;
+  if (Event->EventCode == 0x1C &&
+      RequestSense->SenseKey == DAC960_SenseKey_VendorSpecific &&
+      (RequestSense->AdditionalSenseCode == 0x80 ||
+       RequestSense->AdditionalSenseCode == 0x81))
+    Event->EventCode = ((RequestSense->AdditionalSenseCode - 0x80) << 8) |
+                      RequestSense->AdditionalSenseCodeQualifier;
   while (true)
     {
       EventCode = EventList[EventListIndex].EventCode;
@@ -3953,6 +3958,7 @@ static void DAC960_V2_ReportEvent(DAC960_Controller_T *Controller,
                      RequestSense->CommandSpecificInformation[3]);
       break;
     case 'E':
+      if (Controller->SuppressEnclosureMessages) break;
       sprintf(MessageBuffer, EventMessage, Event->LogicalUnit);
       DAC960_Critical("Enclosure %d %s\n", Controller,
                      Event->TargetID, MessageBuffer);
@@ -4365,7 +4371,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
                                         LogicalDeviceSize);
              else if (NewLogicalDeviceInfo->BackgroundInitializationInProgress)
                DAC960_V2_ReportProgress(Controller,
-                                        "BackgroundInitialization",
+                                        "Background Initialization",
                                         LogicalDeviceNumber,
                                         NewLogicalDeviceInfo
                                         ->BackgroundInitializationBlockNumber,
@@ -4996,6 +5002,7 @@ static int DAC960_IOCTL(Inode_T *Inode, File_T *File,
   DiskGeometry_T Geometry, *UserGeometry;
   DAC960_Controller_T *Controller;
   int PartitionNumber;
+  if (File == NULL) return -EINVAL;
   if (File->f_flags & O_NONBLOCK)
     return DAC960_UserIOCTL(Inode, File, Request, Argument);
   if (ControllerNumber < 0 || ControllerNumber > DAC960_ControllerCount - 1)
@@ -5189,6 +5196,7 @@ static int DAC960_UserIOCTL(Inode_T *Inode, File_T *File,
            ErrorCode =
              copy_from_user(&DCDB, UserCommand.DCDB, sizeof(DAC960_V1_DCDB_T));
            if (ErrorCode != 0) goto Failure1;
+           if (DCDB.Channel >= DAC960_V1_MaxChannels) return -EINVAL;
            if (!((DataTransferLength == 0 &&
                   DCDB.Direction
                   == DAC960_V1_DCDB_NoDataTransfer) ||
@@ -5517,6 +5525,7 @@ int DAC960_KernelIOCTL(unsigned int Request, void *Argument)
        if (CommandOpcode == DAC960_V1_DCDB)
          {
            DCDB = KernelCommand->DCDB;
+           if (DCDB->Channel >= DAC960_V1_MaxChannels) return -EINVAL;
            if (!((DataTransferLength == 0 &&
                   DCDB->Direction == DAC960_V1_DCDB_NoDataTransfer) ||
                  (DataTransferLength > 0 &&
@@ -6329,6 +6338,8 @@ static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
                           == DAC960_V2_NormalCompletion
                           ? "Cancelled" : "Not Cancelled"));
     }
+  else if (strcmp(UserCommand, "suppress-enclosure-messages") == 0)
+    Controller->SuppressEnclosureMessages = true;
   else DAC960_UserCritical("Illegal User Command: '%s'\n",
                           Controller, UserCommand);
   DAC960_AcquireControllerLock(Controller, &ProcessorFlags);
@@ -6513,6 +6524,7 @@ static void DAC960_CreateProcEntries(void)
       PROC_DirectoryEntry_T *ControllerProcEntry, *InitialStatusProcEntry;
       PROC_DirectoryEntry_T *CurrentStatusProcEntry, *UserCommandProcEntry;
       if (Controller == NULL) continue;
+      sprintf(Controller->ControllerName, "c%d", Controller->ControllerNumber);
       ControllerProcEntry = &Controller->ControllerProcEntry;
       ControllerProcEntry->name = Controller->ControllerName;
       ControllerProcEntry->namelen = strlen(ControllerProcEntry->name);
index fb2b47901d5620a40307bb073e967e8515494e93..60300bb78548761b7c1bead16f35f75d9c0e0e3e 100644 (file)
@@ -1910,26 +1910,6 @@ DAC960_V2_GetHealthStatus_T;
 extern int DAC960_KernelIOCTL(unsigned int Request, void *Argument);
 
 
-/*
-  Virtual_to_Bus maps from Kernel Virtual Addresses to PCI Bus Addresses.
-*/
-
-static inline DAC960_BusAddress32_T Virtual_to_Bus(void *VirtualAddress)
-{
-  return (DAC960_BusAddress32_T) virt_to_bus(VirtualAddress);
-}
-
-
-/*
-  Bus_to_Virtual maps from PCI Bus Addresses to Kernel Virtual Addresses.
-*/
-
-static inline void *Bus_to_Virtual(DAC960_BusAddress32_T BusAddress)
-{
-  return (void *) bus_to_virt(BusAddress);
-}
-
-
 /*
   DAC960_DriverVersion protects the private portion of this file.
 */
@@ -2315,6 +2295,7 @@ typedef struct DAC960_Controller
   boolean EphemeralProgressMessage;
   boolean DriveSpinUpMessageDisplayed;
   boolean MonitoringAlertMode;
+  boolean SuppressEnclosureMessages;
   Timer_T MonitoringTimer;
   GenericDiskInfo_T GenericDiskInfo;
   DAC960_Command_T *FreeCommands;
@@ -2522,6 +2503,26 @@ void DAC960_ReleaseControllerLockIH(DAC960_Controller_T *Controller,
 }
 
 
+/*
+  Virtual_to_Bus maps from Kernel Virtual Addresses to PCI Bus Addresses.
+*/
+
+static inline DAC960_BusAddress32_T Virtual_to_Bus(void *VirtualAddress)
+{
+  return (DAC960_BusAddress32_T) virt_to_bus(VirtualAddress);
+}
+
+
+/*
+  Bus_to_Virtual maps from PCI Bus Addresses to Kernel Virtual Addresses.
+*/
+
+static inline void *Bus_to_Virtual(DAC960_BusAddress32_T BusAddress)
+{
+  return (void *) bus_to_virt(BusAddress);
+}
+
+
 /*
   Define the DAC960 BA Series Controller Interface Register Offsets.
 */
index cfd077bcb4d3dcaef7756d2b561bbe106a724b12..6c925fbfb11e66a351ca15b6b68ea411cb7fabb3 100644 (file)
@@ -18,7 +18,7 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
 fi
 
 dep_tristate 'Crystal CS4281' CONFIG_SOUND_CS4281 $CONFIG_SOUND
-dep_tristate 'Crystal SoundFusion (CS461x)' CONFIG_SOUND_FUSION $CONFIG_SOUND
+dep_tristate 'Crystal SoundFusion (CS4280/461x)' CONFIG_SOUND_FUSION $CONFIG_SOUND
 dep_tristate 'Creative SBLive! (EMU10K1)' CONFIG_SOUND_EMU10K1 $CONFIG_SOUND
 dep_tristate 'Ensoniq AudioPCI (ES1370)' CONFIG_SOUND_ES1370 $CONFIG_SOUND
 if [ "$CONFIG_SOUND_ES1370" = "y" ]; then
index b178afa20ee8fe32dd44e296e15ba79d944206af..9cf444b0825afb52115996e0f4fce9fd2bf08988 100644 (file)
@@ -48,6 +48,7 @@ static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned
 static int ac97_init_mixer(struct ac97_codec *codec);
 
 static int sigmatel_init(struct ac97_codec *codec);
+static int enable_eapd(struct ac97_codec *codec);
 
 #define arraysize(x)   (sizeof(x)/sizeof((x)[0]))
 
@@ -58,6 +59,7 @@ static struct {
 } ac97_codec_ids[] = {
        {0x414B4D00, "Asahi Kasei AK4540"     , NULL},
        {0x41445340, "Analog Devices AD1881"  , NULL},
+       {0x41445360, "Analog Devices AD1885"  , enable_eapd},
        {0x43525900, "Cirrus Logic CS4297"    , NULL},
        {0x43525903, "Cirrus Logic CS4297"  ,   NULL},
        {0x43525913, "Cirrus Logic CS4297A"   , NULL},
@@ -637,5 +639,16 @@ static int sigmatel_init(struct ac97_codec * codec)
        return 1;
 }
 
+/*
+ *     Bring up an AD1885
+ */
+static int enable_eapd(struct ac97_codec * codec)
+{
+       codec->codec_write(codec, AC97_POWER_CONTROL,
+               codec->codec_read(codec, AC97_POWER_CONTROL)|0x8000);
+}
+       
+
 EXPORT_SYMBOL(ac97_read_proc);
 EXPORT_SYMBOL(ac97_probe_codec);
index 603e5391aadaee978a8b6ee6e81a42ce0491eff2..f5bd0468005baa9f1804826973d2b4da1ae0fb99 100644 (file)
@@ -2361,8 +2361,8 @@ int __init cs4281_probe(void)
                 temp1 = readl(s->pBA0+ BA0_PCICFG00);
                 temp2 = readl(s->pBA0+ BA0_PCICFG04);
                 temp1 = cs4281_hw_init(s);
-                if(!temp1){
-                        printk(KERN_INFO "cs4281: Init4281() failed. Skipping part.\n");
+                if(temp1){
+                        printk(KERN_INFO "cs4281: Hardware setup failed. Skipping part.\n");
                         continue;
                 }      
                 s->magic = CS4281_MAGIC;
index 77c4aa9590ac995fe71ed46558801b9e393db8c4..8a56f305187f86b96b980643916fd4c8bcead0c3 100644 (file)
@@ -834,8 +834,9 @@ static void cs_update_ptr(struct cs_state *state)
                                        memset (dmabuf->rawbuf + swptr, silence, clear_cnt);
                                        dmabuf->endcleared = 1;
                                }
-                       }                       
-                       wake_up(&dmabuf->wait);
+                       }
+                       if (dmabuf->count < (signed)dmabuf->dmasize/2)
+                               wake_up(&dmabuf->wait);
                }
        }
        /* error handling and process wake up for DAC */
@@ -854,7 +855,8 @@ static void cs_update_ptr(struct cs_state *state)
                                __stop_dac(state);
                                dmabuf->error++;
                        }
-                       wake_up(&dmabuf->wait);
+                       if (dmabuf->count < (signed)dmabuf->dmasize/2)
+                               wake_up(&dmabuf->wait);
                }
        }
 }
@@ -1485,7 +1487,9 @@ static void amp_none(struct cs_card *card, int change)
  
 static void amp_voyetra(struct cs_card *card, int change)
 {
-       /* Manage the EAPD bit on the Crystal 4297 */
+       /* Manage the EAPD bit on the Crystal 4297 
+          and the Analog AD1885 */
+          
        int old=card->amplifier;
        
        card->amplifier+=change;
@@ -2536,13 +2540,14 @@ struct cs_card_type
        void (*active)(struct cs_card *, int);
 };
 
-static struct cs_card_type __init cards[]={
+static struct cs_card_type __initdata cards[]={
        {0x1489, 0x7001, "Genius Soundmaker 128 value", amp_none, NULL},
        {0x5053, 0x3357, "Voyetra", amp_voyetra, NULL},
        /* Not sure if the 570 needs the clkrun hack */
        {PCI_VENDOR_ID_IBM, 0x0132, "Thinkpad 570", amp_none, clkrun_hack},
        {PCI_VENDOR_ID_IBM, 0x0153, "Thinkpad 600X/A20/T20", amp_none, clkrun_hack},
        {PCI_VENDOR_ID_IBM, 0x1010, "Thinkpad 600E (unsupported)", NULL, NULL},
+       {0, 0, "Card without SSID set", NULL, NULL },
        {0, 0, NULL, NULL}
 };
 
index c7a983485a730da92c4b5a3b62f9aea9587e046a..71f9a617cf582c0868fb6f47284a85e3edd4db1f 100644 (file)
@@ -364,7 +364,7 @@ static void i810_free_pcm_channel(struct i810_card *card, int channel)
 static unsigned int i810_set_dac_rate(struct i810_state * state, unsigned int rate)
 {      
        struct dmabuf *dmabuf = &state->dmabuf;
-       u32 dacp, rp;
+       u32 dacp;
        struct ac97_codec *codec=state->card->ac97_codec[0];
        
        if(!(state->card->ac97_features&0x0001))
@@ -389,20 +389,20 @@ static unsigned int i810_set_dac_rate(struct i810_state * state, unsigned int ra
           
        if(rate < 8000)
                rate = 8000;
+                               
+       if(rate != i810_ac97_get(codec, AC97_PCM_FRONT_DAC_RATE))
+       {
                
-       /* Power down the DAC */
-       dacp=i810_ac97_get(codec, AC97_POWER_CONTROL);
-       i810_ac97_set(codec, AC97_POWER_CONTROL, dacp|0x0200);
-       
-       /* Load the rate and read the effective rate */
-       i810_ac97_set(codec, AC97_PCM_FRONT_DAC_RATE, rate);
-       rp=i810_ac97_get(codec, AC97_PCM_FRONT_DAC_RATE);
-       
-       rate=(rp*48000) / clocking;
-       
-       /* Power it back up */
-       i810_ac97_set(codec, AC97_POWER_CONTROL, dacp);
-       
+               /* Power down the DAC */
+               dacp=i810_ac97_get(codec, AC97_POWER_CONTROL);
+               i810_ac97_set(codec, AC97_POWER_CONTROL, dacp|0x0200);
+               /* Load the rate and read the effective rate */
+               i810_ac97_set(codec, AC97_PCM_FRONT_DAC_RATE, rate);
+               rate=i810_ac97_get(codec, AC97_PCM_FRONT_DAC_RATE);
+               /* Power it back up */
+               i810_ac97_set(codec, AC97_POWER_CONTROL, dacp);
+       }
+       rate=(rate*48000) / clocking;
        dmabuf->rate = rate;
 #ifdef DEBUG
        printk("i810_audio: called i810_set_dac_rate : rate = %d\n", rate);
@@ -415,7 +415,7 @@ static unsigned int i810_set_dac_rate(struct i810_state * state, unsigned int ra
 static unsigned int i810_set_adc_rate(struct i810_state * state, unsigned int rate)
 {
        struct dmabuf *dmabuf = &state->dmabuf;
-       u32 dacp, rp;
+       u32 dacp;
        struct ac97_codec *codec=state->card->ac97_codec[0];
        
        if(!(state->card->ac97_features&0x0001))
@@ -441,27 +441,22 @@ static unsigned int i810_set_adc_rate(struct i810_state * state, unsigned int ra
        if(rate < 8000)
                rate = 8000;
 
-       /* Power down the ADC */
-       dacp=i810_ac97_get(codec, AC97_POWER_CONTROL);
-       i810_ac97_set(codec, AC97_POWER_CONTROL, dacp|0x0100);
-       
-       /* Load the rate and read the effective rate */
-       i810_ac97_set(codec, AC97_PCM_LR_DAC_RATE, rate);
-       rp=i810_ac97_get(codec, AC97_PCM_LR_DAC_RATE);
-       
-//     printk("ADC rate set to %d Returned %d\n", 
-//             rate, (int)rp);
-               
-       rate = (rp * 48000) / clocking;
-               
-       /* Power it back up */
-       i810_ac97_set(codec, AC97_POWER_CONTROL, dacp);
-       
+       if(rate != i810_ac97_get(codec, AC97_PCM_LR_DAC_RATE))
+       {
+               /* Power down the ADC */
+               dacp=i810_ac97_get(codec, AC97_POWER_CONTROL);
+               i810_ac97_set(codec, AC97_POWER_CONTROL, dacp|0x0100);  
+               /* Load the rate and read the effective rate */
+               i810_ac97_set(codec, AC97_PCM_LR_DAC_RATE, rate);
+               rate=i810_ac97_get(codec, AC97_PCM_LR_DAC_RATE);
+               /* Power it back up */
+               i810_ac97_set(codec, AC97_POWER_CONTROL, dacp);
+       }
+       rate = (rate * 48000) / clocking;
        dmabuf->rate = rate;
 #ifdef DEBUG
        printk("i810_audio: called i810_set_adc_rate : rate = %d\n", rate);
 #endif
-
        return rate;
 
 }
@@ -836,8 +831,10 @@ static void i810_update_ptr(struct i810_state *state)
                                        memset (dmabuf->rawbuf + swptr, silence, clear_cnt);
                                        dmabuf->endcleared = 1;
                                }
-                       }                       
-                       wake_up(&dmabuf->wait);
+                       }
+                       if (dmabuf->count < (signed)dmabuf->dmasize/2) {
+                               wake_up(&dmabuf->wait);
+                       }
                }
        }
        /* error handling and process wake up for DAC */
@@ -857,7 +854,9 @@ static void i810_update_ptr(struct i810_state *state)
 //                             printk("DMA overrun on send\n");
                                dmabuf->error++;
                        }
-                       wake_up(&dmabuf->wait);
+                       if (dmabuf->count < (signed)dmabuf->dmasize/2) {
+                               wake_up(&dmabuf->wait);
+                       }
                }
        }
 }
@@ -1592,12 +1591,14 @@ static u16 i810_ac97_get(struct ac97_codec *dev, u8 reg)
        struct i810_card *card = dev->private_data;
        int count = 1000;
 
-       while(count-- && (inl(card->iobase + GLOB_STA) & 0x0100))
-               udelay(10);
-       if(!count)
-               printk("i810_audio: AC97 access failed.\n");
-       count=1000;
-       while(count-- && (inb(card->iobase + CAS) & 1)) 
+       if (card->pci_id != INTEL440MX) {
+               while(--count && (inl(card->iobase + GLOB_STA) & 0x0100))
+                       udelay(10);
+               if(!count)
+                       printk("i810_audio: AC97 access failed.\n");
+               count=1000;
+       }
+       while(--count && (inb(card->iobase + CAS) & 1)) 
                udelay(10);
        if(!count)
                printk("i810_audio: AC97 access failed.\n");
@@ -1609,13 +1610,15 @@ static void i810_ac97_set(struct ac97_codec *dev, u8 reg, u16 data)
        struct i810_card *card = dev->private_data;
        int count = 1000;
 
-       while(count-- && (inl(card->iobase + GLOB_STA) & 0x0100))
-               udelay(10);
-       if(!count)
-               printk("i810_audio: AC97 write access failed.\n");
+       if (card->pci_id != INTEL440MX) {
+               while(--count && (inl(card->iobase + GLOB_STA) & 0x0100))
+                       udelay(10);
+               if(!count)
+                       printk("i810_audio: AC97 write access failed.\n");
 
-       count=1000;
-       while(count-- && (inb(card->iobase + CAS) & 1)) 
+               count=1000;
+       }
+       while(--count && (inb(card->iobase + CAS) & 1)) 
                udelay(10);
        if(!count)
                printk("i810_audio: AC97 write access failed.\n");
@@ -1692,12 +1695,12 @@ static int __init i810_ac97_init(struct i810_card *card)
                printk(KERN_ERR "i810_audio: AC'97 reset failed.\n");
                return 0;
        }
-       
+
        current->state = TASK_UNINTERRUPTIBLE;
        schedule_timeout(HZ/5);
                
        inw(card->ac97base);
-
+       
        for (num_ac97 = 0; num_ac97 < NR_AC97; num_ac97++) {
                if ((codec = kmalloc(sizeof(struct ac97_codec), GFP_KERNEL)) == NULL)
                        return -ENOMEM;
@@ -1714,6 +1717,9 @@ static int __init i810_ac97_init(struct i810_card *card)
                if (ac97_probe_codec(codec) == 0)
                        break;
 
+               /* Now check the codec for useful features to make up for 
+                  the dumbness of the 810 hardware engine */
+
                eid = i810_ac97_get(codec, AC97_EXTENDED_ID);
                
                if(eid==0xFFFFFF)
@@ -1746,9 +1752,6 @@ static int __init i810_ac97_init(struct i810_card *card)
                        break;
                }
 
-               /* Now check the codec for useful features to make up for 
-                  the dumbness of the 810 hardware engine */
-                  
                card->ac97_codec[num_ac97] = codec;
 
                /* if there is no secondary codec at all, don't probe any more */
index 9bc1d801c2402268099ba323569db148253c75a1..e965134cced0486695b09db90d52c0f820874b71 100644 (file)
@@ -25,6 +25,8 @@
  *             Jaume Grau      -       flush caches on AARP_PROBE
  *             Rob Newberry    -       Added proxy AARP and AARP proc fs, 
  *                                     moved probing from DDP module.
+ *             Alistair Riddell-       on AARP_PROBE flush sooner - 
+ *                                     ali@gwc.org.uk 000820
  *
  */
 
@@ -1008,7 +1010,10 @@ static int aarp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type
                                   getting into a probe/flush/learn/probe/flush/learn
                                   cycle during probing of a slow to respond host addr */
                                if(a!=NULL)
+                               {
                                        a->expires_at=jiffies-1;
+                                       mod_timer(&aarp_timer, jiffies + sysctl_aarp_tick_time);
+                               }
                        }
                        if(sa.s_node!=ma->s_node)
                                break;
index 59940e7f6feaabdac606f38e63db07150005479f..e83bbeb5851088a8fae34d148a7a80d2ffeada45 100644 (file)
@@ -37,6 +37,8 @@
  *                                              port assignment. we lose a 
  *                                              valid localtalk port as a 
  *                                              result.
+ *              Arnaldo Melo           :       fix minor skb handling bug
+ *                                             in atalk_rcv
  *              
  *
  *             This program is free software; you can redistribute it and/or
@@ -1638,7 +1640,9 @@ static int atalk_rcv(struct sk_buff *skb, struct device *dev, struct packet_type
                {
                        /* 22 bytes - 12 ether, 2 len, 3 802.2 5 snap */
                        struct sk_buff *nskb = skb_realloc_headroom(skb, 32);
-                       kfree(skb);
+                       kfree_skb(skb);
+                       if (!nskb)
+                               return 0;
                        skb=nskb;
                }
                else