aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] fnic: Allow multicast and unicast address registrations for fnicVenkata Siva Vijayendra Bhamidipati2010-02-172-1/+3
| | | | | | | | | | | | | To enable FIP support in fnic, we have to register with hardware to receive FIP solication frames on a well-known multicast address. Before FIP support, the firmware interface allowed multicast address registrations only for enic devices. This is a minor change in fnic to allow the firmware interface to now register mcast addresses for fnic too. Signed-off-by: Brian Uchino <buchino@cisco.com> Signed-off-by: Herman Lee <hermlee@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] fcoe: Only rmmod fcoe.ko if there are no active connectionsRobert Love2010-02-171-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we're gracefully tearing down each active connection when fcoe.ko is removed. We shouldn't allow the user to destroy connections by removing the module. We should force the user to destroy each connection and then the module can be removed. This patch makes it so a refrerence count on the module is taken each time a fcoe_interface is created. The reference count is dropped when the fcoe_interface is destroyed. This makes it so that module_exit() doesn't get called unless all fcoe_interfaces have been destroyed. This patch leaves the removal of interfaces in the module_exit routine so that if the user does a 'rmmod -f' we'll clean everything up before removing the module. The module_put line was put before the out_putdev goto line because we should only be decrementing the reference count if a fcoe_interface is actually destroyed. If we can't find the netdev or the fcoe_interface then it's assumed that something else has destroyed the fcoe_interface and it would have decremented the reference count at that time. Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfcoe: Send port LKA every FIP_VN_KA_PERIOD secs.Bhanu Prakash Gollapudi2010-02-171-1/+1
| | | | | | | | | | | | | libfcoe module doesnt send port keep alive every FIP_VN_KA_PERIOD due to improper assignment of timeout value. Update the port_ka_time appropriately by incrementing it by FIP_VN_KA_PERIOD in fcoe_ctlr_timeout(), so that the link_work is scheduled to send the port LKA. Signed-off-by: Bhanu 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>
* [SCSI] libfc: Don't assume response request present.Hugh Daschbach2010-02-171-1/+2
| | | | | | | | | | | Fix NULL pointer dereference crash occurs in fc_lport_bsg_request() for bsg requests that do not contain a response request. Specifically, FC_BSG_HST_ADD_RPORT and FC_BSG_HST_DEL_RPORT bsg requests are not guaranteed to include a response request. Signed-off-by: Hugh Daschbach <hdasch@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libfc: Fix e_d_tov ns -> ms scaling factor in PLOGI response.Hugh Daschbach2010-02-171-1/+1
| | | | | | | | | | | | Both PLOGI and RTV response processing conditionally scale e_d_tov, but use different scaling factors. The scaling factor is correct in RTV response processing. Bring PLOGI e_d_tov scaling in line with RTV common service parameter inspection. Signed-off-by: Hugh Daschbach <hdasch@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>
* [SCSI] libfc: call ddp setup for only FCP reads to avoid accessing junk fsp ↵Vasu Dev2010-02-172-4/+1
| | | | | | | | | | | | | | | | | | | | pointer Adds check to call fc_fcp_ddp_setup for only FCP read cmds to avoid accessing junk fsp pointer at least in ESX since non FCP frame had junk fsp value, though fsp is implicitly initialized to null by __alloc_skb but with this patch no more relying on fsp initialized to null value and hitting junk fsp ptr access. Removes fsp pointer checking in fc_fcp_ddp_setup as this is not needed any more since its only caller for FCP read will always have a valid fsp. Reported by: Frank Zhang <frank_1.zhang@intel.com> Reported by: Rob Love <robert.w.love@intel.com> Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.9: Update Driver version to 8.3.9James Smart2010-02-171-1/+1
| | | | | Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.9: Fix locking and memory issuesJames Smart2010-02-174-17/+32
| | | | | | | | | - Use the hbalock when changing the fc_flag. - Use the host_lock when changeing the sli_flag. - Prevent NULL pointer dereference after dma_alloc_coherent failure. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.9: Changes to sysfs interface for the lpfc driver.James Smart2010-02-174-33/+183
| | | | | | | | | | - Convert all sysfs parameters to uint instead of int. - Add lpfc_supress_link_up parameter. - Change link_state to writable sysfs parameter. - Add support to be able to "up" or "down" link from link_state parameter. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.9: SLI enhancments to support new hardware.James Smart2010-02-177-100/+451
| | | | | | | | | | | - Add support for the INTF (Interface) PCI register. - Add support for greater than 2 page SGLs. - Add support for up to 32 bit BDE lengths. - Implement the Port Capabilities Mailbox command. - Stop checking the Minor Code in the EQE structure. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.9: Discovery changes to the lpfc driver.James Smart2010-02-178-289/+821
| | | | | | | | - Add init_vpi mailbox command before re-registering VPI. - Add Fast FCF failover support. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] lpfc 8.3.9: PCI Changes to lpfc driverJames Smart2010-02-172-12/+32
| | | | | | | | | - Call pci_save_state() after pci_restore_state() call to cope with kernel change. - Add support for PCI BAR region 0 if BAR0 is a 64 bit register. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] be2iscsi: Adding support for BE3Jayamohan Kallickal2010-02-174-6/+35
| | | | | | | This patch contains changes to support the BE3 chip Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla4xxx: fix compile warning due to invalid extHwConfigMike Christie2010-02-171-8/+6
| | | | | | | | | | | If the nvram is invalid qla4xxx tries to set Asuint32_t based on the card type. If the card type is not listed then Asuint32_t is going to be gargabe. This just fixes that if/elseif by adding a else to catch the case for new hardware that might not be listed yet. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] iscsi_tcp: wake xmit thread when killing sessionMike Christie2010-02-171-1/+7
| | | | | | | | | | If the connection is bad, then the xmit thread could end up waiting a long time (up to sendtmeo seconds) in tcp_sendpage. This patch has us set the sk_error and wake up the xmit thread so we can quickly fail. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bnx2i: set change_queue_depth functionMike Christie2010-02-171-0/+1
| | | | | | | | | No reason that we cannot set the change_queue_depth function for bnx2i. We just forgot to when the driver was created. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] libiscsi: reset cmd timer if cmds are making progressMike Christie2010-02-171-4/+49
| | | | | | | | | | | | | | | | | | | | | | This patch resets the cmd timer if cmds started before the timedout command are making progress. The idea is that the cmd probably timed out because we are trying to exeucte too many commands. If it turns out that the device the IO timedout on was bad or the cmd just got screwed up but other IO/devs were ok then we will will figure this out when the cmds ahead of the timed out one complete ok. This also fixes a bug where we were sort of detecting this by setting the last_timeout and last_xfer to the same value when the task was allocated. That caught the case where we never got to send any IO for it. However, if the problem had started right before we started the new task, then we were forced to wait an extra cmd timeout seconds to start the scsi eh. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] cxgb3i: check for setup netdevMike Christie2010-02-171-0/+12
| | | | | | | | | | | | | If the netdev has not been setup when the host is, we will oops when the iscsi layer calls into the driver and a it tries to reference the netdev in hba->ndev. This can happen if the iscsi driver is loaded before ifup is done. This patch just adds a check, so we can gracefully fail the operation. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] cxgb3i, bnx2i: remove uses of nipquad use %pi4Joe Perches2010-02-173-8/+8
| | | | | | | | | Remove uses of NIPQUAD, use %pI4 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: update driver version to 2.0.1-3Stephen M. Cameron2010-02-171-1/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Reorder compat ioctl functions to eliminate some forward ↵Stephen M. Cameron2010-02-171-34/+30
| | | | | | | declarations. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: eliminate lock_kernel in compat_ioctlStephen M. Cameron2010-02-171-13/+3
| | | | | | | | The use of the big kernel lock here appears to be ancient cruft that is no longer needed. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix bug in adjust_hpsa_scsi_tableStephen M. Cameron2010-02-171-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix bug in adjust_hpsa_scsi_table which caused devices which have changed size, etc. to do the wrong thing. The problem was as follows: The driver maintains its current idea of what devices are present in the h->dev[] array. When it updates this array, it scans the hardware, and produces a new list of devices, call it sd[], for scsi devices. Then, it compares each item in h->dev[] vs. sd[], and any items which are not present sd it removes from h->dev[], and any items present in sd[], but different, it modifies in h->dev[]. Then, it looks for items in sd[] which are not present in h->dev[], and adds those items into h->dev[]. All the while, it keeps track of what items were added and removed to/from h->dev[]. Finally, it updates the SCSI mid-layer by removing and adding the same devices it removed and added to/from h->dev[]. (modified devices count as a remove then add.) originally, when a "changed" device was discovered, it was removed then added to h->dev[]. The item was added to the *end* of h->dev[]. And, the item was removed from sd[] as well (nulled out). As it processed h->dev[], these newly added items at the end of the list were encountered, and sd[] was searched, but those items were nulled out. So they ended up getting removed immediately after they were added. The solution is to have a way to replace items in the h->dev[] array instead of doing a remove + add. Then the "changed" items. are not encountered a second time, and removed. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Fix hpsa_find_scsi_entry so that it doesn't try to dereference ↵Stephen M. Cameron2010-02-171-0/+2
| | | | | | | NULL pointers Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: clarify obscure comment in adjust_hpsa_scsi_tableStephen M. Cameron2010-02-171-1/+5
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: print all the bytes of the CDB, not just the first one.Mike Miller2010-02-171-1/+5
| | | | | | Signed-off-by: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: when resetting devices, print out which deviceStephen M. Cameron2010-02-171-2/+2
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: use scan_start and scan_finished entry points for scanningStephen M. Cameron2010-02-172-3/+55
| | | | | | | | | use scan_start and scan_finished entry points for scanning and route the CCISS_REGNEWD ioctl and sysfs triggering of same functionality through hpsa_scan_start. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Add an shost_to_hba helper function.Stephen M. Cameron2010-02-171-2/+7
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Don't return DID_NO_CONNECT when a device is merely not readyMatt Gates2010-02-171-1/+0
| | | | | | Signed-off-by: Matt Gates <matthew.gates@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Retry commands completing with a sense key of ABORTED_COMMANDMatt Gates2010-02-171-2/+9
| | | | | | Signed-off-by: Matt Gates <matthew.gates@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Return DID_RESET for commands which complete with status of ↵Matt Gates2010-02-171-1/+1
| | | | | | | | | | | UNSOLICITED ABORT The commands should be retried, and this will make that happen, instead of resulting in an i/o error. Signed-off-by: Matt Gates <matthew.gates@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Fix p1210m LUN assignment.Stephen M. Cameron2010-02-172-20/+98
| | | | | | | | | | The p1210m responsds to SCSI report LUNs, unlike traditional Smart Array controllers. This means that the bus, target, and lun assignments done by the driver cannot be arbitrary, but must match what SCSI REPORT LUNS returns. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: add pci ids for storageworks 1210m, remove p400, p800, p700mMike Miller2010-02-171-6/+5
| | | | | | | | and update pci_ids.h to include new PCI ID for StorageWorks 1210m variant. Signed-off-by: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Allow multiple command completions per interrupt.Don Brace2010-02-173-66/+404
| | | | | | | | | | | | | This is done by adding support for the so-called "performant mode" (that's really what they called it). Smart Array controllers have a mode which enables multiple command completions to be delivered with a single interrupt, "performant" mode. We want to use that mode, as some newer controllers will be requiring this mode. Signed-off-by: Don Brace <brace@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: interrupt pending function should return bool not unsigned longStephen M. Cameron2010-02-172-6/+4
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix some debug printks to use dev_dbg insteadStephen M. Cameron2010-02-171-9/+4
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: make tag macros into functionsStephen M. Cameron2010-02-172-7/+22
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: eliminate unnecessary memcpysStephen M. Cameron2010-02-171-8/+3
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: remove unwanted debug codeStephen M. Cameron2010-02-171-6/+0
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: use kzalloc not kmalloc plus memsetStephen M. Cameron2010-02-171-3/+2
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: use sizeof() not an inline constant in memset.Stephen M. Cameron2010-02-171-3/+2
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: return proper error codes not minus one.Stephen M. Cameron2010-02-171-15/+22
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: remove superfluous returns from void functions.Stephen M. Cameron2010-02-171-4/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: make adjust_hpsa_scsi_table return void.Stephen M. Cameron2010-02-171-2/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Use BUG_ON instead of an if statement.Stephen M. Cameron2010-02-171-2/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: avoid unwanted promotion from unsigned to signed for raid level ↵Stephen M. Cameron2010-02-171-2/+2
| | | | | | | index Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Use kernel integer types, not userland onesStephen M. Cameron2010-02-173-120/+120
| | | | | | | That is, use u64, u32, u16 and u8 rather than __u64, __u32, __u16 and __u8. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix typo in commentsStephen M. Cameron2010-02-171-1/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] qla2xxx: negative error return in qla2x00_change_queue_depth()Roel Kluin2010-02-171-1/+1
| | | | | | | | The *change_queue_depth functions usually return a negative error return. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>