firefly-linux-kernel-4.4.55.git
14 years ago[SCSI] libfcoe: Use fka_period as periodic timeouts to age out fcf if
Joe Eykholt [Fri, 11 Jun 2010 23:44:15 +0000 (16:44 -0700)]
[SCSI] libfcoe: Use fka_period as periodic timeouts to age out fcf if

keep alives are disabled due to fd_flags set and also
stop updating keep alive values in that case.

Update select fcf time only if fcf is not already selected or
select time is not already determined from parse adv, and then
have select time cleared only once after fcf is selected.

Changed deadline check to time_after_eq() from time_after()
since now next timeout will be on exact 2.5 times FKA followed
by first advertisement.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfcoe: fix lenient aging of FCF advertisements
Joe Eykholt [Fri, 11 Jun 2010 23:44:10 +0000 (16:44 -0700)]
[SCSI] libfcoe: fix lenient aging of FCF advertisements

[This patch has several improvements to the code in
the fip timers.  It hasn't been tested yet.
I'm sending it out for review.  Vasu, perhaps you can
merge this with your patch and test it together.]

The current code allows an advertisement to be used
even if it has been 3 times the FCF keep-alive
advertisement period (FKA) since one was received from
that FCF.  The spec. calls for 2.5 times FKA.

Fix this and make sure we detect missed keep-alives promptly.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfc: Handle unsolicited PRLO request
Bhanu Prakash Gollapudi [Fri, 11 Jun 2010 23:44:04 +0000 (16:44 -0700)]
[SCSI] libfc: Handle unsolicited PRLO request

Resubmitting after incorporating Joe's review comment.

Unsolicited PRLO request is now handled by sending LS_ACC,
and then relogin to the remote port if an N-port login
session exists for that remote port.

Note that this patch should be applied on top of Joe Eykholt's
"Fix remote port restart problem" patch.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] fcoe: clean up TBD comments in FCoE prototype header
Joe Eykholt [Fri, 11 Jun 2010 23:43:59 +0000 (16:43 -0700)]
[SCSI] fcoe: clean up TBD comments in FCoE prototype header

Some old comments in fc_fcoe.h say TBD long after the
standard has been passed by T11.  Clean them up.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfc: Honor LS_ACC response codes for PRLI
Bhanu Prakash Gollapudi [Fri, 11 Jun 2010 23:43:54 +0000 (16:43 -0700)]
[SCSI] libfc: Honor LS_ACC response codes for PRLI

As per FC-LS Rev 1.62 table 46, response codes are handled as follows:

1. If the Req executed is true, PRLI is accepted.
2. If Req executed is not set,  if resp code is 5,
   PRLI is not retried and port is logged out.
3. If resp code is anything apart from 1 or 5, PRLI is retired
   upto max retry count.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfc: Retry a rejected PRLI request
Bhanu Prakash Gollapudi [Fri, 11 Jun 2010 23:43:49 +0000 (16:43 -0700)]
[SCSI] libfc: Retry a rejected PRLI request

Retry upto max_rport_retry_count when a target responds with
LS_RJT for a PRLI request.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfcoe: No solicitation if adv is dropped
Bhanu Prakash Gollapudi [Fri, 11 Jun 2010 23:43:44 +0000 (16:43 -0700)]
[SCSI] libfcoe: No solicitation if adv is dropped

Host does not send discovery solicitation messages if Disc. Adv
from FCF are dropped. It restarts sending solicitation only
after receiving a Discovery Adv. from FCF. Fix is to restart
solicitation immediately after CVL processing.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfcoe: Avoid hang when receiving non-critical descriptors
Bhanu Prakash Gollapudi [Fri, 11 Jun 2010 23:43:38 +0000 (16:43 -0700)]
[SCSI] libfcoe: Avoid hang when receiving non-critical descriptors

Avoid infinite loop while processing FIP ELS or discovery
advertisement with non-critical descriptors.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Acked-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] libfcoe: FIP link keep-alive should continue while logged off
Joe Eykholt [Fri, 11 Jun 2010 23:43:33 +0000 (16:43 -0700)]
[SCSI] libfcoe: FIP link keep-alive should continue while logged off

A check in fcoe_ctlr_send_keep_alive() returns if there's no
port_id for the local port.  This could miss a keep alive if
we just did a host reset and have logged off and will log back in.

Return only if we are doing the port keep alive, in which case
we need to be logged in.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] ipr: move setting of the allow_restart flag for vsets and disks
Wayne Boyer [Thu, 10 Jun 2010 21:46:34 +0000 (14:46 -0700)]
[SCSI] ipr: move setting of the allow_restart flag for vsets and disks

A problem was found where the call to scsi_add_device() fails intermittently
for an adapter.  This is caused when __scsi_add_device() returns -ENODEV as
a result of not calling scsi_probe_and_add_lun() since the call to
scsi_host_scan_allowed() fails.  scsi_host_scan_allowed() fails because the
adapter state is set to SHOST_RECOVERY instead of SHOST_RUNNING. The state of
the adapter is being set to SHOST_RECOVERY by scsi_eh_scmd_add() during
error handling.

This problem is avoided by moving the setting of the allow_restart flag to
later in the device initialization sequence.  This prevents further error
handling if we get a NOT_READY response from a TUR command by causing
scsi_check_sense() to return SUCCESS.  Therefore, scsi_eh_scmd_add() will
not run and the adapter state will remain as SHOST_RUNNING.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] be2iscsi: fix null dereference on error path
Dan Carpenter [Thu, 10 Jun 2010 07:53:05 +0000 (09:53 +0200)]
[SCSI] be2iscsi: fix null dereference on error path

"phba" is always null here so we can't dereference it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] be2iscsi: fix memory leak on error path
Dan Carpenter [Thu, 10 Jun 2010 07:52:21 +0000 (09:52 +0200)]
[SCSI] be2iscsi: fix memory leak on error path

I added a kfree(pwrb_arr) in front of the return.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] ipr: add writeq definition if needed
Wayne Boyer [Wed, 9 Jun 2010 15:24:55 +0000 (08:24 -0700)]
[SCSI] ipr: add writeq definition if needed

Compiling the driver will fail on 32 bit powerpc and other
architectures where writeq is not defined.  This patch adds a
definition for writeq.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] be2iscsi: fix disconnection cleanup
Mike Christie [Wed, 9 Jun 2010 08:30:08 +0000 (03:30 -0500)]
[SCSI] be2iscsi: fix disconnection cleanup

This patch fixes 4 bugs in the connection connect/disconnect
cleanup path.

1. If beiscsi_open_conn fails beiscsi_free_ep was always being
called, and if beiscsi_open_conn failed because beiscsi_get_cid
failed then we would free an unallocated cid.

2. If beiscsi_ep_connect failed due to a beiscsi_open_conn failure
it was leaking iscsi_endpoints.

3. beiscsi_ep_disconnect was leaking iscsi_endpoints.
beiscsi_ep_disconnect should free the iscsi_endpoint. We cannot
do it in beiscsi_conn_stop because that is only called for
iscsi connection cleanup. If beiscsi_ep_connect returns
success, but then the poll function fails or the connect
times out then beiscsi_ep_disconnect will be called to clean
up the ep. The conn_stop callout will not be called in that path.

4. beiscsi_conn_stop was freeing the iscsi_endpoint then accessing
it a couple lines later.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.14: Update Driver version to 8.3.14
James Smart [Tue, 8 Jun 2010 22:32:13 +0000 (18:32 -0400)]
[SCSI] lpfc 8.3.14: Update Driver version to 8.3.14

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.14: SCSI and SLI API fixes
James Smart [Tue, 8 Jun 2010 22:31:54 +0000 (18:31 -0400)]
[SCSI] lpfc 8.3.14: SCSI and SLI API fixes

- Fixed accounting of allocated SCSI buffers when post sgl fails.
- Restrict scsi buffer allocation based on LUN count (sdev_cnt).
- Create __lpfc_sli_free_rpi that doesn't take out the hbalock.
- Modify lpfc_sli_free_rpi to call __lpfc_sli_free_rpi.
- Call __lpfc_sli_free_rpi in lpfc_cleanup_pending_mbox.
- Do not swap the strings returned in mailbox commands and do
  not swap byte aligned data in VPD.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.14: FCoE Discovery Fixes
James Smart [Tue, 8 Jun 2010 22:31:37 +0000 (18:31 -0400)]
[SCSI] lpfc 8.3.14: FCoE Discovery Fixes

- Prevent unregistring of unused FCF when FLOGI is pending.
- Prevent point to point discovery on a FCoE HBA.
- Fixed FCF discovery failure after swapping FCoE port by
  switching over to fast failover method when no FCF matches in-use FCF.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.14: PCI fixes and enhancements
James Smart [Tue, 8 Jun 2010 22:31:21 +0000 (18:31 -0400)]
[SCSI] lpfc 8.3.14: PCI fixes and enhancements

- Allow enabling MSI-X intterupts with fewer vectors than requested
  by looking at the return value from pci_enable_msix.
- Implemented driver PCI AER error handling routines for supporting
  AER error recovering on SLI4 devices.
- Remove redundant SLI_ACTIVE checks

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] pmcraid: MSI-X support and other changes
Anil Ravindranath [Tue, 8 Jun 2010 17:56:34 +0000 (10:56 -0700)]
[SCSI] pmcraid: MSI-X support and other changes

1. MSI-X interrupt support
2. Driver changes to support new maxRAID controller FW version. The
   changes are mainly done to handle async notification changes done in
   newer controller FW version.
3. Added state change notifications to notify applications of controller
   states.

Signed-off-by: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.13: Update Driver Version to 8.3.13
James Smart [Mon, 7 Jun 2010 19:24:54 +0000 (15:24 -0400)]
[SCSI] lpfc 8.3.13: Update Driver Version to 8.3.13

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.13: Add TX Queue Support for SLI4 ELS commands.
James Smart [Mon, 7 Jun 2010 19:24:45 +0000 (15:24 -0400)]
[SCSI] lpfc 8.3.13: Add TX Queue Support for SLI4 ELS commands.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.13: Misc fixes
James Smart [Mon, 7 Jun 2010 19:24:29 +0000 (15:24 -0400)]
[SCSI] lpfc 8.3.13: Misc fixes

- Change the Max receive size on CIN FCFs to 0x800
- (From linux community) Check boundary before checking for NULL.
- Update last completion time for completed I/O to prevent heartbeat.
- Add Balius PCI Device IDs

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.13: SCSI specific changes
James Smart [Mon, 7 Jun 2010 19:24:12 +0000 (15:24 -0400)]
[SCSI] lpfc 8.3.13: SCSI specific changes

- Fix hba_queue_depth to reflect actual available XRIs
- Add support for new SLER specific firmware status codes.
- Free SCSI buffer when iotag allocation fails.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.13: Initialization code clean up and fixes.
James Smart [Mon, 7 Jun 2010 19:23:35 +0000 (15:23 -0400)]
[SCSI] lpfc 8.3.13: Initialization code clean up and fixes.

- Add poll or wait flag parameter to hba_init_link and hba_down_link.
- (From Linux Community) Make return with ENXIO negative.
- Remove unused INB code from driver.
- Prevent block_magmt_io from returning until mailbox is inactive.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] lpfc 8.3.13: FC Discovery Fixes and enhancements.
James Smart [Mon, 7 Jun 2010 19:23:17 +0000 (15:23 -0400)]
[SCSI] lpfc 8.3.13: FC Discovery Fixes and enhancements.

- Retry PLOGI up to 48 times when LS_RJT reason is
  "Unable to supply requested data."
- When dev loss timeout occures do not change state if there
  is an outstanding REG_LOGIN.
- Add logic to ignore REG_LOGIN completion if discovery is
  restarted while waiting for REG_LOGIN.
- Only change state on REG_LOGIN completion if still in
  state waiting for REG_LOGIN completion.
- Only send ADISCs to FCP-2 Targets (not Initiators).

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] ipr: add endian swap enablement for 64 bit adapters
Wayne Boyer [Fri, 4 Jun 2010 17:26:50 +0000 (10:26 -0700)]
[SCSI] ipr: add endian swap enablement for 64 bit adapters

A change in the hardware design of the chip for the new adapters changes the
default endianness of MMIO operations.  This patch adds a register definition
which when written to with a predefined value will change the endianness
back to what the driver expects.

This patch also fixes two problems found during testing.

First, the first reserved field in the ipr_hostrcb64_fabirc_desc structure only
reserved one byte.  The correct amount to reserve is 2 bytes.

Second, the reserved field of the ipr_hostrcb64_error structure only reserved
2 bytes.  The correct amount to reserve is 16 bytes.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] dpt_i2o: Use GFP_ATOMIC when a lock is held
Julia Lawall [Sun, 30 May 2010 13:49:22 +0000 (15:49 +0200)]
[SCSI] dpt_i2o: Use GFP_ATOMIC when a lock is held

The function adpt_i2o_post_wait is called from several places, in some of
which, such as adpt_abort, a lock may be held.

The functions adpt_i2o_reparse_lct and adpt_i2o_lct_get are called from
several places, including adpt_rescan where a lock may be held.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@gfp exists@
identifier fn;
position p;
@@

fn(...) {
 ... when != spin_unlock_irqrestore
     when any
 GFP_KERNEL@p
 ... when any
}

@locked@
identifier gfp.fn;
@@

spin_lock_irqsave(...)
...  when != spin_unlock_irqrestore
fn(...)

@depends on locked@
position gfp.p;
@@

- GFP_KERNEL@p
+ GFP_ATOMIC
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Updated version number to 8.03.03-k0.
Giridhar Malavali [Fri, 28 May 2010 22:08:31 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Updated version number to 8.03.03-k0.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: For ISP 23xx, select user specified login timeout value if greater...
Andrew Vasquez [Fri, 28 May 2010 22:08:30 +0000 (15:08 -0700)]
[SCSI] qla2xxx: For ISP 23xx, select user specified login timeout value if greater than minuimum value(4 secs).

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Removed redundant check for ISP 84xx.
Giridhar Malavali [Fri, 28 May 2010 22:08:29 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Removed redundant check for ISP 84xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Enable CRB based doorbell posting for request queue as default for...
Giridhar Malavali [Fri, 28 May 2010 22:08:28 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Enable CRB based doorbell posting for request queue as default for ISP 82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: T10 DIF enablement for 81XX
Arun Easi [Fri, 28 May 2010 22:08:27 +0000 (15:08 -0700)]
[SCSI] qla2xxx: T10 DIF enablement for 81XX

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Fix flash write failure on ISP82xx.
Lalit Chandivade [Fri, 28 May 2010 22:08:26 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Fix flash write failure on ISP82xx.

Driver was not unprotecting correctly, use correct bits
to unprotect the flash on ISP 82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Handle outstanding mbx cmds on hung f/w scenarios.
Santosh Vernekar [Fri, 28 May 2010 22:08:25 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Handle outstanding mbx cmds on hung f/w scenarios.

Outstanding mailbox commands, have no way to recover on f/w hung, and we
timeout on waiting for mbx response. This in turn affects the recovery process
as follows:
- We might already be in dpc while waiting for mbx to complete, so recovery for
that pci function will never get invoked. Reset Timeout (10 sec) is far less
than mbx timeout (30 sec).
- Other mbx cmds will get stuck due to serial mbx access.

Solution is to identify fw-hung scenario and handle outstanding mbx commands to
have an early-exit instead of waiting for response.
Other mbx commands waiting for access will also do an early-exit if fw-hung is
still applicable.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Do not enable VP in non fabric topology.
Lalit Chandivade [Fri, 28 May 2010 22:08:24 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Do not enable VP in non fabric topology.

After topology change ISP is reset and VPs are re-enabled.
If the topology is not fabric, VPs could falsely get enabled.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.
Harish Zunjarrao [Fri, 28 May 2010 22:08:23 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.

Used bootloder address from FLT while loading FW from flash as well.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Make the FC port capability mutual exclusive.
Andrew Vasquez [Fri, 28 May 2010 22:08:22 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Make the FC port capability mutual exclusive.

In case of both target and initiator capabilities reported by fc port,
the fc port port capability is made mutualy exclusive with priority given
for target capabilities.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Add internal loopback support for ISP81xx.
Sarang Radke [Fri, 28 May 2010 22:08:21 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Add internal loopback support for ISP81xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Limit rport-flaps during link-disruptions.
Giridhar Malavali [Fri, 28 May 2010 22:08:20 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Limit rport-flaps during link-disruptions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Correct async-srb issues.
Andrew Vasquez [Fri, 28 May 2010 22:08:19 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Correct async-srb issues.

* hold the hardware_lock throughout the duration of ctx-sp
  timeout handling -- could result in use-after-free oops.

* retry a timed-out login-request.

* done() routines are called with the hardware-lock held, issue
qla2x00_mark_device_lost() with proper 'defer' flag.

* FCP2 capabilities are only relevant to target devices.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Correct use-after-free oops seen during EH-abort.
Giridhar Malavali [Fri, 28 May 2010 22:08:18 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Correct use-after-free oops seen during EH-abort.

Hold a reference to the srb (sp) while aborting an I/O -- as the
I/O can/will complete from within the interrupt-context.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Fix cpu-affinity usage for non-capable ISPs.
Giridhar Malavali [Fri, 28 May 2010 22:08:17 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Fix cpu-affinity usage for non-capable ISPs.

The TMFs used for pre-24xx ISPs incorrectly assumed 'cpu' tag
data could be valid.  These chips have no multi-q/cpu-affinity
support.  This corrects an oops seen on ISP23xx parts.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Add portid to async-request messages.
Andrew Vasquez [Fri, 28 May 2010 22:08:16 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Add portid to async-request messages.

This helps to correlate submission/completion messages during
triaging.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] qla2xxx: Clear drive active CRB register when not in use.
Giridhar Malavali [Fri, 28 May 2010 22:08:15 +0000 (15:08 -0700)]
[SCSI] qla2xxx: Clear drive active CRB register when not in use.

The CRB drive active register is cleared when driver is unloaded
or when driver enters failed state.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: add entry to MAINTAINERS
Stephen M. Cameron [Thu, 27 May 2010 20:14:44 +0000 (15:14 -0500)]
[SCSI] hpsa: add entry to MAINTAINERS

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: fix block fetch table problem.
Stephen M. Cameron [Thu, 27 May 2010 20:14:39 +0000 (15:14 -0500)]
[SCSI] hpsa: fix block fetch table problem.

We have 32 (MAXSGENTRIES) scatter gather elements embedded
in the command.  With all these, the total command size is
about 576 bytes.  However, the last entry in the block fetch table
is 35.  (the block fetch table contains the number of 16-byte chunks
the firmware needs to fetch for a given number of scatter gather
elements.)  35 * 16 = 560 bytes, which isn't enough.  It needs to be
36. (36 * 16 == 576) or, MAXSGENTRIES + 4.  (plus 4 because there's a
bunch of stuff at the front of the command before the first scatter
gather element that takes up 4 * 16 bytes.)  Without this fix, the
controller may have to perform two DMA operations to fetch the
command since the first one may not get the whole thing.

Signed-off-by: Don Brace <brace@beardog.cce.hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: expose controller firmware revision via /sys.
Stephen M. Cameron [Thu, 27 May 2010 20:14:34 +0000 (15:14 -0500)]
[SCSI] hpsa: expose controller firmware revision via /sys.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: Add hpsa.txt to Documentation/scsi
Stephen M. Cameron [Thu, 27 May 2010 20:14:29 +0000 (15:14 -0500)]
[SCSI] hpsa: Add hpsa.txt to Documentation/scsi

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: remove unused firm_ver member of the per-hba structure
Stephen M. Cameron [Thu, 27 May 2010 20:14:24 +0000 (15:14 -0500)]
[SCSI] hpsa: remove unused firm_ver member of the per-hba structure

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_enter_performant_mode
Stephen M. Cameron [Thu, 27 May 2010 20:14:19 +0000 (15:14 -0500)]
[SCSI] hpsa: factor out hpsa_enter_performant_mode

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: remove unused variable trans_offset
Stephen M. Cameron [Thu, 27 May 2010 20:14:13 +0000 (15:14 -0500)]
[SCSI] hpsa: remove unused variable trans_offset

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_wait_for_mode_change_ack
Stephen M. Cameron [Thu, 27 May 2010 20:14:08 +0000 (15:14 -0500)]
[SCSI] hpsa: factor out hpsa_wait_for_mode_change_ack

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: mark hpsa_mark_hpsa_put_ctlr_into_performant_mode as __devinit
Stephen M. Cameron [Thu, 27 May 2010 20:14:03 +0000 (15:14 -0500)]
[SCSI] hpsa: mark hpsa_mark_hpsa_put_ctlr_into_performant_mode as __devinit

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: clean up debug ifdefs
Stephen M. Cameron [Thu, 27 May 2010 20:13:58 +0000 (15:13 -0500)]
[SCSI] hpsa: clean up debug ifdefs

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: check that simple mode is supported
Stephen M. Cameron [Thu, 27 May 2010 20:13:53 +0000 (15:13 -0500)]
[SCSI] hpsa: check that simple mode is supported

before trying to enter simple mode transport method.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_enter_simple_mode
Stephen M. Cameron [Thu, 27 May 2010 20:13:48 +0000 (15:13 -0500)]
[SCSI] hpsa: factor out hpsa_enter_simple_mode

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_p600_dma_prefetch_quirk
Stephen M. Cameron [Thu, 27 May 2010 20:13:43 +0000 (15:13 -0500)]
[SCSI] hpsa: factor out hpsa_p600_dma_prefetch_quirk

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_enable_scsi_prefetch
Stephen M. Cameron [Thu, 27 May 2010 20:13:38 +0000 (15:13 -0500)]
[SCSI] hpsa: factor out hpsa_enable_scsi_prefetch

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa-CISS-signature-present
Stephen M. Cameron [Thu, 27 May 2010 20:13:32 +0000 (15:13 -0500)]
[SCSI] hpsa: factor out hpsa-CISS-signature-present

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: hpsa factor out hpsa_find_board_params
Stephen M. Cameron [Thu, 27 May 2010 20:13:27 +0000 (15:13 -0500)]
[SCSI] hpsa: hpsa factor out hpsa_find_board_params

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: fix leak of ioremapped memory in hpsa_pci_init error path.
Stephen M. Cameron [Thu, 27 May 2010 20:13:22 +0000 (15:13 -0500)]
[SCSI] hpsa: fix leak of ioremapped memory in hpsa_pci_init error path.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_find_cfgtables
Stephen M. Cameron [Thu, 27 May 2010 20:13:17 +0000 (15:13 -0500)]
[SCSI] hpsa: factor out hpsa_find_cfgtables

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_wait_for_board_ready
Stephen M. Cameron [Thu, 27 May 2010 20:13:12 +0000 (15:13 -0500)]
[SCSI] hpsa: factor out hpsa_wait_for_board_ready

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_find_memory_BAR
Stephen M. Cameron [Thu, 27 May 2010 20:13:07 +0000 (15:13 -0500)]
[SCSI] hpsa: factor out hpsa_find_memory_BAR

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: remove redundant board_id parameter from hpsa_interrupt_mode
Stephen M. Cameron [Thu, 27 May 2010 20:13:02 +0000 (15:13 -0500)]
[SCSI] hpsa: remove redundant board_id parameter from hpsa_interrupt_mode

and delete duplicated comment

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_board_disabled
Stephen M. Cameron [Thu, 27 May 2010 20:12:57 +0000 (15:12 -0500)]
[SCSI] hpsa: factor out hpsa_board_disabled

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: factor out hpsa_lookup_board_id
Stephen M. Cameron [Thu, 27 May 2010 20:12:52 +0000 (15:12 -0500)]
[SCSI] hpsa: factor out hpsa_lookup_board_id

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hpsa: save pdev pointer in per hba structure early to avoid passing it around...
Stephen M. Cameron [Thu, 27 May 2010 20:12:46 +0000 (15:12 -0500)]
[SCSI] hpsa: save pdev pointer in per hba structure early to avoid passing it around so much.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] hptiop: Eliminate a NULL pointer dereference
Julia Lawall [Thu, 27 May 2010 12:33:47 +0000 (14:33 +0200)]
[SCSI] hptiop: Eliminate a NULL pointer dereference

The end of the function is reachable both when host is and is not NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
  ... when != if (...) S1 else S2
      when != E = E1
* E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mptsas: fix hangs caused by ATA pass-through
Ryan Kuester [Mon, 26 Apr 2010 23:11:54 +0000 (18:11 -0500)]
[SCSI] mptsas: fix hangs caused by ATA pass-through

I may have an explanation for the LSI 1068 HBA hangs provoked by ATA
pass-through commands, in particular by smartctl.

First, my version of the symptoms.  On an LSI SAS1068E B3 HBA running
01.29.00.00 firmware, with SATA disks, and with smartd running, I'm seeing
occasional task, bus, and host resets, some of which lead to hard faults of
the HBA requiring a reboot.  Abusively looping the smartctl command,

    # while true; do smartctl -a /dev/sdb > /dev/null; done

dramatically increases the frequency of these failures to nearly one per
minute.  A high IO load through the HBA while looping smartctl seems to
improve the chance of a full scsi host reset or a non-recoverable hang.

I reduced what smartctl was doing down to a simple test case which
causes the hang with a single IO when pointed at the sd interface.  See
the code at the bottom of this e-mail.  It uses an SG_IO ioctl to issue
a single pass-through ATA identify device command.  If the buffer
userspace gives for the read data has certain alignments, the task is
issued to the HBA but the HBA fails to respond.  If run against the sg
interface, neither the test code nor smartctl causes a hang.

sd and sg handle the SG_IO ioctl slightly differently.  Unless you
specifically set a flag to do direct IO, sg passes a buffer of its own,
which is page-aligned, to the block layer and later copies the result
into the userspace buffer regardless of its alignment.  sd, on the other
hand, always does direct IO unless the userspace buffer fails an
alignment test at block/blk-map.c line 57, in which case a page-aligned
buffer is created and used for the transfer.

The alignment test currently checks for word-alignment, the default
setup by scsi_lib.c; therefore, userspace buffers of almost any
alignment are given directly to the HBA as DMA targets.  The LSI 1068
hardware doesn't seem to like at least a couple of the alignments which
cross a page boundary (see the test code below).  Curiously, many
page-boundary-crossing alignments do work just fine.

So, either the hardware has an bug handling certain alignments or the
hardware has a stricter alignment requirement than the driver is
advertising.  If stricter alignment is required, then in no case should
misaligned buffers from userspace be allowed through without being
bounced or at least causing an error to be returned.

It seems the mptsas driver could use blk_queue_dma_alignment() to advertise
a stricter alignment requirement.  If it does, sd does the right thing and
bounces misaligned buffers (see block/blk-map.c line 57).  The following
patch to 2.6.34-rc5 makes my symptoms go away.  I'm sure this is the wrong
place for this code, but it gets my idea across.

Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] mpt2sas: DIF Type 2 Protection Support
Eric Moore [Thu, 22 Apr 2010 16:47:40 +0000 (10:47 -0600)]
[SCSI] mpt2sas: DIF Type 2 Protection Support

Adding DIF Type 2 protection support, as well as turning on 32 byte cdb's,
and setting the cdb length for > 16 byte in the SCSI_IO->control parameter.

Signed-off-by: Martin Petersen <martin.petersen@oracle.com>
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] ibmvscsi: Fix oops when an interrupt is pending during probe
Anton Blanchard [Tue, 13 Jul 2010 04:59:29 +0000 (14:59 +1000)]
[SCSI] ibmvscsi: Fix oops when an interrupt is pending during probe

A driver needs to be ready to take an interrupt as soon as it registers
an interrupt handler. I noticed the following oops when testing kdump:

ipr: IBM Power RAID SCSI Device Driver version: 2.5.0 (February 11, 2010)
ibmvscsi 30000002: SRP_VERSION: 16.a
ibmvscsi 30000002: SRP_VERSION: 16.a
Unable to handle kernel paging request for data at address 0x00000000
...
pc: c000000004085e34: .tasklet_action+0xf4/0x1dc
...
c000000004086fe4 .__do_softirq+0x16c/0x2c0
c00000000403138c .call_do_softirq+0x14/0x24
c00000000400ee14 .do_softirq+0xa0/0x104
c00000000408690c .irq_exit+0x70/0xd0
c00000000400f190 .do_IRQ+0x214/0x2a8
c000000004004804 hardware_interrupt_entry+0x1c/0x98
--- Exception: 501 (Hardware Interrupt) at c00000000400c544 .raw_local_irq_restore+0x48/0x54
c00000000465d2a8 ._raw_spin_unlock_irqrestore+0x74/0xa0
c0000000040e7f00 .__setup_irq+0x2ec/0x3f0
c0000000040e8198 .request_threaded_irq+0x194/0x22c
c00000000446d854 .rpavscsi_init_crq_queue+0x284/0x3f0
c00000000446c764 .ibmvscsi_probe+0x688/0x710
c00000000402903c .vio_bus_probe+0x37c/0x3e4
c000000004403f10 .driver_probe_device+0xec/0x1b8
c000000004404088 .__driver_attach+0xac/0xf4
c000000004403184 .bus_for_each_dev+0x98/0x104
c000000004403c98 .driver_attach+0x40/0x60
c0000000044026f0 .bus_add_driver+0x154/0x324
c0000000044045d0 .driver_register+0xe8/0x1ac
c00000000402b2a8 .vio_register_driver+0x54/0x74
c000000004933ea4 .ibmvscsi_module_init+0x80/0xc0
c000000004009834 .do_one_initcall+0x98/0x1d8
c0000000049005b4 .kernel_init+0x27c/0x33c
c000000004031550 .kernel_thread+0x54/0x70

srp_task needs to be setup before request_irq. The patch below fixes the oops.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] zfcp: Update status read mempool
Christof Schmitt [Mon, 21 Jun 2010 08:11:33 +0000 (10:11 +0200)]
[SCSI] zfcp: Update status read mempool

Commit 64deb6efdc5504ce97b5c1c6f281fffbc150bd93 changed the way status
read buffers are handled but forgot to adjust the mempool to the new
size. Add the call to resize the mempool after the exchange config
data. Also use the define instead of the hard coded number in the fsf
callback for consistency.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] zfcp: Do not wait for SBALs on stopped queue
Christof Schmitt [Mon, 21 Jun 2010 08:11:32 +0000 (10:11 +0200)]
[SCSI] zfcp: Do not wait for SBALs on stopped queue

Trying to read the FC host statistics on an offline adapter results in
a 5 seconds wait. Reading the statistics tries to issue an exchange
port data request which first waits up to 5 seconds for an entry in
the request queue.

Change the strategy for getting a free SBAL to exit when the queue is
stopped. Reading the statistics will then fail without the wait.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] zfcp: Fix check whether unchained ct_els is possible
Swen Schillig [Mon, 21 Jun 2010 08:11:31 +0000 (10:11 +0200)]
[SCSI] zfcp: Fix check whether unchained ct_els is possible

A false check was performed whether an unchained ct_els
is possible or not.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years ago[SCSI] ipr: fix resource path display and formatting
Wayne Boyer [Thu, 3 Jun 2010 23:02:21 +0000 (16:02 -0700)]
[SCSI] ipr: fix resource path display and formatting

It was possible to overflow the buffer used to print out the formatted
version of the resource path.  The fix is to limit the number of
bytes that get formatted.

This patch also updates the ipr_show_resource_path function to display the
resource address for devices that are attached to adapters that don't
support resource paths.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
14 years agoLinux 2.6.35-rc3
Linus Torvalds [Sat, 12 Jun 2010 02:14:04 +0000 (19:14 -0700)]
Linux 2.6.35-rc3

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 11 Jun 2010 21:20:03 +0000 (14:20 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  wimax/i2400m: fix missing endian correction read in fw loader
  net8139: fix a race at the end of NAPI
  pktgen: Fix accuracy of inter-packet delay.
  pkt_sched: gen_estimator: add a new lock
  net: deliver skbs on inactive slaves to exact matches
  ipv6: fix ICMP6_MIB_OUTERRORS
  r8169: fix mdio_read and update mdio_write according to hw specs
  gianfar: Revive the driver for eTSEC devices (disable timestamping)
  caif: fix a couple range checks
  phylib: Add support for the LXT973 phy.
  net: Print num_rx_queues imbalance warning only when there are allocated queues

14 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Fri, 11 Jun 2010 21:19:45 +0000 (14:19 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / x86: Save/restore MISC_ENABLE register

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
Linus Torvalds [Fri, 11 Jun 2010 21:18:47 +0000 (14:18 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/btrfs-unstable

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: The file argument for fsync() is never null
  Btrfs: handle ERR_PTR from posix_acl_from_xattr()
  Btrfs: avoid BUG when dropping root and reference in same transaction
  Btrfs: prohibit a operation of changing acl's mask when noacl mount option used
  Btrfs: should add a permission check for setfacl
  Btrfs: btrfs_lookup_dir_item() can return ERR_PTR
  Btrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs
  Btrfs: unwind after btrfs_start_transaction() errors
  Btrfs: btrfs_iget() returns ERR_PTR
  Btrfs: handle kzalloc() failure in open_ctree()
  Btrfs: handle error returns from btrfs_lookup_dir_item()
  Btrfs: Fix BUG_ON for fs converted from extN
  Btrfs: Fix null dereference in relocation.c
  Btrfs: fix remap_file_pages error
  Btrfs: uninitialized data is check_path_shared()
  Btrfs: fix fallocate regression
  Btrfs: fix loop device on top of btrfs

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Fri, 11 Jun 2010 21:15:44 +0000 (14:15 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: clear bridge resource range if BIOS assigned bad one
  PCI: hotplug/cpqphp, fix NULL dereference
  Revert "PCI: create function symlinks in /sys/bus/pci/slots/N/"
  PCI: change resource collision messages from KERN_ERR to KERN_INFO

14 years agoPCI: clear bridge resource range if BIOS assigned bad one
Yinghai Lu [Thu, 3 Jun 2010 20:43:03 +0000 (13:43 -0700)]
PCI: clear bridge resource range if BIOS assigned bad one

Yannick found that video does not work with 2.6.34.  The cause of this
bug was that the BIOS had assigned the wrong range to the PCI bridge
above the video device.  Before 2.6.34 the kernel would have shrunk
the size of the bridge window, but since
  d65245c PCI: don't shrink bridge resources
the kernel will avoid shrinking BIOS ranges.

So zero out the old range if we fail to claim it at boot time; this will
cause us to allocate a new range at startup, restoring the 2.6.34
behavior.

Fixes regression https://bugzilla.kernel.org/show_bug.cgi?id=16009.

Reported-by: Yannick <yannick.roehlly@free.fr>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: hotplug/cpqphp, fix NULL dereference
Jiri Slaby [Wed, 9 Jun 2010 20:31:13 +0000 (22:31 +0200)]
PCI: hotplug/cpqphp, fix NULL dereference

There are devices out there which are PCI Hot-plug controllers with
compaq PCI IDs, but are not bridges, hence have pdev->subordinate
NULL. But cpqphp expects the pointer to be non-NULL.

Add a check to the probe function to avoid oopses like:
BUG: unable to handle kernel NULL pointer dereference at 00000050
IP: [<f82e3c41>] cpqhpc_probe+0x951/0x1120 [cpqphp]
*pdpt = 0000000033779001 *pde = 0000000000000000
...

The device here was:
00:0b.0 PCI Hot-plug controller [0804]: Compaq Computer Corporation PCI Hotplug Controller [0e11:a0f7] (rev 11)
Subsystem: Compaq Computer Corporation Device [0e11:a2f8]

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoRevert "PCI: create function symlinks in /sys/bus/pci/slots/N/"
Jesse Barnes [Fri, 11 Jun 2010 20:08:37 +0000 (13:08 -0700)]
Revert "PCI: create function symlinks in /sys/bus/pci/slots/N/"

This reverts commit 75568f8094eb0333e9c2109b23cbc8b82d318a3c.

Since they're just a convenience anyway, remove these symlinks since
they're causing duplicate filename errors in the wild.

Acked-by: Alex Chiang <achiang@canonical.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: change resource collision messages from KERN_ERR to KERN_INFO
Bjorn Helgaas [Thu, 3 Jun 2010 19:47:18 +0000 (13:47 -0600)]
PCI: change resource collision messages from KERN_ERR to KERN_INFO

We can often deal with PCI resource issues by moving devices around.  In
that case, there's no point in alarming the user with messages like these.
There are many bug reports where the message itself is the only problem,
e.g., https://bugs.launchpad.net/ubuntu/+source/linux/+bug/413419 .

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoBtrfs: The file argument for fsync() is never null
Dan Carpenter [Sat, 29 May 2010 09:49:07 +0000 (09:49 +0000)]
Btrfs: The file argument for fsync() is never null

The "file" argument for fsync is never null so we can remove this check.

What drew my attention here is that 7ea8085910e: "drop unused dentry
argument to ->fsync" introduced an unconditional dereference at the
start of the function and that generated a smatch warning.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: handle ERR_PTR from posix_acl_from_xattr()
Dan Carpenter [Sat, 29 May 2010 09:48:35 +0000 (09:48 +0000)]
Btrfs: handle ERR_PTR from posix_acl_from_xattr()

posix_acl_from_xattr() returns both ERR_PTRs and null, but it's OK to
pass null values to set_cached_acl()

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: avoid BUG when dropping root and reference in same transaction
Sage Weil [Mon, 17 May 2010 17:15:27 +0000 (17:15 +0000)]
Btrfs: avoid BUG when dropping root and reference in same transaction

If btrfs_ioctl_snap_destroy() deletes a snapshot but finishes
with end_transaction(), the cleaner kthread may come in and
drop the root in the same transaction.  If that's the case, the
root's refs still == 1 in the tree when btrfs_del_root() deletes
the item, because commit_fs_roots() hasn't updated it yet (that
happens during the commit).

This wasn't a problem before only because
btrfs_ioctl_snap_destroy() would commit the transaction before dropping
the dentry reference, so the dead root wouldn't get queued up until
after the fs root item was updated in the btree.

Since it is not an error to drop the root reference and the root in the
same transaction, just drop the BUG_ON() in btrfs_del_root().

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: prohibit a operation of changing acl's mask when noacl mount option used
Shi Weihua [Tue, 18 May 2010 00:51:54 +0000 (00:51 +0000)]
Btrfs: prohibit a operation of changing acl's mask when noacl mount option used

when used Posix File System Test Suite(pjd-fstest) to test btrfs,
some cases about setfacl failed when noacl mount option used.
I simplified used commands in pjd-fstest, and the following steps
can reproduce it.
------------------------
# cd btrfs-part/
# mkdir aaa
# setfacl -m m::rw aaa    <- successed, but not expected by pjd-fstest.
------------------------
I checked ext3, a warning message occured, like as:
  setfacl: aaa/: Operation not supported
Certainly, it's expected by pjd-fstest.

So, i compared acl.c of btrfs and ext3. Based on that, a patch created.
Fortunately, it works.

Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: should add a permission check for setfacl
Shi Weihua [Tue, 18 May 2010 00:50:32 +0000 (00:50 +0000)]
Btrfs: should add a permission check for setfacl

On btrfs, do the following
------------------
# su user1
# cd btrfs-part/
# touch aaa
# getfacl aaa
  # file: aaa
  # owner: user1
  # group: user1
  user::rw-
  group::rw-
  other::r--
# su user2
# cd btrfs-part/
# setfacl -m u::rwx aaa
# getfacl aaa
  # file: aaa
  # owner: user1
  # group: user1
  user::rwx           <- successed to setfacl
  group::rw-
  other::r--
------------------
but we should prohibit it that user2 changing user1's acl.
In fact, on ext3 and other fs, a message occurs:
  setfacl: aaa: Operation not permitted

This patch fixed it.
Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: btrfs_lookup_dir_item() can return ERR_PTR
Dan Carpenter [Sat, 29 May 2010 09:47:24 +0000 (09:47 +0000)]
Btrfs: btrfs_lookup_dir_item() can return ERR_PTR

btrfs_lookup_dir_item() can return either ERR_PTRs or null.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs
Dan Carpenter [Sat, 29 May 2010 09:44:10 +0000 (09:44 +0000)]
Btrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs

btrfs_read_fs_root_no_name() returns ERR_PTRs on error so I added a
check for that.  It's not clear to me if it can also return NULL
pointers or not so I left the original NULL pointer check as is.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: unwind after btrfs_start_transaction() errors
Dan Carpenter [Sat, 29 May 2010 09:46:47 +0000 (09:46 +0000)]
Btrfs: unwind after btrfs_start_transaction() errors

This was added by a22285a6a3: "Btrfs: Integrate metadata reservation
with start_transaction".  If we goto out here then we skip all the
unwinding and there are locks still held etc.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: btrfs_iget() returns ERR_PTR
Dan Carpenter [Sat, 29 May 2010 09:42:19 +0000 (09:42 +0000)]
Btrfs: btrfs_iget() returns ERR_PTR

btrfs_iget() returns an ERR_PTR() on failure and not null.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: handle kzalloc() failure in open_ctree()
Dan Carpenter [Sat, 29 May 2010 09:43:07 +0000 (09:43 +0000)]
Btrfs: handle kzalloc() failure in open_ctree()

Unwind and return -ENOMEM if the allocation fails here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: handle error returns from btrfs_lookup_dir_item()
Dan Carpenter [Sat, 29 May 2010 09:40:57 +0000 (09:40 +0000)]
Btrfs: handle error returns from btrfs_lookup_dir_item()

If btrfs_lookup_dir_item() fails, we should can just let the mount fail
with an error.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Fix BUG_ON for fs converted from extN
Yan, Zheng [Mon, 31 May 2010 09:04:46 +0000 (09:04 +0000)]
Btrfs: Fix BUG_ON for fs converted from extN

Tree blocks can live in data block groups in FS converted from extN.
So it's easy to trigger the BUG_ON.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Fix null dereference in relocation.c
Yan, Zheng [Mon, 31 May 2010 08:58:47 +0000 (08:58 +0000)]
Btrfs: Fix null dereference in relocation.c

Fix a potential null dereference in relocation.c

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoMerge branch 'wimax-2.6.35.y' of git://git.kernel.org/pub/scm/linux/kernel/git/inaky...
David S. Miller [Fri, 11 Jun 2010 19:38:23 +0000 (12:38 -0700)]
Merge branch 'wimax-2.6.35.y' of git://git./linux/kernel/git/inaky/wimax

14 years agowimax/i2400m: fix missing endian correction read in fw loader
Inaky Perez-Gonzalez [Fri, 11 Jun 2010 18:51:20 +0000 (11:51 -0700)]
wimax/i2400m: fix missing endian correction read in fw loader

i2400m_fw_hdr_check() was accessing hardware field
bcf_hdr->module_type (little endian 32) without converting to host
byte sex.

Reported-by: Данилин Михаил <mdanilin@nsg.net.ru>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>