]> nv-tegra.nvidia Code Review - linux-3.10.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Jul 2005 23:43:39 +0000 (16:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Jul 2005 23:43:39 +0000 (16:43 -0700)
198 files changed:
Documentation/scsi/scsi_mid_low_api.txt
MAINTAINERS
arch/alpha/kernel/process.c
arch/arm/kernel/process.c
arch/arm/mach-s3c2410/Makefile
arch/arm/mach-s3c2410/clock.c
arch/arm/mach-s3c2410/irq.c
arch/arm/mach-s3c2410/irq.h [new file with mode: 0644]
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/s3c2440-clock.c [new file with mode: 0644]
arch/arm/mach-s3c2410/s3c2440-irq.c [new file with mode: 0644]
arch/arm/mm/mm-armv.c
arch/arm26/kernel/process.c
arch/cris/kernel/process.c
arch/h8300/kernel/process.c
arch/i386/kernel/apm.c
arch/i386/kernel/reboot.c
arch/i386/mach-visws/reboot.c
arch/i386/mach-voyager/voyager_basic.c
arch/ia64/kernel/process.c
arch/ia64/sn/kernel/xpc_main.c
arch/m32r/kernel/process.c
arch/m68k/kernel/process.c
arch/m68knommu/kernel/process.c
arch/mips/kernel/reset.c
arch/parisc/kernel/process.c
arch/ppc/kernel/setup.c
arch/ppc64/kernel/setup.c
arch/s390/kernel/setup.c
arch/sh/kernel/process.c
arch/sparc/kernel/process.c
arch/sparc64/kernel/power.c
arch/sparc64/kernel/process.c
arch/um/kernel/reboot.c
arch/v850/kernel/anna.c
arch/v850/kernel/as85ep1.c
arch/v850/kernel/fpga85e2c.c
arch/v850/kernel/rte_cb.c
arch/v850/kernel/sim.c
arch/v850/kernel/sim85e2.c
arch/x86_64/ia32/ia32entry.S
arch/x86_64/ia32/sys_ia32.c
arch/x86_64/kernel/reboot.c
drivers/acpi/sleep/poweroff.c
drivers/char/hangcheck-timer.c
drivers/char/sysrq.c
drivers/char/watchdog/eurotechwdt.c
drivers/char/watchdog/pcwd.c
drivers/char/watchdog/softdog.c
drivers/char/watchdog/wdt.c
drivers/char/watchdog/wdt_pci.c
drivers/fc4/fc.c
drivers/message/fusion/mptfc.c
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.h
drivers/message/fusion/mptspi.c
drivers/pcmcia/sa1100_jornada720.c
drivers/scsi/aacraid/README
drivers/scsi/aacraid/TODO
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/commctrl.c
drivers/scsi/aacraid/linit.c
drivers/scsi/advansys.c
drivers/scsi/aic7xxx/aic7770.c
drivers/scsi/aic7xxx/aic7770_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic7xxx.h
drivers/scsi/aic7xxx/aic7xxx_core.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
drivers/scsi/aic7xxx/aic7xxx_pci.c
drivers/scsi/aic7xxx/aic7xxx_proc.c
drivers/scsi/aic7xxx_old.c
drivers/scsi/cpqfcTSinit.c
drivers/scsi/dpt_i2o.c
drivers/scsi/eata.c
drivers/scsi/eata_pio.c
drivers/scsi/fdomain.c
drivers/scsi/gdth.c
drivers/scsi/hosts.c
drivers/scsi/ibmvscsi/ibmvscsi.c
drivers/scsi/ibmvscsi/rpa_vscsi.c
drivers/scsi/ibmvscsi/srp.h
drivers/scsi/ips.h
drivers/scsi/libata-core.c
drivers/scsi/lpfc/Makefile
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_compat.h
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_ct.c
drivers/scsi/lpfc/lpfc_disc.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_hw.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_logmsg.h
drivers/scsi/lpfc/lpfc_mbox.c
drivers/scsi/lpfc/lpfc_mem.c
drivers/scsi/lpfc/lpfc_nportdisc.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/lpfc/lpfc_scsi.h
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli.h
drivers/scsi/lpfc/lpfc_version.h
drivers/scsi/megaraid.c
drivers/scsi/megaraid.h
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/ncr53c8xx.c
drivers/scsi/nsp32.c
drivers/scsi/qla1280.c
drivers/scsi/qla2xxx/Kconfig
drivers/scsi/qla2xxx/Makefile
drivers/scsi/qla2xxx/ql2100.c
drivers/scsi/qla2xxx/ql2100_fw.c
drivers/scsi/qla2xxx/ql2200.c
drivers/scsi/qla2xxx/ql2200_fw.c
drivers/scsi/qla2xxx/ql2300.c
drivers/scsi/qla2xxx/ql2300_fw.c
drivers/scsi/qla2xxx/ql2322.c
drivers/scsi/qla2xxx/ql2322_fw.c
drivers/scsi/qla2xxx/ql6312.c
drivers/scsi/qla2xxx/ql6312_fw.c
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_dbg.h
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_devtbl.h
drivers/scsi/qla2xxx/qla_fw.h [new file with mode: 0644]
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_gs.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_inline.h
drivers/scsi/qla2xxx/qla_iocb.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_rscn.c
drivers/scsi/qla2xxx/qla_settings.h
drivers/scsi/qla2xxx/qla_sup.c
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qlogicfc.c
drivers/scsi/qlogicisp.c
drivers/scsi/scsi.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_transport_spi.c
drivers/scsi/sd.c
drivers/scsi/u14-34f.c
drivers/serial/68328serial.c
fs/inotify.c
include/asm-alpha/emergency-restart.h [new file with mode: 0644]
include/asm-arm/arch-s3c2410/regs-iis.h
include/asm-arm/bitops.h
include/asm-arm/emergency-restart.h [new file with mode: 0644]
include/asm-arm/locks.h
include/asm-arm/spinlock.h
include/asm-arm/system.h
include/asm-arm26/emergency-restart.h [new file with mode: 0644]
include/asm-cris/emergency-restart.h [new file with mode: 0644]
include/asm-frv/emergency-restart.h [new file with mode: 0644]
include/asm-generic/emergency-restart.h [new file with mode: 0644]
include/asm-h8300/emergency-restart.h [new file with mode: 0644]
include/asm-i386/emergency-restart.h [new file with mode: 0644]
include/asm-ia64/emergency-restart.h [new file with mode: 0644]
include/asm-m32r/emergency-restart.h [new file with mode: 0644]
include/asm-m68k/emergency-restart.h [new file with mode: 0644]
include/asm-m68knommu/emergency-restart.h [new file with mode: 0644]
include/asm-mips/emergency-restart.h [new file with mode: 0644]
include/asm-parisc/emergency-restart.h [new file with mode: 0644]
include/asm-ppc/emergency-restart.h [new file with mode: 0644]
include/asm-ppc64/emergency-restart.h [new file with mode: 0644]
include/asm-s390/emergency-restart.h [new file with mode: 0644]
include/asm-sh/emergency-restart.h [new file with mode: 0644]
include/asm-sh64/emergency-restart.h [new file with mode: 0644]
include/asm-sparc/emergency-restart.h [new file with mode: 0644]
include/asm-sparc64/emergency-restart.h [new file with mode: 0644]
include/asm-um/emergency-restart.h [new file with mode: 0644]
include/asm-v850/emergency-restart.h [new file with mode: 0644]
include/asm-x86_64/emergency-restart.h [new file with mode: 0644]
include/asm-x86_64/ia32_unistd.h
include/asm-x86_64/unistd.h
include/asm-xtensa/emergency-restart.h [new file with mode: 0644]
include/linux/pci_ids.h
include/linux/reboot.h
include/scsi/scsi.h
include/scsi/scsi_cmnd.h
include/scsi/scsi_device.h
include/scsi/scsi_host.h
kernel/panic.c
kernel/power/disk.c
kernel/power/poweroff.c
kernel/sched.c
kernel/sys.c

index da176c95d0fb62618ff5c3684f5768a935f9dd0f..7536823c0cb1d392b30876eb1922dffd0a5b9b07 100644 (file)
@@ -388,7 +388,6 @@ Summary:
    scsi_remove_device - detach and remove a SCSI device
    scsi_remove_host - detach and remove all SCSI devices owned by host
    scsi_report_bus_reset - report scsi _bus_ reset observed
-   scsi_set_device - place device reference in host structure
    scsi_track_queue_full - track successive QUEUE_FULL events 
    scsi_unblock_requests - allow further commands to be queued to given host
    scsi_unregister - [calls scsi_host_put()]
@@ -740,20 +739,6 @@ int scsi_remove_host(struct Scsi_Host *shost)
 void scsi_report_bus_reset(struct Scsi_Host * shost, int channel)
 
 
-/**
- * scsi_set_device - place device reference in host structure
- * @shost: a pointer to a scsi host instance
- * @pdev: pointer to device instance to assign
- *
- *      Returns nothing
- *
- *      Might block: no
- *
- *      Defined in: include/scsi/scsi_host.h .
- **/
-void scsi_set_device(struct Scsi_Host * shost, struct device * dev)
-
-
 /**
  * scsi_track_queue_full - track successive QUEUE_FULL events on given
  *                      device to determine if and when there is a need
index 48aa6d3d3ce961fe37a22940d73fff7e3b910cf5..ec8433c39deee71023cfd130f739bd62d8e7faff 100644 (file)
@@ -1416,13 +1416,20 @@ W:      http://www.penguinppc.org/
 L:     linuxppc-embedded@ozlabs.org
 S:     Maintained
 
-LINUX FOR POWERPC EMBEDDED PPC8XX AND BOOT CODE
+LINUX FOR POWERPC BOOT CODE
 P:     Tom Rini
 M:     trini@kernel.crashing.org
 W:     http://www.penguinppc.org/
 L:     linuxppc-embedded@ozlabs.org
 S:     Maintained
 
+LINUX FOR POWERPC EMBEDDED PPC8XX
+P:     Marcelo Tosatti
+M:     marcelo.tosatti@cyclades.com
+W:     http://www.penguinppc.org/
+L:     linuxppc-embedded@ozlabs.org
+S:     Maintained
+
 LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX
 P:     Kumar Gala
 M:     kumar.gala@freescale.com
index 4933f3ce58339c182897fe08d25f4e329083cae4..fa98dae3cd986dc323132a0ad2f0bd205ea7c9a4 100644 (file)
@@ -165,7 +165,6 @@ machine_restart(char *restart_cmd)
        common_shutdown(LINUX_REBOOT_CMD_RESTART, restart_cmd);
 }
 
-EXPORT_SYMBOL(machine_restart);
 
 void
 machine_halt(void)
@@ -173,7 +172,6 @@ machine_halt(void)
        common_shutdown(LINUX_REBOOT_CMD_HALT, NULL);
 }
 
-EXPORT_SYMBOL(machine_halt);
 
 void
 machine_power_off(void)
@@ -181,7 +179,6 @@ machine_power_off(void)
        common_shutdown(LINUX_REBOOT_CMD_POWER_OFF, NULL);
 }
 
-EXPORT_SYMBOL(machine_power_off);
 
 /* Used by sysrq-p, among others.  I don't believe r9-r15 are ever
    saved in the context it's used.  */
index bbea636ff687a57feb1e2a5f240e5f0726485b7a..409db6d5ec9994b53a729f755435d3aa518e3aad 100644 (file)
@@ -131,7 +131,6 @@ void machine_halt(void)
 {
 }
 
-EXPORT_SYMBOL(machine_halt);
 
 void machine_power_off(void)
 {
@@ -139,7 +138,6 @@ void machine_power_off(void)
                pm_power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);
 
 void machine_restart(char * __unused)
 {
@@ -169,8 +167,6 @@ void machine_restart(char * __unused)
        while (1);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void __show_regs(struct pt_regs *regs)
 {
        unsigned long flags = condition_codes(regs);
index f99b689e4392ec5c8d8ba7240a599fa83bb41c40..55ed7c7e57dabc091c9f6dd5c28f8bfa3ffd9b3b 100644 (file)
@@ -23,6 +23,8 @@ obj-$(CONFIG_PM_SIMTEC)          += pm-simtec.o
 # S3C2440 support
 
 obj-$(CONFIG_CPU_S3C2440)  += s3c2440.o s3c2440-dsc.o
+obj-$(CONFIG_CPU_S3C2440)  += s3c2440-irq.o
+obj-$(CONFIG_CPU_S3C2440)  += s3c2440-clock.o
 
 # machine specific support
 
index 8d986b8401c2474f3948bb3a4301c26a9784b7f1..9a66050e887d0e99db09d53d1ab91bda120f6353 100644 (file)
@@ -448,60 +448,3 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
 
        return 0;
 }
-
-/* S3C2440 extended clock support */
-
-#ifdef CONFIG_CPU_S3C2440
-
-static struct clk s3c2440_clk_upll = {
-       .name           = "upll",
-       .id             = -1,
-};
-
-static struct clk s3c2440_clk_cam = {
-       .name           = "camif",
-       .parent         = &clk_h,
-       .id             = -1,
-       .enable         = s3c24xx_clkcon_enable,
-       .ctrlbit        = S3C2440_CLKCON_CAMERA,
-};
-
-static struct clk s3c2440_clk_ac97 = {
-       .name           = "ac97",
-       .parent         = &clk_p,
-       .id             = -1,
-       .enable         = s3c24xx_clkcon_enable,
-       .ctrlbit        = S3C2440_CLKCON_CAMERA,
-};
-
-static int s3c2440_clk_add(struct sys_device *sysdev)
-{
-       unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
-
-       s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal.rate);
-
-       printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n",
-              print_mhz(s3c2440_clk_upll.rate));
-
-       s3c24xx_register_clock(&s3c2440_clk_ac97);
-       s3c24xx_register_clock(&s3c2440_clk_cam);
-       s3c24xx_register_clock(&s3c2440_clk_upll);
-
-       clk_disable(&s3c2440_clk_ac97);
-       clk_disable(&s3c2440_clk_cam);
-
-       return 0;
-}
-
-static struct sysdev_driver s3c2440_clk_driver = {
-       .add    = s3c2440_clk_add,
-};
-
-static int s3c24xx_clk_driver(void)
-{
-       return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver);
-}
-
-arch_initcall(s3c24xx_clk_driver);
-
-#endif /* CONFIG_CPU_S3C2440 */
index cf9f46d88061819432925c4097673b8d458a9350..973a5fe6769c515d87c6f409b36223fdd93d05a6 100644 (file)
@@ -45,6 +45,9 @@
  *
  *   28-Jun-2005  Ben Dooks
  *               Mark IRQ_LCD valid
+ *
+ *   25-Jul-2005  Ben Dooks
+ *               Split the S3C2440 IRQ code to seperate file
 */
 
 #include <linux/init.h>
 
 #include "cpu.h"
 #include "pm.h"
-
-#define irqdbf(x...)
-#define irqdbf2(x...)
-
-#define EXTINT_OFF (IRQ_EINT4 - 4)
+#include "irq.h"
 
 /* wakeup irq control */
 
@@ -181,7 +180,7 @@ s3c_irq_unmask(unsigned int irqno)
        __raw_writel(mask, S3C2410_INTMSK);
 }
 
-static struct irqchip s3c_irq_level_chip = {
+struct irqchip s3c_irq_level_chip = {
        .ack       = s3c_irq_maskack,
        .mask      = s3c_irq_mask,
        .unmask    = s3c_irq_unmask,
@@ -370,84 +369,6 @@ static struct irqchip s3c_irq_eint0t4 = {
 #define INTMSK_UART2    (1UL << (IRQ_UART2 - IRQ_EINT0))
 #define INTMSK_ADCPARENT (1UL << (IRQ_ADCPARENT - IRQ_EINT0))
 
-static inline void
-s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
-               int subcheck)
-{
-       unsigned long mask;
-       unsigned long submask;
-
-       submask = __raw_readl(S3C2410_INTSUBMSK);
-       mask = __raw_readl(S3C2410_INTMSK);
-
-       submask |= (1UL << (irqno - IRQ_S3CUART_RX0));
-
-       /* check to see if we need to mask the parent IRQ */
-
-       if ((submask  & subcheck) == subcheck) {
-               __raw_writel(mask | parentbit, S3C2410_INTMSK);
-       }
-
-       /* write back masks */
-       __raw_writel(submask, S3C2410_INTSUBMSK);
-
-}
-
-static inline void
-s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)
-{
-       unsigned long mask;
-       unsigned long submask;
-
-       submask = __raw_readl(S3C2410_INTSUBMSK);
-       mask = __raw_readl(S3C2410_INTMSK);
-
-       submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));
-       mask &= ~parentbit;
-
-       /* write back masks */
-       __raw_writel(submask, S3C2410_INTSUBMSK);
-       __raw_writel(mask, S3C2410_INTMSK);
-}
-
-
-static inline void
-s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)
-{
-       unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
-
-       s3c_irqsub_mask(irqno, parentmask, group);
-
-       __raw_writel(bit, S3C2410_SUBSRCPND);
-
-       /* only ack parent if we've got all the irqs (seems we must
-        * ack, all and hope that the irq system retriggers ok when
-        * the interrupt goes off again)
-        */
-
-       if (1) {
-               __raw_writel(parentmask, S3C2410_SRCPND);
-               __raw_writel(parentmask, S3C2410_INTPND);
-       }
-}
-
-static inline void
-s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
-{
-       unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
-
-       __raw_writel(bit, S3C2410_SUBSRCPND);
-
-       /* only ack parent if we've got all the irqs (seems we must
-        * ack, all and hope that the irq system retriggers ok when
-        * the interrupt goes off again)
-        */
-
-       if (1) {
-               __raw_writel(parentmask, S3C2410_SRCPND);
-               __raw_writel(parentmask, S3C2410_INTPND);
-       }
-}
 
 /* UART0 */
 
@@ -794,174 +715,3 @@ void __init s3c24xx_init_irq(void)
 
        irqdbf("s3c2410: registered interrupt handlers\n");
 }
-
-/* s3c2440 irq code
-*/
-
-#ifdef CONFIG_CPU_S3C2440
-
-/* WDT/AC97 */
-
-static void s3c_irq_demux_wdtac97(unsigned int irq,
-                                 struct irqdesc *desc,
-                                 struct pt_regs *regs)
-{
-       unsigned int subsrc, submsk;
-       struct irqdesc *mydesc;
-
-       /* read the current pending interrupts, and the mask
-        * for what it is available */
-
-       subsrc = __raw_readl(S3C2410_SUBSRCPND);
-       submsk = __raw_readl(S3C2410_INTSUBMSK);
-
-       subsrc &= ~submsk;
-       subsrc >>= 13;
-       subsrc &= 3;
-
-       if (subsrc != 0) {
-               if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_S3C2440_WDT;
-                       mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
-               }
-               if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_S3C2440_AC97;
-                       mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
-               }
-       }
-}
-
-
-#define INTMSK_WDT      (1UL << (IRQ_WDT - IRQ_EINT0))
-
-static void
-s3c_irq_wdtac97_mask(unsigned int irqno)
-{
-       s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13);
-}
-
-static void
-s3c_irq_wdtac97_unmask(unsigned int irqno)
-{
-       s3c_irqsub_unmask(irqno, INTMSK_WDT);
-}
-
-static void
-s3c_irq_wdtac97_ack(unsigned int irqno)
-{
-       s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13);
-}
-
-static struct irqchip s3c_irq_wdtac97 = {
-       .mask       = s3c_irq_wdtac97_mask,
-       .unmask     = s3c_irq_wdtac97_unmask,
-       .ack        = s3c_irq_wdtac97_ack,
-};
-
-/* camera irq */
-
-static void s3c_irq_demux_cam(unsigned int irq,
-                             struct irqdesc *desc,
-                             struct pt_regs *regs)
-{
-       unsigned int subsrc, submsk;
-       struct irqdesc *mydesc;
-
-       /* read the current pending interrupts, and the mask
-        * for what it is available */
-
-       subsrc = __raw_readl(S3C2410_SUBSRCPND);
-       submsk = __raw_readl(S3C2410_INTSUBMSK);
-
-       subsrc &= ~submsk;
-       subsrc >>= 11;
-       subsrc &= 3;
-
-       if (subsrc != 0) {
-               if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_S3C2440_CAM_C;
-                       mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
-               }
-               if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_S3C2440_CAM_P;
-                       mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
-               }
-       }
-}
-
-#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0))
-
-static void
-s3c_irq_cam_mask(unsigned int irqno)
-{
-       s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11);
-}
-
-static void
-s3c_irq_cam_unmask(unsigned int irqno)
-{
-       s3c_irqsub_unmask(irqno, INTMSK_CAM);
-}
-
-static void
-s3c_irq_cam_ack(unsigned int irqno)
-{
-       s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11);
-}
-
-static struct irqchip s3c_irq_cam = {
-       .mask       = s3c_irq_cam_mask,
-       .unmask     = s3c_irq_cam_unmask,
-       .ack        = s3c_irq_cam_ack,
-};
-
-static int s3c2440_irq_add(struct sys_device *sysdev)
-{
-       unsigned int irqno;
-
-       printk("S3C2440: IRQ Support\n");
-
-       set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip);
-       set_irq_handler(IRQ_NFCON, do_level_IRQ);
-       set_irq_flags(IRQ_NFCON, IRQF_VALID);
-
-       /* add new chained handler for wdt, ac7 */
-
-       set_irq_chip(IRQ_WDT, &s3c_irq_level_chip);
-       set_irq_handler(IRQ_WDT, do_level_IRQ);
-       set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97);
-
-       for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) {
-               set_irq_chip(irqno, &s3c_irq_wdtac97);
-               set_irq_handler(irqno, do_level_IRQ);
-               set_irq_flags(irqno, IRQF_VALID);
-       }
-
-       /* add chained handler for camera */
-
-       set_irq_chip(IRQ_CAM, &s3c_irq_level_chip);
-       set_irq_handler(IRQ_CAM, do_level_IRQ);
-       set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam);
-
-       for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) {
-               set_irq_chip(irqno, &s3c_irq_cam);
-               set_irq_handler(irqno, do_level_IRQ);
-               set_irq_flags(irqno, IRQF_VALID);
-       }
-
-       return 0;
-}
-
-static struct sysdev_driver s3c2440_irq_driver = {
-       .add    = s3c2440_irq_add,
-};
-
-static int s3c24xx_irq_driver(void)
-{
-       return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);
-}
-
-arch_initcall(s3c24xx_irq_driver);
-
-#endif /* CONFIG_CPU_S3C2440 */
-
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h
new file mode 100644 (file)
index 0000000..4abf0ca
--- /dev/null
@@ -0,0 +1,99 @@
+/* arch/arm/mach-s3c2410/irq.h
+ *
+ * Copyright (c) 2004-2005 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
+ *
+ * Header file for S3C24XX CPU IRQ support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+*/
+
+#define irqdbf(x...)
+#define irqdbf2(x...)
+
+#define EXTINT_OFF (IRQ_EINT4 - 4)
+
+extern struct irqchip s3c_irq_level_chip;
+
+static inline void
+s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
+               int subcheck)
+{
+       unsigned long mask;
+       unsigned long submask;
+
+       submask = __raw_readl(S3C2410_INTSUBMSK);
+       mask = __raw_readl(S3C2410_INTMSK);
+
+       submask |= (1UL << (irqno - IRQ_S3CUART_RX0));
+
+       /* check to see if we need to mask the parent IRQ */
+
+       if ((submask  & subcheck) == subcheck) {
+               __raw_writel(mask | parentbit, S3C2410_INTMSK);
+       }
+
+       /* write back masks */
+       __raw_writel(submask, S3C2410_INTSUBMSK);
+
+}
+
+static inline void
+s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)
+{
+       unsigned long mask;
+       unsigned long submask;
+
+       submask = __raw_readl(S3C2410_INTSUBMSK);
+       mask = __raw_readl(S3C2410_INTMSK);
+
+       submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));
+       mask &= ~parentbit;
+
+       /* write back masks */
+       __raw_writel(submask, S3C2410_INTSUBMSK);
+       __raw_writel(mask, S3C2410_INTMSK);
+}
+
+
+static inline void
+s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)
+{
+       unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
+
+       s3c_irqsub_mask(irqno, parentmask, group);
+
+       __raw_writel(bit, S3C2410_SUBSRCPND);
+
+       /* only ack parent if we've got all the irqs (seems we must
+        * ack, all and hope that the irq system retriggers ok when
+        * the interrupt goes off again)
+        */
+
+       if (1) {
+               __raw_writel(parentmask, S3C2410_SRCPND);
+               __raw_writel(parentmask, S3C2410_INTPND);
+       }
+}
+
+static inline void
+s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
+{
+       unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
+
+       __raw_writel(bit, S3C2410_SUBSRCPND);
+
+       /* only ack parent if we've got all the irqs (seems we must
+        * ack, all and hope that the irq system retriggers ok when
+        * the interrupt goes off again)
+        */
+
+       if (1) {
+               __raw_writel(parentmask, S3C2410_SRCPND);
+               __raw_writel(parentmask, S3C2410_INTPND);
+       }
+}
index 206778ebfce79de3e40608419a2f56df8d9a7cc9..1e7f343822d0c5c111d5988bcb0eeeb4126ad7bc 100644 (file)
  *     14-Jan-2005 BJD  Add support for muitlple NAND devices
  *     03-Mar-2005 BJD  Ensured that bast-cpld.h is included
  *     10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
- *     14-Mar-2006 BJD  Updated for __iomem changes
- *     22-Jun-2006 BJD  Added DM9000 platform information
- *     28-Jun-2006 BJD  Moved pm functionality out to common code
- *     17-Jul-2006 BJD  Changed to platform device for SuperIO 16550s
+ *     14-Mar-2005 BJD  Updated for __iomem changes
+ *     22-Jun-2005 BJD  Added DM9000 platform information
+ *     28-Jun-2005 BJD  Moved pm functionality out to common code
+ *     17-Jul-2005 BJD  Changed to platform device for SuperIO 16550s
+ *     25-Jul-2005 BJD  Removed ASIX static mappings
 */
 
 #include <linux/kernel.h>
@@ -116,7 +117,6 @@ static struct map_desc bast_iodesc[] __initdata = {
   /* slow, byte */
   { VA_C2(BAST_VA_ISAIO),   PA_CS2(BAST_PA_ISAIO),    SZ_16M, MT_DEVICE },
   { VA_C2(BAST_VA_ISAMEM),  PA_CS2(BAST_PA_ISAMEM),   SZ_16M, MT_DEVICE },
-  { VA_C2(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET),  SZ_1M,  MT_DEVICE },
   { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO),  SZ_1M,  MT_DEVICE },
   { VA_C2(BAST_VA_IDEPRI),  PA_CS3(BAST_PA_IDEPRI),   SZ_1M,  MT_DEVICE },
   { VA_C2(BAST_VA_IDESEC),  PA_CS3(BAST_PA_IDESEC),   SZ_1M,  MT_DEVICE },
@@ -126,7 +126,6 @@ static struct map_desc bast_iodesc[] __initdata = {
   /* slow, word */
   { VA_C3(BAST_VA_ISAIO),   PA_CS3(BAST_PA_ISAIO),    SZ_16M, MT_DEVICE },
   { VA_C3(BAST_VA_ISAMEM),  PA_CS3(BAST_PA_ISAMEM),   SZ_16M, MT_DEVICE },
-  { VA_C3(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET),  SZ_1M,  MT_DEVICE },
   { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO),  SZ_1M,  MT_DEVICE },
   { VA_C3(BAST_VA_IDEPRI),  PA_CS3(BAST_PA_IDEPRI),   SZ_1M,  MT_DEVICE },
   { VA_C3(BAST_VA_IDESEC),  PA_CS3(BAST_PA_IDESEC),   SZ_1M,  MT_DEVICE },
@@ -136,7 +135,6 @@ static struct map_desc bast_iodesc[] __initdata = {
   /* fast, byte */
   { VA_C4(BAST_VA_ISAIO),   PA_CS4(BAST_PA_ISAIO),    SZ_16M, MT_DEVICE },
   { VA_C4(BAST_VA_ISAMEM),  PA_CS4(BAST_PA_ISAMEM),   SZ_16M, MT_DEVICE },
-  { VA_C4(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET),  SZ_1M,  MT_DEVICE },
   { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO),  SZ_1M,  MT_DEVICE },
   { VA_C4(BAST_VA_IDEPRI),  PA_CS5(BAST_PA_IDEPRI),   SZ_1M,  MT_DEVICE },
   { VA_C4(BAST_VA_IDESEC),  PA_CS5(BAST_PA_IDESEC),   SZ_1M,  MT_DEVICE },
@@ -146,7 +144,6 @@ static struct map_desc bast_iodesc[] __initdata = {
   /* fast, word */
   { VA_C5(BAST_VA_ISAIO),   PA_CS5(BAST_PA_ISAIO),    SZ_16M, MT_DEVICE },
   { VA_C5(BAST_VA_ISAMEM),  PA_CS5(BAST_PA_ISAMEM),   SZ_16M, MT_DEVICE },
-  { VA_C5(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET),  SZ_1M,  MT_DEVICE },
   { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO),  SZ_1M,  MT_DEVICE },
   { VA_C5(BAST_VA_IDEPRI),  PA_CS5(BAST_PA_IDEPRI),   SZ_1M,  MT_DEVICE },
   { VA_C5(BAST_VA_IDESEC),  PA_CS5(BAST_PA_IDESEC),   SZ_1M,  MT_DEVICE },
diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2410/s3c2440-clock.c
new file mode 100644 (file)
index 0000000..b018a1f
--- /dev/null
@@ -0,0 +1,116 @@
+/* linux/arch/arm/mach-s3c2410/s3c2440-clock.c
+ *
+ * Copyright (c) 2004-2005 Simtec Electronics
+ *     http://armlinux.simtec.co.uk/
+ *     Ben Dooks <ben@simtec.co.uk>
+ *
+ * S3C2440 Clock support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/errno.h>
+#include <linux/err.h>
+#include <linux/device.h>
+#include <linux/sysdev.h>
+
+#include <linux/interrupt.h>
+#include <linux/ioport.h>
+
+#include <asm/hardware.h>
+#include <asm/atomic.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+
+#include <asm/hardware/clock.h>
+#include <asm/arch/regs-clock.h>
+
+#include "clock.h"
+#include "cpu.h"
+
+/* S3C2440 extended clock support */
+
+static struct clk s3c2440_clk_upll = {
+       .name           = "upll",
+       .id             = -1,
+};
+
+static struct clk s3c2440_clk_cam = {
+       .name           = "camif",
+       .id             = -1,
+       .enable         = s3c24xx_clkcon_enable,
+       .ctrlbit        = S3C2440_CLKCON_CAMERA,
+};
+
+static struct clk s3c2440_clk_ac97 = {
+       .name           = "ac97",
+       .id             = -1,
+       .enable         = s3c24xx_clkcon_enable,
+       .ctrlbit        = S3C2440_CLKCON_CAMERA,
+};
+
+static int s3c2440_clk_add(struct sys_device *sysdev)
+{
+       unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
+       struct clk *clk_h;
+       struct clk *clk_p;
+       struct clk *clk_xtal;
+
+       clk_xtal = clk_get(NULL, "xtal");
+       if (IS_ERR(clk_xtal)) {
+               printk(KERN_ERR "S3C2440: Failed to get clk_xtal\n");
+               return -EINVAL;
+       }
+
+       s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal->rate);
+
+       printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n",
+              print_mhz(s3c2440_clk_upll.rate));
+
+       clk_p = clk_get(NULL, "pclk");
+       clk_h = clk_get(NULL, "hclk");
+
+       if (IS_ERR(clk_p) || IS_ERR(clk_h)) {
+               printk(KERN_ERR "S3C2440: Failed to get parent clocks\n");
+               return -EINVAL;
+       }
+
+       s3c2440_clk_cam.parent = clk_h;
+       s3c2440_clk_ac97.parent = clk_p;
+
+       s3c24xx_register_clock(&s3c2440_clk_ac97);
+       s3c24xx_register_clock(&s3c2440_clk_cam);
+       s3c24xx_register_clock(&s3c2440_clk_upll);
+
+       clk_disable(&s3c2440_clk_ac97);
+       clk_disable(&s3c2440_clk_cam);
+
+       return 0;
+}
+
+static struct sysdev_driver s3c2440_clk_driver = {
+       .add    = s3c2440_clk_add,
+};
+
+static __init int s3c24xx_clk_driver(void)
+{
+       return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver);
+}
+
+arch_initcall(s3c24xx_clk_driver);
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c
new file mode 100644 (file)
index 0000000..7cb9912
--- /dev/null
@@ -0,0 +1,207 @@
+/* linux/arch/arm/mach-s3c2410/s3c2440-irq.c
+ *
+ * Copyright (c) 2003,2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Changelog:
+ *     25-Jul-2005 BJD         Split from irq.c
+ *
+*/
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/interrupt.h>
+#include <linux/ioport.h>
+#include <linux/ptrace.h>
+#include <linux/sysdev.h>
+
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+
+#include <asm/mach/irq.h>
+
+#include <asm/arch/regs-irq.h>
+#include <asm/arch/regs-gpio.h>
+
+#include "cpu.h"
+#include "pm.h"
+#include "irq.h"
+
+/* WDT/AC97 */
+
+static void s3c_irq_demux_wdtac97(unsigned int irq,
+                                 struct irqdesc *desc,
+                                 struct pt_regs *regs)
+{
+       unsigned int subsrc, submsk;
+       struct irqdesc *mydesc;
+
+       /* read the current pending interrupts, and the mask
+        * for what it is available */
+
+       subsrc = __raw_readl(S3C2410_SUBSRCPND);
+       submsk = __raw_readl(S3C2410_INTSUBMSK);
+
+       subsrc &= ~submsk;
+       subsrc >>= 13;
+       subsrc &= 3;
+
+       if (subsrc != 0) {
+               if (subsrc & 1) {
+                       mydesc = irq_desc + IRQ_S3C2440_WDT;
+                       mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
+               }
+               if (subsrc & 2) {
+                       mydesc = irq_desc + IRQ_S3C2440_AC97;
+                       mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
+               }
+       }
+}
+
+
+#define INTMSK_WDT      (1UL << (IRQ_WDT - IRQ_EINT0))
+
+static void
+s3c_irq_wdtac97_mask(unsigned int irqno)
+{
+       s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13);
+}
+
+static void
+s3c_irq_wdtac97_unmask(unsigned int irqno)
+{
+       s3c_irqsub_unmask(irqno, INTMSK_WDT);
+}
+
+static void
+s3c_irq_wdtac97_ack(unsigned int irqno)
+{
+       s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13);
+}
+
+static struct irqchip s3c_irq_wdtac97 = {
+       .mask       = s3c_irq_wdtac97_mask,
+       .unmask     = s3c_irq_wdtac97_unmask,
+       .ack        = s3c_irq_wdtac97_ack,
+};
+
+/* camera irq */
+
+static void s3c_irq_demux_cam(unsigned int irq,
+                             struct irqdesc *desc,
+                             struct pt_regs *regs)
+{
+       unsigned int subsrc, submsk;
+       struct irqdesc *mydesc;
+
+       /* read the current pending interrupts, and the mask
+        * for what it is available */
+
+       subsrc = __raw_readl(S3C2410_SUBSRCPND);
+       submsk = __raw_readl(S3C2410_INTSUBMSK);
+
+       subsrc &= ~submsk;
+       subsrc >>= 11;
+       subsrc &= 3;
+
+       if (subsrc != 0) {
+               if (subsrc & 1) {
+                       mydesc = irq_desc + IRQ_S3C2440_CAM_C;
+                       mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
+               }
+               if (subsrc & 2) {
+                       mydesc = irq_desc + IRQ_S3C2440_CAM_P;
+                       mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
+               }
+       }
+}
+
+#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0))
+
+static void
+s3c_irq_cam_mask(unsigned int irqno)
+{
+       s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11);
+}
+
+static void
+s3c_irq_cam_unmask(unsigned int irqno)
+{
+       s3c_irqsub_unmask(irqno, INTMSK_CAM);
+}
+
+static void
+s3c_irq_cam_ack(unsigned int irqno)
+{
+       s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11);
+}
+
+static struct irqchip s3c_irq_cam = {
+       .mask       = s3c_irq_cam_mask,
+       .unmask     = s3c_irq_cam_unmask,
+       .ack        = s3c_irq_cam_ack,
+};
+
+static int s3c2440_irq_add(struct sys_device *sysdev)
+{
+       unsigned int irqno;
+
+       printk("S3C2440: IRQ Support\n");
+
+       set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip);
+       set_irq_handler(IRQ_NFCON, do_level_IRQ);
+       set_irq_flags(IRQ_NFCON, IRQF_VALID);
+
+       /* add new chained handler for wdt, ac7 */
+
+       set_irq_chip(IRQ_WDT, &s3c_irq_level_chip);
+       set_irq_handler(IRQ_WDT, do_level_IRQ);
+       set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97);
+
+       for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) {
+               set_irq_chip(irqno, &s3c_irq_wdtac97);
+               set_irq_handler(irqno, do_level_IRQ);
+               set_irq_flags(irqno, IRQF_VALID);
+       }
+
+       /* add chained handler for camera */
+
+       set_irq_chip(IRQ_CAM, &s3c_irq_level_chip);
+       set_irq_handler(IRQ_CAM, do_level_IRQ);
+       set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam);
+
+       for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) {
+               set_irq_chip(irqno, &s3c_irq_cam);
+               set_irq_handler(irqno, do_level_IRQ);
+               set_irq_flags(irqno, IRQF_VALID);
+       }
+
+       return 0;
+}
+
+static struct sysdev_driver s3c2440_irq_driver = {
+       .add    = s3c2440_irq_add,
+};
+
+static int s3c24xx_irq_driver(void)
+{
+       return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);
+}
+
+arch_initcall(s3c24xx_irq_driver);
+
index b19f00e99a21f43272a9acd7fa8093a1f5cd2f8a..e33fe4229d056e9ae098249ceb2b3b022cd87196 100644 (file)
@@ -425,6 +425,9 @@ static void __init build_mem_type_table(void)
                mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
                mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
                mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
+
+               mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE;
+               mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED;
        }
 
        cp = &cache_policies[cachepolicy];
index 46aea6ac194d5e015389c77ae941b0901bde29d0..9eb9964d32a7368c0b71c53015c75a7e58626f48 100644 (file)
@@ -103,9 +103,6 @@ void machine_power_off(void)
 {
 }
 
-EXPORT_SYMBOL(machine_halt);
-EXPORT_SYMBOL(machine_power_off);
-
 void machine_restart(char * __unused)
 {
        /*
@@ -136,8 +133,6 @@ void machine_restart(char * __unused)
        while (1);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void show_regs(struct pt_regs * regs)
 {
        unsigned long flags;
index 9f7cad7c78498a706853cafa4491381dcdcc0697..a5ad2b6758530fc2fda8dae4510e90e3c098cb6f 100644 (file)
 #include <linux/user.h>
 #include <linux/elfcore.h>
 #include <linux/mqueue.h>
+#include <linux/reboot.h>
 
 //#define DEBUG
 
@@ -208,13 +209,11 @@ void cpu_idle (void)
 
 void hard_reset_now (void);
 
-void machine_restart(void)
+void machine_restart(char *cmd)
 {
        hard_reset_now();
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 /*
  * Similar to machine_power_off, but don't shut off power.  Add code
  * here to freeze the system for e.g. post-mortem debug purpose when
@@ -225,16 +224,12 @@ void machine_halt(void)
 {
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 /* If or when software power-off is implemented, add code here.  */
 
 void machine_power_off(void)
 {
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 /*
  * When a process does an "exec", machine state like FPU and debug
  * registers need to be reset.  This is a hook function for that.
index b5f83e9f04db63eb1013267b65f94a891432e375..27f1fce64ce465026ee90c0cffd2e25717843075 100644 (file)
@@ -90,8 +90,6 @@ void machine_restart(char * __unused)
        __asm__("jmp @@0"); 
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
        local_irq_disable();
@@ -99,8 +97,6 @@ void machine_halt(void)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        local_irq_disable();
@@ -108,8 +104,6 @@ void machine_power_off(void)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 void show_regs(struct pt_regs * regs)
 {
        printk("\nPC: %08lx  Status: %02x",
index 064211d5f41b62a9d4c593e94aaa2e37862434a6..d7811c4e8b509b30fa5fd15f822d94ebddb0d82c 100644 (file)
@@ -911,14 +911,7 @@ static void apm_power_off(void)
                0xcd, 0x15              /* int   $0x15       */
        };
 
-       /*
-        * This may be called on an SMP machine.
-        */
-#ifdef CONFIG_SMP
        /* Some bioses don't like being called from CPU != 0 */
-       set_cpus_allowed(current, cpumask_of_cpu(0));
-       BUG_ON(smp_processor_id() != 0);
-#endif
        if (apm_info.realmode_power_off)
        {
                (void)apm_save_cpus();
index b3e584849961e79872a92b6518ab15c47071e797..c71fef31dc4797d891f10c5d8d257bbf11d73df7 100644 (file)
@@ -284,7 +284,7 @@ void machine_shutdown(void)
        reboot_cpu_id = 0;
 
        /* See if there has been given a command line override */
-       if ((reboot_cpu_id != -1) && (reboot_cpu < NR_CPUS) &&
+       if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) &&
                cpu_isset(reboot_cpu, cpu_online_map)) {
                reboot_cpu_id = reboot_cpu;
        }
@@ -311,10 +311,8 @@ void machine_shutdown(void)
 #endif
 }
 
-void machine_restart(char * __unused)
+void machine_emergency_restart(void)
 {
-       machine_shutdown();
-
        if (!reboot_thru_bios) {
                if (efi_enabled) {
                        efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
@@ -337,23 +335,22 @@ void machine_restart(char * __unused)
        machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
 }
 
-EXPORT_SYMBOL(machine_restart);
+void machine_restart(char * __unused)
+{
+       machine_shutdown();
+       machine_emergency_restart();
+}
 
 void machine_halt(void)
 {
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
-       lapic_shutdown();
+       machine_shutdown();
 
-       if (efi_enabled)
-               efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, NULL);
        if (pm_power_off)
                pm_power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);
 
index 95e4676594e1e0c05d9e181821533a016e3a28da..9e9296676f931dfc2831f40c127933d2f772badf 100644 (file)
@@ -22,8 +22,6 @@ void machine_restart(char * __unused)
        outb(PIIX4_RESET_VAL, PIIX4_RESET_PORT);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_power_off(void)
 {
        unsigned short pm_status;
@@ -43,10 +41,7 @@ void machine_power_off(void)
        outl(PIIX_SPECIAL_STOP, 0xCFC);
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 void machine_halt(void)
 {
 }
 
-EXPORT_SYMBOL(machine_halt);
index 8680080a6a8916a713d267b6b772a835e1ed8d17..b3eda46e0fe9d4e1a02cfc8e90c9e29b7abd1e94 100644 (file)
@@ -278,8 +278,6 @@ machine_restart(char *cmd)
        }
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void
 mca_nmi_hook(void)
 {
@@ -315,12 +313,9 @@ machine_halt(void)
        machine_power_off();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        if (pm_power_off)
                pm_power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);
index e484910246ad7998d3818b1e6b13a7df91de23de..66e8406098080343da5fa91e3f1b860d7e6ee5d7 100644 (file)
@@ -807,16 +807,12 @@ machine_restart (char *restart_cmd)
        (*efi.reset_system)(EFI_RESET_WARM, 0, 0, NULL);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void
 machine_halt (void)
 {
        cpu_halt();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void
 machine_power_off (void)
 {
@@ -825,4 +821,3 @@ machine_power_off (void)
        machine_halt();
 }
 
-EXPORT_SYMBOL(machine_power_off);
index d580adcad927a15e316097e0422746db9bca408e..bb1d5cf30440cb9bf01b501084dd3ec08e8326ce 100644 (file)
@@ -420,7 +420,7 @@ xpc_activating(void *__partid)
        partid_t partid = (u64) __partid;
        struct xpc_partition *part = &xpc_partitions[partid];
        unsigned long irq_flags;
-       struct sched_param param = { sched_priority: MAX_USER_RT_PRIO - 1 };
+       struct sched_param param = { sched_priority: MAX_RT_PRIO - 1 };
        int ret;
 
 
index b556c3cf6495c4eb8a05dc580f943fd5f52e2de0..ea13a8f4d8b05aadc691f010435b6fa6ef751a91 100644 (file)
@@ -115,8 +115,6 @@ void machine_restart(char *__unused)
                cpu_relax();
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
        printk("Please push reset button!\n");
@@ -124,15 +122,11 @@ void machine_halt(void)
                cpu_relax();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        /* M32R_FIXME */
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 static int __init idle_setup (char *str)
 {
        if (!strncmp(str, "poll", 4)) {
index 93b043e2a4359985b80ab1890135ccc1e57351dc..11b1b90ba6ba49d4dc193517921fd88a5fe84a9f 100644 (file)
@@ -113,8 +113,6 @@ void machine_restart(char * __unused)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
        if (mach_halt)
@@ -122,8 +120,6 @@ void machine_halt(void)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        if (mach_power_off)
@@ -131,8 +127,6 @@ void machine_power_off(void)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 void show_regs(struct pt_regs * regs)
 {
        printk("\n");
index c4a33f265dc07e53577350d5366b3a936c8bc665..82e7ec8888064589dcf642e336f11d32e209dd0b 100644 (file)
@@ -80,8 +80,6 @@ void machine_restart(char * __unused)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
        if (mach_halt)
@@ -89,8 +87,6 @@ void machine_halt(void)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        if (mach_power_off)
@@ -98,8 +94,6 @@ void machine_power_off(void)
        for (;;);
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 void show_regs(struct pt_regs * regs)
 {
        printk(KERN_NOTICE "\n");
index 7e0a9821931ad30d27c813db7d58a5f7778a7bab..ae2ba67b7ef61f1054f8f5f19f625d3f78b5f6ed 100644 (file)
@@ -26,18 +26,13 @@ void machine_restart(char *command)
        _machine_restart(command);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
        _machine_halt();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        _machine_power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);
index 46e4a6881f11cca2d7dc77ae1e7b71b02b15241a..4fc04501d5e5d9c9752d7573b47775cfdc4cd539 100644 (file)
@@ -150,8 +150,6 @@ void machine_restart(char *cmd)
 
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
        /*
@@ -160,8 +158,6 @@ void machine_halt(void)
        */
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 
 /*
  * This routine is called from sys_reboot to actually turn off the
@@ -187,8 +183,6 @@ void machine_power_off(void)
               KERN_EMERG "Please power this system off now.");
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 
 /*
  * Create a kernel thread
index c42f753269396ff297e02669004e3c126a921f26..929e5d1cc7fea145ecffdd2e6968b929dde1ebd6 100644 (file)
@@ -121,8 +121,6 @@ void machine_restart(char *cmd)
        ppc_md.restart(cmd);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_power_off(void)
 {
 #ifdef CONFIG_NVRAM
@@ -131,8 +129,6 @@ void machine_power_off(void)
        ppc_md.power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 void machine_halt(void)
 {
 #ifdef CONFIG_NVRAM
@@ -141,8 +137,6 @@ void machine_halt(void)
        ppc_md.halt();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void (*pm_power_off)(void) = machine_power_off;
 
 #ifdef CONFIG_TAU
index d1b33f0b26cb12261712d00b8e203cf9e7d24129..e80f10c89824c2874c8007d2d6914391a5a8bfbf 100644 (file)
@@ -694,7 +694,6 @@ void machine_restart(char *cmd)
        local_irq_disable();
        while (1) ;
 }
-EXPORT_SYMBOL(machine_restart);
 
 void machine_power_off(void)
 {
@@ -707,7 +706,6 @@ void machine_power_off(void)
        local_irq_disable();
        while (1) ;
 }
-EXPORT_SYMBOL(machine_power_off);
 
 void machine_halt(void)
 {
@@ -720,7 +718,6 @@ void machine_halt(void)
        local_irq_disable();
        while (1) ;
 }
-EXPORT_SYMBOL(machine_halt);
 
 static int ppc64_panic_event(struct notifier_block *this,
                              unsigned long event, void *ptr)
index b6d740ac0e6eedb8f0d1d7255b4d872463acc702..a12183989a79b8e461df14b380ecacaf950fe018 100644 (file)
@@ -299,24 +299,18 @@ void machine_restart(char *command)
        _machine_restart(command);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
        console_unblank();
        _machine_halt();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        console_unblank();
        _machine_power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 static void __init
 add_memory_hole(unsigned long start, unsigned long end)
 {
index 3d024590c24e8f34c185ecd49a13b5ec547ba6ae..6dce9d0b81f8b8d53d4ac78378e4af0c5cbd82db 100644 (file)
@@ -80,8 +80,6 @@ void machine_restart(char * __unused)
                     "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001));
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt(void)
 {
 #if defined(CONFIG_SH_HS7751RVOIP)
@@ -96,8 +94,6 @@ void machine_halt(void)
                cpu_sleep();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
 #if defined(CONFIG_SH_HS7751RVOIP)
@@ -110,8 +106,6 @@ void machine_power_off(void)
 #endif
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 void show_regs(struct pt_regs * regs)
 {
        printk("\n");
index 2c216ffeea90b61535eae1cd37d07b7f9acdb479..29e72b57d4fd2cee97e6e9bc8b8ed63812c448f5 100644 (file)
@@ -158,8 +158,6 @@ void machine_halt(void)
        panic("Halt failed!");
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_restart(char * cmd)
 {
        char *p;
@@ -180,8 +178,6 @@ void machine_restart(char * cmd)
        panic("Reboot failed!");
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_power_off(void)
 {
 #ifdef CONFIG_SUN_AUXIO
@@ -191,8 +187,6 @@ void machine_power_off(void)
        machine_halt();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 static DEFINE_SPINLOCK(sparc_backtrace_lock);
 
 void __show_backtrace(unsigned long fp)
index 533104c7907d970994d3363eaa79b2126e327d8c..946cee0257ea2dc34fe25350fc71910b235dfc7c 100644 (file)
@@ -69,8 +69,6 @@ void machine_power_off(void)
        machine_halt();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 #ifdef CONFIG_PCI
 static int powerd(void *__unused)
 {
index cffb1c8ab4fc4adb071e288954e6b95be9adf7cd..07424b075938b7651e53380cddcf712c42b324e0 100644 (file)
@@ -124,8 +124,6 @@ void machine_halt(void)
        panic("Halt failed!");
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_alt_power_off(void)
 {
        if (!serial_console && prom_palette)
@@ -154,8 +152,6 @@ void machine_restart(char * cmd)
        panic("Reboot failed!");
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 static void show_regwindow32(struct pt_regs *regs)
 {
        struct reg_window32 __user *rw;
index fcec51da1d3771abe84944ca1138853417df6bec..a637e885c5835cb7c78e31c6d40099f8473c448c 100644 (file)
@@ -49,23 +49,17 @@ void machine_restart(char * __unused)
        CHOOSE_MODE(reboot_tt(), reboot_skas());
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_power_off(void)
 {
         uml_cleanup();
        CHOOSE_MODE(halt_tt(), halt_skas());
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 void machine_halt(void)
 {
        machine_power_off();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
index 6aaeab5e8a4047c209da9e6815410ce071cde1cc..d0502e14243707489d895fd73a1b225dc16d696c 100644 (file)
@@ -132,8 +132,6 @@ void machine_restart (char *__unused)
        asm ("jmp r0"); /* Jump to the reset vector.  */
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt (void)
 {
 #ifdef CONFIG_RESET_GUARD
@@ -145,15 +143,11 @@ void machine_halt (void)
                asm ("halt; nop; nop; nop; nop; nop");
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off (void)
 {
        machine_halt ();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 /* Called before configuring an on-chip UART.  */
 void anna_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
 {
index 4059b1df11b57431c99d6e7b3f1ec0d273f7bb94..d78c5e4ea9bca4014e1d08dcd567634ac32f2d7b 100644 (file)
@@ -160,8 +160,6 @@ void machine_restart (char *__unused)
        asm ("jmp r0"); /* Jump to the reset vector.  */
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt (void)
 {
 #ifdef CONFIG_RESET_GUARD
@@ -173,15 +171,11 @@ void machine_halt (void)
                asm ("halt; nop; nop; nop; nop; nop");
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off (void)
 {
        machine_halt ();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 /* Called before configuring an on-chip UART.  */
 void as85ep1_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
 {
index 4bac5149b3c25dd1ddd0fae88670f5acfca3c4df..d8094519ad85efac9a4a6ef9e51177362988c340 100644 (file)
@@ -121,22 +121,16 @@ void machine_halt (void)
        }
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_restart (char *__unused)
 {
        machine_halt ();
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_power_off (void)
 {
        machine_halt ();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 \f
 /* Interrupts */
 
index 7ba397f77aca136c4c87f9ad66703e3f7568dfff..0c794b9e0f9b8c1187eed1d2b9e43a3f8f4e2066 100644 (file)
@@ -67,8 +67,6 @@ void machine_restart (char *__unused)
        asm ("jmp r0"); /* Jump to the reset vector.  */
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 /* This says `HALt.' in LEDese.  */
 static unsigned char halt_leds_msg[] = { 0x76, 0x77, 0x38, 0xF8 };
 
@@ -89,15 +87,11 @@ void machine_halt (void)
                asm ("halt; nop; nop; nop; nop; nop");
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off (void)
 {
        machine_halt ();
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 \f
 /* Animated LED display for timer tick.  */
 
index 4f31da96263277a6af51f58de67183cd4cb29ff2..e2cc5580fa2a1eb9191962261857388698dbbf06 100644 (file)
@@ -104,24 +104,18 @@ void machine_restart (char *__unused)
        V850_SIM_SYSCALL (exit, 0);
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_halt (void)
 {
        V850_SIM_SYSCALL (write, 1, "HALT\n", 5);
        V850_SIM_SYSCALL (exit, 0);
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off (void)
 {
        V850_SIM_SYSCALL (write, 1, "POWER OFF\n", 10);
        V850_SIM_SYSCALL (exit, 0);
 }
 
-EXPORT_SYMBOL(machine_power_off);
-
 \f
 /* Load data from a file called NAME into ram.  The address and length
    of the data image are returned in ADDR and LEN.  */
index 93a722b516bb1b2389fe37b35c7455970881d71b..9111613fb53a332dd1605f0921c64e4b529fdf76 100644 (file)
@@ -184,18 +184,13 @@ void machine_halt (void)
        for (;;) {}
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_restart (char *__unused)
 {
        machine_halt ();
 }
 
-EXPORT_SYMBOL(machine_restart);
-
 void machine_power_off (void)
 {
        machine_halt ();
 }
 
-EXPORT_SYMBOL(machine_power_off);
index cc935427d532355672d06034a644bcbc142e4342..c45d6a05b984f6d1e43e863e6da10b2b5f96d074 100644 (file)
@@ -591,11 +591,15 @@ ia32_sys_call_table:
        .quad compat_sys_mq_getsetattr
        .quad compat_sys_kexec_load     /* reserved for kexec */
        .quad compat_sys_waitid
-       .quad quiet_ni_syscall          /* sys_altroot */
+       .quad quiet_ni_syscall          /* 285: sys_altroot */
        .quad sys_add_key
        .quad sys_request_key
        .quad sys_keyctl
-       /* don't forget to change IA32_NR_syscalls */
+       .quad sys_ioprio_set
+       .quad sys_ioprio_get            /* 290 */
+       .quad sys_inotify_init
+       .quad sys_inotify_add_watch
+       .quad sys_inotify_rm_watch
 ia32_syscall_end:              
        .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
                .quad ni_syscall
index 68a9ab06ee7c21cfe59c23b0910e6a3f7e151683..70caf89d4c2163feca29ef3029d7e262c8255bdb 100644 (file)
@@ -61,6 +61,7 @@
 #include <linux/ptrace.h>
 #include <linux/highuid.h>
 #include <linux/vmalloc.h>
+#include <linux/fsnotify.>
 #include <asm/mman.h>
 #include <asm/types.h>
 #include <asm/uaccess.h>
@@ -984,8 +985,10 @@ asmlinkage long sys32_open(const char __user * filename, int flags, int mode)
                        if (IS_ERR(f)) {
                                put_unused_fd(fd); 
                                fd = error;
-                       } else
+                       } else {
+                               fsnotify_open(f->f_dentry);
                                fd_install(fd, f);
+                       }
                }
                putname(tmp);
        }
index 57e71dbdfd69952732a24fa8c4ac54a234e49d80..47f95687905fd22d417d54632a40b784d186ed82 100644 (file)
@@ -109,23 +109,10 @@ void machine_shutdown(void)
        local_irq_enable();
 }
 
-void machine_restart(char * __unused)
+void machine_emergency_restart(void)
 {
        int i;
 
-       printk("machine restart\n");
-
-       machine_shutdown();
-
-       if (!reboot_force) {
-               local_irq_disable();
-#ifndef CONFIG_SMP
-               disable_local_APIC();
-#endif
-               disable_IO_APIC();
-               local_irq_enable();
-       }
-       
        /* Tell the BIOS if we want cold or warm reboot */
        *((unsigned short *)__va(0x472)) = reboot_mode;
        
@@ -150,18 +137,26 @@ void machine_restart(char * __unused)
        }      
 }
 
-EXPORT_SYMBOL(machine_restart);
+void machine_restart(char * __unused)
+{
+       printk("machine restart\n");
+
+       if (!reboot_force) {
+               machine_shutdown();
+       }
+       machine_emergency_restart();
+}
 
 void machine_halt(void)
 {
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
+       if (!reboot_force) {
+               machine_shutdown();
+       }
        if (pm_power_off)
                pm_power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);
index 1fc86e6b5ab95969134f57513a92daef69ff0f7a..186b182c582522810c22fd44cecf88afd87c97f1 100644 (file)
@@ -19,8 +19,6 @@
 
 int acpi_sleep_prepare(u32 acpi_state)
 {
-       /* Flag to do not allow second time invocation for S5 state */
-       static int shutdown_prepared = 0;
 #ifdef CONFIG_ACPI_SLEEP
        /* do we have a wakeup address for S2 and S3? */
        /* Here, we support only S4BIOS, those we set the wakeup address */
@@ -38,28 +36,23 @@ int acpi_sleep_prepare(u32 acpi_state)
        acpi_enable_wakeup_device_prep(acpi_state);
 #endif
        if (acpi_state == ACPI_STATE_S5) {
-               /* Check if we were already called */
-               if (shutdown_prepared)
-                       return 0;
                acpi_wakeup_gpe_poweroff_prepare();
-               shutdown_prepared = 1;
        }
        acpi_enter_sleep_state_prep(acpi_state);
        return 0;
 }
 
+#ifdef CONFIG_PM
+
 void acpi_power_off(void)
 {
+       /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
        printk("%s called\n", __FUNCTION__);
-       acpi_sleep_prepare(ACPI_STATE_S5);
        local_irq_disable();
        /* Some SMP machines only can poweroff in boot CPU */
-       set_cpus_allowed(current, cpumask_of_cpu(0));
        acpi_enter_sleep_state(ACPI_STATE_S5);
 }
 
-#ifdef CONFIG_PM
-
 static int acpi_shutdown(struct sys_device *x)
 {
        return acpi_sleep_prepare(ACPI_STATE_S5);
@@ -75,8 +68,6 @@ static struct sys_device device_acpi = {
        .cls = &acpi_sysclass,
 };
 
-#endif
-
 static int acpi_poweroff_init(void)
 {
        if (!acpi_disabled) {
@@ -86,19 +77,18 @@ static int acpi_poweroff_init(void)
                status =
                    acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b);
                if (ACPI_SUCCESS(status)) {
-                       pm_power_off = acpi_power_off;
-#ifdef CONFIG_PM
-                       {
-                               int error;
-                               error = sysdev_class_register(&acpi_sysclass);
-                               if (!error)
-                                       error = sysdev_register(&device_acpi);
-                               return error;
-                       }
-#endif
+                       int error;
+                       error = sysdev_class_register(&acpi_sysclass);
+                       if (!error)
+                               error = sysdev_register(&device_acpi);
+                       if (!error)
+                               pm_power_off = acpi_power_off;
+                       return error;
                }
        }
        return 0;
 }
 
 late_initcall(acpi_poweroff_init);
+
+#endif /* CONFIG_PM */
index 78e650fc5b411c076ce288b9926c22a1dcd239fb..81d811edf3c58ec478dd73cb239fd2714bb84f32 100644 (file)
@@ -173,7 +173,7 @@ static void hangcheck_fire(unsigned long data)
                }
                if (hangcheck_reboot) {
                        printk(KERN_CRIT "Hangcheck: hangcheck is restarting the machine.\n");
-                       machine_restart(NULL);
+                       emergency_restart();
                } else {
                        printk(KERN_CRIT "Hangcheck: hangcheck value past margin!\n");
                }
index 12d563c648f7377ce640bff741aa782c756c1051..feb25158c8ee99c6a00363da01b4ea69c63fe4eb 100644 (file)
@@ -115,7 +115,7 @@ static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
                                struct tty_struct *tty) 
 {
        local_irq_enable();
-       machine_restart(NULL);
+       emergency_restart();
 }
 
 static struct sysrq_key_op sysrq_reboot_op = {
index d10e554a14d650ef27bf31a68641ab8e15cbfb0f..f1016e3ba117f5de876078b619d22575df68dd96 100644 (file)
@@ -167,7 +167,7 @@ static irqreturn_t eurwdt_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        printk(KERN_CRIT "Would Reboot.\n");
 #else
        printk(KERN_CRIT "Initiating system reboot.\n");
-       machine_restart(NULL);
+       emergency_restart(NULL);
 #endif
        return IRQ_HANDLED;
 }
index 592dca1088662cad7cabaaaf7ef984caa5877951..6ebce3f2ef9c5fca0ef0b4cfab03b83da818efeb 100644 (file)
@@ -344,7 +344,7 @@ static int pcwd_get_status(int *status)
                        *status |= WDIOF_OVERHEAT;
                        if (temp_panic) {
                                printk (KERN_INFO PFX "Temperature overheat trip!\n");
-                               machine_power_off();
+                               kernel_power_off();
                        }
                }
        } else {
@@ -355,7 +355,7 @@ static int pcwd_get_status(int *status)
                        *status |= WDIOF_OVERHEAT;
                        if (temp_panic) {
                                printk (KERN_INFO PFX "Temperature overheat trip!\n");
-                               machine_power_off();
+                               kernel_power_off();
                        }
                }
        }
index 117903498a015c2a64641706e3edd77e32206691..0d93097f06b489c491f17626162bd658b9a9d4a5 100644 (file)
@@ -97,7 +97,7 @@ static void watchdog_fire(unsigned long data)
        else
        {
                printk(KERN_CRIT PFX "Initiating system reboot.\n");
-               machine_restart(NULL);
+               emergency_restart(NULL);
                printk(KERN_CRIT PFX "Reboot didn't ?????\n");
        }
 }
index 5684aa37988611d4525824d5e6401ee70426a9f8..1210ca0c425b3b829c2b50ef9bd921d1a5965317 100644 (file)
@@ -266,7 +266,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                printk(KERN_CRIT "Would Reboot.\n");
 #else
                printk(KERN_CRIT "Initiating system reboot.\n");
-               machine_restart(NULL);
+               emergency_restart();
 #endif
 #else
                printk(KERN_CRIT "Reset in 5ms.\n");
index 7651deda928c3cb9e02b8c7b6b43b082b07e4b4e..c80cb77b92fb0bc86261ba597489d6c6991dd145 100644 (file)
@@ -311,7 +311,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                printk(KERN_CRIT PFX "Would Reboot.\n");
 #else
                printk(KERN_CRIT PFX "Initiating system reboot.\n");
-               machine_restart(NULL);
+               emergency_restart(NULL);
 #endif
 #else
                printk(KERN_CRIT PFX "Reset in 5ms.\n");
index e3c95882353341bb103a3d9164bd12d2e3fb2d58..5d961f5e0ca0011121063d07734dbdbcff495a4d 100644 (file)
@@ -365,6 +365,7 @@ void fcp_register(fc_channel *fc, u8 type, int unregister)
                        kfree (fc->scsi_bitmap);
                        kfree (fc->cmd_slots);
                        FCND(("Unregistering\n"));
+#if 0
                        if (fc->rst_pkt) {
                                if (fc->rst_pkt->eh_state == SCSI_STATE_UNUSED)
                                        kfree(fc->rst_pkt);
@@ -373,6 +374,7 @@ void fcp_register(fc_channel *fc, u8 type, int unregister)
                                        printk("FC: Reset in progress. Now?!");
                                }
                        }
+#endif
                        FCND(("Unregistered\n"));
                }
        } else
@@ -915,6 +917,7 @@ int fcp_scsi_abort(Scsi_Cmnd *SCpnt)
        }
 }
 
+#if 0
 void fcp_scsi_reset_done(Scsi_Cmnd *SCpnt)
 {
        fc_channel *fc = FC_SCMND(SCpnt);
@@ -922,11 +925,13 @@ void fcp_scsi_reset_done(Scsi_Cmnd *SCpnt)
        fc->rst_pkt->eh_state = SCSI_STATE_FINISHED;
        up(fc->rst_pkt->device->host->eh_action);
 }
+#endif
 
 #define FCP_RESET_TIMEOUT (2*HZ)
 
 int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
 {
+#if 0 /* broken junk, but if davem wants to compile this driver, let him.. */
        unsigned long flags;
        fcp_cmd *cmd;
        fcp_cmnd *fcmd;
@@ -1000,6 +1005,7 @@ int fcp_scsi_dev_reset(Scsi_Cmnd *SCpnt)
        }
        fc->rst_pkt->eh_state = SCSI_STATE_UNUSED;
        return SUCCESS;
+#endif
 }
 
 static int __fcp_scsi_host_reset(Scsi_Cmnd *SCpnt)
index 353deb25e3978bb300865be18affdbb455545e4a..13771abea13f28f075bab7e338f787221bcbc9fd 100644 (file)
@@ -83,19 +83,6 @@ static int   mptfcDoneCtx = -1;
 static int     mptfcTaskCtx = -1;
 static int     mptfcInternalCtx = -1; /* Used only for internal commands */
 
-static struct device_attribute mptfc_queue_depth_attr = {
-       .attr = {
-               .name =         "queue_depth",
-               .mode =         S_IWUSR,
-       },
-       .store = mptscsih_store_queue_depth,
-};
-
-static struct device_attribute *mptfc_dev_attrs[] = {
-       &mptfc_queue_depth_attr,
-       NULL,
-};
-
 static struct scsi_host_template mptfc_driver_template = {
        .proc_name                      = "mptfc",
        .proc_info                      = mptscsih_proc_info,
@@ -105,6 +92,7 @@ static struct scsi_host_template mptfc_driver_template = {
        .slave_alloc                    = mptscsih_slave_alloc,
        .slave_configure                = mptscsih_slave_configure,
        .slave_destroy                  = mptscsih_slave_destroy,
+       .change_queue_depth             = mptscsih_change_queue_depth,
        .eh_abort_handler               = mptscsih_abort,
        .eh_device_reset_handler        = mptscsih_dev_reset,
        .eh_bus_reset_handler           = mptscsih_bus_reset,
@@ -116,7 +104,6 @@ static struct scsi_host_template mptfc_driver_template = {
        .max_sectors                    = 8192,
        .cmd_per_lun                    = 7,
        .use_clustering                 = ENABLE_CLUSTERING,
-       .sdev_attrs                     = mptfc_dev_attrs,
 };
 
 /****************************************************************************
@@ -267,10 +254,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                sh->sg_tablesize = numSGE;
        }
 
-       /* Set the pci device pointer in Scsi_Host structure.
-        */
-       scsi_set_device(sh, &ioc->pcidev->dev);
-
        spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 
        hd = (MPT_SCSI_HOST *) sh->hostdata;
index 4f973a49be4c125e8634dcd29db4ec5649ecc520..b9d4f78725b456e073ec0bf8e4573ea7e4259edb 100644 (file)
@@ -2234,13 +2234,27 @@ mptscsih_slave_destroy(struct scsi_device *device)
        }
 }
 
-static void
-mptscsih_set_queue_depth(struct scsi_device *device, MPT_SCSI_HOST *hd,
-       VirtDevice *pTarget, int qdepth)
+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+/*
+ *     mptscsih_change_queue_depth - This function will set a devices queue depth
+ *     @sdev: per scsi_device pointer
+ *     @qdepth: requested queue depth
+ *
+ *     Adding support for new 'change_queue_depth' api.
+*/
+int
+mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
 {
+       MPT_SCSI_HOST   *hd = (MPT_SCSI_HOST *)sdev->host->hostdata;
+       VirtDevice *pTarget;
        int     max_depth;
        int     tagged;
 
+       if (hd == NULL)
+               return 0;
+       if (!(pTarget = hd->Targets[sdev->id]))
+               return 0;
+
        if (hd->ioc->bus_type == SCSI) {
                if (pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY) {
                        if (!(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES))
@@ -2264,10 +2278,10 @@ mptscsih_set_queue_depth(struct scsi_device *device, MPT_SCSI_HOST *hd,
        else
                tagged = MSG_SIMPLE_TAG;
 
-       scsi_adjust_queue_depth(device, tagged, qdepth);
+       scsi_adjust_queue_depth(sdev, tagged, qdepth);
+       return sdev->queue_depth;
 }
 
-
 /*
  *     OS entry point to adjust the queue_depths on a per-device basis.
  *     Called once per device the bus scan. Use it to force the queue_depth
@@ -2317,7 +2331,7 @@ mptscsih_slave_configure(struct scsi_device *device)
 
        mptscsih_initTarget(hd, device->channel, device->id, device->lun,
                device->inquiry, device->inquiry_len );
-       mptscsih_set_queue_depth(device, hd, pTarget, MPT_SCSI_CMD_PER_DEV_HIGH);
+       mptscsih_change_queue_depth(device, MPT_SCSI_CMD_PER_DEV_HIGH);
 
        dsprintk((MYIOC_s_INFO_FMT
                "Queue depth=%d, tflags=%x\n",
@@ -2337,25 +2351,6 @@ slave_configure_exit:
        return 0;
 }
 
-ssize_t
-mptscsih_store_queue_depth(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
-{
-       int                      depth;
-       struct scsi_device      *sdev = to_scsi_device(dev);
-       MPT_SCSI_HOST           *hd = (MPT_SCSI_HOST *) sdev->host->hostdata;
-       VirtDevice              *pTarget;
-
-       depth = simple_strtoul(buf, NULL, 0);
-       if (depth == 0)
-               return -EINVAL;
-       pTarget = hd->Targets[sdev->id];
-       if (pTarget == NULL)
-               return -EINVAL;
-       mptscsih_set_queue_depth(sdev, (MPT_SCSI_HOST *) sdev->host->hostdata,
-               pTarget, depth);
-       return count;
-}
-
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
  *  Private routines...
@@ -5586,7 +5581,7 @@ EXPORT_SYMBOL(mptscsih_taskmgmt_complete);
 EXPORT_SYMBOL(mptscsih_scandv_complete);
 EXPORT_SYMBOL(mptscsih_event_process);
 EXPORT_SYMBOL(mptscsih_ioc_reset);
-EXPORT_SYMBOL(mptscsih_store_queue_depth);
+EXPORT_SYMBOL(mptscsih_change_queue_depth);
 EXPORT_SYMBOL(mptscsih_timer_expired);
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
index debb8ac5954571a683e26e7e77023b8ec382665d..51c0255ac16ec23b9f5634c7f0fec1e3862caebd 100644 (file)
@@ -103,5 +103,5 @@ extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_F
 extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
 extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
 extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
-extern ssize_t mptscsih_store_queue_depth(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
+extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
 extern void mptscsih_timer_expired(unsigned long data);
index e0c0ee5bc9662386e73c79af9ceded98d9623a72..dfa8806b1e13d618875242352ab8ee32de0781b3 100644 (file)
@@ -102,19 +102,6 @@ static int mptspiDoneCtx = -1;
 static int     mptspiTaskCtx = -1;
 static int     mptspiInternalCtx = -1; /* Used only for internal commands */
 
-static struct device_attribute mptspi_queue_depth_attr = {
-       .attr = {
-               .name =         "queue_depth",
-               .mode =         S_IWUSR,
-       },
-       .store = mptscsih_store_queue_depth,
-};
-
-static struct device_attribute *mptspi_dev_attrs[] = {
-       &mptspi_queue_depth_attr,
-       NULL,
-};
-
 static struct scsi_host_template mptspi_driver_template = {
        .proc_name                      = "mptspi",
        .proc_info                      = mptscsih_proc_info,
@@ -124,6 +111,7 @@ static struct scsi_host_template mptspi_driver_template = {
        .slave_alloc                    = mptscsih_slave_alloc,
        .slave_configure                = mptscsih_slave_configure,
        .slave_destroy                  = mptscsih_slave_destroy,
+       .change_queue_depth             = mptscsih_change_queue_depth,
        .eh_abort_handler               = mptscsih_abort,
        .eh_device_reset_handler        = mptscsih_dev_reset,
        .eh_bus_reset_handler           = mptscsih_bus_reset,
@@ -135,7 +123,6 @@ static struct scsi_host_template mptspi_driver_template = {
        .max_sectors                    = 8192,
        .cmd_per_lun                    = 7,
        .use_clustering                 = ENABLE_CLUSTERING,
-       .sdev_attrs                     = mptspi_dev_attrs,
 };
 
 
@@ -287,10 +274,6 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                sh->sg_tablesize = numSGE;
        }
 
-       /* Set the pci device pointer in Scsi_Host structure.
-        */
-       scsi_set_device(sh, &ioc->pcidev->dev);
-
        spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 
        hd = (MPT_SCSI_HOST *) sh->hostdata;
index 0a387106acb0ebd3bb4c835e54dfac7d89bac1b9..7a87298bae993f0cadc5676a377f4ae2b65851c9 100644 (file)
@@ -30,20 +30,9 @@ static int jornada720_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
    */
   GRER |= 0x00000002;
   /* Set GPIO_A<3:1> to be outputs for PCMCIA/CF power controller: */
-  PA_DDR = 0;
-  PA_DWR = 0;
-  PA_SDR = 0;
-  PA_SSR = 0;
-
-  PB_DDR = 0;
-  PB_DWR = 0x01;
-  PB_SDR = 0;
-  PB_SSR = 0;
-
-  PC_DDR = 0x88;
-  PC_DWR = 0x20;
-  PC_SDR = 0;
-  PC_SSR = 0;
+  sa1111_set_io_dir(SA1111_DEV(skt->dev), GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0, 0);
+  sa1111_set_io(SA1111_DEV(skt->dev), GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
+  sa1111_set_sleep_io(SA1111_DEV(skt->dev), GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
 
   return sa1111_pcmcia_hw_init(skt);
 }
@@ -95,7 +84,7 @@ printk("%s(): config socket %d vcc %d vpp %d\n", __FUNCTION__,
     unsigned long flags;
 
     local_irq_save(flags);
-    PA_DWR = (PA_DWR & ~pa_dwr_mask) | pa_dwr_set;
+    sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, pa_dwr_set);
     local_irq_restore(flags);
   }
 
index fdb0f45f7336cf96cb01c106800ff90b15a31aaf..4fa524687bc51c6bd48cb5fe582748d022da6094 100644 (file)
@@ -13,6 +13,7 @@ Supported Cards/Chipsets
        Adaptec 2020S
        Adaptec 2025S
        Adaptec 2120S
+       Adaptec 2130S
        Adaptec 2200S
        Adaptec 2230S
        Adaptec 2240S
@@ -35,6 +36,13 @@ Supported Cards/Chipsets
        HP NetRAID-4M
        Legend S220
        Legend S230
+       IBM ServeRAID 8i
+       ICP 9014R0
+       ICP 9024R0
+       ICP 9047MA
+       ICP 9087MA
+       ICP 9085LI
+       ICP 5085AU
 
 People
 -------------------------
index 25856a21d982c401cb23c5ed8b3f88c5bb8df340..2f148b4617dc96f842395a2ea22badd7b659c928 100644 (file)
@@ -1,6 +1,4 @@
 o      Testing
 o      More testing
-o      Feature request: display the firmware/bios/etc revisions in the
-       /proc info
 o      Drop irq_mask, basically unused
 o      I/O size increase
index f02c99641467394a8f266c662eca1ae8603b1460..ccdf440021fbe23c8997fc48f4e4928857b906a3 100644 (file)
@@ -276,7 +276,6 @@ int aac_get_containers(struct aac_dev *dev)
 
        if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
                maximum_num_containers = MAXIMUM_NUM_CONTAINERS;
-
        fsa_dev_ptr = (struct fsa_dev_info *) kmalloc(
          sizeof(*fsa_dev_ptr) * maximum_num_containers, GFP_KERNEL);
        if (!fsa_dev_ptr) {
@@ -527,6 +526,11 @@ static char *container_types[] = {
         "V-MIRRORS",          
         "PSEUDO R4",          
        "RAID50",
+       "RAID5D",
+       "RAID5D0",
+       "RAID1E",
+       "RAID6",
+       "RAID60",
         "Unknown"
 };
 
@@ -610,7 +614,9 @@ int aac_get_adapter_info(struct aac_dev* dev)
        struct fib* fibptr;
        int rcode;
        u32 tmp;
-       struct aac_adapter_info * info;
+       struct aac_adapter_info *info;
+       struct aac_bus_info *command;
+       struct aac_bus_info_response *bus_info;
 
        if (!(fibptr = fib_alloc(dev)))
                return -ENOMEM;
@@ -655,6 +661,36 @@ int aac_get_adapter_info(struct aac_dev* dev)
                        memcpy(&dev->supplement_adapter_info, info, sizeof(*info));
        }
 
+
+       /* 
+        * GetBusInfo 
+        */
+
+       fib_init(fibptr);
+
+       bus_info = (struct aac_bus_info_response *) fib_data(fibptr);
+
+       memset(bus_info, 0, sizeof(*bus_info));
+
+       command = (struct aac_bus_info *)bus_info;
+
+       command->Command = cpu_to_le32(VM_Ioctl);
+       command->ObjType = cpu_to_le32(FT_DRIVE);
+       command->MethodId = cpu_to_le32(1);
+       command->CtlCmd = cpu_to_le32(GetBusInfo);
+
+       rcode = fib_send(ContainerCommand,
+                        fibptr,
+                        sizeof (*bus_info),
+                        FsaNormal,
+                        1, 1,
+                        NULL, NULL);
+
+       if (rcode >= 0 && le32_to_cpu(bus_info->Status) == ST_OK) {
+               dev->maximum_num_physicals = le32_to_cpu(bus_info->TargetsPerBus);
+               dev->maximum_num_channels = le32_to_cpu(bus_info->BusCount);
+       }
+
        tmp = le32_to_cpu(dev->adapter_info.kernelrev);
        printk(KERN_INFO "%s%d: kernel %d.%d-%d[%d] %.*s\n", 
                        dev->name, 
@@ -1818,7 +1854,9 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
        u32 flag;
        u32 timeout;
 
-       if( scsicmd->device->id > 15 || scsicmd->device->lun > 7) {
+       dev = (struct aac_dev *)scsicmd->device->host->hostdata;
+       if (scsicmd->device->id >= dev->maximum_num_physicals || 
+                       scsicmd->device->lun > 7) {
                scsicmd->result = DID_NO_CONNECT << 16;
                scsicmd->scsi_done(scsicmd);
                return 0;
index 42484417cef7d9b1d89beead3a9fcd21b24abdee..3a11a536c0dab39e351f8db5e969f1e6c72220c8 100644 (file)
@@ -845,6 +845,28 @@ struct aac_supplement_adapter_info
 #define AAC_SIS_VERSION_V3     3
 #define AAC_SIS_SLOT_UNKNOWN   0xFF
 
+#define GetBusInfo 0x00000009
+struct aac_bus_info {
+       __le32  Command;        /* VM_Ioctl */
+       __le32  ObjType;        /* FT_DRIVE */
+       __le32  MethodId;       /* 1 = SCSI Layer */
+       __le32  ObjectId;       /* Handle */
+       __le32  CtlCmd;         /* GetBusInfo */
+};
+
+struct aac_bus_info_response {
+       __le32  Status;         /* ST_OK */
+       __le32  ObjType;
+       __le32  MethodId;       /* unused */
+       __le32  ObjectId;       /* unused */
+       __le32  CtlCmd;         /* unused */
+       __le32  ProbeComplete;
+       __le32  BusCount;
+       __le32  TargetsPerBus;
+       u8      InitiatorBusId[10];
+       u8      BusValid[10];
+};
+
 /*
  * Battery platforms
  */
@@ -934,6 +956,8 @@ struct aac_dev
 
        struct Scsi_Host        *scsi_host_ptr;
        int                     maximum_num_containers;
+       int                     maximum_num_physicals;
+       int                     maximum_num_channels;
        struct fsa_dev_info     *fsa_dev;
        pid_t                   thread_pid;
        int                     cardtype;
index 390cd67c57c03fdbbc5bfe77177bbe6d85a8d1ff..85387099aab238db175a7b53a238a819f597ba3e 100644 (file)
@@ -517,7 +517,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
        }
        if (dev->dac_support == 1) {
                struct user_sgmap64* upsg = (struct user_sgmap64*)&user_srbcmd->sg;
-               struct sgmap64* psg = (struct sgmap64*)&user_srbcmd->sg;
+               struct sgmap64* psg = (struct sgmap64*)&srbcmd->sg;
                struct user_sgmap* usg;
                byte_count = 0;
 
index f7e9c89c491548ce40080d0c355f4b0f98492602..c1a4f978fcbad1156f9badd33af44f122e2bf5ed 100644 (file)
@@ -102,32 +102,43 @@ static struct pci_device_id aac_pci_tbl[] = {
        { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */
        { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */
        { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */
-       { 0x9005, 0x0286, 0x9005, 0x0800, 0, 0, 25 }, /* Callisto Jupiter Platform */
-       { 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 26 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
-       { 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 27 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
-       { 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 28 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */
-       { 0x9005, 0x0285, 0x1028, 0x0291, 0, 0, 29 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */
-       { 0x9005, 0x0285, 0x9005, 0x0292, 0, 0, 30 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */
-       { 0x9005, 0x0285, 0x9005, 0x0293, 0, 0, 31 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */
-       { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 32 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
-       { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 33 }, /* AAR-2610SA PCI SATA 6ch */
-       { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 34 }, /* ASR-2240S (SabreExpress) */
-       { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 35 }, /* ASR-4005SAS */
-       { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 36 }, /* IBM 8i (AvonPark) */
-       { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 37 }, /* ASR-4000SAS (BlackBird) */
-       { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 38 }, /* ASR-4800SAS (Marauder-X) */
-       { 0x9005, 0x0285, 0x9005, 0x029A, 0, 0, 39 }, /* ASR-4805SAS (Marauder-E) */
-
-       { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 40 }, /* Perc 320/DC*/
-       { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 41 }, /* Adaptec 5400S (Mustang)*/
-       { 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 42 }, /* Adaptec 5400S (Mustang)*/
-       { 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 43 }, /* Dell PERC2/QC */
-       { 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 44 }, /* HP NetRAID-4M */
-
-       { 0x9005, 0x0285, 0x1028, PCI_ANY_ID, 0, 0, 45 }, /* Dell Catchall */
-       { 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 46 }, /* Legend Catchall */
-       { 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 47 }, /* Adaptec Catch All */
-       { 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 48 }, /* Adaptec Rocket Catch All */
+       { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024R0 (Lancer) */
+       { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */
+       { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */
+       { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */
+       { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5085AU (Hurricane) */
+       { 0x9005, 0x0285, 0x9005, 0x02a4, 0, 0, 30 }, /* ICP9085LI (Marauder-X) */
+       { 0x9005, 0x0285, 0x9005, 0x02a5, 0, 0, 31 }, /* ICP5085BR (Marauder-E) */
+       { 0x9005, 0x0287, 0x9005, 0x0800, 0, 0, 32 }, /* Themisto Jupiter Platform */
+       { 0x9005, 0x0200, 0x9005, 0x0200, 0, 0, 32 }, /* Themisto Jupiter Platform */
+       { 0x9005, 0x0286, 0x9005, 0x0800, 0, 0, 33 }, /* Callisto Jupiter Platform */
+       { 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 34 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
+       { 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 35 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
+       { 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 36 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */
+       { 0x9005, 0x0285, 0x1028, 0x0291, 0, 0, 37 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */
+       { 0x9005, 0x0285, 0x9005, 0x0292, 0, 0, 38 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */
+       { 0x9005, 0x0285, 0x9005, 0x0293, 0, 0, 39 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */
+       { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 40 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
+       { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 41 }, /* AAR-2610SA PCI SATA 6ch */
+       { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 42 }, /* ASR-2240S (SabreExpress) */
+       { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 43 }, /* ASR-4005SAS */
+       { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 44 }, /* IBM 8i (AvonPark) */
+       { 0x9005, 0x0285, 0x1014, 0x0312, 0, 0, 44 }, /* IBM 8i (AvonPark Lite) */
+       { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 45 }, /* ASR-4000SAS (BlackBird) */
+       { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 46 }, /* ASR-4800SAS (Marauder-X) */
+       { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 47 }, /* ASR-4805SAS (Marauder-E) */
+       { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 48 }, /* ASR-4810SAS (Hurricane */
+
+       { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 49 }, /* Perc 320/DC*/
+       { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 50 }, /* Adaptec 5400S (Mustang)*/
+       { 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 51 }, /* Adaptec 5400S (Mustang)*/
+       { 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 52 }, /* Dell PERC2/QC */
+       { 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 53 }, /* HP NetRAID-4M */
+
+       { 0x9005, 0x0285, 0x1028, PCI_ANY_ID, 0, 0, 54 }, /* Dell Catchall */
+       { 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 55 }, /* Legend Catchall */
+       { 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 56 }, /* Adaptec Catch All */
+       { 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 57 }, /* Adaptec Rocket Catch All */
        { 0,}
 };
 MODULE_DEVICE_TABLE(pci, aac_pci_tbl);
@@ -164,6 +175,14 @@ static struct aac_driver_ident aac_drivers[] = {
        { aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2820SA      ", 1 }, /* AAR-2820SA (Intruder) */
        { aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2620SA      ", 1 }, /* AAR-2620SA (Intruder) */
        { aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2420SA      ", 1 }, /* AAR-2420SA (Intruder) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9024R0       ", 2 }, /* ICP9024R0 (Lancer) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9014R0       ", 1 }, /* ICP9014R0 (Lancer) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9047MA       ", 1 }, /* ICP9047MA (Lancer) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9087MA       ", 1 }, /* ICP9087MA (Lancer) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP5085AU       ", 1 }, /* ICP5085AU (Hurricane) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9085LI       ", 1 }, /* ICP9085LI (Marauder-X) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP5085BR       ", 1 }, /* ICP5085BR (Marauder-E) */
+       { NULL        , "aacraid",  "ADAPTEC ", "Themisto        ", 0, AAC_QUIRK_SLAVE }, /* Jupiter Platform */
        { aac_rkt_init, "aacraid",  "ADAPTEC ", "Callisto        ", 2, AAC_QUIRK_MASTER }, /* Jupiter Platform */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2020SA       ", 1 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2025SA       ", 1 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
@@ -175,10 +194,11 @@ static struct aac_driver_ident aac_drivers[] = {
        { aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-2610SA      ", 1 }, /* SATA 6Ch (Bearcat) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2240S       ", 1 }, /* ASR-2240S (SabreExpress) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4005SAS     ", 1 }, /* ASR-4005SAS */
-       { aac_rx_init, "aacraid",  "IBM     ", "ServeRAID 8i    ", 1 }, /* IBM 8i (AvonPark) */
+       { aac_rx_init, "ServeRAID","IBM     ", "ServeRAID 8i    ", 1 }, /* IBM 8i (AvonPark) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4000SAS     ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4800SAS     ", 1 }, /* ASR-4800SAS (Marauder-X) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4805SAS     ", 1 }, /* ASR-4805SAS (Marauder-E) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4810SAS     ", 1 }, /* ASR-4810SAS (Hurricane) */
 
        { aac_rx_init, "percraid", "DELL    ", "PERC 320/DC     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/
        { aac_sa_init, "aacraid",  "ADAPTEC ", "Adaptec 5400S   ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/
@@ -681,7 +701,7 @@ static struct scsi_host_template aac_driver_template = {
        .slave_configure                = aac_slave_configure,
        .eh_host_reset_handler          = aac_eh_reset,
        .can_queue                      = AAC_NUM_IO_FIB,       
-       .this_id                        = 16,
+       .this_id                        = MAXIMUM_NUM_CONTAINERS,
        .sg_tablesize                   = 16,
        .max_sectors                    = 128,
 #if (AAC_NUM_IO_FIB > 256)
@@ -760,6 +780,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
                if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL))
                        goto out_free_fibs;
 
+       aac->maximum_num_channels = aac_drivers[index].channels;
        aac_get_adapter_info(aac);
 
        /*
@@ -786,7 +807,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
         * physical channels are address by their actual physical number+1
         */
        if (aac->nondasd_support == 1)
-               shost->max_channel = aac_drivers[index].channels+1;
+               shost->max_channel = aac->maximum_num_channels + 1;
        else
                shost->max_channel = 1;
 
@@ -795,6 +816,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
        list_add(&aac->entry, insert);
 
        shost->max_id = aac->maximum_num_containers;
+       if (shost->max_id < aac->maximum_num_physicals)
+               shost->max_id = aac->maximum_num_physicals;
        if (shost->max_id < MAXIMUM_NUM_CONTAINERS)
                shost->max_id = MAXIMUM_NUM_CONTAINERS;
        else
index 04cb5c405a2db94a232f7621c2e09f1f5599cd14..0fb93363eb2236ba53f701972d317a23b334e97b 100644 (file)
@@ -4556,8 +4556,6 @@ advansys_detect(struct scsi_host_template *tpnt)
                 continue;
             }
 
-           scsi_set_device(shp, dev);
-
             /* Save a pointer to the Scsi_Host of each board found. */
             asc_host[asc_board_count++] = shp;
 
@@ -9194,8 +9192,8 @@ asc_prt_scsi_cmnd(struct scsi_cmnd *s)
         s->sc_data_direction, s->resid);
 
     printk(
-" use_sg %u, sglist_len %u, abort_reason 0x%x\n",
-        s->use_sg, s->sglist_len, s->abort_reason);
+" use_sg %u, sglist_len %u\n",
+        s->use_sg, s->sglist_len);
 
     printk(
 " serial_number 0x%x, retries %d, allowed %d\n",
index 92703bb35982224cc48252edf1969db29b4d79cd..00f3bd1e181e7bba9514583f4b2e45b8ab752a03 100644 (file)
@@ -254,19 +254,12 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
        if (error != 0)
                return (error);
 
-       ahc_list_lock(&l);
-       /*
-        * Link this softc in with all other ahc instances.
-        */
-       ahc_softc_insert(ahc);
+       ahc->init_level++;
 
        /*
         * Enable the board's BUS drivers
         */
        ahc_outb(ahc, BCTL, ENABLE);
-
-       ahc_list_unlock(&l);
-
        return (0);
 }
 
index d4ed5e9f830a29d8ec72bd442f2fe710552ef309..70c5fb59c9ea4c07c4ec6fa04eacaeb6028907a4 100644 (file)
@@ -102,8 +102,7 @@ aic7770_probe(struct device *dev)
 
        dev_set_drvdata(dev, ahc);
 
-       if (aic7xxx_detect_complete)
-               error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
+       error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
        return (error);
 }
 
index 5f526dd0aaa1e1b2b8450109e9962ea6ead776da..6466a184a1416b0e80261ab37c7776351964304b 100644 (file)
@@ -1553,7 +1553,7 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
        ahd_queue_scb(ahd, scb);
 
        scb->platform_data->flags |= AHD_SCB_UP_EH_SEM;
-       spin_unlock_irq(&ahd->platform_data->spin_lock);
+       ahd_unlock(ahd, &s);
        init_timer(&timer);
        timer.data = (u_long)scb;
        timer.expires = jiffies + (5 * HZ);
@@ -1567,7 +1567,7 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
                printf("Timer Expired\n");
                retval = FAILED;
        }
-       spin_lock_irq(&ahd->platform_data->spin_lock);
+       ahd_lock(ahd, &s);
        ahd_schedule_runq(ahd);
        ahd_linux_run_complete_queue(ahd);
        ahd_unlock(ahd, &s);
index 0948d50ae75c5661353de44e560390b957ec930d..088cbc23743d56070c47e0e8c828b690bd83c2a0 100644 (file)
@@ -1023,9 +1023,6 @@ struct ahc_softc {
        struct cs                *critical_sections;
        u_int                     num_critical_sections;
 
-       /* Links for chaining softcs */
-       TAILQ_ENTRY(ahc_softc)    links;
-
        /* Channel Names ('A', 'B', etc.) */
        char                      channel;
        char                      channel_b;
@@ -1110,9 +1107,6 @@ struct ahc_softc {
        uint16_t                  user_tagenable;/* Tagged Queuing allowed */
 };
 
-TAILQ_HEAD(ahc_softc_tailq, ahc_softc);
-extern struct ahc_softc_tailq ahc_tailq;
-
 /************************ Active Device Information ***************************/
 typedef enum {
        ROLE_UNKNOWN,
@@ -1198,7 +1192,6 @@ void                       ahc_intr_enable(struct ahc_softc *ahc, int enable);
 void                    ahc_pause_and_flushwork(struct ahc_softc *ahc);
 int                     ahc_suspend(struct ahc_softc *ahc); 
 int                     ahc_resume(struct ahc_softc *ahc);
-void                    ahc_softc_insert(struct ahc_softc *);
 void                    ahc_set_unit(struct ahc_softc *, int);
 void                    ahc_set_name(struct ahc_softc *, char *);
 void                    ahc_alloc_scbs(struct ahc_softc *ahc);
index 8a2bb6f8d77b003396b4ac3721d24c9fa0717723..7bc01e41bcce79a070348e5ab1138db5154384ef 100644 (file)
@@ -52,9 +52,6 @@
 #include <dev/aic7xxx/aicasm/aicasm_insformat.h>
 #endif
 
-/****************************** Softc Data ************************************/
-struct ahc_softc_tailq ahc_tailq = TAILQ_HEAD_INITIALIZER(ahc_tailq);
-
 /***************************** Lookup Tables **********************************/
 char *ahc_chip_names[] =
 {
@@ -3878,62 +3875,6 @@ ahc_softc_init(struct ahc_softc *ahc)
        return (0);
 }
 
-void
-ahc_softc_insert(struct ahc_softc *ahc)
-{
-       struct ahc_softc *list_ahc;
-
-#if AHC_PCI_CONFIG > 0
-       /*
-        * Second Function PCI devices need to inherit some
-        * settings from function 0.
-        */
-       if ((ahc->chip & AHC_BUS_MASK) == AHC_PCI
-        && (ahc->features & AHC_MULTI_FUNC) != 0) {
-               TAILQ_FOREACH(list_ahc, &ahc_tailq, links) {
-                       ahc_dev_softc_t list_pci;
-                       ahc_dev_softc_t pci;
-
-                       list_pci = list_ahc->dev_softc;
-                       pci = ahc->dev_softc;
-                       if (ahc_get_pci_slot(list_pci) == ahc_get_pci_slot(pci)
-                        && ahc_get_pci_bus(list_pci) == ahc_get_pci_bus(pci)) {
-                               struct ahc_softc *master;
-                               struct ahc_softc *slave;
-
-                               if (ahc_get_pci_function(list_pci) == 0) {
-                                       master = list_ahc;
-                                       slave = ahc;
-                               } else {
-                                       master = ahc;
-                                       slave = list_ahc;
-                               }
-                               slave->flags &= ~AHC_BIOS_ENABLED; 
-                               slave->flags |=
-                                   master->flags & AHC_BIOS_ENABLED;
-                               slave->flags &= ~AHC_PRIMARY_CHANNEL; 
-                               slave->flags |=
-                                   master->flags & AHC_PRIMARY_CHANNEL;
-                               break;
-                       }
-               }
-       }
-#endif
-
-       /*
-        * Insertion sort into our list of softcs.
-        */
-       list_ahc = TAILQ_FIRST(&ahc_tailq);
-       while (list_ahc != NULL
-           && ahc_softc_comp(ahc, list_ahc) <= 0)
-               list_ahc = TAILQ_NEXT(list_ahc, links);
-       if (list_ahc != NULL)
-               TAILQ_INSERT_BEFORE(list_ahc, ahc, links);
-       else
-               TAILQ_INSERT_TAIL(&ahc_tailq, ahc, links);
-       ahc->init_level++;
-}
-
 void
 ahc_set_unit(struct ahc_softc *ahc, int unit)
 {
index b89094db14c1774bddda35ccdbac8eaaf20fe148..116d0f51ca2cae984bc50d09c0d13931f6cbcebf 100644 (file)
@@ -136,10 +136,6 @@ static struct scsi_transport_template *ahc_linux_transport_template = NULL;
 #include <linux/blkdev.h>              /* For block_size() */
 #include <linux/delay.h>       /* For ssleep/msleep */
 
-/*
- * Lock protecting manipulation of the ahc softc list.
- */
-spinlock_t ahc_list_spinlock;
 
 /*
  * Set this to the delay in seconds after SCSI bus reset.
@@ -291,25 +287,6 @@ ahc_print_path(struct ahc_softc *ahc, struct scb *scb)
  */
 static uint32_t aic7xxx_no_reset;
 
-/*
- * Certain PCI motherboards will scan PCI devices from highest to lowest,
- * others scan from lowest to highest, and they tend to do all kinds of
- * strange things when they come into contact with PCI bridge chips.  The
- * net result of all this is that the PCI card that is actually used to boot
- * the machine is very hard to detect.  Most motherboards go from lowest
- * PCI slot number to highest, and the first SCSI controller found is the
- * one you boot from.  The only exceptions to this are when a controller
- * has its BIOS disabled.  So, we by default sort all of our SCSI controllers
- * from lowest PCI slot number to highest PCI slot number.  We also force
- * all controllers with their BIOS disabled to the end of the list.  This
- * works on *almost* all computers.  Where it doesn't work, we have this
- * option.  Setting this option to non-0 will reverse the order of the sort
- * to highest first, then lowest, but will still leave cards with their BIOS
- * disabled at the very end.  That should fix everyone up unless there are
- * really strange cirumstances.
- */
-static uint32_t aic7xxx_reverse_scan;
-
 /*
  * Should we force EXTENDED translation on a controller.
  *     0 == Use whatever is in the SEEPROM or default to off
@@ -337,13 +314,6 @@ static uint32_t aic7xxx_pci_parity = ~0;
  */
 uint32_t aic7xxx_allow_memio = ~0;
 
-/*
- * aic7xxx_detect() has been run, so register all device arrivals
- * immediately with the system rather than deferring to the sorted
- * attachment performed by aic7xxx_detect().
- */
-int aic7xxx_detect_complete;
-
 /*
  * So that we can set how long each device is given as a selection timeout.
  * The table of values goes like this:
@@ -423,7 +393,9 @@ static int ahc_linux_run_command(struct ahc_softc*,
 static void ahc_linux_setup_tag_info_global(char *p);
 static aic_option_callback_t ahc_linux_setup_tag_info;
 static int  aic7xxx_setup(char *s);
-static int  ahc_linux_next_unit(void);
+
+static int ahc_linux_unit;
+
 
 /********************************* Inlines ************************************/
 static __inline void ahc_linux_unmap_scb(struct ahc_softc*, struct scb*);
@@ -475,48 +447,6 @@ ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
        return (consumed);
 }
 
-/*
- * Try to detect an Adaptec 7XXX controller.
- */
-static int
-ahc_linux_detect(struct scsi_host_template *template)
-{
-       struct  ahc_softc *ahc;
-       int     found = 0;
-
-       /*
-        * If we've been passed any parameters, process them now.
-        */
-       if (aic7xxx)
-               aic7xxx_setup(aic7xxx);
-
-       template->proc_name = "aic7xxx";
-
-       /*
-        * Initialize our softc list lock prior to
-        * probing for any adapters.
-        */
-       ahc_list_lockinit();
-
-       found = ahc_linux_pci_init();
-       if (!ahc_linux_eisa_init())
-               found++;
-       
-       /*
-        * Register with the SCSI layer all
-        * controllers we've found.
-        */
-       TAILQ_FOREACH(ahc, &ahc_tailq, links) {
-
-               if (ahc_linux_register_host(ahc, template) == 0)
-                       found++;
-       }
-
-       aic7xxx_detect_complete++;
-
-       return (found);
-}
-
 /*
  * Return a string describing the driver.
  */
@@ -848,6 +778,7 @@ ahc_linux_bus_reset(struct scsi_cmnd *cmd)
 struct scsi_host_template aic7xxx_driver_template = {
        .module                 = THIS_MODULE,
        .name                   = "aic7xxx",
+       .proc_name              = "aic7xxx",
        .proc_info              = ahc_linux_proc_info,
        .info                   = ahc_linux_info,
        .queuecommand           = ahc_linux_queue,
@@ -959,99 +890,6 @@ ahc_dmamap_unload(struct ahc_softc *ahc, bus_dma_tag_t dmat, bus_dmamap_t map)
        return (0);
 }
 
-/********************* Platform Dependent Functions ***************************/
-/*
- * Compare "left hand" softc with "right hand" softc, returning:
- * < 0 - lahc has a lower priority than rahc
- *   0 - Softcs are equal
- * > 0 - lahc has a higher priority than rahc
- */
-int
-ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc)
-{
-       int     value;
-       int     rvalue;
-       int     lvalue;
-
-       /*
-        * Under Linux, cards are ordered as follows:
-        *      1) VLB/EISA BIOS enabled devices sorted by BIOS address.
-        *      2) PCI devices with BIOS enabled sorted by bus/slot/func.
-        *      3) All remaining VLB/EISA devices sorted by ioport.
-        *      4) All remaining PCI devices sorted by bus/slot/func.
-        */
-       value = (lahc->flags & AHC_BIOS_ENABLED)
-             - (rahc->flags & AHC_BIOS_ENABLED);
-       if (value != 0)
-               /* Controllers with BIOS enabled have a *higher* priority */
-               return (value);
-
-       /*
-        * Same BIOS setting, now sort based on bus type.
-        * EISA and VL controllers sort together.  EISA/VL
-        * have higher priority than PCI.
-        */
-       rvalue = (rahc->chip & AHC_BUS_MASK);
-       if (rvalue == AHC_VL)
-               rvalue = AHC_EISA;
-       lvalue = (lahc->chip & AHC_BUS_MASK);
-       if (lvalue == AHC_VL)
-               lvalue = AHC_EISA;
-       value = rvalue - lvalue;
-       if (value != 0)
-               return (value);
-
-       /* Still equal.  Sort by BIOS address, ioport, or bus/slot/func. */
-       switch (rvalue) {
-#ifdef CONFIG_PCI
-       case AHC_PCI:
-       {
-               char primary_channel;
-
-               if (aic7xxx_reverse_scan != 0)
-                       value = ahc_get_pci_bus(lahc->dev_softc)
-                             - ahc_get_pci_bus(rahc->dev_softc);
-               else
-                       value = ahc_get_pci_bus(rahc->dev_softc)
-                             - ahc_get_pci_bus(lahc->dev_softc);
-               if (value != 0)
-                       break;
-               if (aic7xxx_reverse_scan != 0)
-                       value = ahc_get_pci_slot(lahc->dev_softc)
-                             - ahc_get_pci_slot(rahc->dev_softc);
-               else
-                       value = ahc_get_pci_slot(rahc->dev_softc)
-                             - ahc_get_pci_slot(lahc->dev_softc);
-               if (value != 0)
-                       break;
-               /*
-                * On multi-function devices, the user can choose
-                * to have function 1 probed before function 0.
-                * Give whichever channel is the primary channel
-                * the highest priority.
-                */
-               primary_channel = (lahc->flags & AHC_PRIMARY_CHANNEL) + 'A';
-               value = -1;
-               if (lahc->channel == primary_channel)
-                       value = 1;
-               break;
-       }
-#endif
-       case AHC_EISA:
-               if ((rahc->flags & AHC_BIOS_ENABLED) != 0) {
-                       value = rahc->platform_data->bios_address
-                             - lahc->platform_data->bios_address; 
-               } else {
-                       value = rahc->bsh.ioport
-                             - lahc->bsh.ioport; 
-               }
-               break;
-       default:
-               panic("ahc_softc_sort: invalid bus type");
-       }
-       return (value);
-}
-
 static void
 ahc_linux_setup_tag_info_global(char *p)
 {
@@ -1103,7 +941,6 @@ aic7xxx_setup(char *s)
 #ifdef AHC_DEBUG
                { "debug", &ahc_debug },
 #endif
-               { "reverse_scan", &aic7xxx_reverse_scan },
                { "periodic_otag", &aic7xxx_periodic_otag },
                { "pci_parity", &aic7xxx_pci_parity },
                { "seltime", &aic7xxx_seltime },
@@ -1178,7 +1015,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
        host->max_lun = AHC_NUM_LUNS;
        host->max_channel = (ahc->features & AHC_TWIN) ? 1 : 0;
        host->sg_tablesize = AHC_NSEG;
-       ahc_set_unit(ahc, ahc_linux_next_unit());
+       ahc_set_unit(ahc, ahc_linux_unit++);
        sprintf(buf, "scsi%d", host->host_no);
        new_name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
        if (new_name != NULL) {
@@ -1206,29 +1043,6 @@ ahc_linux_get_memsize(void)
        return ((uint64_t)si.totalram << PAGE_SHIFT);
 }
 
-/*
- * Find the smallest available unit number to use
- * for a new device.  We don't just use a static
- * count to handle the "repeated hot-(un)plug"
- * scenario.
- */
-static int
-ahc_linux_next_unit(void)
-{
-       struct ahc_softc *ahc;
-       int unit;
-
-       unit = 0;
-retry:
-       TAILQ_FOREACH(ahc, &ahc_tailq, links) {
-               if (ahc->unit == unit) {
-                       unit++;
-                       goto retry;
-               }
-       }
-       return (unit);
-}
-
 /*
  * Place the SCSI bus into a known state by either resetting it,
  * or forcing transfer negotiations on the next command to any
@@ -2633,6 +2447,11 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
        ahc_unlock(ahc, &flags);
 }
 
+#if 0
+/* FIXME: This code claims to support IU and QAS.  However, the actual
+ * sequencer code and aic7xxx_core have no support for these parameters and
+ * will get into a bad state if they're negotiated.  Do not enable this
+ * unless you know what you're doing */
 static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
 {
        struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
@@ -2688,6 +2507,7 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
                         ppr_options, AHC_TRANS_GOAL, FALSE);
        ahc_unlock(ahc, &flags);
 }
+#endif
 
 static struct spi_function_template ahc_linux_transport_functions = {
        .set_offset     = ahc_linux_set_offset,
@@ -2698,10 +2518,12 @@ static struct spi_function_template ahc_linux_transport_functions = {
        .show_width     = 1,
        .set_dt         = ahc_linux_set_dt,
        .show_dt        = 1,
+#if 0
        .set_iu         = ahc_linux_set_iu,
        .show_iu        = 1,
        .set_qas        = ahc_linux_set_qas,
        .show_qas       = 1,
+#endif
 };
 
 
@@ -2709,18 +2531,25 @@ static struct spi_function_template ahc_linux_transport_functions = {
 static int __init
 ahc_linux_init(void)
 {
-       ahc_linux_transport_template = spi_attach_transport(&ahc_linux_transport_functions);
+       /*
+        * If we've been passed any parameters, process them now.
+        */
+       if (aic7xxx)
+               aic7xxx_setup(aic7xxx);
+
+       ahc_linux_transport_template =
+               spi_attach_transport(&ahc_linux_transport_functions);
        if (!ahc_linux_transport_template)
                return -ENODEV;
+
        scsi_transport_reserve_target(ahc_linux_transport_template,
                                      sizeof(struct ahc_linux_target));
        scsi_transport_reserve_device(ahc_linux_transport_template,
                                      sizeof(struct ahc_linux_device));
-       if (ahc_linux_detect(&aic7xxx_driver_template))
-               return 0;
-       spi_release_transport(ahc_linux_transport_template);
-       ahc_linux_exit();
-       return -ENODEV;
+
+       ahc_linux_pci_init();
+       ahc_linux_eisa_init();
+       return 0;
 }
 
 static void
index 8ffe2d3e1d95420198f6e80c4ba8e03e2bd6b13b..0e47ac21754954132612b8c3d2bd41a840b21a46 100644 (file)
@@ -132,7 +132,6 @@ typedef struct scsi_cmnd      *ahc_io_ctx_t;
 /************************* Configuration Data *********************************/
 extern u_int aic7xxx_no_probe;
 extern u_int aic7xxx_allow_memio;
-extern int aic7xxx_detect_complete;
 extern struct scsi_host_template aic7xxx_driver_template;
 
 /***************************** Bus Space/DMA **********************************/
@@ -510,15 +509,6 @@ void       ahc_format_transinfo(struct info_str *info,
 
 /******************************** Locking *************************************/
 /* Lock protecting internal data structures */
-static __inline void ahc_lockinit(struct ahc_softc *);
-static __inline void ahc_lock(struct ahc_softc *, unsigned long *flags);
-static __inline void ahc_unlock(struct ahc_softc *, unsigned long *flags);
-
-/* Lock held during ahc_list manipulation and ahc softc frees */
-extern spinlock_t ahc_list_spinlock;
-static __inline void ahc_list_lockinit(void);
-static __inline void ahc_list_lock(unsigned long *flags);
-static __inline void ahc_list_unlock(unsigned long *flags);
 
 static __inline void
 ahc_lockinit(struct ahc_softc *ahc)
@@ -538,24 +528,6 @@ ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)
        spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags);
 }
 
-static __inline void
-ahc_list_lockinit(void)
-{
-       spin_lock_init(&ahc_list_spinlock);
-}
-
-static __inline void
-ahc_list_lock(unsigned long *flags)
-{
-       spin_lock_irqsave(&ahc_list_spinlock, *flags);
-}
-
-static __inline void
-ahc_list_unlock(unsigned long *flags)
-{
-       spin_unlock_irqrestore(&ahc_list_spinlock, *flags);
-}
-
 /******************************* PCI Definitions ******************************/
 /*
  * PCIM_xxx: mask to locate subfield in register
@@ -892,7 +864,6 @@ int ahc_platform_abort_scbs(struct ahc_softc *ahc, int target,
 irqreturn_t
        ahc_linux_isr(int irq, void *dev_id, struct pt_regs * regs);
 void   ahc_platform_flushwork(struct ahc_softc *ahc);
-int    ahc_softc_comp(struct ahc_softc *, struct ahc_softc *);
 void   ahc_done(struct ahc_softc*, struct scb*);
 void   ahc_send_async(struct ahc_softc *, char channel,
                       u_int target, u_int lun, ac_code, void *);
index 89d737ee551a71c978f9670fdd58a096c9f0c6ae..9d318ce2c993189412982d5dea1ffea994fe5ccc 100644 (file)
@@ -143,10 +143,6 @@ ahc_linux_pci_dev_remove(struct pci_dev *pdev)
        struct ahc_softc *ahc = pci_get_drvdata(pdev);
        u_long s;
 
-       ahc_list_lock(&s);
-       TAILQ_REMOVE(&ahc_tailq, ahc, links);
-       ahc_list_unlock(&s);
-
        ahc_lock(ahc, &s);
        ahc_intr_enable(ahc, FALSE);
        ahc_unlock(ahc, &s);
@@ -208,8 +204,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                return (-error);
        }
        pci_set_drvdata(pdev, ahc);
-       if (aic7xxx_detect_complete)
-               ahc_linux_register_host(ahc, &aic7xxx_driver_template);
+       ahc_linux_register_host(ahc, &aic7xxx_driver_template);
        return (0);
 }
 
index 7ddcc97fb243f7f8dad248c998a02971d2206b57..b3b2e2237eb39dc9d930b6633ea7b9d5790c4bfb 100644 (file)
@@ -704,7 +704,6 @@ ahc_find_pci_device(ahc_dev_softc_t pci)
 int
 ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry)
 {
-       u_long   l;
        u_int    command;
        u_int    our_id;
        u_int    sxfrctl1;
@@ -964,12 +963,7 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry)
        if (error != 0)
                return (error);
 
-       ahc_list_lock(&l);
-       /*
-        * Link this softc in with all other ahc instances.
-        */
-       ahc_softc_insert(ahc);
-       ahc_list_unlock(&l);
+       ahc->init_level++;
        return (0);
 }
 
index ab4469d83fb1d95fee4f5e06fa87dcfa39491f12..3802c91f0b07489a2dc3b04a01e9963880abaed8 100644 (file)
@@ -155,9 +155,9 @@ ahc_dump_target_state(struct ahc_softc *ahc, struct info_str *info,
        copy_info(info, "\tUser: ");
        ahc_format_transinfo(info, &tinfo->user);
        starget = ahc->platform_data->starget[target_offset];
-       targ = scsi_transport_target_data(starget);
-       if (targ == NULL)
+       if (!starget)
                return;
+       targ = scsi_transport_target_data(starget);
 
        copy_info(info, "\tGoal: ");
        ahc_format_transinfo(info, &tinfo->goal);
index fac091e7093c2e490d789704eaa9afdf6cf583ba..52b72d7794f51aeadc11df93a1a53aed02f1b478 100644 (file)
@@ -8448,7 +8448,6 @@ aic7xxx_alloc(Scsi_Host_Template *sht, struct aic7xxx_host *temp)
     }
     p->host_no = host->host_no;
   }
-  scsi_set_device(host, &p->pdev->dev);
   return (p);
 }
 
index 5674ada6d5c249ca58fb1d39ffba9355171d1b18..d72be0ce89c84534911026dce7879659045bd619 100644 (file)
@@ -336,7 +336,6 @@ int cpqfcTS_detect(Scsi_Host_Template *ScsiHostTemplate)
       DEBUG_PCI(printk("  PciDev->baseaddress[3]= %lx\n", 
                                PciDev->resource[3].start));
 
-      scsi_set_device(HostAdapter, &PciDev->dev);
       HostAdapter->irq = PciDev->irq;  // copy for Scsi layers
       
       // HP Tachlite uses two (255-byte) ranges of Port I/O (lower & upper),
index bbe346bd3cb8f476e8f012abd7e5e6f7a3e2f41f..e2370529c63293595e894603c3bdd7aab2dce1b1 100644 (file)
@@ -382,7 +382,6 @@ static int adpt_queue(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd *))
 {
        adpt_hba* pHba = NULL;
        struct adpt_device* pDev = NULL;        /* dpt per device information */
-       ulong timeout = jiffies + (TMOUT_SCSI*HZ);
 
        cmd->scsi_done = done;
        /*
@@ -418,11 +417,6 @@ static int adpt_queue(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd *))
                return 1;
        }
 
-       if(cmd->eh_state != SCSI_STATE_QUEUED){
-               // If we are not doing error recovery
-               mod_timer(&cmd->eh_timeout, timeout);
-       }
-
        // TODO if the cmd->device if offline then I may need to issue a bus rescan
        // followed by a get_lct to see if the device is there anymore
        if((pDev = (struct adpt_device*) (cmd->device->hostdata)) == NULL) {
index 1bb8727eea3e5a2a2a7984bc7922451127c93426..c10e45b94b6269bd8d70bfdecf6519ffe4fff9c1 100644 (file)
@@ -1899,16 +1899,6 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
                        printk("%s: abort, mbox %d, interrupt pending.\n",
                               ha->board_name, i);
 
-               if (SCarg->eh_state == SCSI_STATE_TIMEOUT) {
-                       unmap_dma(i, ha);
-                       SCarg->host_scribble = NULL;
-                       ha->cp_stat[i] = FREE;
-                       printk
-                           ("%s, abort, mbox %d, eh_state timeout, pid %ld.\n",
-                            ha->board_name, i, SCarg->pid);
-                       return SUCCESS;
-               }
-
                return FAILED;
        }
 
index 04a06b71a5e23666956fd0bae203ada2ee959c7c..42c6e35f801c371d19aedc7489dd637cb6df4010 100644 (file)
@@ -449,7 +449,7 @@ static int eata_pio_abort(struct scsi_cmnd *cmd)
 {
        uint loop = HZ;
 
-       DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_abort called pid: %ld " "target: %x lun: %x reason %x\n", cmd->pid, cmd->device->id, cmd->device->lun, cmd->abort_reason));
+       DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_abort called pid: %ld " "target: %x lun: %x\n", cmd->pid, cmd->device->id, cmd->device->lun));
 
 
        while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY)
@@ -484,7 +484,7 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd)
        struct scsi_cmnd *sp;
        struct Scsi_Host *host = cmd->device->host;
 
-       DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:" " %x lun: %x reason %x\n", cmd->pid, cmd->device->id, cmd->device->lun, cmd->abort_reason));
+       DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:" " %x lun: %x\n", cmd->pid, cmd->device->id, cmd->device->lun));
 
        spin_lock_irq(host->host_lock);
 
index 4ba6a15cf43d2afb6715607174a843ccb6b7d9e6..aecf32dd0bde9ca7f510fd8d31106a8adfa0fd02 100644 (file)
@@ -938,7 +938,6 @@ struct Scsi_Host *__fdomain_16x0_detect(struct scsi_host_template *tpnt )
    }
    shpnt->irq = interrupt_level;
    shpnt->io_port = port_base;
-   scsi_set_device(shpnt, &pdev->dev);
    shpnt->n_io_port = 0x10;
    print_banner( shpnt );
 
index 4552cccd283484e4b863d4c1f9a77e1c052f1647..af682301beacb5eb627faef8439d3150d7af4e54 100644 (file)
@@ -4521,9 +4521,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp)
             ha->virt_bus = hdr_channel;
 
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-            scsi_set_device(shp, &pcistr[ctr].pdev->dev);
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
             scsi_set_pci_device(shp, pcistr[ctr].pdev);
 #endif
             if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat &GDT_64BIT)||
index d7a38b6713f958b1c4023544b3de1869b5a22bcf..5feb886c33921075ab728f8d6a072dedf9959a8c 100644 (file)
@@ -180,11 +180,6 @@ static void scsi_host_dev_release(struct device *dev)
        scsi_destroy_command_freelist(shost);
        kfree(shost->shost_data);
 
-       /*
-        * Some drivers (eg aha1542) do scsi_register()/scsi_unregister()
-        * during probing without performing a scsi_set_device() in between.
-        * In this case dev->parent is NULL.
-        */
        if (parent)
                put_device(parent);
        kfree(shost);
index d89b8eb3cdf374c9b3ed552b0c66457843f59882..fe09d145542ae44f2dae5249d933f00f368f19b4 100644 (file)
@@ -87,7 +87,7 @@ static int max_channel = 3;
 static int init_timeout = 5;
 static int max_requests = 50;
 
-#define IBMVSCSI_VERSION "1.5.5"
+#define IBMVSCSI_VERSION "1.5.6"
 
 MODULE_DESCRIPTION("IBM Virtual SCSI");
 MODULE_AUTHOR("Dave Boutcher");
@@ -675,8 +675,6 @@ static void send_mad_adapter_info(struct ibmvscsi_host_data *hostdata)
        struct viosrp_adapter_info *req;
        struct srp_event_struct *evt_struct;
        
-       memset(&hostdata->madapter_info, 0x00, sizeof(hostdata->madapter_info));
-       
        evt_struct = get_event_struct(&hostdata->pool);
        if (!evt_struct) {
                printk(KERN_ERR "ibmvscsi: couldn't allocate an event "
index 50cb909f314f43ddfbb5436c752601c6adbe1b29..035f615817d74362bbbed9a767b9d92044ac4ebd 100644 (file)
 #include <linux/dma-mapping.h>
 #include <linux/interrupt.h>
 #include "ibmvscsi.h"
+#include "srp.h"
+
+static char partition_name[97] = "UNKNOWN";
+static unsigned int partition_number = -1;
 
 /* ------------------------------------------------------------
  * Routines for managing the command/response queue
@@ -148,6 +152,48 @@ static void ibmvscsi_task(void *data)
        }
 }
 
+static void gather_partition_info(void)
+{
+       struct device_node *rootdn;
+
+       char *ppartition_name;
+       unsigned int *p_number_ptr;
+
+       /* Retrieve information about this partition */
+       rootdn = find_path_device("/");
+       if (!rootdn) {
+               return;
+       }
+
+       ppartition_name =
+               get_property(rootdn, "ibm,partition-name", NULL);
+       if (ppartition_name)
+               strncpy(partition_name, ppartition_name,
+                               sizeof(partition_name));
+       p_number_ptr =
+               (unsigned int *)get_property(rootdn, "ibm,partition-no",
+                                            NULL);
+       if (p_number_ptr)
+               partition_number = *p_number_ptr;
+}
+
+static void set_adapter_info(struct ibmvscsi_host_data *hostdata)
+{
+       memset(&hostdata->madapter_info, 0x00,
+                       sizeof(hostdata->madapter_info));
+
+       printk(KERN_INFO "rpa_vscsi: SPR_VERSION: %s\n", SRP_VERSION);
+       strcpy(hostdata->madapter_info.srp_version, SRP_VERSION);
+
+       strncpy(hostdata->madapter_info.partition_name, partition_name,
+                       sizeof(hostdata->madapter_info.partition_name));
+
+       hostdata->madapter_info.partition_number = partition_number;
+
+       hostdata->madapter_info.mad_version = 1;
+       hostdata->madapter_info.os_type = 2;
+}
+
 /**
  * initialize_crq_queue: - Initializes and registers CRQ with hypervisor
  * @queue:     crq_queue to initialize and register
@@ -177,6 +223,9 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
        if (dma_mapping_error(queue->msg_token))
                goto map_failed;
 
+       gather_partition_info();
+       set_adapter_info(hostdata);
+
        rc = plpar_hcall_norets(H_REG_CRQ,
                                vdev->unit_address,
                                queue->msg_token, PAGE_SIZE);
@@ -246,6 +295,8 @@ void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
        memset(queue->msgs, 0x00, PAGE_SIZE);
        queue->cur = 0;
 
+       set_adapter_info(hostdata);
+
        /* And re-open it again */
        rc = plpar_hcall_norets(H_REG_CRQ,
                                vdev->unit_address,
index e952c1cd9740d18ca206846fb9e2a053d4e2a79a..2ae5154fd89cfffc0d94ec9932c539ca821f73a4 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef SRP_H
 #define SRP_H
 
+#define SRP_VERSION "16.a"
+
 #define PACKED __attribute__((packed))
 
 enum srp_types {
index 906a76158fa95b1f39b92e0a00a0c2db8d9ebdfa..480e06f4d6ae2b833f8cf108e2159a11a58ecbfe 100644 (file)
       #define IPS_UNREGISTER_HOSTS(SHT)
       #define IPS_ADD_HOST(shost,device)   do { scsi_add_host(shost,device); scsi_scan_host(shost); } while (0)
       #define IPS_REMOVE_HOST(shost)       scsi_remove_host(shost)
-      #define IPS_SCSI_SET_DEVICE(sh,ha)   scsi_set_device(sh, &(ha)->pcidev->dev)
+      #define IPS_SCSI_SET_DEVICE(sh,ha)   do { } while (0)
       #define IPS_PRINTK(level, pcidev, format, arg...)                 \
             dev_printk(level , &((pcidev)->dev) , format , ## arg)
    #endif
index cb535fa185b93453ca535bf8a28fe2366a904a06..73b1f72b7e430989b261f1dd0c825d9ec02ad18e 100644 (file)
@@ -2866,7 +2866,7 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)
        if (qc->dev->class == ATA_DEV_ATAPI && qc->scsicmd) {
                struct scsi_cmnd *cmd = qc->scsicmd;
 
-               if (!scsi_eh_eflags_chk(cmd, SCSI_EH_CANCEL_CMD)) {
+               if (!(cmd->eh_eflags & SCSI_EH_CANCEL_CMD)) {
 
                        /* finish completing original command */
                        __ata_qc_complete(qc);
@@ -3750,7 +3750,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
        host->max_channel = 1;
        host->unique_id = ata_unique_id++;
        host->max_cmd_len = 12;
-       scsi_set_device(host, ent->dev);
+
        scsi_assign_lock(host, &host_set->lock);
 
        ap->flags = ATA_FLAG_PORT_DISABLED;
index 2b3098591c41ee0049bdad3f3b9f1eebe40bdab3..d1be465d5f55d611bee8d2554e27b6b1962e2e61 100644 (file)
@@ -1,26 +1,24 @@
 #/*******************************************************************
 # * This file is part of the Emulex Linux Device Driver for         *
-# * Enterprise Fibre Channel Host Bus Adapters.                     *
-# * Refer to the README file included with this package for         *
-# * driver version and adapter support.                             *
-# * Copyright (C) 2004 Emulex Corporation.                          *
+# * Fibre Channel Host Bus Adapters.                                *
+# * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+# * EMULEX and SLI are trademarks of Emulex.                        *
 # * www.emulex.com                                                  *
 # *                                                                 *
 # * This program is free software; you can redistribute it and/or   *
-# * modify it under the terms of the GNU General Public License     *
-# * as published by the Free Software Foundation; either version 2  *
-# * of the License, or (at your option) any later version.          *
-# *                                                                 *
-# * This program is distributed in the hope that it will be useful, *
-# * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
-# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
-# * GNU General Public License for more details, a copy of which    *
-# * can be found in the file COPYING included with this package.    *
+# * modify it under the terms of version 2 of the GNU General       *
+# * Public License as published by the Free Software Foundation.    *
+# * This program is distributed in the hope that it will be useful. *
+# * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+# * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+# * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+# * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+# * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+# * more details, a copy of which can be found in the file COPYING  *
+# * included with this package.                                     *
 # *******************************************************************/
 ######################################################################
 
-#$Id: Makefile 1.58 2005/01/23 19:00:32EST sf_support Exp  $
-
 ifneq ($(GCOV),)
   EXTRA_CFLAGS += -fprofile-arcs -ftest-coverage
   EXTRA_CFLAGS += -O0
index d78247c63d0469741c33851b0f54b96aa0f6d02a..3bb82aae432e5d09d63a8c294732d0c55cc75729 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc.h 1.167 2005/04/07 08:47:05EDT sf_support Exp  $
- */
-
 struct lpfc_sli2_slim;
 
 #define LPFC_MAX_TARGET         256    /* max targets supported */
index 1276bd77b99586299b6e428bfe78060a57bf872f..3cea928830192b15a27db74a703902072d3a1b08 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_attr.c 1.24 2005/04/13 11:58:55EDT sf_support Exp  $
- */
-
 #include <linux/ctype.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
index 646649fe962aaea112edcd9a382d85827f11cf6f..275ba34b3c9d5c2d80376248a249d921a6e93377 100644 (file)
@@ -1,26 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
 /*
- * $Id: lpfc_compat.h 1.32 2005/01/25 17:51:45EST sf_support Exp  $
- *
  * This file provides macros to aid compilation in the Linux 2.4 kernel
  * over various platform architectures.
  */
index c504477a6a5d49bfb842cbfdb49362f194065952..bd5135d3eee482d4fcfd458aeab0d1bca641dcc7 100644 (file)
@@ -1,27 +1,23 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_crtn.h 1.166 2005/04/07 08:46:47EDT sf_support Exp  $
- */
-
 void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t);
 void lpfc_read_nv(struct lpfc_hba *, LPFC_MBOXQ_t *);
 int lpfc_read_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb,
@@ -195,6 +191,9 @@ int lpfc_sli_issue_iocb_wait_high_priority(struct lpfc_hba * phba,
 void lpfc_sli_wake_iocb_high_priority(struct lpfc_hba * phba,
                                      struct lpfc_iocbq * queue1,
                                      struct lpfc_iocbq * queue2);
+void lpfc_sli_abort_fcp_cmpl(struct lpfc_hba * phba,
+                            struct lpfc_iocbq * cmdiocb,
+                            struct lpfc_iocbq * rspiocb);
 
 void *lpfc_mbuf_alloc(struct lpfc_hba *, int, dma_addr_t *);
 void lpfc_mbuf_free(struct lpfc_hba *, void *, dma_addr_t);
index c40cb239c16db370bfa5629f5dd1b3c876185c5a..78adee4699af668bca94db5515fc3176c0e4c11d 100644 (file)
@@ -1,26 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
 /*
- * $Id: lpfc_ct.c 1.161 2005/04/13 11:59:01EDT sf_support Exp  $
- *
  * Fibre Channel SCSI LAN Device Driver CT support
  */
 
index adccc99510d5c606a189ca421b9adcfc1c3dc8a7..098b8b45c7f1be964515812a56e2cebaddae024c 100644 (file)
@@ -1,27 +1,23 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_disc.h 1.61 2005/04/07 08:46:52EDT sf_support Exp  $
- */
-
 #define FC_MAX_HOLD_RSCN     32              /* max number of deferred RSCNs */
 #define FC_MAX_NS_RSP        65536    /* max size NameServer rsp */
 #define FC_MAXLOOP           126      /* max devices supported on a fc loop */
index 68d1b77e02560c7a764a16ebbfc4c0fcdd637c25..2b1c9572dae728bfc50158ba82e1ee1f905c6ee4 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_els.c 1.186 2005/04/13 14:26:55EDT sf_support Exp  $
- */
-
 #include <linux/blkdev.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
@@ -3139,7 +3136,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
        case ELS_CMD_PLOGI:
                phba->fc_stat.elsRcvPLOGI++;
                if (phba->hba_state < LPFC_DISC_AUTH) {
-                       rjt_err = LSEXP_NOTHING_MORE;
+                       rjt_err = 1;
                        break;
                }
                lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI);
@@ -3154,7 +3151,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
        case ELS_CMD_LOGO:
                phba->fc_stat.elsRcvLOGO++;
                if (phba->hba_state < LPFC_DISC_AUTH) {
-                       rjt_err = LSEXP_NOTHING_MORE;
+                       rjt_err = 1;
                        break;
                }
                lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_LOGO);
@@ -3162,7 +3159,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
        case ELS_CMD_PRLO:
                phba->fc_stat.elsRcvPRLO++;
                if (phba->hba_state < LPFC_DISC_AUTH) {
-                       rjt_err = LSEXP_NOTHING_MORE;
+                       rjt_err = 1;
                        break;
                }
                lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLO);
@@ -3177,7 +3174,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
        case ELS_CMD_ADISC:
                phba->fc_stat.elsRcvADISC++;
                if (phba->hba_state < LPFC_DISC_AUTH) {
-                       rjt_err = LSEXP_NOTHING_MORE;
+                       rjt_err = 1;
                        break;
                }
                lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_ADISC);
@@ -3185,7 +3182,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
        case ELS_CMD_PDISC:
                phba->fc_stat.elsRcvPDISC++;
                if (phba->hba_state < LPFC_DISC_AUTH) {
-                       rjt_err = LSEXP_NOTHING_MORE;
+                       rjt_err = 1;
                        break;
                }
                lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PDISC);
@@ -3209,7 +3206,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
        case ELS_CMD_PRLI:
                phba->fc_stat.elsRcvPRLI++;
                if (phba->hba_state < LPFC_DISC_AUTH) {
-                       rjt_err = LSEXP_NOTHING_MORE;
+                       rjt_err = 1;
                        break;
                }
                lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PRLI);
@@ -3220,7 +3217,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
                break;
        default:
                /* Unsupported ELS command, reject */
-               rjt_err = LSEXP_NOTHING_MORE;
+               rjt_err = 1;
 
                /* Unknown ELS command <elsCmd> received from NPORT <did> */
                lpfc_printf_log(phba, KERN_ERR, LOG_ELS,
@@ -3236,7 +3233,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba,
        if (rjt_err) {
                stat.un.b.lsRjtRsvd0 = 0;
                stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
-               stat.un.b.lsRjtRsnCodeExp = rjt_err;
+               stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE;
                stat.un.b.vendorUnique = 0;
                lpfc_els_rsp_reject(phba, stat.un.lsRjtError, elsiocb, ndlp);
        }
index d546206038bf756bd7b4d1606300379e75307a41..233901e9dfde56b166ee77d9930286e7bc88d447 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_hbadisc.c 1.266 2005/04/13 11:59:06EDT sf_support Exp  $
- */
-
 #include <linux/blkdev.h>
 #include <linux/pci.h>
 #include <linux/kthread.h>
@@ -61,14 +58,7 @@ static void lpfc_disc_timeout_handler(struct lpfc_hba *);
 static void
 lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
 {
-       if (!(ndlp->nlp_type & NLP_FABRIC)) {
-               /* Nodev timeout on NPort <nlp_DID> */
-               lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
-                       "%d:0203 Nodev timeout on NPort x%x "
-                       "Data: x%x x%x x%x\n",
-                       phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag,
-                       ndlp->nlp_state, ndlp->nlp_rpi);
-       }
+       int warn_on = 0;
 
        spin_lock_irq(phba->host->host_lock);
        if (!(ndlp->nlp_flag & NLP_NODEV_TMO)) {
@@ -79,12 +69,27 @@ lpfc_process_nodev_timeout(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
        ndlp->nlp_flag &= ~NLP_NODEV_TMO;
 
        if (ndlp->nlp_sid != NLP_NO_SID) {
+               warn_on = 1;
                /* flush the target */
                lpfc_sli_abort_iocb(phba, &phba->sli.ring[phba->sli.fcp_ring],
                        ndlp->nlp_sid, 0, 0, LPFC_CTX_TGT);
        }
        spin_unlock_irq(phba->host->host_lock);
 
+       if (warn_on) {
+               lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
+                               "%d:0203 Nodev timeout on NPort x%x "
+                               "Data: x%x x%x x%x\n",
+                               phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag,
+                               ndlp->nlp_state, ndlp->nlp_rpi);
+       } else {
+               lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY,
+                               "%d:0204 Nodev timeout on NPort x%x "
+                               "Data: x%x x%x x%x\n",
+                               phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag,
+                               ndlp->nlp_state, ndlp->nlp_rpi);
+       }
+
        lpfc_disc_state_machine(phba, ndlp, NULL, NLP_EVT_DEVICE_RM);
        return;
 }
index fc958a99dadb38dafb61c450d933e197da06311e..21591cb9f551ada28b04da49bd0d0e3016008ce8 100644 (file)
@@ -1,27 +1,23 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_hw.h 1.37 2005/03/29 19:51:45EST sf_support Exp  $
- */
-
 #define FDMI_DID        0xfffffaU
 #define NameServer_DID  0xfffffcU
 #define SCR_DID         0xfffffdU
@@ -2214,20 +2210,20 @@ typedef union {
  * SLI-2 specific structures
  */
 
-typedef struct {
-       uint32_t cmdPutInx;
-       uint32_t rspGetInx;
-} HGP;
+struct lpfc_hgp {
+       __le32 cmdPutInx;
+       __le32 rspGetInx;
+};
 
-typedef struct {
-       uint32_t cmdGetInx;
-       uint32_t rspPutInx;
-} PGP;
+struct lpfc_pgp {
+       __le32 cmdGetInx;
+       __le32 rspPutInx;
+};
 
 typedef struct _SLI2_DESC {
-       HGP host[MAX_RINGS];
+       struct lpfc_hgp host[MAX_RINGS];
        uint32_t unused1[16];
-       PGP port[MAX_RINGS];
+       struct lpfc_pgp port[MAX_RINGS];
 } SLI2_DESC;
 
 typedef union {
index 233c912b63ce0fbf539467e47de1314883b0e2ef..34d416d2b007b09893e2b716efabcd217e09642f 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_init.c 1.233 2005/04/13 11:59:09EDT sf_support Exp  $
- */
-
 #include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
@@ -780,6 +777,9 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
        pci_read_config_dword(phba->pcidev, PCI_VENDOR_ID, &id);
 
        switch ((id >> 16) & 0xffff) {
+       case PCI_DEVICE_ID_FIREFLY:
+               strcpy(str, "LP6000 1");
+               break;
        case PCI_DEVICE_ID_SUPERFLY:
                if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3)
                        strcpy(str, "LP7000 1");
@@ -837,6 +837,9 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
        case PCI_DEVICE_ID_LP10000S:
                strcpy(str, "LP10000-S 2");
                break;
+       default:
+               memset(str, 0, 16);
+               break;
        }
        if (mdp)
                sscanf(str, "%s", mdp);
@@ -1662,6 +1665,8 @@ lpfc_pci_remove_one(struct pci_dev *pdev)
 static struct pci_device_id lpfc_id_table[] = {
        {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_VIPER,
                PCI_ANY_ID, PCI_ANY_ID, },
+       {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_FIREFLY,
+               PCI_ANY_ID, PCI_ANY_ID, },
        {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_THOR,
                PCI_ANY_ID, PCI_ANY_ID, },
        {PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PEGASUS,
@@ -1712,6 +1717,7 @@ lpfc_init(void)
        int error = 0;
 
        printk(LPFC_MODULE_DESC "\n");
+       printk(LPFC_COPYRIGHT "\n");
 
        lpfc_transport_template =
                                fc_attach_transport(&lpfc_transport_functions);
index a85268880fae421bab242534050078e392b6f549..62c8ca862e9ec2666decc907d26018a4f3dc83d8 100644 (file)
@@ -1,27 +1,23 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_logmsg.h 1.32 2005/01/25 17:52:01EST sf_support Exp  $
- */
-
 #define LOG_ELS                       0x1      /* ELS events */
 #define LOG_DISCOVERY                 0x2      /* Link discovery events */
 #define LOG_MBOX                      0x4      /* Mailbox events */
index 8712a80fe747167d0ccd1398fd2db7ad0121ec5e..c27cf94795db52c7f3a520805443cb414963f356 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_mbox.c 1.85 2005/04/13 11:59:11EDT sf_support Exp  $
- */
-
 #include <linux/blkdev.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
@@ -422,7 +419,6 @@ lpfc_config_pcb_setup(struct lpfc_hba * phba)
        uint32_t iocbCnt;
        int i;
 
-       psli->MBhostaddr = (uint32_t *)&phba->slim2p->mbx;
        pcbp->maxRing = (psli->num_rings - 1);
 
        iocbCnt = 0;
@@ -528,7 +524,7 @@ lpfc_config_port(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
        dma_addr_t pdma_addr;
        uint32_t bar_low, bar_high;
        size_t offset;
-       HGP hgp;
+       struct lpfc_hgp hgp;
        void __iomem *to_slim;
 
        memset(pmb, 0, sizeof(LPFC_MBOXQ_t));
@@ -584,9 +580,9 @@ lpfc_config_port(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
        else
                phba->slim2p->pcb.hgpAddrHigh = 0;
        /* write HGP data to SLIM at the required longword offset */
-       memset(&hgp, 0, sizeof(HGP));
+       memset(&hgp, 0, sizeof(struct lpfc_hgp));
        to_slim = phba->MBslimaddr + (SLIMOFF*sizeof (uint32_t));
-       lpfc_memcpy_to_slim(to_slim, &hgp, sizeof (HGP));
+       lpfc_memcpy_to_slim(to_slim, &hgp, sizeof(struct lpfc_hgp));
 
        /* Setup Port Group ring pointer */
        offset = (uint8_t *)&phba->slim2p->mbx.us.s2.port -
index 4397e1160712d7da8a5f4eb7c980ffe98f002815..a5cfb6421fa94c002bce5dbe862c655649e5e6cb 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_mem.c 1.79 2005/04/13 14:25:50EDT sf_support Exp  $
- */
-
 #include <linux/mempool.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
index e7470a4738c5f41ee5245a0a234eac5107ed5acd..45dc0210fc49581d0c63a6e0d8a5a52cbc0a2d1d 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_nportdisc.c 1.179 2005/04/13 11:59:13EDT sf_support Exp  $
- */
-
 #include <linux/blkdev.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
@@ -950,8 +947,13 @@ lpfc_cmpl_adisc_adisc_issue(struct lpfc_hba * phba,
                lpfc_unreg_rpi(phba, ndlp);
                return (ndlp->nlp_state);
        }
-       ndlp->nlp_state = NLP_STE_MAPPED_NODE;
-       lpfc_nlp_list(phba, ndlp, NLP_MAPPED_LIST);
+       if (ndlp->nlp_type & NLP_FCP_TARGET) {
+               ndlp->nlp_state = NLP_STE_MAPPED_NODE;
+               lpfc_nlp_list(phba, ndlp, NLP_MAPPED_LIST);
+       } else {
+               ndlp->nlp_state = NLP_STE_UNMAPPED_NODE;
+               lpfc_nlp_list(phba, ndlp, NLP_UNMAPPED_LIST);
+       }
        return (ndlp->nlp_state);
 }
 
index f2aff3f4042baf4aa86bfa4134bb467a2e68dff6..17e4974d4445aca881e07f115d16d0f744141e08 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_scsi.c 1.37 2005/04/13 14:27:09EDT sf_support Exp  $
- */
-
 #include <linux/pci.h>
 #include <linux/interrupt.h>
 
@@ -874,6 +871,7 @@ __lpfc_abort_handler(struct scsi_cmnd *cmnd)
                else
                        icmd->ulpCommand = CMD_CLOSE_XRI_CN;
 
+               abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl;
                if (lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0) ==
                                                                IOCB_ERROR) {
                        list_add_tail(&abtsiocb->list, lpfc_iocb_list);
@@ -1273,4 +1271,5 @@ struct scsi_host_template lpfc_template = {
        .cmd_per_lun            = LPFC_CMD_PER_LUN,
        .use_clustering         = ENABLE_CLUSTERING,
        .shost_attrs            = lpfc_host_attrs,
+       .max_sectors            = 0xFFFF,
 };
index 4aafba47628d3c022042a155a2a175874434f137..d8fd2010ef416aee066677ec6bd6474d6569a417 100644 (file)
@@ -1,27 +1,23 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_scsi.h 1.83 2005/04/07 08:47:43EDT sf_support Exp  $
- */
-
 struct lpfc_hba;
 
 #define list_remove_head(list, entry, type, member)            \
index 8d14b28c80b90865ef8c6b5db099b0ef4cf6bb4e..1775508ed2762e88918cdc25a89b978932a8adf9 100644 (file)
@@ -1,27 +1,24 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
+ * Portions Copyright (C) 2004-2005 Christoph Hellwig              *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_sli.c 1.232 2005/04/13 11:59:16EDT sf_support Exp  $
- */
-
 #include <linux/blkdev.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
@@ -225,8 +222,7 @@ lpfc_sli_ringtx_get(struct lpfc_hba * phba, struct lpfc_sli_ring * pring)
 static IOCB_t *
 lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
 {
-       MAILBOX_t *mbox = (MAILBOX_t *)phba->sli.MBhostaddr;
-       PGP *pgp = (PGP *)&mbox->us.s2.port[pring->ringno];
+       struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno];
        uint32_t  max_cmd_idx = pring->numCiocb;
        IOCB_t *iocb = NULL;
 
@@ -411,9 +407,7 @@ lpfc_sli_resume_iocb(struct lpfc_hba * phba, struct lpfc_sli_ring * pring)
 static void
 lpfc_sli_turn_on_ring(struct lpfc_hba * phba, int ringno)
 {
-       PGP *pgp =
-               ((PGP *) &
-                (((MAILBOX_t *)phba->sli.MBhostaddr)->us.s2.port[ringno]));
+       struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[ringno];
 
        /* If the ring is active, flag it */
        if (phba->sli.ring[ringno].cmdringaddr) {
@@ -537,7 +531,7 @@ lpfc_sli_handle_mb_event(struct lpfc_hba * phba)
        /* Get a Mailbox buffer to setup mailbox commands for callback */
        if ((pmb = phba->sli.mbox_active)) {
                pmbox = &pmb->mb;
-               mbox = (MAILBOX_t *) phba->sli.MBhostaddr;
+               mbox = &phba->slim2p->mbx;
 
                /* First check out the status word */
                lpfc_sli_pcimem_bcopy(mbox, pmbox, sizeof (uint32_t));
@@ -905,10 +899,11 @@ static int
 lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,
                                struct lpfc_sli_ring * pring, uint32_t mask)
 {
+       struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno];
        IOCB_t *irsp = NULL;
+       IOCB_t *entry = NULL;
        struct lpfc_iocbq *cmdiocbq = NULL;
        struct lpfc_iocbq rspiocbq;
-       PGP *pgp;
        uint32_t status;
        uint32_t portRspPut, portRspMax;
        int rc = 1;
@@ -920,10 +915,6 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,
        spin_lock_irqsave(phba->host->host_lock, iflag);
        pring->stats.iocb_event++;
 
-       /* The driver assumes SLI-2 mode */
-       pgp = (PGP *) &((MAILBOX_t *) phba->sli.MBhostaddr)
-               ->us.s2.port[pring->ringno];
-
        /*
         * The next available response entry should never exceed the maximum
         * entries.  If it does, treat it as an adapter hardware error.
@@ -955,7 +946,17 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,
 
        rmb();
        while (pring->rspidx != portRspPut) {
-               irsp = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx);
+               /*
+                * Fetch an entry off the ring and copy it into a local data
+                * structure.  The copy involves a byte-swap since the
+                * network byte order and pci byte orders are different.
+                */
+               entry = (IOCB_t *) IOCB_ENTRY(pring->rspringaddr, pring->rspidx);
+               lpfc_sli_pcimem_bcopy((uint32_t *) entry,
+                                     (uint32_t *) &rspiocbq.iocb,
+                                     sizeof (IOCB_t));
+               irsp = &rspiocbq.iocb;
+
                type = lpfc_sli_iocb_cmd_type(irsp->ulpCommand & CMD_IOCB_MASK);
                pring->stats.iocb_rsp++;
                rsp_cmpl++;
@@ -987,10 +988,6 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,
                                break;
                        }
 
-                       rspiocbq.iocb.un.ulpWord[4] = irsp->un.ulpWord[4];
-                       rspiocbq.iocb.ulpStatus = irsp->ulpStatus;
-                       rspiocbq.iocb.ulpContext = irsp->ulpContext;
-                       rspiocbq.iocb.ulpIoTag = irsp->ulpIoTag;
                        cmdiocbq = lpfc_sli_txcmpl_ring_iotag_lookup(phba,
                                                                pring,
                                                                &rspiocbq);
@@ -1075,9 +1072,7 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba,
        struct lpfc_iocbq *cmdiocbp;
        struct lpfc_iocbq *saveq;
        struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list;
-       HGP *hgp;
-       PGP *pgp;
-       MAILBOX_t *mbox;
+       struct lpfc_pgp *pgp = &phba->slim2p->mbx.us.s2.port[pring->ringno];
        uint8_t iocb_cmd_type;
        lpfc_iocb_type type;
        uint32_t status, free_saveq;
@@ -1089,11 +1084,6 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba,
        spin_lock_irqsave(phba->host->host_lock, iflag);
        pring->stats.iocb_event++;
 
-       /* The driver assumes SLI-2 mode */
-       mbox = (MAILBOX_t *) phba->sli.MBhostaddr;
-       pgp = (PGP *) & mbox->us.s2.port[pring->ringno];
-       hgp = (HGP *) & mbox->us.s2.host[pring->ringno];
-
        /*
         * The next available response entry should never exceed the maximum
         * entries.  If it does, treat it as an adapter hardware error.
@@ -1738,6 +1728,8 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba)
                return;
        }
 
+       phba->work_hba_events &= ~WORKER_MBOX_TMO;
+
        pmbox = phba->sli.mbox_active;
        mb = &pmbox->mb;
 
@@ -1752,16 +1744,14 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba)
                phba->sli.sli_flag,
                phba->sli.mbox_active);
 
-       if (phba->sli.mbox_active == pmbox) {
-               phba->sli.mbox_active = NULL;
-               if (pmbox->mbox_cmpl) {
-                       mb->mbxStatus = MBX_NOT_FINISHED;
-                       spin_unlock_irq(phba->host->host_lock);
-                       (pmbox->mbox_cmpl) (phba, pmbox);
-                       spin_lock_irq(phba->host->host_lock);
-               }
-               phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
+       phba->sli.mbox_active = NULL;
+       if (pmbox->mbox_cmpl) {
+               mb->mbxStatus = MBX_NOT_FINISHED;
+               spin_unlock_irq(phba->host->host_lock);
+               (pmbox->mbox_cmpl) (phba, pmbox);
+               spin_lock_irq(phba->host->host_lock);
        }
+       phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE;
 
        spin_unlock_irq(phba->host->host_lock);
        lpfc_mbox_abort(phba);
@@ -1771,7 +1761,6 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba)
 int
 lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
 {
-       MAILBOX_t *mbox;
        MAILBOX_t *mb;
        struct lpfc_sli *psli;
        uint32_t status, evtctr;
@@ -1901,15 +1890,13 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
        mb->mbxOwner = OWN_CHIP;
 
        if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
-
                /* First copy command data to host SLIM area */
-               mbox = (MAILBOX_t *) psli->MBhostaddr;
-               lpfc_sli_pcimem_bcopy(mb, mbox, MAILBOX_CMD_SIZE);
+               lpfc_sli_pcimem_bcopy(mb, &phba->slim2p->mbx, MAILBOX_CMD_SIZE);
        } else {
                if (mb->mbxCommand == MBX_CONFIG_PORT) {
                        /* copy command data into host mbox for cmpl */
-                       mbox = (MAILBOX_t *) psli->MBhostaddr;
-                       lpfc_sli_pcimem_bcopy(mb, mbox, MAILBOX_CMD_SIZE);
+                       lpfc_sli_pcimem_bcopy(mb, &phba->slim2p->mbx,
+                                       MAILBOX_CMD_SIZE);
                }
 
                /* First copy mbox command data to HBA SLIM, skip past first
@@ -1946,8 +1933,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
                psli->mbox_active = NULL;
                if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
                        /* First read mbox status word */
-                       mbox = (MAILBOX_t *) psli->MBhostaddr;
-                       word0 = *((volatile uint32_t *)mbox);
+                       word0 = *((volatile uint32_t *)&phba->slim2p->mbx);
                        word0 = le32_to_cpu(word0);
                } else {
                        /* First read mbox status word */
@@ -1984,8 +1970,8 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
 
                        if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
                                /* First copy command data */
-                               mbox = (MAILBOX_t *) psli->MBhostaddr;
-                               word0 = *((volatile uint32_t *)mbox);
+                               word0 = *((volatile uint32_t *)
+                                               &phba->slim2p->mbx);
                                word0 = le32_to_cpu(word0);
                                if (mb->mbxCommand == MBX_CONFIG_PORT) {
                                        MAILBOX_t *slimmb;
@@ -2009,10 +1995,9 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag)
                }
 
                if (psli->sli_flag & LPFC_SLI2_ACTIVE) {
-                       /* First copy command data */
-                       mbox = (MAILBOX_t *) psli->MBhostaddr;
                        /* copy results back to user */
-                       lpfc_sli_pcimem_bcopy(mbox, mb, MAILBOX_CMD_SIZE);
+                       lpfc_sli_pcimem_bcopy(&phba->slim2p->mbx, mb,
+                                       MAILBOX_CMD_SIZE);
                } else {
                        /* First copy command data */
                        lpfc_memcpy_from_slim(mb, phba->MBslimaddr,
@@ -2089,8 +2074,6 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                switch (piocb->iocb.ulpCommand) {
                case CMD_QUE_RING_BUF_CN:
                case CMD_QUE_RING_BUF64_CN:
-               case CMD_CLOSE_XRI_CN:
-               case CMD_ABORT_XRI_CN:
                        /*
                         * For IOCBs, like QUE_RING_BUF, that have no rsp ring
                         * completion, iocb_cmpl MUST be 0.
@@ -2573,6 +2556,16 @@ lpfc_sli_sum_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
        return sum;
 }
 
+void
+lpfc_sli_abort_fcp_cmpl(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
+                          struct lpfc_iocbq * rspiocb)
+{
+       spin_lock_irq(phba->host->host_lock);
+       list_add_tail(&cmdiocb->list, &phba->lpfc_iocb_list);
+       spin_unlock_irq(phba->host->host_lock);
+       return;
+}
+
 int
 lpfc_sli_abort_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                    uint16_t tgt_id, uint64_t lun_id, uint32_t ctx,
@@ -2622,6 +2615,8 @@ lpfc_sli_abort_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
                else
                        abtsiocb->iocb.ulpCommand = CMD_CLOSE_XRI_CN;
 
+               /* Setup callback routine and issue the command. */
+               abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl;
                ret_val = lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0);
                if (ret_val == IOCB_ERROR) {
                        list_add_tail(&abtsiocb->list, lpfc_iocb_list);
index abd9a8c84e9e6e078e2eecf73b532d78519284c8..6c74f3c85ff76cefcdb150a603109a1b9c3667c6 100644 (file)
@@ -1,27 +1,23 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_sli.h 1.42 2005/03/21 02:01:28EST sf_support Exp  $
- */
-
 /* forward declaration for LPFC_IOCB_t's use */
 struct lpfc_hba;
 
index dfacd8d82097aadf43df155134fb46c819ce7cc8..47dea48ee0ecf8e476bca2cd9189f6d5e8be9a60 100644 (file)
@@ -1,32 +1,29 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
- * Enterprise Fibre Channel Host Bus Adapters.                     *
- * Refer to the README file included with this package for         *
- * driver version and adapter support.                             *
- * Copyright (C) 2004 Emulex Corporation.                          *
+ * Fibre Channel Host Bus Adapters.                                *
+ * Copyright (C) 2004-2005 Emulex.  All rights reserved.           *
+ * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
  * This program is free software; you can redistribute it and/or   *
- * modify it under the terms of the GNU General Public License     *
- * as published by the Free Software Foundation; either version 2  *
- * of the License, or (at your option) any later version.          *
- *                                                                 *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of  *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   *
- * GNU General Public License for more details, a copy of which    *
- * can be found in the file COPYING included with this package.    *
+ * modify it under the terms of version 2 of the GNU General       *
+ * Public License as published by the Free Software Foundation.    *
+ * This program is distributed in the hope that it will be useful. *
+ * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
+ * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
+ * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
+ * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
+ * more details, a copy of which can be found in the file COPYING  *
+ * included with this package.                                     *
  *******************************************************************/
 
-/*
- * $Id: lpfc_version.h 1.49 2005/04/13 15:07:19EDT sf_support Exp  $
- */
-
-#define LPFC_DRIVER_VERSION "8.0.28"
+#define LPFC_DRIVER_VERSION "8.0.29"
 
 #define LPFC_DRIVER_NAME "lpfc"
 
 #define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \
                LPFC_DRIVER_VERSION
+#define LPFC_COPYRIGHT "Copyright(c) 2004-2005 Emulex.  All rights reserved."
 
 #define DFC_API_VERSION "0.0.0"
index a70cdf31311cc8b7841952ccb8138935eb228e75..6f308ebe3e797857d02baae2679c96db8fd8bfbd 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/blkdev.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
+#include <linux/completion.h>
 #include <linux/delay.h>
 #include <linux/proc_fs.h>
 #include <linux/reboot.h>
@@ -1938,7 +1939,7 @@ megaraid_abort(Scsi_Cmnd *cmd)
 
 
 static int
-__megaraid_reset(Scsi_Cmnd *cmd)
+megaraid_reset(struct scsi_cmnd *cmd)
 {
        adapter_t       *adapter;
        megacmd_t       mc;
@@ -1950,7 +1951,6 @@ __megaraid_reset(Scsi_Cmnd *cmd)
        mc.cmd = MEGA_CLUSTER_CMD;
        mc.opcode = MEGA_RESET_RESERVATIONS;
 
-       spin_unlock_irq(&adapter->lock);
        if( mega_internal_command(adapter, LOCK_INT, &mc, NULL) != 0 ) {
                printk(KERN_WARNING
                                "megaraid: reservation reset failed.\n");
@@ -1958,9 +1958,10 @@ __megaraid_reset(Scsi_Cmnd *cmd)
        else {
                printk(KERN_INFO "megaraid: reservation reset.\n");
        }
-       spin_lock_irq(&adapter->lock);
 #endif
 
+       spin_lock_irq(&adapter->lock);
+
        rval =  megaraid_abort_and_reset(adapter, cmd, SCB_RESET);
 
        /*
@@ -1968,24 +1969,11 @@ __megaraid_reset(Scsi_Cmnd *cmd)
         * to be communicated over to the mid layer.
         */
        mega_rundoneq(adapter);
-
-       return rval;
-}
-
-static int
-megaraid_reset(Scsi_Cmnd *cmd)
-{
-       adapter_t *adapter = (adapter_t *)cmd->device->host->hostdata;
-       int rc;
-
-       spin_lock_irq(&adapter->lock);
-       rc = __megaraid_reset(cmd);
        spin_unlock_irq(&adapter->lock);
 
-       return rc;
+       return rval;
 }
 
-
 /**
  * megaraid_abort_and_reset()
  * @adapter - megaraid soft state
@@ -4490,8 +4478,6 @@ mega_internal_command(adapter_t *adapter, lockscope_t ls, megacmd_t *mc,
 
        scb->idx = CMDID_INT_CMDS;
 
-       scmd->state = 0;
-
        /*
         * Get the lock only if the caller has not acquired it already
         */
@@ -4501,15 +4487,7 @@ mega_internal_command(adapter_t *adapter, lockscope_t ls, megacmd_t *mc,
 
        if( ls == LOCK_INT ) spin_unlock_irqrestore(&adapter->lock, flags);
 
-       /*
-        * Wait till this command finishes. Do not use
-        * wait_event_interruptible(). It causes panic if CTRL-C is hit when
-        * dumping e.g., physical disk information through /proc interface.
-        */
-#if 0
-       wait_event_interruptible(adapter->int_waitq, scmd->state);
-#endif
-       wait_event(adapter->int_waitq, scmd->state);
+       wait_for_completion(&adapter->int_waitq);
 
        rval = scmd->result;
        mc->status = scmd->result;
@@ -4543,16 +4521,7 @@ mega_internal_done(Scsi_Cmnd *scmd)
 
        adapter = (adapter_t *)scmd->device->host->hostdata;
 
-       scmd->state = 1; /* thread waiting for its command to complete */
-
-       /*
-        * See comment in mega_internal_command() routine for
-        * wait_event_interruptible()
-        */
-#if 0
-       wake_up_interruptible(&adapter->int_waitq);
-#endif
-       wake_up(&adapter->int_waitq);
+       complete(&adapter->int_waitq);
 
 }
 
@@ -4874,7 +4843,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
        }
                
        init_MUTEX(&adapter->int_mtx);
-       init_waitqueue_head(&adapter->int_waitq);
+       init_completion(&adapter->int_waitq);
 
        adapter->this_id = DEFAULT_INITIATOR_ID;
        adapter->host->this_id = DEFAULT_INITIATOR_ID;
index e25c4de9edd94aa76ed3db6f467a0c00545a490a..4facf557cd1951d403d233e9808d6b33f65d7377 100644 (file)
@@ -891,7 +891,7 @@ typedef struct {
        Scsi_Cmnd               int_scmd;
        struct semaphore        int_mtx;        /* To synchronize the internal
                                                commands */
-       wait_queue_head_t       int_waitq;      /* wait queue for internal
+       struct completion       int_waitq;      /* wait queue for internal
                                                 cmds */
 
        int     has_cluster;    /* cluster support on this HBA */
index cbe4302462760b681ddd85d79cfd9d02f0258e7d..d47be8e0ea3a9ff33009bd40567556a724dadca5 100644 (file)
@@ -719,7 +719,6 @@ megaraid_io_attach(adapter_t *adapter)
 
        // export the parameters required by the mid-layer
        scsi_assign_lock(host, adapter->host_lock);
-       scsi_set_device(host, &adapter->pdev->dev);
 
        host->irq               = adapter->irq;
        host->unique_id         = adapter->unique_id;
index 2a0e42ec27d3e8bc5a66baf424f990516632a0e4..519486d24b28ec11ab08a601763e7343440741f7 100644 (file)
@@ -7756,7 +7756,6 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt,
         * your module_init */
        BUG_ON(!ncr53c8xx_transport_template);
        instance->transportt    = ncr53c8xx_transport_template;
-       scsi_set_device(instance, device->dev);
 
        /* Patch script to physical addresses */
        ncr_script_fill(&script0, &scripth0);
index 5159ceea319eb99e34f8bb7fd10527562b179d5b..6367f009cd74b5d70ce32b47041b0c59896ce474 100644 (file)
@@ -2719,9 +2719,7 @@ static int nsp32_detect(Scsi_Host_Template *sht)
        host->unique_id = data->BaseAddress;
        host->n_io_port = data->NumAddress;
        host->base      = (unsigned long)data->MmioAddress;
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,63))
-       scsi_set_device(host, &PCIDEV->dev);
-#else
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,63))
        scsi_set_pci_device(host, PCIDEV);
 #endif
 
index 1a4ce1c39478b02af8cb637a7531f4842d299f4e..b993652bfa25d3acaaa7332b3ade101a8bd9310f 100644 (file)
@@ -2853,7 +2853,7 @@ qla1280_bus_reset(struct scsi_qla_host *ha, int bus)
                ha->bus_settings[bus].failed_reset_count++;
        } else {
                spin_unlock_irq(HOST_LOCK);
-               schedule_timeout(reset_delay * HZ);
+               ssleep(reset_delay);
                spin_lock_irq(HOST_LOCK);
 
                ha->bus_settings[bus].scsi_bus_dead = 0;
index 6c73b84c6e644964f80d7501b7b2a81bec167a81..fccecf67423e5633f064b96d737ee904bb1139ab 100644 (file)
@@ -2,6 +2,7 @@ config SCSI_QLA2XXX
        tristate
        default (SCSI && PCI)
        depends on SCSI && PCI
+       select SCSI_FC_ATTRS
 
 config SCSI_QLA21XX
        tristate "QLogic ISP2100 host adapter family support"
index 48fdd406c07572d5338a58e94092ea79717485c0..982b83604b41b263babc231fbf66e3c51b4752e2 100644 (file)
@@ -1,4 +1,6 @@
 EXTRA_CFLAGS += -DUNIQUE_FW_NAME
+CONFIG_SCSI_QLA24XX=m
+EXTRA_CFLAGS += -DCONFIG_SCSI_QLA24XX -DCONFIG_SCSI_QLA24XX_MODULE
 
 qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
                qla_dbg.o qla_sup.o qla_rscn.o qla_attr.o
@@ -14,3 +16,4 @@ obj-$(CONFIG_SCSI_QLA22XX) += qla2xxx.o qla2200.o
 obj-$(CONFIG_SCSI_QLA2300) += qla2xxx.o qla2300.o
 obj-$(CONFIG_SCSI_QLA2322) += qla2xxx.o qla2322.o
 obj-$(CONFIG_SCSI_QLA6312) += qla2xxx.o qla6312.o
+obj-$(CONFIG_SCSI_QLA24XX) += qla2xxx.o
index ea136a61af407d96d1c8f97d3834e858393faf43..058733d98d6b6050c48ce4d4b1f280755b2d5e2c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * QLogic ISP2100 device driver for Linux 2.6.x
  * Copyright (C) 2003 Christoph Hellwig.
- * Copyright (C) 2003-2004 QLogic Corporation (www.qlogic.com)
+ * Copyright (C) 2003-2005 QLogic Corporation (www.qlogic.com)
  *
  * Released under GPL v2.
  */
index e72f9f1a11efb439a864c46886c4091ea8db4e76..18376b883845c249132993d017bbcb928d44f5c2 100644 (file)
@@ -2,7 +2,7 @@
  *                  QLOGIC LINUX SOFTWARE
  *
  * QLogic ISP2x00 device driver for Linux 2.6.x
- * Copyright (C) 2003-2004 QLogic Corporation
+ * Copyright (C) 2003-2005 QLogic Corporation
  * (www.qlogic.com)
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -18,7 +18,7 @@
  *************************************************************************/
 
 /*
- *     Firmware Version 1.19.24 (14:02 Jul 16, 2002)
+ *     Firmware Version 1.19.25 (13:12 Dec 10, 2003)
  */
 
 #ifdef UNIQUE_FW_NAME
@@ -28,15 +28,15 @@ unsigned short risc_code_version = 1*1024+19;
 #endif
 
 #ifdef UNIQUE_FW_NAME
-unsigned char fw2100tp_version_str[] = {1,19,24};
+unsigned char fw2100tp_version_str[] = {1,19,25};
 #else
-unsigned char firmware_version[] = {1,19,24};
+unsigned char firmware_version[] = {1,19,25};
 #endif
 
 #ifdef UNIQUE_FW_NAME
-#define fw2100tp_VERSION_STRING "1.19.24"
+#define fw2100tp_VERSION_STRING "1.19.25"
 #else
-#define FW_VERSION_STRING "1.19.24"
+#define FW_VERSION_STRING "1.19.25"
 #endif
 
 #ifdef UNIQUE_FW_NAME
@@ -50,7 +50,7 @@ unsigned short fw2100tp_code01[] = {
 #else
 unsigned short risc_code01[] = { 
 #endif
-       0x0078, 0x102d, 0x0000, 0x95f1, 0x0000, 0x0001, 0x0013, 0x0018,
+       0x0078, 0x102d, 0x0000, 0x9601, 0x0000, 0x0001, 0x0013, 0x0019,
        0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
        0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
        0x5449, 0x4f4e, 0x2049, 0x5350, 0x3231, 0x3030, 0x2046, 0x6972,
@@ -60,16 +60,16 @@ unsigned short risc_code01[] = {
        0x20c1, 0x0020, 0x2c2c, 0x2d34, 0x2762, 0x236a, 0x2c24, 0x2d04,
        0x266a, 0x2562, 0xa406, 0x00c0, 0x1052, 0x20c1, 0x0021, 0x2c2c,
        0x2362, 0x2c04, 0x2562, 0xa306, 0x0040, 0x1052, 0x20c1, 0x0020,
-       0x2039, 0x8fff, 0x20a1, 0xad00, 0x2708, 0x810d, 0x810d, 0x810d,
+       0x2039, 0x8fff, 0x20a1, 0xae00, 0x2708, 0x810d, 0x810d, 0x810d,
        0x810d, 0xa18c, 0x000f, 0x2001, 0x000a, 0xa112, 0xa00e, 0x21a8,
        0x41a4, 0x3400, 0x8211, 0x00c0, 0x105f, 0x2708, 0x3400, 0xa102,
        0x0040, 0x106f, 0x0048, 0x106f, 0x20a8, 0xa00e, 0x41a4, 0x20a1,
-       0xa5f1, 0x2009, 0x0000, 0x20a9, 0x070f, 0x41a4, 0x3400, 0x20c9,
-       0xaaff, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x25c7,
-       0x2051, 0xa600, 0x2a70, 0x7762, 0xa786, 0x8fff, 0x0040, 0x1092,
-       0x705f, 0xcd00, 0x705b, 0xccf1, 0x7067, 0x0200, 0x706b, 0x0200,
-       0x0078, 0x109a, 0x705b, 0xbd01, 0x7067, 0x0100, 0x706b, 0x0100,
-       0x705f, 0xbd00, 0x1078, 0x12df, 0x1078, 0x13ca, 0x1078, 0x1577,
+       0xa601, 0x2009, 0x0000, 0x20a9, 0x07ff, 0x41a4, 0x3400, 0x20c9,
+       0xabff, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x25c7,
+       0x2051, 0xa700, 0x2a70, 0x7762, 0xa786, 0x8fff, 0x0040, 0x1092,
+       0x705f, 0xce00, 0x705b, 0xcdf1, 0x7067, 0x0200, 0x706b, 0x0200,
+       0x0078, 0x109a, 0x705b, 0xbe01, 0x7067, 0x0100, 0x706b, 0x0100,
+       0x705f, 0xbe00, 0x1078, 0x12df, 0x1078, 0x13ca, 0x1078, 0x1577,
        0x1078, 0x1ce9, 0x1078, 0x42ec, 0x1078, 0x76bf, 0x1078, 0x1355,
        0x1078, 0x2ac0, 0x1078, 0x4e93, 0x1078, 0x49a3, 0x1078, 0x594a,
        0x1078, 0x2263, 0x1078, 0x5c43, 0x1078, 0x5485, 0x1078, 0x2162,
@@ -87,15 +87,15 @@ unsigned short risc_code01[] = {
        0xa005, 0x00c0, 0x1198, 0x2011, 0x41dc, 0x1078, 0x5a45, 0x1078,
        0x1adf, 0x780f, 0x00ff, 0x7840, 0xa084, 0xfffb, 0x7842, 0x2011,
        0x8010, 0x73c4, 0x1078, 0x361b, 0x2001, 0xffff, 0x1078, 0x5ae6,
-       0x723c, 0xc284, 0x723e, 0x2001, 0xa60c, 0x2014, 0xc2ac, 0x2202,
-       0x1078, 0x6f9f, 0x2011, 0x0004, 0x1078, 0x8d1b, 0x1078, 0x489e,
+       0x723c, 0xc284, 0x723e, 0x2001, 0xa70c, 0x2014, 0xc2ac, 0x2202,
+       0x1078, 0x6f9f, 0x2011, 0x0004, 0x1078, 0x8d2b, 0x1078, 0x489e,
        0x1078, 0x42d4, 0x0040, 0x1144, 0x7087, 0x0001, 0x70bf, 0x0000,
        0x1078, 0x3c9e, 0x0078, 0x1198, 0x1078, 0x4967, 0x0040, 0x114d,
-       0x7a0c, 0xc2b4, 0x7a0e, 0x0078, 0x1159, 0x1078, 0x90a6, 0x70cc,
+       0x7a0c, 0xc2b4, 0x7a0e, 0x0078, 0x1159, 0x1078, 0x90b6, 0x70cc,
        0xd09c, 0x00c0, 0x1159, 0x7098, 0xa005, 0x0040, 0x1159, 0x1078,
-       0x42b8, 0x70d7, 0x0000, 0x70d3, 0x0000, 0x72cc, 0x2079, 0xa652,
+       0x42b8, 0x70d7, 0x0000, 0x70d3, 0x0000, 0x72cc, 0x2079, 0xa752,
        0x7804, 0xd0ac, 0x0040, 0x1165, 0xc295, 0x72ce, 0xa296, 0x0004,
-       0x0040, 0x1186, 0x2011, 0x0001, 0x1078, 0x8d1b, 0x7093, 0x0000,
+       0x0040, 0x1186, 0x2011, 0x0001, 0x1078, 0x8d2b, 0x7093, 0x0000,
        0x7097, 0xffff, 0x7003, 0x0002, 0x0f7f, 0x1078, 0x2677, 0x2011,
        0x0005, 0x1078, 0x70e0, 0x1078, 0x62d1, 0x0c7e, 0x2061, 0x0100,
        0x60e3, 0x0008, 0x0c7f, 0x127f, 0x0078, 0x119a, 0x7093, 0x0000,
@@ -103,7 +103,7 @@ unsigned short risc_code01[] = {
        0x1078, 0x62d1, 0x0c7e, 0x2061, 0x0100, 0x60e3, 0x0008, 0x0c7f,
        0x0f7f, 0x127f, 0x007c, 0x0c7e, 0x20a9, 0x0082, 0x2009, 0x007e,
        0x017e, 0x027e, 0x037e, 0x2110, 0x027e, 0x2019, 0x0029, 0x1078,
-       0x73d0, 0x027f, 0x1078, 0xa4f1, 0x037f, 0x027f, 0x017f, 0x1078,
+       0x73d0, 0x027f, 0x1078, 0xa501, 0x037f, 0x027f, 0x017f, 0x1078,
        0x298e, 0x8108, 0x00f0, 0x11a0, 0x0c7f, 0x706f, 0x0000, 0x7070,
        0xa084, 0x00ff, 0x7072, 0x709b, 0x0000, 0x007c, 0x127e, 0x2091,
        0x8000, 0x7000, 0xa086, 0x0002, 0x00c0, 0x1244, 0x7094, 0xa086,
@@ -114,13 +114,13 @@ unsigned short risc_code01[] = {
        0x27f7, 0x1078, 0x62d1, 0x70cc, 0xd094, 0x00c0, 0x1244, 0x2011,
        0x0001, 0x2019, 0x0000, 0x1078, 0x282f, 0x1078, 0x62d1, 0x0078,
        0x1244, 0x70d4, 0xa005, 0x00c0, 0x1244, 0x7090, 0xa005, 0x00c0,
-       0x1244, 0x1078, 0x4967, 0x00c0, 0x1244, 0x2001, 0xa653, 0x2004,
+       0x1244, 0x1078, 0x4967, 0x00c0, 0x1244, 0x2001, 0xa753, 0x2004,
        0xd0ac, 0x0040, 0x1227, 0x157e, 0x0c7e, 0x20a9, 0x007f, 0x2009,
        0x0000, 0x017e, 0x1078, 0x45c4, 0x00c0, 0x121a, 0x6000, 0xd0ec,
        0x00c0, 0x1222, 0x017f, 0x8108, 0x00f0, 0x1211, 0x0c7f, 0x157f,
        0x0078, 0x1227, 0x017f, 0x0c7f, 0x157f, 0x0078, 0x1244, 0x7003,
        0x0003, 0x7097, 0xffff, 0x2001, 0x0000, 0x1078, 0x24e8, 0x1078,
-       0x3699, 0x2001, 0xa8b2, 0x2004, 0xa086, 0x0005, 0x00c0, 0x123c,
+       0x3699, 0x2001, 0xa9b2, 0x2004, 0xa086, 0x0005, 0x00c0, 0x123c,
        0x2011, 0x0000, 0x1078, 0x70e0, 0x2011, 0x0000, 0x1078, 0x70ea,
        0x1078, 0x62d1, 0x1078, 0x639b, 0x127f, 0x007c, 0x017e, 0x0f7e,
        0x127e, 0x2091, 0x8000, 0x2079, 0x0100, 0x2009, 0x00f7, 0x1078,
@@ -137,51 +137,51 @@ unsigned short risc_code01[] = {
        0x00f0, 0x129f, 0x7853, 0x1400, 0x7843, 0x0090, 0x7843, 0x0010,
        0x2019, 0x61a8, 0x7854, 0x0005, 0x0005, 0xd08c, 0x0040, 0x12b4,
        0x7824, 0xd0ac, 0x00c0, 0x12ca, 0x8319, 0x00c0, 0x12aa, 0x2009,
-       0xa632, 0x2104, 0x8000, 0x200a, 0xa084, 0xfff0, 0x0040, 0x12c4,
+       0xa732, 0x2104, 0x8000, 0x200a, 0xa084, 0xfff0, 0x0040, 0x12c4,
        0x200b, 0x0000, 0x1078, 0x2588, 0x2001, 0x0001, 0x1078, 0x24e8,
-       0x0078, 0x12d3, 0x2001, 0xa632, 0x2003, 0x0000, 0x7828, 0xc09d,
+       0x0078, 0x12d3, 0x2001, 0xa732, 0x2003, 0x0000, 0x7828, 0xc09d,
        0x782a, 0x7827, 0x0048, 0x7853, 0x0400, 0x157f, 0x037f, 0x007f,
        0x127f, 0x0f7f, 0x017f, 0x007c, 0x007c, 0x007c, 0x007c, 0x2a70,
-       0x2061, 0xa8ad, 0x2063, 0x0001, 0x6007, 0x0013, 0x600b, 0x0018,
+       0x2061, 0xa9ad, 0x2063, 0x0001, 0x6007, 0x0013, 0x600b, 0x0019,
        0x600f, 0x0017, 0x2009, 0x0100, 0x2104, 0xa082, 0x0002, 0x0048,
        0x12f5, 0x7053, 0xffff, 0x0078, 0x12f7, 0x7053, 0x0000, 0x7057,
-       0xffff, 0x706f, 0x0000, 0x7073, 0x0000, 0x1078, 0x90a6, 0x2061,
-       0xa88d, 0x6003, 0x0909, 0x6007, 0x0000, 0x600b, 0x8800, 0x600f,
+       0xffff, 0x706f, 0x0000, 0x7073, 0x0000, 0x1078, 0x90b6, 0x2061,
+       0xa98d, 0x6003, 0x0909, 0x6007, 0x0000, 0x600b, 0x8800, 0x600f,
        0x0200, 0x6013, 0x00ff, 0x6017, 0x0003, 0x601b, 0x0000, 0x601f,
-       0x07d0, 0x2061, 0xa895, 0x6003, 0x8000, 0x6007, 0x0000, 0x600b,
+       0x07d0, 0x2061, 0xa995, 0x6003, 0x8000, 0x6007, 0x0000, 0x600b,
        0x0000, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x0000, 0x601b,
-       0x0001, 0x601f, 0x0000, 0x2061, 0xa8a5, 0x6003, 0x514c, 0x6007,
-       0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0xa626, 0x2003,
+       0x0001, 0x601f, 0x0000, 0x2061, 0xa9a5, 0x6003, 0x514c, 0x6007,
+       0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0xa726, 0x2003,
        0x0000, 0x007c, 0x2091, 0x8000, 0x0068, 0x1334, 0x007e, 0x017e,
        0x2079, 0x0000, 0x7818, 0xd084, 0x00c0, 0x133a, 0x017f, 0x792e,
        0x007f, 0x782a, 0x007f, 0x7826, 0x3900, 0x783a, 0x7823, 0x8002,
-       0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2079, 0xa600,
-       0x7803, 0x0005, 0x0078, 0x1352, 0x007c, 0x2071, 0xa600, 0x715c,
+       0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2079, 0xa700,
+       0x7803, 0x0005, 0x0078, 0x1352, 0x007c, 0x2071, 0xa700, 0x715c,
        0x712e, 0x2021, 0x0001, 0xa190, 0x002d, 0xa298, 0x002d, 0x0048,
        0x136b, 0x7060, 0xa302, 0x00c8, 0x136b, 0x220a, 0x2208, 0x2310,
        0x8420, 0x0078, 0x135d, 0x200b, 0x0000, 0x74aa, 0x74ae, 0x007c,
-       0x0e7e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa600, 0x70ac, 0xa0ea,
+       0x0e7e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa700, 0x70ac, 0xa0ea,
        0x0010, 0x00c8, 0x137e, 0xa06e, 0x0078, 0x1388, 0x8001, 0x70ae,
        0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, 0x0000,
-       0x127f, 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa600, 0x127e, 0x2091,
+       0x127f, 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa700, 0x127e, 0x2091,
        0x8000, 0x70ac, 0x8001, 0x00c8, 0x1398, 0xa06e, 0x0078, 0x13a1,
        0x70ae, 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807,
        0x0000, 0x127f, 0x0e7f, 0x007c, 0x0e7e, 0x127e, 0x2091, 0x8000,
-       0x2071, 0xa600, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70ac, 0x8000,
+       0x2071, 0xa700, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70ac, 0x8000,
        0x70ae, 0x127f, 0x0e7f, 0x007c, 0x8dff, 0x0040, 0x13c0, 0x6804,
        0x6807, 0x0000, 0x007e, 0x1078, 0x13a4, 0x0d7f, 0x0078, 0x13b4,
-       0x007c, 0x0e7e, 0x2071, 0xa600, 0x70ac, 0xa08a, 0x0010, 0xa00d,
-       0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa8d6, 0x7007, 0x0000, 0x701b,
+       0x007c, 0x0e7e, 0x2071, 0xa700, 0x70ac, 0xa08a, 0x0010, 0xa00d,
+       0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa9d6, 0x7007, 0x0000, 0x701b,
        0x0000, 0x701f, 0x0000, 0x2071, 0x0000, 0x7010, 0xa085, 0x8004,
        0x7012, 0x0e7f, 0x007c, 0x127e, 0x2091, 0x8000, 0x0e7e, 0x2270,
-       0x700b, 0x0000, 0x2071, 0xa8d6, 0x7018, 0xa088, 0xa8df, 0x220a,
+       0x700b, 0x0000, 0x2071, 0xa9d6, 0x7018, 0xa088, 0xa9df, 0x220a,
        0x8000, 0xa084, 0x0007, 0x701a, 0x7004, 0xa005, 0x00c0, 0x13f6,
        0x0f7e, 0x2079, 0x0010, 0x1078, 0x1408, 0x0f7f, 0x0e7f, 0x127f,
-       0x007c, 0x0e7e, 0x2071, 0xa8d6, 0x7004, 0xa005, 0x00c0, 0x1406,
+       0x007c, 0x0e7e, 0x2071, 0xa9d6, 0x7004, 0xa005, 0x00c0, 0x1406,
        0x0f7e, 0x2079, 0x0010, 0x1078, 0x1408, 0x0f7f, 0x0e7f, 0x007c,
        0x7000, 0x0079, 0x140b, 0x140f, 0x1479, 0x1496, 0x1496, 0x7018,
        0x711c, 0xa106, 0x00c0, 0x1417, 0x7007, 0x0000, 0x007c, 0x0d7e,
-       0xa180, 0xa8df, 0x2004, 0x700a, 0x2068, 0x8108, 0xa18c, 0x0007,
+       0xa180, 0xa9df, 0x2004, 0x700a, 0x2068, 0x8108, 0xa18c, 0x0007,
        0x711e, 0x7803, 0x0026, 0x6824, 0x7832, 0x6828, 0x7836, 0x682c,
        0x783a, 0x6830, 0x783e, 0x6810, 0x700e, 0x680c, 0x7016, 0x6804,
        0x0d7f, 0xd084, 0x0040, 0x1439, 0x7007, 0x0001, 0x1078, 0x143e,
@@ -193,16 +193,16 @@ unsigned short risc_code01[] = {
        0x2011, 0x0040, 0xa182, 0x0040, 0x00c8, 0x1468, 0x2110, 0xa006,
        0x700e, 0x22a8, 0x53a6, 0x8203, 0x7822, 0x7803, 0x0020, 0x3300,
        0x7016, 0x7803, 0x0001, 0x157f, 0x147f, 0x137f, 0x027f, 0x017f,
-       0x007c, 0x137e, 0x147e, 0x157e, 0x2099, 0xa6fa, 0x20a1, 0x0018,
+       0x007c, 0x137e, 0x147e, 0x157e, 0x2099, 0xa7fa, 0x20a1, 0x0018,
        0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x127e, 0x2091, 0x8000,
        0x7803, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002, 0x700b,
-       0xa6f5, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x137e, 0x147e,
-       0x157e, 0x2001, 0xa729, 0x209c, 0x20a1, 0x0014, 0x7803, 0x0026,
-       0x2001, 0xa72a, 0x20ac, 0x53a6, 0x2099, 0xa72b, 0x20a1, 0x0018,
+       0xa7f5, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x137e, 0x147e,
+       0x157e, 0x2001, 0xa829, 0x209c, 0x20a1, 0x0014, 0x7803, 0x0026,
+       0x2001, 0xa82a, 0x20ac, 0x53a6, 0x2099, 0xa82b, 0x20a1, 0x0018,
        0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x127e, 0x2091, 0x8000,
        0x7803, 0x0001, 0x7007, 0x0004, 0x7000, 0xc08c, 0x7002, 0x700b,
-       0xa726, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x017e, 0x0e7e,
-       0x2071, 0xa8d6, 0x0f7e, 0x2079, 0x0010, 0x7904, 0x7803, 0x0002,
+       0xa826, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x017e, 0x0e7e,
+       0x2071, 0xa9d6, 0x0f7e, 0x2079, 0x0010, 0x7904, 0x7803, 0x0002,
        0xd1fc, 0x0040, 0x14d0, 0xa18c, 0x0700, 0x7004, 0x1079, 0x14d4,
        0x0f7f, 0x0e7f, 0x017f, 0x007c, 0x1408, 0x14dc, 0x1509, 0x1531,
        0x1564, 0x14da, 0x0078, 0x14da, 0xa18c, 0x0700, 0x00c0, 0x1502,
@@ -217,16 +217,16 @@ unsigned short risc_code01[] = {
        0x2068, 0x7830, 0x6826, 0x7834, 0x682a, 0x7838, 0x682e, 0x783c,
        0x6832, 0x680b, 0x0100, 0x0d7f, 0x7007, 0x0000, 0x1078, 0x1408,
        0x007c, 0xa18c, 0x0700, 0x00c0, 0x155e, 0x137e, 0x147e, 0x157e,
-       0x2001, 0xa6f8, 0x2004, 0xa080, 0x000d, 0x20a0, 0x2099, 0x0014,
-       0x7803, 0x0040, 0x20a9, 0x0020, 0x53a5, 0x2001, 0xa6fa, 0x2004,
-       0xd0bc, 0x0040, 0x1554, 0x2001, 0xa703, 0x2004, 0xa080, 0x000d,
+       0x2001, 0xa7f8, 0x2004, 0xa080, 0x000d, 0x20a0, 0x2099, 0x0014,
+       0x7803, 0x0040, 0x20a9, 0x0020, 0x53a5, 0x2001, 0xa7fa, 0x2004,
+       0xd0bc, 0x0040, 0x1554, 0x2001, 0xa803, 0x2004, 0xa080, 0x000d,
        0x20a0, 0x20a9, 0x0020, 0x53a5, 0x157f, 0x147f, 0x137f, 0x7007,
        0x0000, 0x1078, 0x4f8c, 0x1078, 0x1408, 0x007c, 0x2011, 0x8003,
        0x1078, 0x361b, 0x0078, 0x1562, 0xa18c, 0x0700, 0x00c0, 0x1571,
-       0x2001, 0xa728, 0x2003, 0x0100, 0x7007, 0x0000, 0x1078, 0x1408,
+       0x2001, 0xa828, 0x2003, 0x0100, 0x7007, 0x0000, 0x1078, 0x1408,
        0x007c, 0x2011, 0x8004, 0x1078, 0x361b, 0x0078, 0x1575, 0x127e,
-       0x2091, 0x2100, 0x2079, 0x0030, 0x2071, 0xa8e7, 0x7803, 0x0004,
-       0x7003, 0x0000, 0x700f, 0xa8ed, 0x7013, 0xa8ed, 0x780f, 0x0076,
+       0x2091, 0x2100, 0x2079, 0x0030, 0x2071, 0xa9e7, 0x7803, 0x0004,
+       0x7003, 0x0000, 0x700f, 0xa9ed, 0x7013, 0xa9ed, 0x780f, 0x0076,
        0x7803, 0x0004, 0x127f, 0x007c, 0x6934, 0xa184, 0x0007, 0x0079,
        0x1591, 0x1599, 0x15df, 0x1599, 0x1599, 0x1599, 0x15c4, 0x15a8,
        0x159d, 0xa085, 0x0001, 0x0078, 0x15f9, 0x684c, 0xd0bc, 0x0040,
@@ -249,7 +249,7 @@ unsigned short risc_code01[] = {
        0x2091, 0x2100, 0x027f, 0x037f, 0x047f, 0x7000, 0xa005, 0x00c0,
        0x1630, 0x7206, 0x2001, 0x1651, 0x007e, 0x2260, 0x0078, 0x17e0,
        0x710c, 0x220a, 0x8108, 0x230a, 0x8108, 0x240a, 0x8108, 0xa182,
-       0xa908, 0x0048, 0x163d, 0x2009, 0xa8ed, 0x710e, 0x7010, 0xa102,
+       0xaa08, 0x0048, 0x163d, 0x2009, 0xa9ed, 0x710e, 0x7010, 0xa102,
        0xa082, 0x0009, 0x0040, 0x1648, 0xa080, 0x001b, 0x00c0, 0x164b,
        0x2009, 0x0138, 0x200a, 0x7000, 0xa005, 0x00c0, 0x1651, 0x1078,
        0x17c1, 0x127f, 0x007c, 0x127e, 0x027e, 0x037e, 0x0c7e, 0x007e,
@@ -285,7 +285,7 @@ unsigned short risc_code01[] = {
        0x6810, 0xa300, 0x6812, 0x6814, 0xa201, 0x6816, 0x7803, 0x0004,
        0x7003, 0x0000, 0x6100, 0xa18e, 0x0004, 0x00c0, 0x1753, 0x2009,
        0x0048, 0x1078, 0x775c, 0x0c7f, 0x0d7f, 0x127f, 0x007c, 0x0f7e,
-       0x0e7e, 0x027e, 0x037e, 0x047e, 0x057e, 0x2071, 0xa8e7, 0x7000,
+       0x0e7e, 0x027e, 0x037e, 0x047e, 0x057e, 0x2071, 0xa9e7, 0x7000,
        0xa086, 0x0000, 0x0040, 0x17ba, 0x7004, 0xac06, 0x00c0, 0x17ab,
        0x2079, 0x0030, 0x7000, 0xa086, 0x0003, 0x0040, 0x17ab, 0x7804,
        0xd0fc, 0x00c0, 0x17a7, 0x20e1, 0x6000, 0x2011, 0x0032, 0x2001,
@@ -295,12 +295,12 @@ unsigned short risc_code01[] = {
        0x178d, 0x7803, 0x0002, 0x7803, 0x0009, 0x7003, 0x0003, 0x7007,
        0x0000, 0x057f, 0x027f, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001,
        0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0078, 0x17ab, 0x1078,
-       0x1913, 0x0078, 0x175f, 0x157e, 0x20a9, 0x0009, 0x2009, 0xa8ed,
+       0x1913, 0x0078, 0x175f, 0x157e, 0x20a9, 0x0009, 0x2009, 0xa9ed,
        0x2104, 0xac06, 0x00c0, 0x17b5, 0x200a, 0xa188, 0x0003, 0x00f0,
        0x17b0, 0x157f, 0x057f, 0x047f, 0x037f, 0x027f, 0x0e7f, 0x0f7f,
        0x007c, 0x700c, 0x7110, 0xa106, 0x00c0, 0x17c9, 0x7003, 0x0000,
        0x007c, 0x2104, 0x7006, 0x2060, 0x8108, 0x211c, 0x8108, 0x2124,
-       0x8108, 0xa182, 0xa908, 0x0048, 0x17d7, 0x2009, 0xa8ed, 0x7112,
+       0x8108, 0xa182, 0xaa08, 0x0048, 0x17d7, 0x2009, 0xa9ed, 0x7112,
        0x700c, 0xa106, 0x00c0, 0x17e0, 0x2001, 0x0138, 0x2003, 0x0008,
        0x8cff, 0x00c0, 0x17e7, 0x1078, 0x1b4d, 0x0078, 0x1854, 0x6010,
        0x2068, 0x2d58, 0x6828, 0xa406, 0x00c0, 0x17f2, 0x682c, 0xa306,
@@ -309,7 +309,7 @@ unsigned short risc_code01[] = {
        0x6034, 0xa303, 0x0040, 0x1806, 0x00c8, 0x1818, 0x643a, 0x6336,
        0x6c2a, 0x6b2e, 0x047e, 0x037e, 0x2400, 0x6c7c, 0xa402, 0x6812,
        0x2300, 0x6b80, 0xa303, 0x6816, 0x037f, 0x047f, 0x0078, 0x181c,
-       0x1078, 0x9053, 0x0040, 0x17e3, 0x2001, 0xa674, 0x2004, 0xd0b4,
+       0x1078, 0x9063, 0x0040, 0x17e3, 0x2001, 0xa774, 0x2004, 0xd0b4,
        0x00c0, 0x182b, 0x6018, 0x2004, 0xd0bc, 0x00c0, 0x182b, 0x6817,
        0x7fff, 0x6813, 0xffff, 0x1078, 0x208a, 0x00c0, 0x17e3, 0x0c7e,
        0x7004, 0x2060, 0x6024, 0xc0d4, 0x6026, 0x0c7f, 0x684c, 0xd0f4,
@@ -337,9 +337,9 @@ unsigned short risc_code01[] = {
        0xa201, 0x682e, 0x2300, 0x6b10, 0xa302, 0x6812, 0x2200, 0x6a14,
        0xa203, 0x6816, 0x1078, 0x2026, 0x007c, 0x1078, 0x1332, 0x1078,
        0x1c97, 0x7004, 0x2060, 0x0d7e, 0x6010, 0x2068, 0x7003, 0x0000,
-       0x1078, 0x1af4, 0x1078, 0x8d06, 0x0040, 0x190c, 0x6808, 0x8001,
+       0x1078, 0x1af4, 0x1078, 0x8d16, 0x0040, 0x190c, 0x6808, 0x8001,
        0x680a, 0x697c, 0x6912, 0x6980, 0x6916, 0x682b, 0xffff, 0x682f,
-       0xffff, 0x6850, 0xc0bd, 0x6852, 0x0d7f, 0x1078, 0x8a01, 0x0078,
+       0xffff, 0x6850, 0xc0bd, 0x6852, 0x0d7f, 0x1078, 0x8a11, 0x0078,
        0x1adb, 0x1078, 0x1332, 0x127e, 0x2091, 0x2100, 0x007e, 0x017e,
        0x2b68, 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700,
        0x00c0, 0x18ef, 0xa184, 0x0003, 0xa086, 0x0003, 0x0040, 0x1911,
@@ -361,7 +361,7 @@ unsigned short risc_code01[] = {
        0x19a7, 0x7004, 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, 0x7000,
        0xa086, 0x0004, 0x0040, 0x1adb, 0x7003, 0x0000, 0x1078, 0x17c1,
        0x0078, 0x1adb, 0x057e, 0x7d0c, 0xd5bc, 0x00c0, 0x19b9, 0x1078,
-       0xa57e, 0x057f, 0x1078, 0x1af4, 0x0f7e, 0x7004, 0x2078, 0x1078,
+       0xa58e, 0x057f, 0x1078, 0x1af4, 0x0f7e, 0x7004, 0x2078, 0x1078,
        0x4963, 0x0040, 0x19c6, 0x7824, 0xc0f5, 0x7826, 0x0f7f, 0x682b,
        0xffff, 0x682f, 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912,
        0x6980, 0x6916, 0x0078, 0x1adb, 0x7004, 0x0c7e, 0x2060, 0x6024,
@@ -388,7 +388,7 @@ unsigned short risc_code01[] = {
        0x680c, 0xa213, 0x7810, 0xa100, 0x7812, 0x690c, 0x7814, 0xa101,
        0x7816, 0x0078, 0x1a8f, 0x6810, 0x2008, 0xa31a, 0x6814, 0xa213,
        0x7810, 0xa100, 0x7812, 0x6914, 0x7814, 0xa101, 0x7816, 0x0f7f,
-       0x0d7f, 0x0078, 0x196d, 0x057e, 0x7d0c, 0x1078, 0xa57e, 0x057f,
+       0x0d7f, 0x0078, 0x196d, 0x057e, 0x7d0c, 0x1078, 0xa58e, 0x057f,
        0x1078, 0x1af4, 0x0f7e, 0x7004, 0x2078, 0x1078, 0x4963, 0x0040,
        0x1aa4, 0x7824, 0xc0f5, 0x7826, 0x0f7f, 0x682b, 0xffff, 0x682f,
        0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912, 0x6980, 0x6916,
@@ -399,11 +399,11 @@ unsigned short risc_code01[] = {
        0xa005, 0x0040, 0x1ac5, 0x2068, 0x6808, 0x8000, 0x680a, 0x6c28,
        0x6b2c, 0x1078, 0x17e0, 0x017f, 0x007f, 0x127f, 0x007c, 0x127e,
        0x2091, 0x2100, 0x7000, 0xa086, 0x0003, 0x00c0, 0x1af2, 0x700c,
-       0x7110, 0xa106, 0x0040, 0x1af2, 0x20e1, 0x9028, 0x700f, 0xa8ed,
-       0x7013, 0xa8ed, 0x127f, 0x007c, 0x0c7e, 0x1078, 0x1b22, 0x20e1,
+       0x7110, 0xa106, 0x0040, 0x1af2, 0x20e1, 0x9028, 0x700f, 0xa9ed,
+       0x7013, 0xa9ed, 0x127f, 0x007c, 0x0c7e, 0x1078, 0x1b22, 0x20e1,
        0x9028, 0x700c, 0x7110, 0xa106, 0x0040, 0x1b19, 0x2104, 0xa005,
        0x0040, 0x1b08, 0x2060, 0x6010, 0x2060, 0x6008, 0x8001, 0x600a,
-       0xa188, 0x0003, 0xa182, 0xa908, 0x0048, 0x1b10, 0x2009, 0xa8ed,
+       0xa188, 0x0003, 0xa182, 0xaa08, 0x0048, 0x1b10, 0x2009, 0xa9ed,
        0x7112, 0x700c, 0xa106, 0x00c0, 0x1af9, 0x2011, 0x0008, 0x0078,
        0x1af9, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0138, 0x2202,
        0x0c7f, 0x007c, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2021,
@@ -415,7 +415,7 @@ unsigned short risc_code01[] = {
        0x1b55, 0x780c, 0xd0a4, 0x0040, 0x1b5b, 0x1078, 0x1af4, 0xa085,
        0x0001, 0x0078, 0x1b5d, 0x1078, 0x1b92, 0x007c, 0x0e7e, 0x2071,
        0x0200, 0x7808, 0xa084, 0xf000, 0xa10d, 0x1078, 0x1b22, 0x2019,
-       0x5000, 0x8319, 0x0040, 0x1b7c, 0x2001, 0xa908, 0x2004, 0xa086,
+       0x5000, 0x8319, 0x0040, 0x1b7c, 0x2001, 0xaa08, 0x2004, 0xa086,
        0x0000, 0x0040, 0x1b7c, 0x2001, 0x0021, 0xd0fc, 0x0040, 0x1b69,
        0x1078, 0x1eaa, 0x0078, 0x1b67, 0x20e1, 0x7000, 0x7324, 0x7420,
        0x7028, 0x7028, 0x7426, 0x7037, 0x0001, 0x810f, 0x712e, 0x702f,
@@ -447,7 +447,7 @@ unsigned short risc_code01[] = {
        0x6004, 0x7836, 0xa006, 0x783a, 0x783e, 0x0078, 0x1c65, 0x6010,
        0x7822, 0x686e, 0x6014, 0x7826, 0x6872, 0x6000, 0x7832, 0x6004,
        0x7836, 0x6008, 0x783a, 0x600c, 0x783e, 0x7803, 0x0011, 0x0c7f,
-       0x0d7f, 0x007c, 0x0f7e, 0x0e7e, 0x017e, 0x027e, 0x2071, 0xa8e7,
+       0x0d7f, 0x007c, 0x0f7e, 0x0e7e, 0x017e, 0x027e, 0x2071, 0xa9e7,
        0x2079, 0x0030, 0x2011, 0x0050, 0x7000, 0xa086, 0x0000, 0x0040,
        0x1c92, 0x8211, 0x0040, 0x1c90, 0x2001, 0x0005, 0x2004, 0xd08c,
        0x0040, 0x1c79, 0x7904, 0xa18c, 0x0780, 0x017e, 0x1078, 0x1913,
@@ -455,7 +455,7 @@ unsigned short risc_code01[] = {
        0xa085, 0x0001, 0x027f, 0x017f, 0x0e7f, 0x0f7f, 0x007c, 0x7803,
        0x0004, 0x2009, 0x0064, 0x7804, 0xd0ac, 0x0040, 0x1ce8, 0x8109,
        0x00c0, 0x1c9b, 0x2009, 0x0100, 0x210c, 0xa18a, 0x0003, 0x1048,
-       0x1332, 0x1078, 0x1fca, 0x0e7e, 0x0f7e, 0x2071, 0xa8d6, 0x2079,
+       0x1332, 0x1078, 0x1fca, 0x0e7e, 0x0f7e, 0x2071, 0xa9d6, 0x2079,
        0x0010, 0x7004, 0xa086, 0x0000, 0x0040, 0x1ce0, 0x7800, 0x007e,
        0x7820, 0x007e, 0x7830, 0x007e, 0x7834, 0x007e, 0x7838, 0x007e,
        0x783c, 0x007e, 0x7803, 0x0004, 0x7823, 0x0000, 0x0005, 0x0005,
@@ -463,7 +463,7 @@ unsigned short risc_code01[] = {
        0x007f, 0x783e, 0x007f, 0x783a, 0x007f, 0x7836, 0x007f, 0x7832,
        0x007f, 0x7822, 0x007f, 0x7802, 0x0f7f, 0x0e7f, 0x0078, 0x1ce6,
        0x0f7f, 0x0e7f, 0x7804, 0xd0ac, 0x10c0, 0x1332, 0x1078, 0x639b,
-       0x007c, 0x0e7e, 0x2071, 0xa908, 0x7003, 0x0000, 0x0e7f, 0x007c,
+       0x007c, 0x0e7e, 0x2071, 0xaa08, 0x7003, 0x0000, 0x0e7f, 0x007c,
        0x0d7e, 0xa280, 0x0004, 0x206c, 0x694c, 0xd1dc, 0x00c0, 0x1d6b,
        0x6934, 0xa184, 0x0007, 0x0079, 0x1cfd, 0x1d05, 0x1d56, 0x1d05,
        0x1d05, 0x1d05, 0x1d3b, 0x1d18, 0x1d07, 0x1078, 0x1332, 0x684c,
@@ -480,7 +480,7 @@ unsigned short risc_code01[] = {
        0x0040, 0x18ed, 0x6958, 0xa006, 0x682e, 0x682a, 0x2d00, 0x681a,
        0x6834, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, 0x6832, 0x6926,
        0x684c, 0xc0dd, 0x684e, 0x0d7f, 0x007c, 0x0f7e, 0x2079, 0x0020,
-       0x7804, 0xd0fc, 0x10c0, 0x1eaa, 0x0e7e, 0x0d7e, 0x2071, 0xa908,
+       0x7804, 0xd0fc, 0x10c0, 0x1eaa, 0x0e7e, 0x0d7e, 0x2071, 0xaa08,
        0x7000, 0xa005, 0x00c0, 0x1df0, 0x0c7e, 0x7206, 0xa280, 0x0004,
        0x205c, 0x7004, 0x2068, 0x7803, 0x0004, 0x6818, 0x0d7e, 0x2068,