e1000: prevent statistics from garbling during bus resets

If a PCI bus error/fault triggers a PCI bus reset, attempts to get
the ethernet packet count statistics from the hardware will fail,
returning garbage data upstream.  This patch skips statistics data
collection if the PCI device is not on the bus.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Basic implementation of 'make headers_install'

This adds a make target which exports a subset of headers which contain
definitions which are useful for system libraries and tools. It uses the
BSD 'unifdef' tool to remove instances of #ifdef __KERNEL__, and uses
sed to remove markers like __user.

Based on an original implementation by Arnd Bergmann <arnd@arndb.de>
Hacked about by David Woodhouse <dwmw2@infradead.org>
Reviewed and cleaned up by Sam Ravnborg <sam@ravnborg.org>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Basic implementation of 'make headers_check'

Based on the 'headers_install' target, this performs a basic sanity check
on the exported headers -- so far only checking that they do not include
any other headers which aren't selected for import, but easily extendable.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add generic Kbuild files for 'make headers_install'

This adds the Kbuild files listing the files which are to be installed by
the 'headers_install' make target, in generic directories.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add Kbuild file for PowerPC 'make headers_install'

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add Kbuild file for x86_64 'make headers_install'

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add Kbuild file for i386 'make headers_install'

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add Kbuild file for S390 'make headers_install'

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add Kbuild file for IA64 'make headers_install'

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add Kbuild file for SPARC 'make headers_install'

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add Kbuild file for Alpha 'make headers_install'

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Add empty Kbuild files for 'make headers_install' in remaining arches.

These include nothing more than the basic set of files listed in
asm-generic/Kbuild.asm. Any extra arch-specific files will need to be
added.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Restrict headers exported to userspace for SPARC and SPARC64

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Remove <linux/i2c-id.h> and <linux/i2c-algo-ite.h> from userspace export

Do not export the following i2c header files to user space:

* i2c-id.h: These IDs are internal to the kernel and user space
  does not need them.
* i2c-algo-ite.h: The driver is broken and planned for removal, so
  let's not export it for now. The extra ioctl defined here can
  be standardized and moved to i2c-core/i2c-dev if really needed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
[SCSI] kmalloc argument switcheroo in recent 53c700 change.

On Wed, Jun 21, 2006 at 07:00:34PM +0000, Linux Kernel wrote:
 > commit 67d59dfdeb21df2c16dcd478b66177e91178ecd0
 > tree ae85703651d81740f4a6cd398f9dd4d6aabe6a2f
 > parent 6db874fbdbedba5e15e76cc03b42f52ea70338c0
 > author James Bottomley <James.Bottomley@steeleye.com> Wed, 14 Jun 2006 07:31:19 -0500
 > committer James Bottomley <jejb@mulgrave.il.steeleye.com> Tue, 20 Jun 2006 05:34:01 -0500
 >
 > [SCSI] 53c700: remove reliance on deprecated cmnd fields
 >  ...
 >
 > +	SDp->hostdata = kmalloc(GFP_KERNEL, sizeof(struct NCR_700_sense));
 > +
 > +	if (!SDp->hostdata)
 > +		return -ENOMEM;

"I'll take reversed arguments for $100 please Alex".

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] scsi_debug version 1.79

  - add 'virtual_gb' parameter to simulate large storage
    (by wrapping in dev_size_mb megabytes of actual ram)
  - add 'no_lun_0' parameter to skip lun 0 on each target
    (but still respond as required to INQUIRY + REPORT LUNS)
  - add well know lu support
  - add MODE SELECT commands support [pages: 0xa and 0x1c]
  - add LOG SENSE command support [pages: 0xd and 0x2f]
  - add READ CAPACITY (16) support
  - increase number of mode pages supported (to read),
    mainly transport specific (SAS) mode (sub)pages
  - add more VPD pages and extend others, including
    ATA information VPD page
  - START STOP UNIT now maintains a state machine
  - READ (16) and WRITE (16) cope with lbas larger
    than 32 bits (needed for the 'virtual_gb' parameter)
  - allow single command transfers up to 32 MB
  - more precise error (sense data) messages

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] ibmvscsi: treat busy and error conditions separately

This patch fixes a condition where ibmvscsi treats a transport error as a
"busy" condition, so no errors were returned to the scsi mid-layer.
In a RAID environment this means that I/O hung rather than failing
over.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] megaraid_sas: zcr with fix

The patch adds support for a ZCR controller (Device ID : 0x413).

It also has a critical bug fix :

Disable controller interrupt before firing INIT cmd to FW.  Interrupt
is enabled after required initialization is over. This is done to
ensure that driver is ready to handle interrupts when it is generated
by the controller.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] HP XP devinfo update

According to Anthony Cheung all HP XP arrays with "OPEN-" 
types support REPORT_LUN. So there is no reason why we
shouldn't use it.

Signed-off-by: Anthony Cheung <anthony.cheung@hp.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>