aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-02-17[SCSI] hpsa: fix bug in adjust_hpsa_scsi_tableStephen M. Cameron1-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>
2010-02-17[SCSI] hpsa: Fix hpsa_find_scsi_entry so that it doesn't try to dereference NULL pointersStephen M. Cameron1-0/+2
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: clarify obscure comment in adjust_hpsa_scsi_tableStephen M. Cameron1-1/+5
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: print all the bytes of the CDB, not just the first one.Mike Miller1-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>
2010-02-17[SCSI] hpsa: when resetting devices, print out which deviceStephen M. Cameron1-2/+2
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: use scan_start and scan_finished entry points for scanningStephen M. Cameron2-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>
2010-02-17[SCSI] hpsa: Add an shost_to_hba helper function.Stephen M. Cameron1-2/+7
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: Don't return DID_NO_CONNECT when a device is merely not readyMatt Gates1-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>
2010-02-17[SCSI] hpsa: Retry commands completing with a sense key of ABORTED_COMMANDMatt Gates1-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>
2010-02-17[SCSI] hpsa: Return DID_RESET for commands which complete with status of UNSOLICITED ABORTMatt Gates1-1/+1
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>
2010-02-17[SCSI] hpsa: Fix p1210m LUN assignment.Stephen M. Cameron2-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>
2010-02-17[SCSI] hpsa: add pci ids for storageworks 1210m, remove p400, p800, p700mMike Miller1-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>
2010-02-17[SCSI] hpsa: Allow multiple command completions per interrupt.Don Brace3-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>
2010-02-17[SCSI] hpsa: interrupt pending function should return bool not unsigned longStephen M. Cameron2-6/+4
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: fix some debug printks to use dev_dbg insteadStephen M. Cameron1-9/+4
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: make tag macros into functionsStephen M. Cameron2-7/+22
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: eliminate unnecessary memcpysStephen M. Cameron1-8/+3
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: remove unwanted debug codeStephen M. Cameron1-6/+0
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: use kzalloc not kmalloc plus memsetStephen M. Cameron1-3/+2
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: use sizeof() not an inline constant in memset.Stephen M. Cameron1-3/+2
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: return proper error codes not minus one.Stephen M. Cameron1-15/+22
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: remove superfluous returns from void functions.Stephen M. Cameron1-4/+1
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: make adjust_hpsa_scsi_table return void.Stephen M. Cameron1-2/+1
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: Use BUG_ON instead of an if statement.Stephen M. Cameron1-2/+1
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: avoid unwanted promotion from unsigned to signed for raid level indexStephen M. Cameron1-2/+2
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] hpsa: Use kernel integer types, not userland onesStephen M. Cameron3-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>
2010-02-17[SCSI] hpsa: fix typo in commentsStephen M. Cameron1-1/+1
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] qla2xxx: negative error return in qla2x00_change_queue_depth()Roel Kluin1-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>
2010-02-17[SCSI] megaraid_sas: version and documentation updateYang, Bo2-4/+4
Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] megaraid_sas: driver fixed the device update issueYang, Bo1-0/+142
driver fixed the device update issue after get the AEN PD delete/ADD and LD add/delete from FW. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] megaraid_sas: add the logical drive list to driverYang, Bo2-0/+125
Driver issue the get ld list to fw to get the logic drive list. Driver will keep the logic drive list for the internal use after driver load. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] megaraid_sas: Zero pad_0 in mfi structureYang, Bo1-0/+7
Add the pad_0 in mfi frame structure to 0 to fix the context value larger than 32bit value issue. Signed-off-by Bo Yang<bo.yang@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-17[SCSI] fcoe: Only rmmod fcoe.ko if there are no active connectionsRob Love1-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>
2010-02-17[SCSI] libfcoe: Send port LKA every FIP_VN_KA_PERIOD secs.Bhanu Prakash Gollapudi1-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>
2010-02-17[SCSI] libfc: Don't assume response request present.Hugh Daschbach1-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>
2010-02-17[SCSI] libfc: Fix e_d_tov ns -> ms scaling factor in PLOGI response.Hugh Daschbach1-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>
2010-02-17[SCSI] libfc: call ddp setup for only FCP reads to avoid accessing junk fsp pointerVasu Dev2-4/+1
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>
2010-02-17[SCSI] iscsi_tcp regression: remove bogus warn on in write pathMike Christie1-5/+3
An empty r2tqueue is a valid state. It just means that we have processed all that there was to do. This patch removes the WARN_ON that was added when the kfifo changes were merged. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: Update Driver version to 8.3.8James Smart1-2/+2
Update Driver version to 8.3.8 Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: (BSG4) Add new vendor specific BSG CommandsJames Smart1-14/+1569
Add the following new vendor specific BSG commands. - Add LPFC_BSG_VENDOR_GET_MGMT_REV command - Add LPFC_BSG_VENDOR_MBOX command - Add LPFC_BSG_VENDOR_DIAG_MODE command - Add LPFC_BSG_VENDOR_DIAG_TEST command Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: (BSG3) Modify BSG commands to operate asynchronouslyJames Smart1-271/+592
Modify the following BSG commands to operate asynchronously. - FC_BSG_RPT_ELS - FC_BSG_RPT_CT - LPFC_BSG_VENDOR_GET_CT_EVENT - LPFC_BSG_VENDOR_SET_CT_EVENT Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: (BSG2) Create lpfc_bsg.hJames Smart1-0/+98
Create lpfc_bsg.h - structures, etc used by bsg-related routines. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: (BSG1) Update BSG infrastructureJames Smart7-54/+47
Update BSG infrastructure to handle new vendor specific BSG commands. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: Add code to display logical link speedJames Smart4-0/+13
Display Logical Link Speed when supported and is non-zero. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: BugFixes: Discovery relates changesJames Smart8-18/+265
Discovery relates changes: - Separated VPI_REGISTERED state of physical port into VFI_REGISTERED and VPI_REGISTERED state so that driver can unregister physical port VPI independent of VFI. - Add code to unregister, re-init and re-register physical port VPI when physical port NportID change. - Add code to unregister and re-register VPI of a vport when its Nport ID change. - Add code in FDISC completion path to re-start FLOGI discovery when a FDISC complete with LOGIN_REQUIRED reason code. - Fix a memory leak in lpfc_init_vpi_cmpl - Add code to start a timer for vport to retry FDISC when CVL is received by a vport or physical port. If all Nports receive CVLs, then all timers are cancelled and a logical link level discovery will be started after one second. - Flush ELS commands after killing all delayed ELS commands. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] lpfc 8.3.8: BugFixes: SLI relates changesJames Smart8-87/+170
Fix hardware/SLI relates issues: - Handle XB bit so that ELS XRIs are not prematurely released. - Handle XB bit so that FCP XRIs are not prematurely released. - Define new security SLI Commands. - Remove unused security SLI commands - Skip receive data size parameter check on received FLOGI. - Added LPFC_USE_FCPWQIDX flag to iocb to force SLI layer to submit abort WQE on same WQ as the command WQE. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] qla1280: Drop host_lock while requesting firmwareBen Hutchings1-0/+4
request_firmware() may sleep and it appears to be safe to release the spinlock here. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@kernel.org Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] be2iscsi: correction in the claculation for num_cxn_wrbJayamohan Kallickal1-7/+6
This patch correct the math done for num_cxn_wrb Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] be2iscsi: changing the chip opcode for TEXTJayamohan Kallickal1-2/+1
This patch corrects the chipopcode for text and chooses correct paramters for that command Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] be2iscsi: Ensure clean reuse of wrbJayamohan Kallickal1-6/+17
This patch ensures that wrb is cleanly resued for io path and is memset to zero for non io path Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>