1. 06 5月, 2007 7 次提交
  2. 05 5月, 2007 4 次提交
  3. 03 5月, 2007 2 次提交
    • M
      PCI: Convert to alloc_pci_dev() · bab41e9b
      Michael Ellerman 提交于
      Convert code that allocs a struct pci_dev to use alloc_pci_dev().
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bab41e9b
    • J
      PCI: Cleanup the includes of <linux/pci.h> · 6473d160
      Jean Delvare 提交于
      I noticed that many source files include <linux/pci.h> while they do
      not appear to need it. Here is an attempt to clean it all up.
      
      In order to find all possibly affected files, I searched for all
      files including <linux/pci.h> but without any other occurence of "pci"
      or "PCI". I removed the include statement from all of these, then I
      compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
      false positives manually.
      
      My tests covered 66% of the affected files, so there could be false
      positives remaining. Untested files are:
      
      arch/alpha/kernel/err_common.c
      arch/alpha/kernel/err_ev6.c
      arch/alpha/kernel/err_ev7.c
      arch/ia64/sn/kernel/huberror.c
      arch/ia64/sn/kernel/xpnet.c
      arch/m68knommu/kernel/dma.c
      arch/mips/lib/iomap.c
      arch/powerpc/platforms/pseries/ras.c
      arch/ppc/8260_io/enet.c
      arch/ppc/8260_io/fcc_enet.c
      arch/ppc/8xx_io/enet.c
      arch/ppc/syslib/ppc4xx_sgdma.c
      arch/sh64/mach-cayman/iomap.c
      arch/xtensa/kernel/xtensa_ksyms.c
      arch/xtensa/platform-iss/setup.c
      drivers/i2c/busses/i2c-at91.c
      drivers/i2c/busses/i2c-mpc.c
      drivers/media/video/saa711x.c
      drivers/misc/hdpuftrs/hdpu_cpustate.c
      drivers/misc/hdpuftrs/hdpu_nexus.c
      drivers/net/au1000_eth.c
      drivers/net/fec_8xx/fec_main.c
      drivers/net/fec_8xx/fec_mii.c
      drivers/net/fs_enet/fs_enet-main.c
      drivers/net/fs_enet/mac-fcc.c
      drivers/net/fs_enet/mac-fec.c
      drivers/net/fs_enet/mac-scc.c
      drivers/net/fs_enet/mii-bitbang.c
      drivers/net/fs_enet/mii-fec.c
      drivers/net/ibm_emac/ibm_emac_core.c
      drivers/net/lasi_82596.c
      drivers/parisc/hppb.c
      drivers/sbus/sbus.c
      drivers/video/g364fb.c
      drivers/video/platinumfb.c
      drivers/video/stifb.c
      drivers/video/valkyriefb.c
      include/asm-arm/arch-ixp4xx/dma.h
      sound/oss/au1550_ac97.c
      
      I would welcome test reports for these files. I am fine with removing
      the untested files from the patch if the general opinion is that these
      changes aren't safe. The tested part would still be nice to have.
      
      Note that this patch depends on another header fixup patch I submitted
      to LKML yesterday:
        [PATCH] scatterlist.h needs types.h
        http://lkml.org/lkml/2007/3/01/141Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6473d160
  4. 30 4月, 2007 2 次提交
    • D
      [SCSI] qla2xxx: fix regression on sparc64 · 4e08df3f
      David Miller 提交于
      Some sparc64 boxes don't have a valid NVRAM (from which the driver
      takes its WWPN) try to extract this from open firmware instead and if
      that fails, fall back to a default, which would be invalid if more
      than one machine on the same SAN does this, since two machines with
      the same WWPN would be illegal, so warn when taking this potentially
      invalid default.
      
      Tested on SunBlade-1000:
      Acked-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      4e08df3f
    • J
      [BLOCK] Don't pin lots of memory in mempools · 5972511b
      Jens Axboe 提交于
      Currently we scale the mempool sizes depending on memory installed
      in the machine, except for the bio pool itself which sits at a fixed
      256 entry pre-allocation.
      
      There's really no point in "optimizing" this OOM path, we just need
      enough preallocated to make progress. A single unit is enough, lets
      scale it down to 2 just to be on the safe side.
      
      This patch saves ~150kb of pinned kernel memory on a 32-bit box.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5972511b
  5. 29 4月, 2007 1 次提交
  6. 28 4月, 2007 2 次提交
  7. 27 4月, 2007 1 次提交
    • D
      [SCSI] SUNESP: Complete driver rewrite to version 2.0 · cd9ad58d
      David S. Miller 提交于
      Major features:
      
      1) Tagged queuing support.
      2) Will properly negotiate for synchronous transfers even on
         devices that reject the wide negotiation message, such as
         CDROMs
      3) Significantly lower kernel stack usage in interrupt
         handler path by elimination of function vector arrays,
         replaced by a top-level switch statement state machine.
      4) Uses generic scsi infrastructure as much as possible to
         avoid code duplication.
      5) Automatic request of sense data in response to CHECK_CONDITION
      6) Portable to other platforms using ESP such as DEC and Sun3
         systems.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd9ad58d
  8. 26 4月, 2007 4 次提交
  9. 24 4月, 2007 1 次提交
  10. 18 4月, 2007 6 次提交
    • M
      [SCSI] modalias for scsi devices · d7b8bcb0
      Michael Tokarev 提交于
      The following patch adds support for sysfs/uevent modalias
      attribute for scsi devices (like disks, tapes, cdroms etc),
      based on whatever current sd.c, sr.c, st.c and osst.c drivers
      supports.
      
      The modalias format is like this:
      
       scsi:type-0x04
      
      (for TYPE_WORM, handled by sr.c now).
      
      Several comments.
      
      o This hexadecimal type value is because all TYPE_XXX constants
        in include/scsi/scsi.h are given in hex, but __stringify() will
        not convert them to decimal (so it will NOT be scsi:type-4).
        Since it does not really matter in which format it is, while
        both modalias in module and modalias attribute match each other,
        I descided to go for that 0x%02x format (and added a comment in
        include/scsi/scsi.h to keep them that way), instead of changing
        them all to decimal.
      
      o There was no .uevent routine for SCSI bus.  It might be a good
        idea to add some more ueven environment variables in there.
      
      o osst.c driver handles tapes too, like st.c, but only SOME tapes.
        With this setup, hotplug scripts (or whatever is used by the
        user) will try to load both st and osst modules for all SCSI
        tapes found, because both modules have scsi:type-0x01 alias).
        It is not harmful, but one extra module is no good either.
        It is possible to solve this, by exporting more info in
        modalias attribute, including vendor and device identification
        strings, so that modalias becomes something like
          scsi:type-0x12:vendor-Adaptec LTD:device-OnStream Tape Drive
        and having that, match for all 3 attributes, not only device
        type.  But oh well, vendor and device strings may be large,
        and they do contain spaces and whatnot.
        So I left them for now, awaiting for comments first.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d7b8bcb0
    • A
      [SCSI] sg: cap reserved_size values at max_sectors · 44ec9542
      Alan Stern 提交于
      This patch (as857) modifies the SG_GET_RESERVED_SIZE and
      SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at
      the device's request_queue's max_sectors value.  This will permit
      cdrecord to obtain a legal value for the maximum transfer length,
      fixing Bugzilla #7026.
      
      The patch also caps the initial reserved_size value.  There's no
      reason to have a reserved buffer larger than max_sectors, since it
      would be impossible to use the extra space.
      
      The corresponding ioctls in the block layer are modified similarly,
      and the initial value for the reserved_size is set as large as
      possible.  This will effectively make it default to max_sectors.
      Note that the actual value is meaningless anyway, since block devices
      don't have a reserved buffer.
      
      Finally, the BLKSECTGET ioctl is added to sg, so that there will be a
      uniform way for users to determine the actual max_sectors value for
      any raw SCSI transport.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NJens Axboe <jens.axboe@oracle.com>
      Acked-by: NDouglas Gilbert <dougg@torque.net>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      44ec9542
    • Z
      [SCSI] BusLogic: stop using check_region · 1079a2d2
      Zachary Amsden 提交于
      I got so sick of seing the check_region warnings from BusLogic.c I actually
      fixed it properly.  Never use check region, reserve it before the probe
      with request region instead and check the error result; free region if
      setup fails.  Should be functionally identical to the original except for
      fixing the potential race.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1079a2d2
    • B
      [SCSI] tgt: fix rdma transfer bugs · ad1331a7
      Bastian Blank 提交于
      - ibmstgt hits the max rdma transfer size (128k).
      - libsrp returns a rdma transfer error properly.
      Signed-off-by: NBastian Blank <bastian@waldi.eu.org>
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      ad1331a7
    • S
      [SCSI] aacraid: fix aacraid not finding device · 4def7fa1
      Salyzyn, Mark 提交于
      Thanks for the help from Steve Fox and Duane Cox investigating this
      issue, I'd like to report that we found the problem. The issue is with
      the patch Steve Fox isolated below, by not accommodating older adapters
      properly and issuing a command they do not support when retrieving
      storage parameters about the arrays. This simple patch resolves the
      problem (and more accurately mimics the logic of the original code
      before the patch).
      Signed-off-by: NMark Salyzyn <aacraid@adaptec.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      4def7fa1
    • B
      [SCSI] scsi_error.c: Add EH Start Unit retry · ed773e66
      Brian King 提交于
      Currently, the scsi error handler will issue a START_UNIT
      command if the drive indicates it needs its motor started
      and the allow_restart flag is set in the scsi_device. If,
      after the scsi error handler invokes a host adapter reset
      due to error recovery, a device is in a unit attention
      state AND also needs a START_UNIT, that device will be placed
      offline. The disk array devices on an ipr RAID adapter
      will do exactly this when in a dual initiator configuration.
      This patch adds a single retry to the EH initiated
      START_UNIT.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      
      Patch modified and
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      ed773e66
  11. 15 4月, 2007 1 次提交
  12. 14 4月, 2007 1 次提交
  13. 13 4月, 2007 2 次提交
  14. 03 4月, 2007 1 次提交
    • D
      [SCSI]: Fix scsi_send_eh_cmnd scatterlist handling · 8cc574a3
      David S. Miller 提交于
      This fixes a regression caused by commit:
      
      2dc611de
      
      The sense buffer code in scsi_send_eh_cmnd was changed to use
      alloc_page() and a scatter list, but the sense data copy was not
      updated to match so what we actually get in the sense buffer is total
      grabage starting with the kernel address of the struct page we got.
      Basically the stack frame of scsi_send_eh_cmd() is what ends up
      in the sense buffer.
      
      Depending upon how pointers look on a given platform, you can
      end up getting sr_ioctl.c errors when you mount a cdrom.  If
      the CDROM gives a check condition for GPCMD_GET_CONFIGURATION issued
      by drivers/cdrom/cdrom.c:cdrom_mmc_profile(), sr_ioctl will
      spit out this error message in sr_do_ioctl() with the way pointers
      are on sparc64:
      
      		default:
      			printk(KERN_ERR "%s: CDROM (ioctl) error, command: ", cd->cdi.name);
      			__scsi_print_command(cgc->cmd);
      			scsi_print_sense_hdr("sr", &sshdr);
      			err = -EIO;
      
      This is the error Tom Callaway reported in:
      
      http://marc.info/?l=linux-sparc&m=117407453208101&w=2
      
      Anyways, fix this by using page_address(sgl.page) which is OK
      because we know this is low-mem due to GFP_ATOMIC.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      8cc574a3
  15. 02 4月, 2007 5 次提交