Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"This is a set of five fixes: Two MAINTAINER email updates (urgent
because the non-avagotech emails will start bouncing) an lpfc big
endian oops fix, a 256 byte sector hang fix (to eliminate 256 byte
sectors) and a storvsc fix which could cause test unit ready failures
on bringup"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
MAINTAINERS: Revise lpfc maintainers for Avago Technologies ownership of Emulex
MAINTAINERS, be2iscsi: change email domain
sd: Disable support for 256 byte/sector disks
lpfc: Fix breakage on big endian kernels
storvsc: Set the SRB flags correctly when no data transfer is needed

+8 -5
MAINTAINERS
··· 3825 3825 L: linux-embedded@vger.kernel.org 3826 3826 S: Maintained 3827 3827 3828 - EMULEX LPFC FC SCSI DRIVER 3829 - M: James Smart <james.smart@emulex.com> 3828 + EMULEX/AVAGO LPFC FC/FCOE SCSI DRIVER 3829 + M: James Smart <james.smart@avagotech.com> 3830 + M: Dick Kennedy <dick.kennedy@avagotech.com> 3830 3831 L: linux-scsi@vger.kernel.org 3831 - W: http://sourceforge.net/projects/lpfcxxxx 3832 + W: http://www.avagotech.com 3832 3833 S: Supported 3833 3834 F: drivers/scsi/lpfc/ 3834 3835 ··· 8830 8829 F: include/uapi/linux/phantom.h 8831 8830 8832 8831 SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER 8833 - M: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> 8832 + M: Jayamohan Kallickal <jayamohan.kallickal@avagotech.com> 8833 + M: Minh Tran <minh.tran@avagotech.com> 8834 + M: John Soni Jose <sony.john-n@avagotech.com> 8834 8835 L: linux-scsi@vger.kernel.org 8835 - W: http://www.emulex.com 8836 + W: http://www.avagotech.com 8836 8837 S: Supported 8837 8838 F: drivers/scsi/be2iscsi/ 8838 8839
+3 -3
drivers/scsi/be2iscsi/be.h
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 10 * Contact Information: 11 - * linux-drivers@emulex.com 11 + * linux-drivers@avagotech.com 12 12 * 13 - * Emulex 13 + * Avago Technologies 14 14 * 3333 Susan Street 15 15 * Costa Mesa, CA 92626 16 16 */
+3 -3
drivers/scsi/be2iscsi/be_cmds.c
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 10 * Contact Information: 11 - * linux-drivers@emulex.com 11 + * linux-drivers@avagotech.com 12 12 * 13 - * Emulex 13 + * Avago Technologies 14 14 * 3333 Susan Street 15 15 * Costa Mesa, CA 92626 16 16 */
+3 -3
drivers/scsi/be2iscsi/be_cmds.h
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 10 * Contact Information: 11 - * linux-drivers@emulex.com 11 + * linux-drivers@avagotech.com 12 12 * 13 - * Emulex 13 + * Avago Technologies 14 14 * 3333 Susan Street 15 15 * Costa Mesa, CA 92626 16 16 */
+4 -4
drivers/scsi/be2iscsi/be_iscsi.c
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 7 7 * as published by the Free Software Foundation. The full GNU General 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 - * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com) 10 + * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com) 11 11 * 12 12 * Contact Information: 13 - * linux-drivers@emulex.com 13 + * linux-drivers@avagotech.com 14 14 * 15 - * Emulex 15 + * Avago Technologies 16 16 * 3333 Susan Street 17 17 * Costa Mesa, CA 92626 18 18 */
+4 -4
drivers/scsi/be2iscsi/be_iscsi.h
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 7 7 * as published by the Free Software Foundation. The full GNU General 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 - * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com) 10 + * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com) 11 11 * 12 12 * Contact Information: 13 - * linux-drivers@emulex.com 13 + * linux-drivers@avagotech.com 14 14 * 15 - * Emulex 15 + * Avago Technologies 16 16 * 3333 Susan Street 17 17 * Costa Mesa, CA 92626 18 18 */
+6 -6
drivers/scsi/be2iscsi/be_main.c
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 7 7 * as published by the Free Software Foundation. The full GNU General 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 - * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com) 10 + * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com) 11 11 * 12 12 * Contact Information: 13 - * linux-drivers@emulex.com 13 + * linux-drivers@avagotech.com 14 14 * 15 - * Emulex 15 + * Avago Technologies 16 16 * 3333 Susan Street 17 17 * Costa Mesa, CA 92626 18 18 */ ··· 50 50 51 51 MODULE_DESCRIPTION(DRV_DESC " " BUILD_STR); 52 52 MODULE_VERSION(BUILD_STR); 53 - MODULE_AUTHOR("Emulex Corporation"); 53 + MODULE_AUTHOR("Avago Technologies"); 54 54 MODULE_LICENSE("GPL"); 55 55 module_param(be_iopoll_budget, int, 0); 56 56 module_param(enable_msix, int, 0); ··· 552 552 553 553 static struct scsi_host_template beiscsi_sht = { 554 554 .module = THIS_MODULE, 555 - .name = "Emulex 10Gbe open-iscsi Initiator Driver", 555 + .name = "Avago Technologies 10Gbe open-iscsi Initiator Driver", 556 556 .proc_name = DRV_NAME, 557 557 .queuecommand = iscsi_queuecommand, 558 558 .change_queue_depth = scsi_change_queue_depth,
+5 -5
drivers/scsi/be2iscsi/be_main.h
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 7 7 * as published by the Free Software Foundation. The full GNU General 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 - * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com) 10 + * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com) 11 11 * 12 12 * Contact Information: 13 - * linux-drivers@emulex.com 13 + * linux-drivers@avagotech.com 14 14 * 15 - * Emulex 15 + * Avago Technologies 16 16 * 3333 Susan Street 17 17 * Costa Mesa, CA 92626 18 18 */ ··· 37 37 38 38 #define DRV_NAME "be2iscsi" 39 39 #define BUILD_STR "10.4.114.0" 40 - #define BE_NAME "Emulex OneConnect" \ 40 + #define BE_NAME "Avago Technologies OneConnect" \ 41 41 "Open-iSCSI Driver version" BUILD_STR 42 42 #define DRV_DESC BE_NAME " " "Driver" 43 43
+4 -4
drivers/scsi/be2iscsi/be_mgmt.c
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 7 7 * as published by the Free Software Foundation. The full GNU General 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 - * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com) 10 + * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com) 11 11 * 12 12 * Contact Information: 13 - * linux-drivers@emulex.com 13 + * linux-drivers@avagotech.com 14 14 * 15 - * Emulex 15 + * Avago Technologies 16 16 * 3333 Susan Street 17 17 * Costa Mesa, CA 92626 18 18 */
+4 -4
drivers/scsi/be2iscsi/be_mgmt.h
··· 1 1 /** 2 - * Copyright (C) 2005 - 2014 Emulex 2 + * Copyright (C) 2005 - 2015 Avago Technologies 3 3 * All rights reserved. 4 4 * 5 5 * This program is free software; you can redistribute it and/or ··· 7 7 * as published by the Free Software Foundation. The full GNU General 8 8 * Public License is included in this distribution in the file called COPYING. 9 9 * 10 - * Written by: Jayamohan Kallickal (jayamohan.kallickal@emulex.com) 10 + * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com) 11 11 * 12 12 * Contact Information: 13 - * linux-drivers@emulex.com 13 + * linux-drivers@avagotech.com 14 14 * 15 - * Emulex 15 + * Avago Technologies 16 16 * 3333 Susan Street 17 17 * Costa Mesa, CA 92626 18 18 */
+21 -20
drivers/scsi/lpfc/lpfc_scsi.c
··· 1130 1130 } 1131 1131 1132 1132 /** 1133 - * lpfc_fcpcmd_to_iocb - copy the fcp_cmd data into the IOCB 1134 - * @data: A pointer to the immediate command data portion of the IOCB. 1135 - * @fcp_cmnd: The FCP Command that is provided by the SCSI layer. 1136 - * 1137 - * The routine copies the entire FCP command from @fcp_cmnd to @data while 1138 - * byte swapping the data to big endian format for transmission on the wire. 1139 - **/ 1140 - static void 1141 - lpfc_fcpcmd_to_iocb(uint8_t *data, struct fcp_cmnd *fcp_cmnd) 1142 - { 1143 - int i, j; 1144 - 1145 - for (i = 0, j = 0; i < sizeof(struct fcp_cmnd); 1146 - i += sizeof(uint32_t), j++) { 1147 - ((uint32_t *)data)[j] = cpu_to_be32(((uint32_t *)fcp_cmnd)[j]); 1148 - } 1149 - } 1150 - 1151 - /** 1152 1133 * lpfc_scsi_prep_dma_buf_s3 - DMA mapping for scsi buffer to SLI3 IF spec 1153 1134 * @phba: The Hba for which this call is being executed. 1154 1135 * @lpfc_cmd: The scsi buffer which is going to be mapped. ··· 1264 1283 * we need to set word 4 of IOCB here 1265 1284 */ 1266 1285 iocb_cmd->un.fcpi.fcpi_parm = scsi_bufflen(scsi_cmnd); 1267 - lpfc_fcpcmd_to_iocb(iocb_cmd->unsli3.fcp_ext.icd, fcp_cmnd); 1268 1286 return 0; 1269 1287 } 1270 1288 ··· 4127 4147 } 4128 4148 4129 4149 /** 4150 + * lpfc_fcpcmd_to_iocb - copy the fcp_cmd data into the IOCB 4151 + * @data: A pointer to the immediate command data portion of the IOCB. 4152 + * @fcp_cmnd: The FCP Command that is provided by the SCSI layer. 4153 + * 4154 + * The routine copies the entire FCP command from @fcp_cmnd to @data while 4155 + * byte swapping the data to big endian format for transmission on the wire. 4156 + **/ 4157 + static void 4158 + lpfc_fcpcmd_to_iocb(uint8_t *data, struct fcp_cmnd *fcp_cmnd) 4159 + { 4160 + int i, j; 4161 + for (i = 0, j = 0; i < sizeof(struct fcp_cmnd); 4162 + i += sizeof(uint32_t), j++) { 4163 + ((uint32_t *)data)[j] = cpu_to_be32(((uint32_t *)fcp_cmnd)[j]); 4164 + } 4165 + } 4166 + 4167 + /** 4130 4168 * lpfc_scsi_prep_cmnd - Wrapper func for convert scsi cmnd to FCP info unit 4131 4169 * @vport: The virtual port for which this call is being executed. 4132 4170 * @lpfc_cmd: The scsi command which needs to send. ··· 4223 4225 fcp_cmnd->fcpCntl3 = 0; 4224 4226 phba->fc4ControlRequests++; 4225 4227 } 4228 + if (phba->sli_rev == 3 && 4229 + !(phba->sli3_options & LPFC_SLI3_BG_ENABLED)) 4230 + lpfc_fcpcmd_to_iocb(iocb_cmd->unsli3.fcp_ext.icd, fcp_cmnd); 4226 4231 /* 4227 4232 * Finish initializing those IOCB fields that are independent 4228 4233 * of the scsi_cmnd request_buffer
+5 -14
drivers/scsi/sd.c
··· 1600 1600 { 1601 1601 u64 start_lba = blk_rq_pos(scmd->request); 1602 1602 u64 end_lba = blk_rq_pos(scmd->request) + (scsi_bufflen(scmd) / 512); 1603 + u64 factor = scmd->device->sector_size / 512; 1603 1604 u64 bad_lba; 1604 1605 int info_valid; 1605 1606 /* ··· 1622 1621 if (scsi_bufflen(scmd) <= scmd->device->sector_size) 1623 1622 return 0; 1624 1623 1625 - if (scmd->device->sector_size < 512) { 1626 - /* only legitimate sector_size here is 256 */ 1627 - start_lba <<= 1; 1628 - end_lba <<= 1; 1629 - } else { 1630 - /* be careful ... don't want any overflows */ 1631 - unsigned int factor = scmd->device->sector_size / 512; 1632 - do_div(start_lba, factor); 1633 - do_div(end_lba, factor); 1634 - } 1624 + /* be careful ... don't want any overflows */ 1625 + do_div(start_lba, factor); 1626 + do_div(end_lba, factor); 1635 1627 1636 1628 /* The bad lba was reported incorrectly, we have no idea where 1637 1629 * the error is. ··· 2182 2188 if (sector_size != 512 && 2183 2189 sector_size != 1024 && 2184 2190 sector_size != 2048 && 2185 - sector_size != 4096 && 2186 - sector_size != 256) { 2191 + sector_size != 4096) { 2187 2192 sd_printk(KERN_NOTICE, sdkp, "Unsupported sector size %d.\n", 2188 2193 sector_size); 2189 2194 /* ··· 2237 2244 sdkp->capacity <<= 2; 2238 2245 else if (sector_size == 1024) 2239 2246 sdkp->capacity <<= 1; 2240 - else if (sector_size == 256) 2241 - sdkp->capacity >>= 1; 2242 2247 2243 2248 blk_queue_physical_block_size(sdp->request_queue, 2244 2249 sdkp->physical_block_size);
+1 -2
drivers/scsi/storvsc_drv.c
··· 1600 1600 break; 1601 1601 default: 1602 1602 vm_srb->data_in = UNKNOWN_TYPE; 1603 - vm_srb->win8_extension.srb_flags |= (SRB_FLAGS_DATA_IN | 1604 - SRB_FLAGS_DATA_OUT); 1603 + vm_srb->win8_extension.srb_flags |= SRB_FLAGS_NO_DATA_TRANSFER; 1605 1604 break; 1606 1605 } 1607 1606