]> git.neil.brown.name Git - history.git/commitdiff
Import 2.0.29 2.0.29
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:24 +0000 (15:11 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:24 +0000 (15:11 -0500)
15 files changed:
MAINTAINERS
Makefile
arch/alpha/kernel/bios32.c
arch/alpha/kernel/traps.c
arch/i386/kernel/irq.c
drivers/block/ide-cd.c
drivers/pci/pci.c
drivers/scsi/AM53C974.c
drivers/scsi/scsi_ioctl.c
fs/nfs/bio.c
fs/nfs/rpcsock.c
include/linux/pci.h
include/scsi/scsi.h
net/ipv4/arp.c
net/ipv4/ip_input.c

index 889c8d60deed6ff02a427198ca3342f918748eb1..bfcc8a2450887cd9959047c51290337d5da1f7ac 100644 (file)
@@ -195,6 +195,12 @@ M: mlord@pobox.com
 L:     linux-kernel@vger.rutgers.edu
 S:     Maintained
 
+IDE/ATAPI CDROM DRIVER 
+P:     Erik Andersen
+M:     andersee@debian.org
+L:     linux-kernel@vger.rutgers.edu
+S:     Maintained
+
 ISDN SUBSYSTEM
 P:     Fritz Elfert
 M:     fritz@wuemaus.franken.de
index 2bfc5a75ad66b2dda51973c07ae19a8651ca1312..84c6b95b7aebdcd8c288ea9c3aaead9cacea24b0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 0
-SUBLEVEL = 28
+SUBLEVEL = 29
 
 ARCH = i386
 
index 556db022350bfd6b07fc8738947461fbea2a71b4..2220552e0c7dabfe53d3728e2522901452057ae6 100644 (file)
@@ -24,6 +24,7 @@
  * within the United States, $35 abroad.
  */
 #include <linux/config.h>
+#include <linux/kernel.h>
 
 #if 0
 # define DBG_DEVS(args)                printk args
@@ -48,7 +49,6 @@ asmlinkage int sys_pciconfig_write()
 
 #else /* CONFIG_PCI */
 
-#include <linux/kernel.h>
 #include <linux/bios32.h>
 #include <linux/pci.h>
 #include <linux/malloc.h>
index 24145c4af0af57547b62c9324d506baf4ce6c05d..2c54f580254e0d73d72c2ff584e0988d6eeda97a 100644 (file)
@@ -236,13 +236,13 @@ static inline unsigned long s_mem_to_reg (unsigned long s_mem)
        exp = (exp_msb << 10) | exp_low;        /* common case */
        if (exp_msb) {
                if (exp_low == 0x7f) {
-                       exp = 0x3ff;
+                       exp = 0x7ff;
                }
        } else {
                if (exp_low == 0x00) {
                        exp = 0x000;
                } else {
-                       exp |= (0x7 << 8);
+                       exp |= (0x7 << 7);
                }
        }
        return (sign << 63) | (exp << 52) | (frac << 29);
index 7fa61649b00e1c5456ea79f3e57b4958987231d8..ac7a078897be553c38be21e74bbb006b5c9706c4 100644 (file)
@@ -285,7 +285,7 @@ int get_smp_prof_list(char *buf) {
                for (j=0;j<smp_num_cpus;j++)
                        len+=sprintf(buf+len, "%10d ",
                                int_count[cpu_logical_map[j]][i]);
-               len += sprintf(buf+len, "%c %s\n",
+               len += sprintf(buf+len, "%c %s",
                        (action->flags & SA_INTERRUPT) ? '+' : ' ',
                        action->name);
                for (action=action->next; action; action = action->next) {
@@ -293,6 +293,7 @@ int get_smp_prof_list(char *buf) {
                                (action->flags & SA_INTERRUPT) ? " +" : "",
                                action->name);
                }
+               len += sprintf(buf+len, "\n");
        }
        len+=sprintf(buf+len, "LCK: %10lu",
                sum_spins);
index 679a690c11d55c25f5ae30f85964ae8639f51918..7269c724b4414c404222df78dde624cba6e87b1b 100644 (file)
@@ -1,5 +1,14 @@
+/* #define VERBOSE_IDE_CD_ERRORS 1 */
 /*
  * linux/drivers/block/ide-cd.c
+ * ATAPI cd-rom driver.  To be used with ide.c.
+ * See Documentation/cdrom/ide-cd for usage information.
+ *
+ * Copyright (C) 1994, 1995, 1996  scott snyder  <snyder@fnald0.fnal.gov>
+ * Copyright (C) 1996, 1997  Erik Andersen <andersee@debian.org>
+ *
+ * May be copied or modified under the terms of the GNU General Public License
+ * see linux/COPYING for more information.
  *
  * 1.00  Oct 31, 1994 -- Initial version.
  * 1.01  Nov  2, 1994 -- Fixed problem with starting request in
  * 3.17  Sep 17, 1996 -- Tweak audio reads for some drives.
  *                       Start changing CDROMLOADFROMSLOT to CDROM_SELECT_DISC.
  *
+ * 3.19  Nov 5, 1996  -- New ide-cd maintainer:
+ *                                 Erik B. Andersen <andersee@debian.org>
+ * 3.20  Jan 13,1997  -- Bug Fixes:
+ *                        Fix errors on CDROMSTOP (If you have a "Dolphin",
+ *                          you must define IHAVEADOLPHIN)
+ *                        Added identifier so new Sanyo CD-changer works
+ *                        Better detection if door locking isn't supported 
+ *                         
  * NOTE: Direct audio reads will only work on some types of drive.
  * So far, i've received reports of success for Sony and Toshiba drives.
  *
- * ATAPI cd-rom driver.  To be used with ide.c.
- * See Documentation/cdrom/ide-cd for usage information.
+ * ALSO NOTE:
+ *
+ *  The ide cdrom driver has undergone extensive changes for the
+ *       latest development kernel.  If you wish to add new features to
+ *       this driver, make your changes to the latest version in the
+ *       development kernel.  Only Bug fixes will be accepted for this
+ *       version.
+ *
+ *       For those wishing to work on this driver, please be sure you download
+ *       and comply with the latest ATAPI standard.  This document can be
+ *       obtained by anonymous ftp from fission.dt.wdc.com in directory:
+ *       /pub/standards/atapi/spec/SFF8020-r2.6/PDF/8020r26.pdf
  *
- * Copyright (C) 1994, 1995, 1996  scott snyder  <snyder@fnald0.fnal.gov>
- * May be copied or modified under the terms of the GNU General Public License
- * (../../COPYING).
  */
 
 
@@ -1555,7 +1579,7 @@ cdrom_lockdoor (ide_drive_t *drive, int lockflag,
                /* If we got an illegal field error, the drive
                   probably cannot lock the door. */
                if (reqbuf->sense_key == ILLEGAL_REQUEST &&
-                   reqbuf->asc == 0x24) {
+                   (reqbuf->asc == 0x24 || reqbuf->asc == 0x20)) {
                        printk ("%s: door locking not supported\n",
                                drive->name);
                        CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
@@ -2065,13 +2089,18 @@ int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
                return cdrom_startstop (drive, 1, NULL);
 
        case CDROMSTOP: {
+#ifdef IHAVEADOLPHIN
+               /*  Certain Drives require this.  Most don't
+                   and will produce errors upon CDROMSTOP
+                   pit says the Dolphin needs this.  If you
+                   own a dolphin, just define IHAVEADOLPHIN somewhere */
                int stat;
-
                stat = cdrom_startstop (drive, 0, NULL);
                if (stat) return stat;
-               /* pit says the Dolphin needs this. */
                return cdrom_eject (drive, 1, NULL);
-      }
+#endif /* end of IHAVEADOLPHIN  */
+               return cdrom_startstop (drive, 0, NULL);
+       }
 
        case CDROMPLAYMSF: {
                struct cdrom_msf msf;
@@ -2694,14 +2723,15 @@ void ide_cdrom_setup (ide_drive_t *drive)
                        CDROM_CONFIG_FLAGS (drive)->subchan_as_bcd = 1;
                }
 
-               /* Sanyo 3 CD changer uses a non-standard command 
-                   for CD changing */
-                else if ((strcmp(drive->id->model, "CD-ROM CDR-C3 G") == 0) ||
-                         (strcmp(drive->id->model, "CD-ROM CDR-C3G") == 0)) {
-                       /* uses CD in slot 0 when value is set to 3 */
-                       CDROM_STATE_FLAGS (drive)->sanyo_slot = 3;
-               }
-
+                /* Sanyo 3 CD changer uses a non-standard command
+                    for CD changing */
+                 else if ((strcmp(drive->id->model, "CD-ROM CDR-C3 G") == 0) ||
+                         (strcmp(drive->id->model, "CD-ROM CDR-C3G") == 0) ||
+                         (strcmp(drive->id->model, "CD-ROM CDR_C36") == 0)) {
+                        /* uses CD in slot 0 when value is set to 3 */
+                        CDROM_STATE_FLAGS (drive)->sanyo_slot = 3;
+                }
+                
        }
 #endif /* not STANDARD_ATAPI */
 
index d708da7f0722dcdb1b8c29bb408fcfeea0f1e04d..ceebda47d7a93539eb69b8bb7917b2c026617d50 100644 (file)
@@ -91,6 +91,7 @@ struct pci_dev_info dev_info[] = {
        DEVICE( MATROX,         MATROX_MGA_IMP, "MGA Impression"),
        DEVICE( CT,             CT_65545,       "65545"),
        DEVICE( CT,             CT_65548,       "65548"),
+       DEVICE( CT,             CT_65550,       "65550"),
        DEVICE( MIRO,           MIRO_36050,     "ZR36050"),
        DEVICE( FD,             FD_36C70,       "TMC-18C30"),
        DEVICE( SI,             SI_6201,        "6201"),
index 5a7839d9d6abb50995877984139a36d4ce6bd040..09d944e01967f2b4d0746027304ecba6cfafaa88 100644 (file)
@@ -158,6 +158,11 @@ static volatile int main_running = 0;
 static int commandline_current = 0;
 override_t overrides[7] = { {-1, 0, 0, 0}, };   /* LILO overrides */
 
+struct proc_dir_entry proc_scsi_am53c974 = {
+       PROC_SCSI_AM53C974, 8, "am53c974",
+       S_IFDIR | S_IRUGO | S_IXUGO, 2
+};
+
 #ifdef AM53C974_DEBUG
 static int deb_stop = 1;
 
@@ -566,6 +571,8 @@ int AM53C974_detect(Scsi_Host_Template *tpnt)
 {
 int count;        /* number of boards detected */
 
+tpnt->proc_dir = &proc_scsi_am53c974;
+
 #if defined (CONFIG_PCI)
 if (pcibios_present())
    count = AM53C974_bios_detect(tpnt);
@@ -598,7 +605,7 @@ struct AM53C974_hostdata *hostdata;
 
 #ifdef AM53C974_OPTION_DEBUG_PROBE_ONLY
    printk ("AM53C974: probe only enabled, aborting initialization\n");
-   return -1;
+   return 0;
 #endif
 
 instance = scsi_register(tpnt, sizeof(struct AM53C974_hostdata));
@@ -661,7 +668,7 @@ if (!search) {
    if (request_irq(instance->irq, AM53C974_intr, SA_INTERRUPT, "AM53C974", NULL)) {
       printk("scsi%d: IRQ%d not free, detaching\n", instance->host_no, instance->irq);
       scsi_unregister(instance);
-      return -1; } 
+      return 0; } 
    }
   else {
    printk("scsi%d: using interrupt handler previously installed for scsi%d\n",
@@ -679,8 +686,7 @@ AM53C974_write_8(CNTLREG1, CNTLREG1_DISR | instance->this_id);
 AM53C974_write_8(CMDREG, CMDREG_RBUS);     /* reset SCSI bus */
 udelay(10);
 AM53C974_config_after_reset(instance);
-
-return(0);
+return(1);
 }
 
 /*********************************************************************
@@ -2007,7 +2013,7 @@ AM53C974_write_8(STCLREG, (unsigned char)(length & 0xff));
 AM53C974_write_8(STCMREG, (unsigned char)((length & 0xff00) >> 8));
 AM53C974_write_8(STCHREG, (unsigned char)((length & 0xff0000) >> 16));
 AM53C974_write_32(DMASTC, length & 0xffffff);
-AM53C974_write_32(DMASPA, (unsigned long)data);
+AM53C974_write_32(DMASPA, virt_to_bus(data));
 AM53C974_write_8(CMDREG, CMDREG_IT | CMDREG_DMA);
 AM53C974_write_8(DMACMD, (dir << 7) | DMACMD_INTE_D | DMACMD_START);
 }
@@ -2244,6 +2250,21 @@ cmd->scsi_done(cmd);
 return SCSI_ABORT_SUCCESS;
 }
 
+
+/*
+ * AM53C974_release()
+ *
+ * Release resources allocated for a single AM53C974 adapter.
+ */
+int
+AM53C974_release(struct Scsi_Host *shp)
+{
+       free_irq(shp->irq, NULL);
+       scsi_unregister(shp);
+       return 0;
+}
+
+
 #ifdef MODULE
 /* Eventually this will go into an include file, but this will be later */
 Scsi_Host_Template driver_template = AM53C974;
index 7040b1ce0ac2d210b9cf3f535fe197e5952186ef..6b327def4eb51a998d7295371f2821d91e8e5abd 100644 (file)
@@ -247,6 +247,7 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
        retries = 1;
        break;
       case START_STOP:
+      case MOVE_MEDIUM:
        timeout =  60 * HZ;     /* 60 seconds */
        retries = 1;
        break;
index 0b7533ec6be449dae69c4fb022035b7c4c710925..66997f677e4564113d09b3891d40ac61008732b0 100644 (file)
@@ -210,6 +210,9 @@ nfs_readpage(struct inode *inode, struct page *page)
        unsigned long   address;
        int             error = -1;
 
+       /* In case we're called from a page fault we want to */
+       /* make sure we're runnable before we schedule.. */
+       current->state = TASK_RUNNING;
        dprintk("NFS: nfs_readpage %08lx\n", page_address(page));
        address = page_address(page);
        page->count++;
index 3a875f212d2250b72eabbdb3ac08943e38de8c5d..236c7f55ff558d29ebe1c8968b6efc7cc814c781 100644 (file)
@@ -357,6 +357,9 @@ rpc_grok(struct rpc_sock *rsock)
        if (result < 4) {
                printk(KERN_WARNING "RPC: impossible RPC reply size %d\n",
                                                result);
+               iov[0].iov_base=(void*)&xid;    /* xid=32bits, which is large enough */
+               iov[0].iov_len=result;
+               rpc_recvmsg(rsock, iov, 1, result, 0);
                return 0;
        }
 
index 4118dfdc01f7041c251490f367c3041c7f4c8cec..60f52076df892b7455ab0d668f9cbf4ecfc291ec 100644 (file)
 #define PCI_VENDOR_ID_CT               0x102c
 #define PCI_DEVICE_ID_CT_65545         0x00d8
 #define PCI_DEVICE_ID_CT_65548         0x00dc
+#define PCI_DEVICE_ID_CT_65550         0x00e0
 
 #define PCI_VENDOR_ID_MIRO             0x1031
 #define PCI_DEVICE_ID_MIRO_36050       0x5601
index 8328210e856c51ec699b577d231ab217f69762ab..1020a33b9168decc9a3a87e826617cd52a3338a1 100644 (file)
 #define LOG_SENSE             0x4d
 #define MODE_SELECT_10        0x55
 #define MODE_SENSE_10         0x5a
+#define MOVE_MEDIUM           0xa5
 #define READ_12               0xa8
 #define WRITE_12              0xaa
 #define WRITE_VERIFY_12       0xae
 #define SEARCH_HIGH_12        0xb0
 #define SEARCH_EQUAL_12       0xb1
 #define SEARCH_LOW_12         0xb2
+#define READ_ELEMENT_STATUS   0xb8
 #define SEND_VOLUME_TAG       0xb6
 #define WRITE_LONG_2          0xea
 
index 5abe621d9a0c0fa4a29decac76d4d4d4e5581dd0..27751c1d270671f28d584a14e9e4d3d32b68975c 100644 (file)
@@ -1907,12 +1907,14 @@ int arp_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
                /*
                 *      net_alias_dev_rcv_sel32 returns main dev if it fails to found other.
                 */
-               dev = net_alias_dev_rcv_sel32(dev, AF_INET, sip, tip);
+               if (ip_chk_addr(tip) == IS_MYADDR) {
+                       dev = net_alias_dev_rcv_sel32(dev, AF_INET, sip, tip);
 
-               if (dev->type != ntohs(arp->ar_hrd) || dev->flags & IFF_NOARP)
-               {
-                       kfree_skb(skb, FREE_READ);
-                       return 0;
+                       if (dev->type != ntohs(arp->ar_hrd) || dev->flags & IFF_NOARP)
+                       {
+                               kfree_skb(skb, FREE_READ);
+                               return 0;
+                       }
                }
        }
 #endif
index d11c646adbdc69949d93af9f09aabc28fe5b5c79..e099b774495900713c34935b4cb88b3a4842b1ef 100644 (file)
@@ -302,8 +302,10 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
         */
 
 #ifdef CONFIG_NET_ALIAS
-       if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev)) 
-               skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr);
+       if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev)) {
+               if (ip_chk_addr(iph->daddr) == IS_MYADDR)
+                       skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr);
+       }
 #endif
 
        if (iph->ihl > 5)