aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-02-19[SCSI] qla2xxx: Change the log message when previous dump is available to ↵Giridhar Malavali
retrieve for ISP82xx. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Log messages to use correct vha.Arun Easi
Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Add new message when a new loopid is assigned.Arun Easi
Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Fix ql_dbg arguments.Arun Easi
Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Use ql_log* #define's in ql_log() and ql_log_pci().Chad Dupuis
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Convert remaining printk's to ql_log format.Chad Dupuis
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Print mailbox command opcode and return code when a command ↵Chad Dupuis
times out. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Reduce mbx-command timeout for Login/Logout requests.Andrew Vasquez
Don't use default 30 second mailbox-command timeout for these serial requests, instead, limit the TMO to the standard 2*RATOV plus some fudge-factor. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Prep zero-length BSG data-transfer requests.Andrew Vasquez
During command failure/non-recognition, the upper-layer FC-transport expects the drivers to set job-reply->reply_payload_rcv_len. Do this in a consistent manner to avoid duplication. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Perform implicit logout during rport tear-down.Andrew Vasquez
During rport tear-down, make sure we do an implicit LOGO of the fcport in our firmware to try to clear any residual commands associated with that fcport. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Handle failure cases during fabric_loginChad Dupuis
Make sure that all calls to ha->isp_ops->fabric_login() check the return value for failure. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Increase speed of flash access in ISP82xx adapters to ↵Chad Dupuis
improve firmware load speed. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Return blank sysfs string on initial get thermal failure.Joe Carnuccio
When thermal temperature initially fails, return a blank string to the sysfs interface. This fixes the initial display of 0.00 followed by subsequent display of blank line; the initial 0.00 should have not displayed for cards that do not support thermal temperature. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Handle change notifications based on switch scan results.Arun Easi
Instead of processing each RSCN individually, use only the name server results from the switch to tell the existance of a given fcport. Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Correct print format for edc ql_log() calls.Joe Carnuccio
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Use consistent DL mask for ELS/CT passthru requests.Andrew Vasquez
The driver is logging a slew of 'good' status requests for ELS/CT passthrough commands. Change some log messages from: * ql_log() -> ql_dbg() * ql_log_info -> ql_dbg_user Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Consolidation of SRB processing.Giridhar Malavali
Rework the structures related to SRB processing to minimize the memory allocations per I/O and manage resources associated with and completions from common routines. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Use a valid enode-mac if none defined.Andrew Vasquez
Original 'defaults' were not OUI valid. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Enhancements to support ISP83xx.Giridhar Malavali
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com> Signed-off-by: Nigel Kirkland <nigel.kirkland@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] qla2xxx: Enhanced the dump routines to capture multiple request and ↵Giridhar Malavali
response queues. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllersMahesh Rajashekhara
Added Sync. mode to support Series 7/8/9 controller families: This is a compatibility mode for all these controller families. The Async. (Performance) mode can be changed in the future. First Async. mode version added for Series 7; Controller parameter aac_sync_mode added Signed-off-by: Mahesh Rajashekhara <aacraid@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2i: Fixed the override of the error_mask module paramEddie Wai
The error_mask module param overrides has a bug which prevented the new module param values to take effect. Also changed the type attribute of the error_mask1/2 module params from int to uint to allow the MSB to be set. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Acked-by: Anil Veerabhadrappa <anilgv@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2i: use kthread_create_on_node()Eric Dumazet
bnx2i_percpu_thread_create() create per cpu kthread, and should use proper NUMA aware API. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bfa: don't leak mem in bfad_im_bsg_els_ct_request()Jesper Juhl
If 'drv_fcxp = kzalloc(sizeof(struct bfad_fcxp), GFP_KERNEL);' fails and returns NULL, then we'll leak the memory allocated to 'bsg_fcpt' when we jump to 'out:' and the variable subsequently goes out of scope. Also remove the cast of the kzalloc() return value. kzalloc() returns a void* which is implicitly converted, so the explicit cast is pointless. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] isci: enable clock gatingMarcin Tomczak
Enabling clock gating for power savings on entry to controller ready state. Disable SCU clock gating for power savings on exit from the controller ready state. The gating is fully automated by silicon after setting the mode. Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] libiscsi: fix cmd timeout/completion raceMike Christie
If the driver/lib has called scsi_done and cleaned up internally but scsi layer has not yet called blk_mark_rq_complete when the command times out we hit a problem if the timeout code calls blk_mark_rq_complete first. When the time out code calls into the driver we were returning BLK_EH_RESET_TIMER and that causes the timeout code to just call us again later. We need to be calling BLK_EH_HANDLED so the timeout code can complete the completion process because it had called blk_mark_rq_complete on the command and now owns its processing. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] libiscsi_tcp: fix max_r2t manipulationMike Christie
Problem description from Xi Wang: A large max_r2t could lead to integer overflow in subsequent call to iscsi_tcp_r2tpool_alloc(), allocating a smaller buffer than expected and leading to out-of-bounds write. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] iscsi: fix setting of pid from netlink skbMike Christie
NETLINK_CREDS's pid now returns 0, so I guess we are supposed to be using NETLINK_CB. This changed while the patch to export the pid was getting merged upstream, so it was not noticed until both the network and iscsi changes were in the same tree. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: stable@kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] iscsi: don't hang in endless loop if no targets presentSasha Levin
iscsi_if_send_reply() may return -ESRCH if there were no targets to send data to. Currently we're ignoring this value and looping in attempt to do it over and over, which will usually lead in a hung task like this one: [ 4920.817298] INFO: task trinity:9074 blocked for more than 120 seconds. [ 4920.818527] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 4920.819982] trinity D 0000000000000000 5504 9074 2756 0x00000004 [ 4920.825374] ffff880003961a98 0000000000000086 ffff8800001aa000 ffff8800001aa000 [ 4920.826791] 00000000001d4340 ffff880003961fd8 ffff880003960000 00000000001d4340 [ 4920.828241] 00000000001d4340 00000000001d4340 ffff880003961fd8 00000000001d4340 [ 4920.833231] [ 4920.833519] Call Trace: [ 4920.834010] [<ffffffff826363fa>] schedule+0x3a/0x50 [ 4920.834953] [<ffffffff82634ac9>] __mutex_lock_common+0x209/0x5b0 [ 4920.836226] [<ffffffff81af805d>] ? iscsi_if_rx+0x2d/0x990 [ 4920.837281] [<ffffffff81053943>] ? sched_clock+0x13/0x20 [ 4920.838305] [<ffffffff81af805d>] ? iscsi_if_rx+0x2d/0x990 [ 4920.839336] [<ffffffff82634eb0>] mutex_lock_nested+0x40/0x50 [ 4920.840423] [<ffffffff81af805d>] iscsi_if_rx+0x2d/0x990 [ 4920.841434] [<ffffffff810dffed>] ? sub_preempt_count+0x9d/0xd0 [ 4920.842548] [<ffffffff82637bb0>] ? _raw_read_unlock+0x30/0x60 [ 4920.843666] [<ffffffff821f71de>] netlink_unicast+0x1ae/0x1f0 [ 4920.844751] [<ffffffff821f7997>] netlink_sendmsg+0x227/0x350 [ 4920.845850] [<ffffffff821857bd>] ? sock_update_netprioidx+0xdd/0x1b0 [ 4920.847060] [<ffffffff82185732>] ? sock_update_netprioidx+0x52/0x1b0 [ 4920.848276] [<ffffffff8217f226>] sock_aio_write+0x166/0x180 [ 4920.849348] [<ffffffff810dfe41>] ? get_parent_ip+0x11/0x50 [ 4920.850428] [<ffffffff811d0d9a>] do_sync_write+0xda/0x120 [ 4920.851465] [<ffffffff810dffed>] ? sub_preempt_count+0x9d/0xd0 [ 4920.852579] [<ffffffff810dfe41>] ? get_parent_ip+0x11/0x50 [ 4920.853608] [<ffffffff81791887>] ? security_file_permission+0x27/0xb0 [ 4920.854821] [<ffffffff811d0f4c>] vfs_write+0x16c/0x180 [ 4920.855781] [<ffffffff811d104f>] sys_write+0x4f/0xa0 [ 4920.856798] [<ffffffff82638e79>] system_call_fastpath+0x16/0x1b [ 4920.877487] 1 lock held by trinity/9074: [ 4920.878239] #0: (rx_queue_mutex){+.+...}, at: [<ffffffff81af805d>] iscsi_if_rx+0x2d/0x990 [ 4920.880005] Kernel panic - not syncing: hung_task: blocked tasks Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Acked-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] fix the new host byte settings (DID_TARGET_FAILURE and DID_NEXUS_FAILURE)Moger, Babu
This patch fixes the host byte settings DID_TARGET_FAILURE and DID_NEXUS_FAILURE. The function __scsi_error_from_host_byte, tries to reset the host byte to DID_OK. But that does not happen because of the OR operation. Here is the flow. scsi_softirq_done-> scsi_decide_disposition -> __scsi_error_from_host_byte Let's take an example with DID_NEXUS_FAILURE. In scsi_decide_disposition, result will be set as DID_NEXUS_FAILURE (=0x11). Then in __scsi_error_from_host_byte, when we do OR with DID_OK. Purpose is to reset it back to DID_OK. But that does not happen. This patch fixes this issue. Signed-off-by: Babu Moger <babu.moger@netapp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2fc: Bumped version to 1.0.10Bhanu Prakash Gollapudi
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2fc: NPIV ports go offline when interface is brought down & upBhanu Prakash Gollapudi
When there are 255 NPIV ports, and the interface is brought down & up, both physical and NPIV ports are logged off and never logged back in. Since discovery happens on single CPU, XID resources on that CPU will be limited, which when exhausted the discovery fails. Increase the XID resource range to ensure that the discovery completes successfully. Also ensure that fc_exch_mgr_alloc() doesn't fail on the system that has lower number of CPUs. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2fc: Handle LOGO flooding from the targetBhanu Prakash Gollapudi
Host drops sessions when flood of unsolicited LOGOs are received from the target. Because of unsufficient PLOGI retries, upon exceeding the retry count of 3, the target sessions are dropped. Increased the retry count to 255 to allow sufficient retries in this scenario. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] bnx2fc: fix panic in bnx2fc_post_io_reqBhanu Prakash Gollapudi
System panics while accessing stale pointer - timer_work_queue - in the IO path before bnx2fc_stop is called. Fix is to destroy the workqueue after the destroy operation is complete. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] fcoe: Allow exposing FDMI attributes via sysfsNeerav Parikh
Allow FDMI attributes to be exposed via the fc_host class object for the fcoe driver. Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] fcoe: Add support for FDMI in fcoeNeerav Parikh
This adds support for updating the FC-GS FDMI attributes in the fcoe driver. Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] libfc: Add support for FDMINeerav Parikh
This patch adds support for Fabric Device Management Interface as per FC-GS-4 spec. in libfc. Any driver making use of libfc can enable fdmi state machine for a given lport. If lport has enabled FDMI support the lport state machine will transition into FDMI after completing the DNS states and before entering the SCR state. The FDMI state transition is such that if there is an error, it won't stop the lport state machine from transitioning and the it will behave as if there was no FDMI support. The FDMI HBA attributes are registed with the Management server via Register HBA (RHBA) command and the port attributes are reigstered using the Register Port(RPA) command. Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] libfc: Make the libfc Common Transport(CT) code genericNeerav Parikh
Currently the libfc Common Transport(CT) calls assume that the CT requests are Name Server specific only. This patch makes it more flexible to allow more FC-GS services to make use of these routines. Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] scsi_transport_fc: Add FDMI host attributesNeerav Parikh
This adds FC-GS Fabric Device Management Interface (FDMI) related attributes to fc_host_attr structure. This is in preparation for allowing FDMI attributes to be registered via libfc. Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: use find_first_zero_bitAkinobu Mita
Use find_first_zero_bit to find the first cleared bit in a memory region. This also includes the following minor changes. - Use bitmap_zero - Reduce unnecessary atomic bitops usage Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] scsi_debug: GET LBA STATUS response length correctionDouglas Gilbert
The SCSI GET LBA STATUS command was introduced in SBC-3 revision 20 in September 2009. At that time the Parameter Data Length field in the response had an associated byte offset of 8. Then in SBC-3 revision 25 (October 2010) that byte offset was changed to 4. The sg_get_lba_status utility in sg3_utils version 1.33 (released earlier today) has been changed to calculate the newer response length. However the implementation of GET LBA STATUS command in the scsi_debug driver still uses the original byte offset. modify the Parameter Data Length field value in the GET LBA STATUS command response to comply with the change in SBC-3 revision 25 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: update device attributes when they changeScott Teel
Certain types of changes to devices should not be interpreted as a device change that would cause the device to be removed and re-added. These include RAID level and Firmware revision changes. However, these attribute changes DO need to be reflected in the controller info structure's dev structure list, so that sysfs and /proc info files for the devices will reflect the new values. Signed-off-by: Scott Teel <scott.stacy.teel@hp.com> Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: improve naming on external target device functionsScott Teel
Reduce confusion and inaccuracy caused by dated naming of vars and functions referring to external target devices. CURRENT NAMING: PROPOSED NAMING: "MSA2xxx devices" "external target devices" msa2xxx_model ext_target_model is_msa2xxx is_ext_target add_msa2xxx_enclosure add_ext_target_dev nmsa2xxx_enclosures n_ext_target_devs Signed-off-by: Scott Teel <scott.teel@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: eliminate 8 external target limitationScott Teel
Driver limits SAS external target IDs to range 1-8. Need to increase limit and clean up overlapping concepts of targets and paths in the code. There are several defined constants that control this: HPSA_MAX_TARGETS_PER_CTLR 16 MAX_MSA2XXX_ENCLOSURES 32 HPSA_MAX_PATHS 8 We can condense this to one constant: MAX_EXT_TARGETS 32 SAS switches allow for 8 connections, and there is capacity for 4 switches per enclosure in largest blade enclosure type. Signed-off-by: Scott Teel <scott.teel@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: refactor hpsa_figure_bus_target_lunStephen M. Cameron
It should call hpsa_set_bus_target_lun rather than individually setting bus, target and lun. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: make target and lun match what SCSI REPORT LUNs returnsStephen M. Cameron
Some distros have a "rescan-scsi-bus.sh" script which depends on SCSI REPORT LUNs not reporting something different than what the driver tells the kernel, even if the driver uses scan_start and scan_finished methods of the SCSI host template to override the usual SCSI midlayer discovery code. Previously, 1 was added to the LUN to make room to insert the RAID controller device at LUN 0. Now, the RAID controller is moved to bus 3, and 1 is no longer added to the LUN. However, SCSI REPORT LUNS on Smart Array doesn't report physical devices like tape drives or auto-loaders as it turns out, so those particular device types still won't match. Generally the logical drives are reported first however, so at least those should match. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: Fix problem with MSA2xxx devicesStephen M. Cameron
Upgraded firmware on Smart Array P7xx (and some others) made them show up as SCSI revision 5 devices and this caused the driver to fail to map MSA2xxx logical drives to the correct bus/target/lun. A symptom of this would be that the target ID of the logical drives as presented by the external storage array is ignored, and all such logical drives are assigned to target zero, differentiated only by LUN. Some multipath software reportedly does not deal well with this behavior, failing to recognize different paths to the same device as such. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Scott Teel <scott.teel@hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: factor out driver nameStephen M. Cameron
Sometimes, for testing purposes (e.g. testing rmmod on a system that normally boots using hpsa) it's nice to rename the driver and split it into two drivers and restrict it to certain controllers. This makes that easier. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: combine hpsa_scsi_detect and hpsa_register_scsiStephen M. Cameron
hpsa_register_scsi just calls hpsa_scsi_detect. Move the guts of hpsa_scsi_detect into hpsa_register_scsi and get rid of hpsa_scsi_detect. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] hpsa: removed unneeded structure member max_sg_entries and fix badly ↵Stephen M. Cameron
named constant MAXSGENTRIES We had both h->max_sg_entries and h->maxsgentries in the per controller structure which is terribly confusing. max_sg_entries was really just a constant, 32, which defines how big the "block fetch table" is, which is as large as the max number of SG elements embedded within a command (excluding SG elements in chain blocks). MAXSGENTRIES was the constant used to denote the max number of SG elements embedded within a command, also a poor name. So renamed MAXSGENTREIS to SG_ENTRIES_IN_CMD, and removed h->max_sg_entries and replaced it with SG_ENTRIES_IN_CMD. h->maxsgentries is unchanged, and is the maximum number of sg elements the controller will support in a command, including those in chain blocks, minus 1 for the chain block pointer.. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>